From patchwork Wed Mar 25 15:25:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 11458083 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3DB56139A for ; Wed, 25 Mar 2020 15:26:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D6CC20409 for ; Wed, 25 Mar 2020 15:26:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D6CC20409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH7v8-00036A-9U for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 Mar 2020 11:26:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43148) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH7uW-0001v6-WD for qemu-devel@nongnu.org; Wed, 25 Mar 2020 11:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jH7uV-0006xB-LU for qemu-devel@nongnu.org; Wed, 25 Mar 2020 11:25:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:16714) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jH7uV-0006uF-CH for qemu-devel@nongnu.org; Wed, 25 Mar 2020 11:25:39 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02PF4FUL127322 for ; Wed, 25 Mar 2020 11:25:30 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ywbtj3vxw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Mar 2020 11:25:30 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Mar 2020 15:25:27 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 25 Mar 2020 15:25:25 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02PFPPWm54067208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Mar 2020 15:25:25 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 34D4511C058; Wed, 25 Mar 2020 15:25:25 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF2DE11C05C; Wed, 25 Mar 2020 15:25:24 +0000 (GMT) Received: from bahia.lan (unknown [9.145.41.106]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 25 Mar 2020 15:25:24 +0000 (GMT) Subject: [PATCH 0/4] spapr: Get rid of CAS reboot flag From: Greg Kurz To: David Gibson Date: Wed, 25 Mar 2020 16:25:24 +0100 User-Agent: StGit/unknown-version MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 20032515-0028-0000-0000-000003EB4A9A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20032515-0029-0000-0000-000024B0B8F1 Message-Id: <158514992409.478799.6718223069768660390.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-25_07:2020-03-24, 2020-03-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 phishscore=0 impostorscore=0 priorityscore=1501 spamscore=0 bulkscore=0 mlxlogscore=544 lowpriorityscore=0 clxscore=1034 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003250121 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, =?utf-8?q?C?= =?utf-8?q?=C3=A9dric?= Le Goater , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The CAS reboot flag was introduced in QEMU 2.10 to allow the guest to be presented a new boot-time device tree after CAS negotiation. CAS-generated resets rely on qemu_system_reset_request() which has the particularity of dropping the main loop lock at some point. This opens a window where migration can happen, hence promotting the CAS reboot flag to actual state that we should also migrate. In practice, this can't happen anymore since we have eliminated the scenario of the XICS/XIVE switch and the much less frequent scenario of device plug/unplug before CAS. We still have much of the CAS reboot bits around though. The full FDT rendering we do at CAS is enough to get rid of them once and far all. Some preliminary cleanup is made before going for the full removal, for easier reviewing. At some point I had the need to move some code around in CAS, and Alexey's patch from the "spapr: kill SLOF" (v8) series proved to be helpful so I've reused it in this patchset. This series applies cleanly on both ppc-for-5.0 and ppc-for-5.1. Since it doesn't fix any actual bug, I think this can be delayed to 5.1. --- Greg --- Alexey Kardashevskiy (1): spapr/cas: Separate CAS handling from rebuilding the FDT Greg Kurz (3): spapr: Don't check capabilities removed between CAS calls spapr: Simplify selection of radix/hash during CAS spapr: Drop CAS reboot flag hw/ppc/spapr.c | 20 ++------- hw/ppc/spapr_hcall.c | 108 +++++++++++++++++++++++------------------------- include/hw/ppc/spapr.h | 8 +++- 3 files changed, 63 insertions(+), 73 deletions(-)