From nobody Sat Oct 25 02:31:11 2025 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 1521088000928940.077499864995; Wed, 14 Mar 2018 21:26:40 -0700 (PDT) Received: from localhost ([::1]:49679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKTL-0005Bz-2f for importer@patchew.org; Thu, 15 Mar 2018 00:26:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074N-GF for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMF-00041v-Gr for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([103.22.144.67]:56075) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKME-0003zP-LZ; Thu, 15 Mar 2018 00:19:15 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc2xQ4z9sVW; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=SvtA6ciWpPXXUOc/pYroiYW0it2wWCb2cmarytnqp54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j8Qreu2OY6IXKRe2M0zrBSIR8bUm7MdT9KKXlutwnlRJkxP0pzvsBjhYaQ6cOrIUW bzJ+j+6mxWEES6LJWpLKdCe/+7vduZeQa0gao/rXo1EANfEo3QazThWOO/W5lCvDMr Wx31/g0Vu+gv3+mLsLUnd0EiaEB6gGcXatHBDJwU= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:18:55 +1100 Message-Id: <20180315041903.10046-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-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 1/9] sii3112: Remove unneeded exit function 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, surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 An exit function was mistakenly left here but it's not needed because the PCI bars are organised differently in this device. Calling this exit function during device_del was causing an abort with memory_region_del_subregion: `Assertion subregion->container =3D=3D mr' fai= led. Reported-by: Thomas Huth Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ide/sii3112.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index e3896c65b4..743a50ed51 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -327,17 +327,6 @@ static void sii3112_pci_realize(PCIDevice *dev, Error = **errp) qemu_register_reset(sii3112_reset, s); } =20 -static void sii3112_pci_exitfn(PCIDevice *dev) -{ - PCIIDEState *d =3D PCI_IDE(dev); - int i; - - for (i =3D 0; i < 2; ++i) { - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_iopor= t); - } -} - static void sii3112_pci_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -348,7 +337,6 @@ static void sii3112_pci_class_init(ObjectClass *klass, = void *data) pd->class_id =3D PCI_CLASS_STORAGE_RAID; pd->revision =3D 1; pd->realize =3D sii3112_pci_realize; - pd->exit =3D sii3112_pci_exitfn; dc->desc =3D "SiI3112A SATA controller"; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521087689174333.81386046783064; Wed, 14 Mar 2018 21:21:29 -0700 (PDT) Received: from localhost ([::1]:49641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKOG-0008NA-Dl for importer@patchew.org; Thu, 15 Mar 2018 00:21:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMG-00073S-KQ for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMF-00041Z-Ft for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:16 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:54187) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKME-0003zS-Lg; Thu, 15 Mar 2018 00:19:15 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc1fsjz9sRD; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=pW/KbyeNK2EoSCqIfKS6is+9Gif8LVWPm+iJTKdnsoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Id4dwkCQguecYpOgDpkNk4DTy6Cw7pJErCmj1dLaNO6gf/T+RHcPnP61T7aCXcKep 7pC/ukRmCniloWbePvg1Z6fa9FDc65Wp8mCS2LCawVZ4RkAMMmQF4fMoX2xKcix0yg dVqpd9caj64N3UlaIMBYwU2FLUL7AIMsIMq1Aj2k= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:18:56 +1100 Message-Id: <20180315041903.10046-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 2/9] tests/boot-serial: Check the 40p machine, too 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, Thomas Huth , surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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-Type: text/plain; charset="utf-8" From: Thomas Huth The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" machine, so we can test it accordingly with the boot-serial tester, too. While we're at it, also change the strings that we are using for the "prep" machine, so that this test now also checks some CLI parameters. Signed-off-by: Thomas Huth Reviewed-by: Herv=C3=A9 Poussineau Signed-off-by: David Gibson --- tests/boot-serial-test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index ece25c694f..5b24cd26c1 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -75,11 +75,13 @@ typedef struct testdef { static testdef_t tests[] =3D { { "alpha", "clipper", "", "PCI:" }, { "ppc", "ppce500", "", "U-Boot" }, - { "ppc", "prep", "", "Open Hack'Ware BIOS" }, + { "ppc", "prep", "-m 96", "Memory size: 96 MB" }, + { "ppc", "40p", "-boot d", "Booting from device d" }, { "ppc", "g3beige", "", "PowerPC,750" }, { "ppc", "mac99", "", "PowerPC,G4" }, { "ppc64", "ppce500", "", "U-Boot" }, - { "ppc64", "prep", "", "Open Hack'Ware BIOS" }, + { "ppc64", "prep", "-boot e", "Booting from device e" }, + { "ppc64", "40p", "-m 192", "Memory size: 192 MB" }, { "ppc64", "mac99", "", "PowerPC,970FX" }, { "ppc64", "pseries", "", "Open Firmware" }, { "ppc64", "powernv", "-cpu POWER8", "OPAL" }, --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521087690588668.9067775342514; Wed, 14 Mar 2018 21:21:30 -0700 (PDT) Received: from localhost ([::1]:49642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKOI-0008Pn-FY for importer@patchew.org; Thu, 15 Mar 2018 00:21:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMG-00073R-KQ for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMF-00041o-GP for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:16 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:53555) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKME-0003zQ-LW; Thu, 15 Mar 2018 00:19:15 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc4WQFz9sVY; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=jViGsFrsrgOrbGhOsucYL6wC0MmFF5LBne5J8v0TuNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZnhuSU5p4Jt5zDbymhhgIZGUgixhYuuuWKDnRodvctsiAKg6XoTWSqvJftTAAWoU IQMHid/O9glQ7kZe4AwmJkw2lm8PhQf8OrpC+JtsP06Kb03fVzrov0JhmID2KpjtqZ w6e4uHg3YQeoZVKDfmenYVsoI01nAwbn7iI3GkFI= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:18:57 +1100 Message-Id: <20180315041903.10046-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 3/9] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices 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, Thomas Huth , surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 The global hack for creating SCSI devices has recently been removed, but this apparently broke SCSI devices on some boards that were not ready for this change yet. For the 40p machine you now get: $ ppc64-softmmu/qemu-system-ppc64 -M 40p -cdrom x.iso qemu-system-ppc64: -cdrom x.iso: machine type does not support if=3Dscsi,bu= s=3D0,unit=3D2 Fix it by providing a lsi53c810_create() function that takes care of calling scsi_bus_legacy_handle_cmdline() after creating the corresponding SCSI controller. Fixes: 1454509726719e0933c800fad00d6999752688ea Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/prep.c | 2 +- hw/scsi/lsi53c895a.c | 7 +++++++ include/hw/pci/pci.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 096d4d4cfb..3361509a85 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -788,7 +788,7 @@ static void ibm_40p_init(MachineState *machine) qdev_prop_set_uint32(dev, "equipment", 0xc0); qdev_init_nofail(dev); =20 - pci_create_simple(pci_bus, PCI_DEVFN(1, 0), "lsi53c810"); + lsi53c810_create(pci_bus, PCI_DEVFN(1, 0)); =20 /* XXX: s3-trio at PCI_DEVFN(2, 0) */ pci_vga_init(pci_bus); diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index f3d4c4d230..160657f4b9 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -2279,3 +2279,10 @@ void lsi53c895a_create(PCIBus *bus) =20 scsi_bus_legacy_handle_cmdline(&s->bus); } + +void lsi53c810_create(PCIBus *bus, int devfn) +{ + LSIState *s =3D LSI53C895A(pci_create_simple(bus, devfn, "lsi53c810")); + + scsi_bus_legacy_handle_cmdline(&s->bus); +} diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index d8c18c7fa4..e255941b5a 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -708,6 +708,7 @@ PCIDevice *pci_create(PCIBus *bus, int devfn, const cha= r *name); PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name); =20 void lsi53c895a_create(PCIBus *bus); +void lsi53c810_create(PCIBus *bus, int devfn); =20 qemu_irq pci_allocate_irq(PCIDevice *pci_dev); void pci_set_irq(PCIDevice *pci_dev, int level); --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521088000928954.0387700188686; Wed, 14 Mar 2018 21:26:40 -0700 (PDT) Received: from localhost ([::1]:49678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKTI-0005A0-IN for importer@patchew.org; Thu, 15 Mar 2018 00:26:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074O-H5 for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMF-00041j-Fw for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([103.22.144.67]:45891) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKME-0003zO-LZ; Thu, 15 Mar 2018 00:19:15 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc3sFlz9sVV; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=APBmlWA0ZLBkMcVHZDJxBebmAE+7wiPq9uCpvbF5AdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AhcDxGteXD9ZKOYF4Y5L8ouPmUzzOoQnGOt2dzj3Ttfwpj3wb0yj1ldeVGczEWEkf FZJLdD16XU7RiHWD1l7NAqv8B64tGI2kYYup8SAT5XV2OEJSJPnQlvcid3uvAylwOF BbzNp0zfQu/sIYy1UANwAxvscIa0+4Z6JE2+uxu0= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:18:58 +1100 Message-Id: <20180315041903.10046-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-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 4/9] hw/misc/macio: Mark the macio devices with user_creatable = false 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, Thomas Huth , surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 The macio devices currently cause a crash when the user tries to instantiate them on a different machine: $ ppc64-softmmu/qemu-system-ppc64 -device macio-newworld Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222: qemu-system-ppc64: -device macio-newworld: Device 'serial0' is in use Aborted (core dumped) These devices are clearly not intended to be creatable by the user since they are using serial_hds[] directly in their instance_init function. So let's mark them with user_creatable =3D false. Signed-off-by: Thomas Huth Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/macio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index af1bd46b4b..454244f59e 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -406,6 +406,8 @@ static void macio_class_init(ObjectClass *klass, void *= data) k->class_id =3D PCI_CLASS_OTHERS << 8; dc->props =3D macio_properties; set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); + /* Reason: Uses serial_hds in macio_instance_init */ + dc->user_creatable =3D false; } =20 static const TypeInfo macio_oldworld_type_info =3D { --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521087847094105.78799820266056; Wed, 14 Mar 2018 21:24:07 -0700 (PDT) Received: from localhost ([::1]:49657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKQt-0002nC-1T for importer@patchew.org; Thu, 15 Mar 2018 00:24:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074Y-NM for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMI-00043w-Aw for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:34255) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKMH-00042A-VN; Thu, 15 Mar 2018 00:19:18 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc6jRMz9sVb; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=hIqwWhkqh0Atd66P6JgaBQ2ksoM6Ld+bJEAAK78HBjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=irKUskRWxSr6hR/0e7WKajIyI/5n/18V3UmeunAw+UO2rnW3yXqQ3n/26OeKH+HtR NE2VdEsQzpH0E50KDKtmbkq0CMkg0+CWSENQ2q+VjZAlFqU3q9nPPphmtdr7/Ojw9D oaU/TlEnzm2XF8qWk38gPp2vVits47QO1GTUgOh0= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:18:59 +1100 Message-Id: <20180315041903.10046-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 5/9] PPC e500: Fix gap between u-boot and kernel 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, surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, David Engraf , 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: David Engraf This patch moves the gap between u-boot and kernel at the correct location. Signed-off-by: David Engraf Signed-off-by: David Gibson --- hw/ppc/e500.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 43c15d18c4..bdef2bddc6 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1009,6 +1009,10 @@ void ppce500_init(MachineState *machine, PPCE500Para= ms *params) } =20 cur_base =3D loadaddr + payload_size; + if (cur_base < (32 * 1024 * 1024)) { + /* u-boot occupies memory up to 32MB, so load blobs above */ + cur_base =3D (32 * 1024 * 1024); + } =20 /* Load bare kernel only if no bios/u-boot has been provided */ if (machine->kernel_filename && !kernel_as_payload) { @@ -1025,11 +1029,6 @@ void ppce500_init(MachineState *machine, PPCE500Para= ms *params) cur_base +=3D kernel_size; } =20 - if (cur_base < (32 * 1024 * 1024)) { - /* u-boot occupies memory up to 32MB, so load blobs above */ - cur_base =3D (32 * 1024 * 1024); - } - /* Load initrd. */ if (machine->initrd_filename) { initrd_base =3D (cur_base + INITRD_LOAD_PAD) & ~INITRD_PAD_MASK; --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 15210878652351022.731603566375; Wed, 14 Mar 2018 21:24:25 -0700 (PDT) Received: from localhost ([::1]:49660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKRE-00035M-CO for importer@patchew.org; Thu, 15 Mar 2018 00:24:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074S-JL for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMI-00043q-A1 for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:34955) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKMH-000428-U9; Thu, 15 Mar 2018 00:19:18 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc5cXVz9sVX; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=YMYmOzhfiM3kS+euaarYGXfjyaKr28ubyRHzEJof7OY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gcBhSjQ7Tu8p1FImHsKnB7ijklcY63nfEFNhIbtHg5uKFE99HJUiRY7pwiAGWYGqU uHkYXx+u60db1fXELiwjti8olZXKwsXjrn8FEGyFYk4YKHSw93E3IRxoPTaNjcwM2Z lrzn24xMwKtF6EHWer1cCdc9I0mGhM3G9OtLQmXY= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:19:00 +1100 Message-Id: <20180315041903.10046-7-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 6/9] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth" 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, Thomas Huth , surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 With the new "--nic" command line parameter option, the "old" way of specifying a NIC model via the nd_table[] is becoming more prominent again. But for the pseries "spapr-vlan" device, there is a confusing discrepancy between the model name that is used for "--device" (i.e. "spapr-vlan") and the model name that has to be used for "--net nic" or the new "--nic" parameter (i.e. "ibmveth"). Since "spapr-vlan" is the "real" name of the device, let's allow "spapr-vlan" to be used as model name for the nd_table[] entries, too. Signed-off-by: Thomas Huth Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7e1c858566..dfa9e43601 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2607,10 +2607,11 @@ static void spapr_machine_init(MachineState *machin= e) NICInfo *nd =3D &nd_table[i]; =20 if (!nd->model) { - nd->model =3D g_strdup("ibmveth"); + nd->model =3D g_strdup("spapr-vlan"); } =20 - if (strcmp(nd->model, "ibmveth") =3D=3D 0) { + if (g_str_equal(nd->model, "spapr-vlan") || + g_str_equal(nd->model, "ibmveth")) { spapr_vlan_create(spapr->vio_bus, nd); } else { pci_nic_init_nofail(&nd_table[i], phb->bus, nd->model, NULL); --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521087859793293.26004659230193; Wed, 14 Mar 2018 21:24:19 -0700 (PDT) Received: from localhost ([::1]:49658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKR8-00030M-Uz for importer@patchew.org; Thu, 15 Mar 2018 00:24:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-000748-D0 for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMI-000442-Cf for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:43845) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKMI-00042G-0X; Thu, 15 Mar 2018 00:19:18 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMd1RvFz9sVh; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087549; bh=w55xhCjXyT/jQgAa04gwtlXbGRP7Gu3txeoxjJI9kkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aRQ78GWCuw6NYi8SN0jPK+zXtG6SdOMZ14Vuuj3qT0EwVPBcLZqpE9XuTzYEkVNNK wJdCfTcMgFl3jSGAjM2JMGXRv2nKdDx3feoQNfLlsWafNwUe4hD9OUnzWndyc8q/Nl ilRUg5mAZKEX8goo81gICvdbCjwD+wojlYIrhSAg= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:19:01 +1100 Message-Id: <20180315041903.10046-8-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 7/9] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...) 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, surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 Using log unimp is more appropriate for these messages and this also silences them by default so they won't clobber make check output when tests are added for this board. Signed-off-by: BALATON Zoltan Reviewed-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/ppc440_pcix.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index ab2626a9de..b1307e6477 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -21,6 +21,7 @@ =20 #include "qemu/osdep.h" #include "qemu/error-report.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/ppc/ppc.h" #include "hw/ppc/ppc4xx.h" @@ -286,8 +287,9 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr= addr, break; =20 default: - error_report("%s: unhandled PCI internal register 0x%lx", __func__, - (unsigned long)addr); + qemu_log_mask(LOG_UNIMP, + "%s: unhandled PCI internal register 0x%"HWADDR_PRIx= "\n", + __func__, addr); break; } } @@ -377,8 +379,9 @@ static uint64_t ppc440_pcix_reg_read4(void *opaque, hwa= ddr addr, break; =20 default: - error_report("%s: invalid PCI internal register 0x%lx", __func__, - (unsigned long)addr); + qemu_log_mask(LOG_UNIMP, + "%s: invalid PCI internal register 0x%" HWADDR_PRIx = "\n", + __func__, addr); val =3D 0; } =20 --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521087699192370.83879964836467; Wed, 14 Mar 2018 21:21:39 -0700 (PDT) Received: from localhost ([::1]:49645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKOY-0000H0-Af for importer@patchew.org; Thu, 15 Mar 2018 00:21:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074B-Da for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMI-00044A-ES for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:38447) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKMI-00042E-28; Thu, 15 Mar 2018 00:19:18 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMd0G0mz9sVZ; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087549; bh=DbkWalBBuFo7S07n2vhC+EUQ0XuiHGX4nuniQ+9n0R8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NrSYXrZI5b/yVRrCdlv77skPKUPYiWgauZ7FOgF1sG6Ya/NnPwF3w4MskSmg0NIxe 8uwdzuEZRLEj4QUFSeZyqXZ4OQRHOQWxfQUoRS16OayHBPo++70uv/TlKPpnAZQbct JDNcrDDbhkY6ROTnEo2exTMarmQqUg+HSv7zXPik= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:19:02 +1100 Message-Id: <20180315041903.10046-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 8/9] tests/boot-serial: Test the sam460ex board 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, Thomas Huth , surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 a U-Boot firmware for this board in our repository, and the firmware prints some output to the serial console, so we can check this board in the boot-serial tester, too. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- tests/boot-serial-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 5b24cd26c1..011525d8cf 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -79,12 +79,14 @@ static testdef_t tests[] =3D { { "ppc", "40p", "-boot d", "Booting from device d" }, { "ppc", "g3beige", "", "PowerPC,750" }, { "ppc", "mac99", "", "PowerPC,G4" }, + { "ppc", "sam460ex", "-m 256", "DRAM: 256 MiB" }, { "ppc64", "ppce500", "", "U-Boot" }, { "ppc64", "prep", "-boot e", "Booting from device e" }, { "ppc64", "40p", "-m 192", "Memory size: 192 MB" }, { "ppc64", "mac99", "", "PowerPC,970FX" }, { "ppc64", "pseries", "", "Open Firmware" }, { "ppc64", "powernv", "-cpu POWER8", "OPAL" }, + { "ppc64", "sam460ex", "-device e1000", "8086 100e" }, { "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" }, { "i386", "pc", "-device sga", "SGABIOS" }, { "i386", "q35", "-device sga", "SGABIOS" }, --=20 2.14.3 From nobody Sat Oct 25 02:31:11 2025 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 1521087863773505.38721038282927; Wed, 14 Mar 2018 21:24:23 -0700 (PDT) Received: from localhost ([::1]:49659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKRC-00033g-Vj for importer@patchew.org; Thu, 15 Mar 2018 00:24:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074Q-I2 for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMH-00043d-Vo for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([103.22.144.67]:41915) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKMH-000426-K5; Thu, 15 Mar 2018 00:19:17 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMd0nvlz9sVd; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087549; bh=Y5oAYO1Y4pyCBuBeA/32+fcJrJZu9Kifi3/lgr4XYmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RqQPJ04cF3P8Ed3svTTq0/CMG+GSiVo9hwv+TY9NFjaeOs7ifTPHXE4UvxUpxc8s4 R0j+cfF1mCLsC0oOQnG3CV2RqAs8Fl8ZF7El5+Nec5vhNwPJxZ1+rmttgp97AS0v+Y BYZO4w1mWRzFMbVVtAtclDlo/XBUZtdM3NqeR6aw= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:19:03 +1100 Message-Id: <20180315041903.10046-10-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-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 9/9] target/ppc: fix tlbsync to check privilege level depending on GTSE 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, surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.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 tlbsync also needs to check the Guest Translation Shootdown Enable (GTSE) bit in the Logical Partition Control Register (LPCR) to determine at which privilege level it is running. See commit c6fd28fd573d ("target/ppc: Update tlbie to check privilege level based on GTSE") Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Suraj Jitindar Singh Signed-off-by: David Gibson --- target/ppc/translate.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 0a0c090c99..218665b408 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4526,7 +4526,7 @@ static void gen_tlbie(DisasContext *ctx) TCGv_i32 t1; =20 if (ctx->gtse) { - CHK_SV; /* If gtse is set then tblie is supervisor privileged */ + CHK_SV; /* If gtse is set then tlbie is supervisor privileged */ } else { CHK_HV; /* Else hypervisor privileged */ } @@ -4553,7 +4553,12 @@ static void gen_tlbsync(DisasContext *ctx) #if defined(CONFIG_USER_ONLY) GEN_PRIV; #else - CHK_HV; + + if (ctx->gtse) { + CHK_SV; /* If gtse is set then tlbsync is supervisor privileged */ + } else { + CHK_HV; /* Else hypervisor privileged */ + } =20 /* BookS does both ptesync and tlbsync make tlbsync a nop for server */ if (ctx->insns_flags & PPC_BOOKE) { --=20 2.14.3