From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516354980251867.5230017678298; Fri, 19 Jan 2018 01:43:00 -0800 (PST) Received: from localhost ([::1]:38357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTCF-00036o-Mt for importer@patchew.org; Fri, 19 Jan 2018 04:42:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTA9-0001ix-8r for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTA6-0008Uk-5z for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:41 -0500 Received: from ozlabs.org ([103.22.144.67]:55503) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTA5-0008TV-8W for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:38 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5f20Xlz9s4q; Fri, 19 Jan 2018 20:40:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354822; bh=FqF3U1xajrS8BBIhXzpf35w9Xf+7G/CK7uMMstDA/IU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nie5RBydB9rMOnts40kMkjHItsZ7Xtv4LeyYzbtQP8Wa2WrP7U6haExtCcdg7QhM/ U7NU/cXu9Ndy8O2h2f1FjnyFdi+zM27V9MvWA1iEjCQ7tn5W3A+qAfaZ000axwpZ7Q u5woyf+B1fFrom8moTQIaPwqKAcKZYXFHrcGHwHs= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:03 +1100 Message-Id: <20180119094015.28266-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 01/13] default-configs/ppc64-softmmu: Include 32-bit configs instead of copying them X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, Thomas Huth , surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth qemu-softmmu-ppc64 is supposed to be a superset of qemu-softmmu-ppc. However, instead of simply including the 32-bit config file, we've duplicated all CONFIG_xxx settings there instead. This way, we've missed some CONFIG switches in ppc64-softmmu.mak which were only added to the 32-bit config file (e.g. CONFIG_SUNGEM). Let's fix this problem by including the 32-bit config file into the 64-bit config file instead of duplicating all the CONFIG switches there. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- default-configs/ppc64-softmmu.mak | 61 +++++------------------------------= ---- 1 file changed, 8 insertions(+), 53 deletions(-) diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-soft= mmu.mak index d1b3a6dd50..b94af6c7c6 100644 --- a/default-configs/ppc64-softmmu.mak +++ b/default-configs/ppc64-softmmu.mak @@ -1,64 +1,19 @@ # Default configuration for ppc64-softmmu =20 -include pci.mak -include sound.mak -include usb.mak -CONFIG_PPC4XX=3Dy -CONFIG_VIRTIO_VGA=3Dy -CONFIG_ESCC=3Dy -CONFIG_M48T59=3Dy +# Include all 32-bit boards +include ppc-softmmu.mak + +# For PowerNV +CONFIG_POWERNV=3Dy CONFIG_IPMI=3Dy CONFIG_IPMI_LOCAL=3Dy CONFIG_IPMI_EXTERN=3Dy CONFIG_ISA_IPMI_BT=3Dy -CONFIG_SERIAL=3Dy -CONFIG_PARALLEL=3Dy -CONFIG_I8254=3Dy -CONFIG_PCKBD=3Dy -CONFIG_FDC=3Dy -CONFIG_I8257=3Dy -CONFIG_I82374=3Dy -CONFIG_OPENPIC=3Dy -CONFIG_PREP_PCI=3Dy -CONFIG_I82378=3Dy -CONFIG_PC87312=3Dy -CONFIG_MACIO=3Dy -CONFIG_PCSPK=3Dy -CONFIG_CUDA=3Dy -CONFIG_ADB=3Dy -CONFIG_MAC_NVRAM=3Dy -CONFIG_MAC_DBDMA=3Dy -CONFIG_HEATHROW_PIC=3Dy -CONFIG_GRACKLE_PCI=3Dy -CONFIG_UNIN_PCI=3Dy -CONFIG_DEC_PCI=3Dy -CONFIG_PPCE500_PCI=3Dy -CONFIG_IDE_ISA=3Dy -CONFIG_IDE_CMD646=3Dy -CONFIG_IDE_MACIO=3Dy -CONFIG_NE2000_ISA=3Dy -CONFIG_PFLASH_CFI01=3Dy -CONFIG_PFLASH_CFI02=3Dy -CONFIG_PTIMER=3Dy -CONFIG_I8259=3Dy -CONFIG_XILINX=3Dy -CONFIG_XILINX_ETHLITE=3Dy -CONFIG_PSERIES=3Dy -CONFIG_POWERNV=3Dy -CONFIG_PREP=3Dy -CONFIG_MAC=3Dy -CONFIG_E500=3Dy -CONFIG_OPENPIC_KVM=3D$(call land,$(CONFIG_E500),$(CONFIG_KVM)) -CONFIG_PLATFORM_BUS=3Dy -CONFIG_ETSEC=3Dy -CONFIG_SM501=3Dy + # For pSeries +CONFIG_PSERIES=3Dy +CONFIG_VIRTIO_VGA=3Dy CONFIG_XICS=3D$(CONFIG_PSERIES) CONFIG_XICS_SPAPR=3D$(CONFIG_PSERIES) CONFIG_XICS_KVM=3D$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM)) -# For PReP -CONFIG_SERIAL_ISA=3Dy -CONFIG_MC146818RTC=3Dy -CONFIG_ISA_TESTDEV=3Dy CONFIG_MEM_HOTPLUG=3Dy -CONFIG_RS6000_MC=3Dy --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151635512106581.3380220236545; Fri, 19 Jan 2018 01:45:21 -0800 (PST) Received: from localhost ([::1]:38414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTEe-0005Zq-5m for importer@patchew.org; Fri, 19 Jan 2018 04:45:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTA9-0001iz-8s for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTA6-0008Ul-62 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:41 -0500 Received: from ozlabs.org ([103.22.144.67]:60147) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTA5-0008TT-8k for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:38 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5f5gzxz9sBW; Fri, 19 Jan 2018 20:40:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354822; bh=suHoNOwG6qzzjBrDnFcD6m8Ox7G2s2m6Mt7SUK1IoKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N/7m0fR/WpwGrxIugiTmVBaKxjQGaTsDICi3O+puxifmqvED2hT6QUDuKHW6kmKDH t+ogYHd4rZiLEuk2iNrxr3EbNvV2ESqSL6m7RITJjnifF4WV43Acfgynx5hJImNf92 4TSTz90LB6zUd5VKRPH+ozIdI7s1LfDAnR3fSeAM= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:04 +1100 Message-Id: <20180119094015.28266-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 02/13] default-configs/ppc-softmmu: Restructure the switches according to the machines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, Thomas Huth , surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Order the CONFIG switches in ppc-softmmu.mak according to the machine classes where they are used (embedded, Mac or PReP), so that it is easier for the users to disable a set of switches completely if they are not needed. Also add the missing CONFIG_IDE_SII3112 switch to the embedded section which was previously only added to ppcemb-softmmu.mak. And while we're at it, also remove the CONFIG_IDE_CMD646 switch since this controller does not seem to be used by any ppc machine in QEMU. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- default-configs/ppc-softmmu.mak | 59 ++++++++++++++++++++++---------------= ---- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.= mak index bb225c6e46..3baed6a8fd 100644 --- a/default-configs/ppc-softmmu.mak +++ b/default-configs/ppc-softmmu.mak @@ -3,52 +3,57 @@ include pci.mak include sound.mak include usb.mak + +# For embedded PPCs: CONFIG_PPC4XX=3Dy -CONFIG_ESCC=3Dy CONFIG_M48T59=3Dy CONFIG_SERIAL=3Dy -CONFIG_PARALLEL=3Dy -CONFIG_I8254=3Dy -CONFIG_PCKBD=3Dy -CONFIG_FDC=3Dy CONFIG_I8257=3Dy -CONFIG_I82374=3Dy CONFIG_OPENPIC=3Dy -CONFIG_PREP_PCI=3Dy -CONFIG_I82378=3Dy -CONFIG_PC87312=3Dy -CONFIG_MACIO=3Dy -CONFIG_SUNGEM=3Dy -CONFIG_PCSPK=3Dy -CONFIG_CS4231A=3Dy -CONFIG_CUDA=3Dy -CONFIG_ADB=3Dy -CONFIG_MAC_NVRAM=3Dy -CONFIG_MAC_DBDMA=3Dy -CONFIG_HEATHROW_PIC=3Dy -CONFIG_GRACKLE_PCI=3Dy -CONFIG_UNIN_PCI=3Dy -CONFIG_DEC_PCI=3Dy CONFIG_PPCE500_PCI=3Dy -CONFIG_IDE_ISA=3Dy -CONFIG_IDE_CMD646=3Dy -CONFIG_IDE_MACIO=3Dy -CONFIG_NE2000_ISA=3Dy CONFIG_PFLASH_CFI01=3Dy CONFIG_PFLASH_CFI02=3Dy CONFIG_PTIMER=3Dy CONFIG_I8259=3Dy CONFIG_XILINX=3Dy CONFIG_XILINX_ETHLITE=3Dy -CONFIG_PREP=3Dy -CONFIG_MAC=3Dy CONFIG_E500=3Dy CONFIG_OPENPIC_KVM=3D$(call land,$(CONFIG_E500),$(CONFIG_KVM)) CONFIG_PLATFORM_BUS=3Dy CONFIG_ETSEC=3Dy CONFIG_SM501=3Dy +CONFIG_IDE_SII3112=3Dy + +# For Macs +CONFIG_MAC=3Dy +CONFIG_ESCC=3Dy +CONFIG_MACIO=3Dy +CONFIG_SUNGEM=3Dy +CONFIG_CUDA=3Dy +CONFIG_ADB=3Dy +CONFIG_MAC_NVRAM=3Dy +CONFIG_MAC_DBDMA=3Dy +CONFIG_HEATHROW_PIC=3Dy +CONFIG_GRACKLE_PCI=3Dy +CONFIG_UNIN_PCI=3Dy +CONFIG_DEC_PCI=3Dy +CONFIG_IDE_MACIO=3Dy + # For PReP +CONFIG_PREP=3Dy +CONFIG_PREP_PCI=3Dy CONFIG_SERIAL_ISA=3Dy CONFIG_MC146818RTC=3Dy CONFIG_ISA_TESTDEV=3Dy CONFIG_RS6000_MC=3Dy +CONFIG_PARALLEL=3Dy +CONFIG_I82374=3Dy +CONFIG_I82378=3Dy +CONFIG_I8254=3Dy +CONFIG_PCKBD=3Dy +CONFIG_FDC=3Dy +CONFIG_NE2000_ISA=3Dy +CONFIG_PC87312=3Dy +CONFIG_PCSPK=3Dy +CONFIG_IDE_ISA=3Dy +CONFIG_CS4231A=3Dy --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355412728640.6847850268671; Fri, 19 Jan 2018 01:50:12 -0800 (PST) Received: from localhost ([::1]:38577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTJD-0000tA-VV for importer@patchew.org; Fri, 19 Jan 2018 04:50:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAc-00029x-Ib for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAZ-0000t1-GY for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:10 -0500 Received: from ozlabs.org ([103.22.144.67]:48175) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAZ-0000sE-4Z for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:07 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5f4Xx7z9s7h; Fri, 19 Jan 2018 20:40:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354822; bh=1ogcuL93TPvZIxVK/6Pww/LmNEey/qTWIWV9WcOJ/44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iAdgQCW8jWHuco5N7spdyQudlWNV91xV1K0v2v6YIl/pVz0HTQDMsqqtq9646tl4M N+wWQsGXB16Sy+mLhveMUHkgGV3gEsKCpuUHiXsYPktwKZSgZwLr63n6CXzyNJb2gH ILP0/31sH2Z/qbGMprHLOdRd39zprq5kCVP2g54E= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:05 +1100 Message-Id: <20180119094015.28266-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 03/13] hw/ppc/Makefile: Add a way to disable the PPC4xx boards X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, Thomas Huth , surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth We've got the config switch CONFIG_PPC4XX, so we should use it in the Makefile accordingly and only include the PPC4xx boards if this switch has been enabled. (Note: Unfortunately, the files ppc4xx_devs.c and ppc405_uc.c still have to be included in the build anyway to fulfil some complicated linker dependencies ... so these are subject to a more thourough clean-up later) Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/Makefile.objs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs index 1faff853b7..ad1928c5d8 100644 --- a/hw/ppc/Makefile.objs +++ b/hw/ppc/Makefile.objs @@ -12,8 +12,8 @@ obj-y +=3D spapr_pci_vfio.o endif obj-$(CONFIG_PSERIES) +=3D spapr_rtas_ddw.o # PowerPC 4xx boards -obj-y +=3D ppc405_boards.o ppc4xx_devs.o ppc405_uc.o ppc440_bamboo.o -obj-y +=3D ppc4xx_pci.o +obj-y +=3D ppc4xx_devs.o ppc405_uc.o +obj-$(CONFIG_PPC4XX) +=3D ppc4xx_pci.o ppc405_boards.o ppc440_bamboo.o # PReP obj-$(CONFIG_PREP) +=3D prep.o obj-$(CONFIG_PREP) +=3D prep_systemio.o --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355121994813.5634389224292; Fri, 19 Jan 2018 01:45:21 -0800 (PST) Received: from localhost ([::1]:38415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTEf-0005bm-8f for importer@patchew.org; Fri, 19 Jan 2018 04:45:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTA9-0001j9-Nu for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTA8-00005w-Nd for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:41 -0500 Received: from ozlabs.org ([103.22.144.67]:33343) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTA8-0008Uy-Cd for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:40 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5g1QnDz9sNw; Fri, 19 Jan 2018 20:40:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354823; bh=R30oOaNiZ5OOie+5R45a3zvj139BNuitLAO7WhaLVao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=exZuzmdBMWdeU5t8BN8+gmLGzhSGd/GAyQJ8kMqCrb3tLECyNDCu8QlWqWpHm4GQa 9z9E34+uRakLOCqTQqrpLc58qz93rCWWL1DLHor8usM+uC42mY5Mq0F933DXgnuF8U bWCNb3VoyVeraXBW7ctawzeZDiOcvZRjZU7xkHJI= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:06 +1100 Message-Id: <20180119094015.28266-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 04/13] ppc: Deprecate qemu-system-ppcemb X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, Thomas Huth , surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth qemu-system-ppcemb has been once split of qemu-system-ppc to support CPU page sizes < 4096 for some of the embedded 4xx PowerPC CPUs. However, there was hardly any OS available in the wild that really used such small page sizes (Linux uses 4096 on PPC), so there is no known recent use case for this separate build anymore. It's rather cumbersome to maintain a separate set of config switches for this, and it's wasting compile and test time of all the developers who have to build all QEMU targets to verify that their changes did not break anything. Except for the small CPU page sizes, qemu-system-ppc can be used as a full replacement for qemu-system-ppcemb since it contains all the embedded 4xx PPC boards and CPUs, too. Thus let's start the deprecation process for qemu-system-ppcemb to see whether somebody still needs the small page sizes or whether we could finally remove this unloved separate build. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- qemu-doc.texi | 6 ++++++ target/ppc/translate_init.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index 3e9eb819a6..b13c6332fd 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2766,6 +2766,12 @@ The ``host_net_remove'' command is replaced by the `= `netdev_del'' command. The ``ivshmem'' device type is replaced by either the ``ivshmem-plain'' or ``ivshmem-doorbell`` device types. =20 +@subsection Page size support < 4k for embedded PowerPC CPUs (since 2.12.0) + +qemu-system-ppcemb will be removed. qemu-system-ppc (or qemu-system-ppc64) +should be used instead. That means that embedded 4xx PowerPC CPUs will not +support page sizes < 4096 any longer. + @section System emulator machines =20 @subsection Xilinx EP108 (since 2.11.0) diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 70ff15a51a..ab70b3a25c 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -10634,6 +10634,11 @@ static void ppc_cpu_register_types(void) { type_register_static(&ppc_cpu_type_info); type_register_static(&ppc_vhyp_type_info); + +#ifdef TARGET_PPCEMB + warn_report("qemu-system-ppcemb is deprecated, " + "please use qemu-system-ppc instead."); +#endif } =20 type_init(ppc_cpu_register_types) --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355127998867.164838747371; Fri, 19 Jan 2018 01:45:27 -0800 (PST) Received: from localhost ([::1]:38417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTEl-0005iH-4q for importer@patchew.org; Fri, 19 Jan 2018 04:45:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAd-0002Aj-Fy for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAc-0000vs-Oc for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:11 -0500 Received: from ozlabs.org ([103.22.144.67]:40875) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAc-0000tH-Dg for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:10 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5h3PQDz9sBd; Fri, 19 Jan 2018 20:40:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354824; bh=2qv3/N5KUFXYjwocd9J+noQaKroB7bZ9evj4tuC0ncs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j8tZxX6pYQCHo4dw2Nw7VfOWBgz9cjNkR74QVX820eMKQhAKoX1u0BMFU7ktl8yGU w4CbPaQ6u4d+86QCSy4dnYZ+N6578zLL8ciTlZrIEDL5nOY2VfgCS8NgbzT067fcdO DXSBw6/Zi+4xOsZW2Dpd6TiAGGlSMv3I9bHhMs2k= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:07 +1100 Message-Id: <20180119094015.28266-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 05/13] target/ppc: fix doorbell and hypervisor doorbell definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: C=C3=A9dric Le Goater commit f03a1af581b9 ("ppc: Fix POWER7 and POWER8 exception definitions") introduced definitions for the server doorbell exceptions by reusing the embedded definitions but this adds complexity in the powerpc_excp() routine. Let's introduce specific definitions for the Server doorbells exception. Signed-off-by: C=C3=A9dric Le Goater Signed-off-by: David Gibson --- target/ppc/cpu.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 14aaa87fe8..b8f4dfc108 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -140,9 +140,6 @@ enum { POWERPC_EXCP_HYPPRIV =3D 41, /* Embedded hypervisor priv instruction = */ /* Vectors 42 to 63 are reserved = */ /* Exceptions defined in the PowerPC server specification = */ - /* Server doorbell variants */ -#define POWERPC_EXCP_SDOOR POWERPC_EXCP_GDOORI -#define POWERPC_EXCP_SDOOR_HV POWERPC_EXCP_DOORI POWERPC_EXCP_RESET =3D 64, /* System reset exception = */ POWERPC_EXCP_DSEG =3D 65, /* Data segment exception = */ POWERPC_EXCP_ISEG =3D 66, /* Instruction segment exception = */ @@ -189,8 +186,11 @@ enum { POWERPC_EXCP_HV_EMU =3D 96, /* HV emulation assistance = */ POWERPC_EXCP_HV_MAINT =3D 97, /* HMI = */ POWERPC_EXCP_HV_FU =3D 98, /* Hypervisor Facility unavailable = */ + /* Server doorbell variants */ + POWERPC_EXCP_SDOOR =3D 99, + POWERPC_EXCP_SDOOR_HV =3D 100, /* EOL = */ - POWERPC_EXCP_NB =3D 99, + POWERPC_EXCP_NB =3D 101, /* QEMU exceptions: used internally during code translation = */ POWERPC_EXCP_STOP =3D 0x200, /* stop translation = */ POWERPC_EXCP_BRANCH =3D 0x201, /* branch instruction = */ --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151635499168947.30212724435228; Fri, 19 Jan 2018 01:43:11 -0800 (PST) Received: from localhost ([::1]:38355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTCC-00033a-Ag for importer@patchew.org; Fri, 19 Jan 2018 04:42:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTA9-0001iw-7p for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTA6-0008Ue-5J for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:41 -0500 Received: from ozlabs.org ([103.22.144.67]:42069) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTA5-0008TW-8t for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:38 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5f74Y8z9s82; Fri, 19 Jan 2018 20:40:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354822; bh=rJqWD7joyKZ7hbFP4nkTFItn6q8b5Ft9UizuHOyNM0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e1M5mIiJf1G3Wv0gW9SHArwU8Dkl+IC3ie6FgFNvOzUMRS2sZEgLLq6FIcen2L+BG TH6ftfLGyfjD+MtaMa2c7GtwfZMa2UsMSLgXWrTallq4lHoB1h3Xnnzql3uFEah8TZ o4A3uvJGDwCi72jK3m3iMIGXtETyS9Q1qcu1aVoE= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:08 +1100 Message-Id: <20180119094015.28266-7-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 06/13] target/ppc: msgsnd and msgclr instructions need hypervisor privilege X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: C=C3=A9dric Le Goater Signed-off-by: C=C3=A9dric Le Goater Signed-off-by: David Gibson --- target/ppc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 0ef21cce33..396f422cf4 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -6174,7 +6174,7 @@ static void gen_msgclr(DisasContext *ctx) #if defined(CONFIG_USER_ONLY) GEN_PRIV; #else - CHK_SV; + CHK_HV; gen_helper_msgclr(cpu_env, cpu_gpr[rB(ctx->opcode)]); #endif /* defined(CONFIG_USER_ONLY) */ } @@ -6184,7 +6184,7 @@ static void gen_msgsnd(DisasContext *ctx) #if defined(CONFIG_USER_ONLY) GEN_PRIV; #else - CHK_SV; + CHK_HV; gen_helper_msgsnd(cpu_gpr[rB(ctx->opcode)]); #endif /* defined(CONFIG_USER_ONLY) */ } --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355654384288.30097507356584; Fri, 19 Jan 2018 01:54:14 -0800 (PST) Received: from localhost ([::1]:38897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTNF-0004lq-NM for importer@patchew.org; Fri, 19 Jan 2018 04:54:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAd-0002Af-De for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAc-0000ve-NL for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:11 -0500 Received: from ozlabs.org ([103.22.144.67]:47099) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAc-0000tG-CL for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:10 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5h6Kjqz9sNc; Fri, 19 Jan 2018 20:40:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354824; bh=/BqvBaK0tWPT70w1EoQWt4SUOFe+ymuFtW7Ws5YwZzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kADHquZG4B2gueBz0o7vCa4SuJ7ren5suQpQQpq3iLPJSQ0ApowaET2eVOHb7++ym EFJ3UXrX9wEMAY/JFcIo5NeljkoCwZlkgd1dPb8Zxmh1GWhSSC3Lr322Ia/v5hYTkd AQQCUTaJLB1gZRAp6d46j9wXcXCqMM/kqbuX4gB0= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:09 +1100 Message-Id: <20180119094015.28266-8-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 07/13] spapr: drop duplicate variable in spapr_core_plug() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Greg Kurz A variable is already defined at the begining of the function to hold a pointer to the CPU core object: sPAPRCPUCore *core =3D SPAPR_CPU_CORE(OBJECT(dev)); No need to define it again in the pre-2.10 compatibility code snipplet. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 499ab647d8..bca838fce6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3362,9 +3362,7 @@ static void spapr_core_plug(HotplugHandler *hotplug_d= ev, DeviceState *dev, int i; =20 for (i =3D 0; i < cc->nr_threads; i++) { - sPAPRCPUCore *sc =3D SPAPR_CPU_CORE(dev); - - cs =3D CPU(sc->threads[i]); + cs =3D CPU(core->threads[i]); pre_2_10_vmstate_unregister_dummy_icp(cs->cpu_index); } } --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355540881767.9339262830908; Fri, 19 Jan 2018 01:52:20 -0800 (PST) Received: from localhost ([::1]:38660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTLQ-0002u1-2E for importer@patchew.org; Fri, 19 Jan 2018 04:52:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAd-0002B8-TI for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAc-0000w7-QB for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:11 -0500 Received: from ozlabs.org ([103.22.144.67]:40061) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAc-0000tK-Et for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:10 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5j0qKxz9sP1; Fri, 19 Jan 2018 20:40:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354825; bh=GYzsb+meavc2Kmomi3srxhXRjfZKAzEWrgnUn7267SY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jJRNxi335igEN/BljR5wAIBHfi4SaJEr0WoxpamKR3PA1VR0OL7cLjdPmUIHr1UnY iJZ7JV2Z1lkxmstNkJ26cNzfZQWOe83tyTvquJQknQNYbq4R8vYQEBGhNCfaEmqBVM SUhfY1J7ErON+oOGoQf0cVIl0Gd7v5a564HqxHOM= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:10 +1100 Message-Id: <20180119094015.28266-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 08/13] spapr: fix device tree properties when using compatibility mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Greg Kurz Commit 51f84465dd98 changed the compatility mode setting logic: - machine reset only sets compatibility mode for the boot CPU - compatibility mode is set for other CPUs when they are put online by the guest with the "start-cpu" RTAS call This causes a regression for machines started with max-compat-cpu: the device tree nodes related to secondary CPU cores contain wrong "cpu-version" and "ibm,pa-features" values, as shown below. Guest started on a POWER8 host with: -smp cores=3D2 -machine pseries,max-cpu-compat=3Dcompat7 ibm,pa-features =3D [18 00 f6 3f c7 c0 80 f0 80 00 00 00 00 00 00 00 00 00 80 00 80 00 80 00 00 00]; cpu-version =3D <0x4d0200>; ^^^ second CPU core ibm,pa-features =3D <0x600f63f 0xc70080c0>; cpu-version =3D <0xf000003>; ^^^ boot CPU core The second core is advertised in raw POWER8 mode. This happens because CAS assumes all CPUs to have the same compatibility mode. Since the boot CPU already has the requested compatibility mode, the CAS code does not set it for the secondary one, and exposes the bogus device tree properties in in the CAS response to the guest. A similar situation is observed when hot-plugging a CPU core. The related device tree properties are generated and exposed to guest with the "ibm,configure-connector" RTAS before "start-cpu" is called. The CPU core is advertised to the guest in raw mode as well. It both cases, it boils down to the fact that "start-cpu" happens too late. This can be fixed globally by propagating the compatibility mode of the boot CPU to the other CPUs during reset. For this to work, the compatibility mode of the boot CPU must be set before the machine code actually resets all CPUs. It is not needed to set the compatibility mode in "start-cpu" anymore, so the code is dropped. Fixes: 51f84465dd98 Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr.c | 18 +++++++++--------- hw/ppc/spapr_cpu_core.c | 7 +++++++ hw/ppc/spapr_rtas.c | 9 --------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index bca838fce6..02e45dd010 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1484,6 +1484,15 @@ static void spapr_machine_reset(void) spapr_setup_hpt_and_vrma(spapr); } =20 + /* if this reset wasn't generated by CAS, we should reset our + * negotiated options and start from scratch */ + if (!spapr->cas_reboot) { + spapr_ovec_cleanup(spapr->ov5_cas); + spapr->ov5_cas =3D spapr_ovec_new(); + + ppc_set_compat(first_ppc_cpu, spapr->max_compat_pvr, &error_fatal); + } + qemu_devices_reset(); =20 /* DRC reset may cause a device to be unplugged. This will cause troub= les @@ -1504,15 +1513,6 @@ static void spapr_machine_reset(void) rtas_addr =3D rtas_limit - RTAS_MAX_SIZE; fdt_addr =3D rtas_addr - FDT_MAX_SIZE; =20 - /* if this reset wasn't generated by CAS, we should reset our - * negotiated options and start from scratch */ - if (!spapr->cas_reboot) { - spapr_ovec_cleanup(spapr->ov5_cas); - spapr->ov5_cas =3D spapr_ovec_new(); - - ppc_set_compat(first_ppc_cpu, spapr->max_compat_pvr, &error_fatal); - } - fdt =3D spapr_build_fdt(spapr, rtas_addr, spapr->rtas_size); =20 spapr_load_rtas(spapr, fdt, rtas_addr); diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index ac19b2e0b7..590d167b04 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -44,6 +44,13 @@ static void spapr_cpu_reset(void *opaque) if (cs !=3D first_cpu) { env->spr[SPR_LPCR] &=3D ~pcc->lpcr_pm; } + + /* Set compatibility mode to match the boot CPU, which was either set + * by the machine reset code or by CAS. This should never fail. + */ + if (cs !=3D first_cpu) { + ppc_set_compat(cpu, POWERPC_CPU(first_cpu)->compat_pvr, &error_abo= rt); + } } =20 static void spapr_cpu_destroy(PowerPCCPU *cpu) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 2b89e1d448..4bb939d3d1 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -163,7 +163,6 @@ static void rtas_start_cpu(PowerPCCPU *cpu_, sPAPRMachi= neState *spapr, CPUState *cs =3D CPU(cpu); CPUPPCState *env =3D &cpu->env; PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu); - Error *local_err =3D NULL; =20 if (!cs->halted) { rtas_st(rets, 0, RTAS_OUT_HW_ERROR); @@ -175,14 +174,6 @@ static void rtas_start_cpu(PowerPCCPU *cpu_, sPAPRMach= ineState *spapr, * new cpu enters */ kvm_cpu_synchronize_state(cs); =20 - /* Set compatibility mode to match existing cpus */ - ppc_set_compat(cpu, POWERPC_CPU(first_cpu)->compat_pvr, &local_err= ); - if (local_err) { - error_report_err(local_err); - rtas_st(rets, 0, RTAS_OUT_HW_ERROR); - return; - } - env->msr =3D (1ULL << MSR_SF) | (1ULL << MSR_ME); =20 /* Enable Power-saving mode Exit Cause exceptions for the new CPU = */ --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355412728337.85483333105594; Fri, 19 Jan 2018 01:50:12 -0800 (PST) Received: from localhost ([::1]:38578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTJF-0000uq-OM for importer@patchew.org; Fri, 19 Jan 2018 04:50:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAd-0002As-KH for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAc-0000wL-S4 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:11 -0500 Received: from ozlabs.org ([103.22.144.67]:37503) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAc-0000tO-GB for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:10 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5j4PWWz9t2x; Fri, 19 Jan 2018 20:40:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354825; bh=QTg0B5BKPApKgVSbc2Z3vzJT4faGdV1cRCasBJXwxXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q1CFUL21VYBA5z5l/wKo4Z0vsIj1HsvuCbWpvoFWDYCFwog5EMRpQUUnnk1jsIzcC R/ouFXStGszF9AX8uaBVz1LUlClqKveJVtz/U22CE5yKkR/XTM/x3eeusyZYF3TzpX FyFsWxWQRlwgbQEUMSq8pvL65icMe5jRhPOjDhZw= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:11 +1100 Message-Id: <20180119094015.28266-10-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 09/13] target-ppc: optimize cmp translation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, "pbonzini@redhat.com" , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "pbonzini@redhat.com" We know that only one bit (in addition to SO) is going to be set in the condition register, so do two movconds instead of three setconds, three shifts and two ORs. For ppc64-linux-user, the code size reduction is around 5% and the performance improvement slightly less than 10%. For softmmu, the improvement is around 5%. Signed-off-by: Paolo Bonzini Signed-off-by: David Gibson --- target/ppc/translate.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 396f422cf4..bcd36d5353 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -605,27 +605,22 @@ static opc_handler_t invalid_handler =3D { static inline void gen_op_cmp(TCGv arg0, TCGv arg1, int s, int crf) { TCGv t0 =3D tcg_temp_new(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); - - tcg_gen_trunc_tl_i32(cpu_crf[crf], cpu_so); - - tcg_gen_setcond_tl((s ? TCG_COND_LT: TCG_COND_LTU), t0, arg0, arg1); - tcg_gen_trunc_tl_i32(t1, t0); - tcg_gen_shli_i32(t1, t1, CRF_LT_BIT); - tcg_gen_or_i32(cpu_crf[crf], cpu_crf[crf], t1); + TCGv t1 =3D tcg_temp_new(); + TCGv_i32 t =3D tcg_temp_new_i32(); =20 - tcg_gen_setcond_tl((s ? TCG_COND_GT: TCG_COND_GTU), t0, arg0, arg1); - tcg_gen_trunc_tl_i32(t1, t0); - tcg_gen_shli_i32(t1, t1, CRF_GT_BIT); - tcg_gen_or_i32(cpu_crf[crf], cpu_crf[crf], t1); + tcg_gen_movi_tl(t0, CRF_EQ); + tcg_gen_movi_tl(t1, CRF_LT); + tcg_gen_movcond_tl((s ? TCG_COND_LT : TCG_COND_LTU), t0, arg0, arg1, t= 1, t0); + tcg_gen_movi_tl(t1, CRF_GT); + tcg_gen_movcond_tl((s ? TCG_COND_GT : TCG_COND_GTU), t0, arg0, arg1, t= 1, t0); =20 - tcg_gen_setcond_tl(TCG_COND_EQ, t0, arg0, arg1); - tcg_gen_trunc_tl_i32(t1, t0); - tcg_gen_shli_i32(t1, t1, CRF_EQ_BIT); - tcg_gen_or_i32(cpu_crf[crf], cpu_crf[crf], t1); + tcg_gen_trunc_tl_i32(t, t0); + tcg_gen_trunc_tl_i32(cpu_crf[crf], cpu_so); + tcg_gen_or_i32(cpu_crf[crf], cpu_crf[crf], t); =20 tcg_temp_free(t0); - tcg_temp_free_i32(t1); + tcg_temp_free(t1); + tcg_temp_free_i32(t); } =20 static inline void gen_op_cmpi(TCGv arg0, target_ulong arg1, int s, int cr= f) --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355254046928.5339348712641; Fri, 19 Jan 2018 01:47:34 -0800 (PST) Received: from localhost ([::1]:38524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTGn-0007N8-Bl for importer@patchew.org; Fri, 19 Jan 2018 04:47:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAF-0001nv-45 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTA8-000065-Of for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:47 -0500 Received: from ozlabs.org ([103.22.144.67]:55497) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTA8-0008V0-DN for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:40 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5j2j6Rz9sP9; Fri, 19 Jan 2018 20:40:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354825; bh=uOCIfs+7K8PyGzpZTzAco+9ULElUNc2KtKwNd1iiJtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ls779ruF917lZ7d61UPA/4kEjt83fweXT+CYNwMfw0dxSBS1BEwYO4qXxAD98QNdy GKwFMbcetF579L5RriM5fQwG461BQVfUX27tXn9P1beeAt1MctBOa6iKR/rn/cWR6g U892xnqUrxjH55RG6WR1wzYrY/8VHN4x9ftsgtlg= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:12 +1100 Message-Id: <20180119094015.28266-11-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 10/13] sm501: Add missing break to case X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Noticed by Coverity, forgotten in 5690d9ece Reported-by: Peter Maydell Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/display/sm501.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 4f7dc59b25..134cbed607 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -797,6 +797,7 @@ static uint64_t sm501_system_config_read(void *opaque, = hwaddr addr, break; case SM501_COMMAND_LIST_STATUS: ret =3D 0x00180002; /* FIFOs are empty, everything idle */ + break; case SM501_IRQ_MASK: ret =3D s->irq_mask; break; --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516354998836236.91254247842107; Fri, 19 Jan 2018 01:43:18 -0800 (PST) Received: from localhost ([::1]:38358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTCL-0003BC-1l for importer@patchew.org; Fri, 19 Jan 2018 04:42:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAC-0001lm-UO for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAC-0000GO-0k for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:44 -0500 Received: from ozlabs.org ([103.22.144.67]:52811) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAA-00007a-Uq for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:43 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5k1rzKz9t44; Fri, 19 Jan 2018 20:40:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354826; bh=Yr3m0DgMhuNQiMUxqwI/Fi6QBG9fOOHXE/XtkUlIo2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRilXtbp77yztcyrMlIcREU/eblGBaHjZezRPgMmq88hGtwGNOtJ5cY1NMCSiFb/m Uk3gRNFJs3k/vsviauFnl7fE4coTVPRuW06vVuh9HFR1VUlrDhJYea4WXKF6Jeg8kC VQjbqigOomQs0Y/yEfjOV/YeT7tKl8LmCFZokutE= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:13 +1100 Message-Id: <20180119094015.28266-12-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 11/13] sii3112: Add explicit type casts to avoid unintended sign extension X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Noticed by Coverity Reported-by: Peter Maydell Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ide/sii3112.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index e2f5562bb7..17aa930e39 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -79,13 +79,13 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr a= ddr, val |=3D (d->regs[0].confstat & (1UL << 11) ? (1 << 4) : 0); /*SAT= AINT0*/ val |=3D (d->regs[1].confstat & (1UL << 11) ? (1 << 6) : 0); /*SAT= AINT1*/ val |=3D (d->i.bmdma[1].status & BM_STATUS_INT ? (1 << 14) : 0); - val |=3D d->i.bmdma[0].status << 16; - val |=3D d->i.bmdma[1].status << 24; + val |=3D (uint32_t)d->i.bmdma[0].status << 16; + val |=3D (uint32_t)d->i.bmdma[1].status << 24; break; case 0x18: val =3D d->i.bmdma[1].cmd; val |=3D (d->regs[1].confstat & (1UL << 11) ? (1 << 4) : 0); - val |=3D d->i.bmdma[1].status << 16; + val |=3D (uint32_t)d->i.bmdma[1].status << 16; break; case 0x80 ... 0x87: if (size =3D=3D 1) { @@ -128,7 +128,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr a= ddr, val =3D (d->i.bus[0].ifs[0].blk) ? 0x113 : 0; break; case 0x148: - val =3D d->regs[0].sien << 16; + val =3D (uint32_t)d->regs[0].sien << 16; break; case 0x180: val =3D d->regs[1].scontrol; @@ -137,7 +137,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr a= ddr, val =3D (d->i.bus[1].ifs[0].blk) ? 0x113 : 0; break; case 0x1c8: - val =3D d->regs[1].sien << 16; + val =3D (uint32_t)d->regs[1].sien << 16; break; default: val =3D 0; --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355254932382.23160432320174; Fri, 19 Jan 2018 01:47:34 -0800 (PST) Received: from localhost ([::1]:38525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTGo-0007NX-6B for importer@patchew.org; Fri, 19 Jan 2018 04:47:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAD-0001ls-16 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAB-0000Ee-HF for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:45 -0500 Received: from ozlabs.org ([103.22.144.67]:43683) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAA-00007W-Tr for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:40:43 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5k0b3wz9t4P; Fri, 19 Jan 2018 20:40:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354826; bh=E5v1A+W7naBCAq63OWndaBYxfR5y1UbJXRV2bDRNXTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E0GkQUBtDBNZ7JRKHqyRV0lsxll1d8Qf0JJ6RcSePU1lVP75U2FIPya6a55oEBCgQ N9+uZTEWwAijuvRBjUGKCLgzYxwsGDXyweKLiabdY5Ro/YxqXiJCO+Mh08fTSqStEV tHwwccSJZ2KyYIUGfj9YwPydzU0mU0oi+lGpoVdc= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:14 +1100 Message-Id: <20180119094015.28266-13-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 12/13] target/ppc: add support for hypervisor doorbells on book3s CPUs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: C=C3=A9dric Le Goater The hypervisor doorbells are used by skiboot and Linux on POWER9 processors to wake up secondaries. This adds processor control support to the Server architecture by reusing the Embedded support. They are very similar, only the bits definition of the CPU identifier differ. Still to be done is message broadcast to all threads of the same processor. Signed-off-by: C=C3=A9dric Le Goater Signed-off-by: David Gibson --- target/ppc/cpu.h | 8 +++++-- target/ppc/excp_helper.c | 52 +++++++++++++++++++++++++++++++++++++++++= ++++ target/ppc/helper.h | 2 ++ target/ppc/translate.c | 25 ++++++++++++++++++++-- target/ppc/translate_init.c | 2 +- 5 files changed, 84 insertions(+), 5 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index b8f4dfc108..603a38cae8 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -930,7 +930,7 @@ enum { #define BOOKE206_MAX_TLBN 4 =20 /*************************************************************************= ****/ -/* Embedded.Processor Control */ +/* Server and Embedded Processor Control */ =20 #define DBELL_TYPE_SHIFT 27 #define DBELL_TYPE_MASK (0x1f << DBELL_TYPE_SHIFT) @@ -940,11 +940,15 @@ enum { #define DBELL_TYPE_G_DBELL_CRIT (0x03 << DBELL_TYPE_SHIFT) #define DBELL_TYPE_G_DBELL_MC (0x04 << DBELL_TYPE_SHIFT) =20 -#define DBELL_BRDCAST (1 << 26) +#define DBELL_TYPE_DBELL_SERVER (0x05 << DBELL_TYPE_SHIFT) + +#define DBELL_BRDCAST PPC_BIT(37) #define DBELL_LPIDTAG_SHIFT 14 #define DBELL_LPIDTAG_MASK (0xfff << DBELL_LPIDTAG_SHIFT) #define DBELL_PIRTAG_MASK 0x3fff =20 +#define DBELL_PROCIDTAG_MASK PPC_BITMASK(44, 63) + /*************************************************************************= ****/ /* Segment page size information, used by recent hash MMUs * The format of this structure mirrors kvm_ppc_smmu_info diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 4e548a4487..c092fbead0 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -417,6 +417,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int ex= cp_model, int excp) case POWERPC_EXCP_HISI: /* Hypervisor instruction storage excepti= on */ case POWERPC_EXCP_HDSEG: /* Hypervisor data segment exception = */ case POWERPC_EXCP_HISEG: /* Hypervisor instruction segment excepti= on */ + case POWERPC_EXCP_SDOOR_HV: /* Hypervisor Doorbell interrupt = */ case POWERPC_EXCP_HV_EMU: srr0 =3D SPR_HSRR0; srr1 =3D SPR_HSRR1; @@ -846,6 +847,11 @@ static void ppc_hw_interrupt(CPUPPCState *env) powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_DOORI); return; } + if (env->pending_interrupts & (1 << PPC_INTERRUPT_HDOORBELL)) { + env->pending_interrupts &=3D ~(1 << PPC_INTERRUPT_HDOORBELL); + powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_SDOOR_HV); + return; + } if (env->pending_interrupts & (1 << PPC_INTERRUPT_PERFM)) { env->pending_interrupts &=3D ~(1 << PPC_INTERRUPT_PERFM); powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_PERFM); @@ -1145,4 +1151,50 @@ void helper_msgsnd(target_ulong rb) } qemu_mutex_unlock_iothread(); } + +/* Server Processor Control */ +static int book3s_dbell2irq(target_ulong rb) +{ + int msg =3D rb & DBELL_TYPE_MASK; + + /* A Directed Hypervisor Doorbell message is sent only if the + * message type is 5. All other types are reserved and the + * instruction is a no-op */ + return msg =3D=3D DBELL_TYPE_DBELL_SERVER ? PPC_INTERRUPT_HDOORBELL : = -1; +} + +void helper_book3s_msgclr(CPUPPCState *env, target_ulong rb) +{ + int irq =3D book3s_dbell2irq(rb); + + if (irq < 0) { + return; + } + + env->pending_interrupts &=3D ~(1 << irq); +} + +void helper_book3s_msgsnd(target_ulong rb) +{ + int irq =3D book3s_dbell2irq(rb); + int pir =3D rb & DBELL_PROCIDTAG_MASK; + CPUState *cs; + + if (irq < 0) { + return; + } + + qemu_mutex_lock_iothread(); + CPU_FOREACH(cs) { + PowerPCCPU *cpu =3D POWERPC_CPU(cs); + CPUPPCState *cenv =3D &cpu->env; + + /* TODO: broadcast message to all threads of the same processor */ + if (cenv->spr_cb[SPR_PIR].default_value =3D=3D pir) { + cenv->pending_interrupts |=3D 1 << irq; + cpu_interrupt(cs, CPU_INTERRUPT_HARD); + } + } + qemu_mutex_unlock_iothread(); +} #endif diff --git a/target/ppc/helper.h b/target/ppc/helper.h index bb6a94a8b3..5b739179b8 100644 --- a/target/ppc/helper.h +++ b/target/ppc/helper.h @@ -679,6 +679,8 @@ DEF_HELPER_FLAGS_3(store_sr, TCG_CALL_NO_RWG, void, env= , tl, tl) DEF_HELPER_FLAGS_1(602_mfrom, TCG_CALL_NO_RWG_SE, tl, tl) DEF_HELPER_1(msgsnd, void, tl) DEF_HELPER_2(msgclr, void, env, tl) +DEF_HELPER_1(book3s_msgsnd, void, tl) +DEF_HELPER_2(book3s_msgclr, void, env, tl) #endif =20 DEF_HELPER_4(dlmzb, tl, env, tl, tl, i32) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index bcd36d5353..4132f67bb1 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -6170,7 +6170,12 @@ static void gen_msgclr(DisasContext *ctx) GEN_PRIV; #else CHK_HV; - gen_helper_msgclr(cpu_env, cpu_gpr[rB(ctx->opcode)]); + /* 64-bit server processors compliant with arch 2.x */ + if (ctx->insns_flags & PPC_SEGMENT_64B) { + gen_helper_book3s_msgclr(cpu_env, cpu_gpr[rB(ctx->opcode)]); + } else { + gen_helper_msgclr(cpu_env, cpu_gpr[rB(ctx->opcode)]); + } #endif /* defined(CONFIG_USER_ONLY) */ } =20 @@ -6180,10 +6185,24 @@ static void gen_msgsnd(DisasContext *ctx) GEN_PRIV; #else CHK_HV; - gen_helper_msgsnd(cpu_gpr[rB(ctx->opcode)]); + /* 64-bit server processors compliant with arch 2.x */ + if (ctx->insns_flags & PPC_SEGMENT_64B) { + gen_helper_book3s_msgsnd(cpu_gpr[rB(ctx->opcode)]); + } else { + gen_helper_msgsnd(cpu_gpr[rB(ctx->opcode)]); + } #endif /* defined(CONFIG_USER_ONLY) */ } =20 +static void gen_msgsync(DisasContext *ctx) +{ +#if defined(CONFIG_USER_ONLY) + GEN_PRIV; +#else + CHK_HV; +#endif /* defined(CONFIG_USER_ONLY) */ + /* interpreted as no-op */ +} =20 #if defined(TARGET_PPC64) static void gen_maddld(DisasContext *ctx) @@ -6664,6 +6683,8 @@ GEN_HANDLER2_E(msgsnd, "msgsnd", 0x1F, 0x0E, 0x06, 0x= 03ff0001, PPC_NONE, PPC2_PRCNTL), GEN_HANDLER2_E(msgclr, "msgclr", 0x1F, 0x0E, 0x07, 0x03ff0001, PPC_NONE, PPC2_PRCNTL), +GEN_HANDLER2_E(msgsync, "msgsync", 0x1F, 0x16, 0x1B, 0x00000000, + PPC_NONE, PPC2_PRCNTL), GEN_HANDLER(wrtee, 0x1F, 0x03, 0x04, 0x000FFC01, PPC_WRTEE), GEN_HANDLER(wrteei, 0x1F, 0x03, 0x05, 0x000E7C01, PPC_WRTEE), GEN_HANDLER(dlmzb, 0x1F, 0x0E, 0x02, 0x00000000, PPC_440_SPEC), diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index ab70b3a25c..87a23f0f62 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -8866,7 +8866,7 @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data) PPC2_FP_TST_ISA206 | PPC2_BCTAR_ISA207 | PPC2_LSQ_ISA207 | PPC2_ALTIVEC_207 | PPC2_ISA205 | PPC2_ISA207S | PPC2_FP_CVT_S64 | - PPC2_TM | PPC2_PM_ISA206 | PPC2_ISA300; + PPC2_TM | PPC2_PM_ISA206 | PPC2_ISA300 | PPC2_PRCN= TL; pcc->msr_mask =3D (1ull << MSR_SF) | (1ull << MSR_TM) | (1ull << MSR_VR) | --=20 2.14.3 From nobody Sat May 4 23:42:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516355541664819.9726459784345; Fri, 19 Jan 2018 01:52:21 -0800 (PST) Received: from localhost ([::1]:38662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTLQ-0002vX-SW for importer@patchew.org; Fri, 19 Jan 2018 04:52:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecTAd-0002B7-TG for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecTAc-0000wn-Vb for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:11 -0500 Received: from ozlabs.org ([103.22.144.67]:55873) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecTAc-0000tL-K6 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 04:41:10 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zNG5j5kJrz9t0m; Fri, 19 Jan 2018 20:40:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516354825; bh=6dDhIcxnzVW3yUqeDKm6//FhNb/fLXJxFhL45yqgYL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EOsghrQ3T1/O99MuezC5/B6ecDrj3qT2OEcQ6WW0h2x9yjNYQ19hTIQ8OMmkxqErO gGQgVVwqDQ+x9J0vB5RNaut07gbSztPWtDa51HYoJZK7IDpuK4vfEoIfb7PKcrkM9U +ksKogdS2aRm3aqHHuSyRvFswafy2A29WJSZa9oY= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 19 Jan 2018 20:40:15 +1100 Message-Id: <20180119094015.28266-14-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119094015.28266-1-david@gibson.dropbear.id.au> References: <20180119094015.28266-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 13/13] target/ppc/spapr_caps: Add macro to generate spapr_caps migration vmstate X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-ppc@nognu.org, surajjs@au1.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Suraj Jitindar Singh The vmstate description and the contained needed function for migration of spapr_caps is the same for each cap, with the name of the cap substituted. As such introduce a macro to allow for easier generation of these. Convert the three existing spapr_caps (htm, vsx, and dfp) to use this macro. Signed-off-by: Suraj Jitindar Singh Signed-off-by: David Gibson --- hw/ppc/spapr_caps.c | 78 +++++++++++++++++--------------------------------= ---- 1 file changed, 24 insertions(+), 54 deletions(-) diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index d5c9ce774a..5d52969bd5 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -228,62 +228,32 @@ int spapr_caps_post_migration(sPAPRMachineState *spap= r) return ok ? 0 : -EINVAL; } =20 -static bool spapr_cap_htm_needed(void *opaque) -{ - sPAPRMachineState *spapr =3D opaque; - - return spapr->cmd_line_caps[SPAPR_CAP_HTM] && - (spapr->eff.caps[SPAPR_CAP_HTM] !=3D spapr->def.caps[SPAPR_CAP_= HTM]); -} - -const VMStateDescription vmstate_spapr_cap_htm =3D { - .name =3D "spapr/cap/htm", - .version_id =3D 1, - .minimum_version_id =3D 1, - .needed =3D spapr_cap_htm_needed, - .fields =3D (VMStateField[]) { - VMSTATE_UINT8(mig.caps[SPAPR_CAP_HTM], sPAPRMachineState), - VMSTATE_END_OF_LIST() - }, -}; - -static bool spapr_cap_vsx_needed(void *opaque) -{ - sPAPRMachineState *spapr =3D opaque; - - return spapr->cmd_line_caps[SPAPR_CAP_VSX] && - (spapr->eff.caps[SPAPR_CAP_VSX] !=3D spapr->def.caps[SPAPR_CAP_= VSX]); +/* Used to generate the migration field and needed function for a spapr ca= p */ +#define SPAPR_CAP_MIG_STATE(cap, ccap) \ +static bool spapr_cap_##cap##_needed(void *opaque) \ +{ \ + sPAPRMachineState *spapr =3D opaque; \ + \ + return spapr->cmd_line_caps[SPAPR_CAP_##ccap] && \ + (spapr->eff.caps[SPAPR_CAP_##ccap] !=3D \ + spapr->def.caps[SPAPR_CAP_##ccap]); \ +} \ + \ +const VMStateDescription vmstate_spapr_cap_##cap =3D { \ + .name =3D "spapr/cap/" #cap, \ + .version_id =3D 1, \ + .minimum_version_id =3D 1, \ + .needed =3D spapr_cap_##cap##_needed, \ + .fields =3D (VMStateField[]) { \ + VMSTATE_UINT8(mig.caps[SPAPR_CAP_##ccap], \ + sPAPRMachineState), \ + VMSTATE_END_OF_LIST() \ + }, \ } =20 -const VMStateDescription vmstate_spapr_cap_vsx =3D { - .name =3D "spapr/cap/vsx", - .version_id =3D 1, - .minimum_version_id =3D 1, - .needed =3D spapr_cap_vsx_needed, - .fields =3D (VMStateField[]) { - VMSTATE_UINT8(mig.caps[SPAPR_CAP_VSX], sPAPRMachineState), - VMSTATE_END_OF_LIST() - }, -}; - -static bool spapr_cap_dfp_needed(void *opaque) -{ - sPAPRMachineState *spapr =3D opaque; - - return spapr->cmd_line_caps[SPAPR_CAP_DFP] && - (spapr->eff.caps[SPAPR_CAP_DFP] !=3D spapr->def.caps[SPAPR_CAP_= DFP]); -} - -const VMStateDescription vmstate_spapr_cap_dfp =3D { - .name =3D "spapr/cap/dfp", - .version_id =3D 1, - .minimum_version_id =3D 1, - .needed =3D spapr_cap_dfp_needed, - .fields =3D (VMStateField[]) { - VMSTATE_UINT8(mig.caps[SPAPR_CAP_DFP], sPAPRMachineState), - VMSTATE_END_OF_LIST() - }, -}; +SPAPR_CAP_MIG_STATE(htm, HTM); +SPAPR_CAP_MIG_STATE(vsx, VSX); +SPAPR_CAP_MIG_STATE(dfp, DFP); =20 void spapr_caps_reset(sPAPRMachineState *spapr) { --=20 2.14.3