From nobody Thu May 2 01:28:12 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.zoho.com; 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 14903046521287.567803278235374; Thu, 23 Mar 2017 14:30:52 -0700 (PDT) Received: from localhost ([::1]:58787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAJm-0004vZ-Ja for importer@patchew.org; Thu, 23 Mar 2017 17:30:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAIF-0003WH-Bv for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crAIE-0008Ar-Jy for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54732) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crAIE-0008AI-Dh for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:14 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7110F6A6DD; Thu, 23 Mar 2017 21:29:14 +0000 (UTC) Received: from localhost (ovpn-116-27.gru2.redhat.com [10.97.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26B1BA5697; Thu, 23 Mar 2017 21:29:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7110F6A6DD Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7110F6A6DD From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 23 Mar 2017 18:28:45 -0300 Message-Id: <20170323212848.8492-2-ehabkost@redhat.com> In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com> References: <20170323212848.8492-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 23 Mar 2017 21:29:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class 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: jgross@suse.com, Thomas Huth , sstabellini@kernel.org, Markus Armbruster , Marcel Apfelbaum , Laszlo Ersek Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The xen-backend devices created by the Xen code are not supposed to be treated as dynamic sysbus devices. This is an attempt to change that and see what happens, but I couldn't test it because I don't have a Xen host set up. If this patch breaks anything, this means we have a bug in foreach_dynamic_sysbus_device(), which is supposed to return only devices created using -device. The original code that sets has_dynamic_sysbus was added by commit 3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894, but I don't see any comment explaining why it was necessary. Cc: Juergen Gross Cc: Stefano Stabellini Signed-off-by: Eduardo Habkost --- hw/xen/xen_backend.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index 6c21c37d68..4607d6d3ee 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -550,15 +550,6 @@ err: return -1; } =20 -static void xen_set_dynamic_sysbus(void) -{ - Object *machine =3D qdev_get_machine(); - ObjectClass *oc =3D object_get_class(machine); - MachineClass *mc =3D MACHINE_CLASS(oc); - - mc->has_dynamic_sysbus =3D true; -} - int xen_be_register(const char *type, struct XenDevOps *ops) { char path[50]; @@ -580,8 +571,6 @@ int xen_be_register(const char *type, struct XenDevOps = *ops) =20 void xen_be_register_common(void) { - xen_set_dynamic_sysbus(); - xen_be_register("console", &xen_console_ops); xen_be_register("vkbd", &xen_kbdmouse_ops); xen_be_register("qdisk", &xen_blkdev_ops); --=20 2.11.0.259.g40922b1 From nobody Thu May 2 01:28:12 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.zoho.com; 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 1490304862116685.6756749880883; Thu, 23 Mar 2017 14:34:22 -0700 (PDT) Received: from localhost ([::1]:58831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crANA-00082B-Qo for importer@patchew.org; Thu, 23 Mar 2017 17:34:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAII-0003YS-6d for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crAIG-0008CA-Kv for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34820) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crAIG-0008BN-C0 for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:16 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B5FEC05B1C7; Thu, 23 Mar 2017 21:29:16 +0000 (UTC) Received: from localhost (ovpn-116-27.gru2.redhat.com [10.97.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8AF9AAACA; Thu, 23 Mar 2017 21:29:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5B5FEC05B1C7 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5B5FEC05B1C7 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 23 Mar 2017 18:28:46 -0300 Message-Id: <20170323212848.8492-3-ehabkost@redhat.com> In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com> References: <20170323212848.8492-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 23 Mar 2017 21:29:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 2/4] machine: Replace has_dynamic_sysbus with a whitelist 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: jgross@suse.com, Thomas Huth , sstabellini@kernel.org, Markus Armbruster , Marcel Apfelbaum , Laszlo Ersek Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Replace the existing has_dynamic_sysbus flag, that makes the machine accept every single sysbus device type on the command-line, with a short whitelist. Most of the machines already have an internal whitelist implemented using foreach_dynamic_sysbus_device(), so we just encode the existing behavior inside the new MachineClass field. The only problematic case is q35, that accepts all sysbus device types. In this case, instad of adding TYPE_SYS_BUS_DEVICE to the whitelist, add the existing list of existing sysbus device types to keep compatibility. After that, we can gradually and carefully remove unnecessary entries from the q35 whitelist. Signed-off-by: Eduardo Habkost --- include/hw/arm/sysbus-fdt.h | 7 +++++++ include/hw/boards.h | 3 ++- hw/arm/sysbus-fdt.c | 10 ++++++++++ hw/arm/virt.c | 4 +++- hw/core/machine.c | 43 +++++++++++++++++++++++++++++------------= -- hw/i386/pc_q35.c | 29 ++++++++++++++++++++++++++++- hw/ppc/e500plat.c | 4 +++- hw/ppc/spapr.c | 2 +- 8 files changed, 83 insertions(+), 19 deletions(-) diff --git a/include/hw/arm/sysbus-fdt.h b/include/hw/arm/sysbus-fdt.h index e15bb81807..071124e13d 100644 --- a/include/hw/arm/sysbus-fdt.h +++ b/include/hw/arm/sysbus-fdt.h @@ -57,4 +57,11 @@ typedef struct { */ void arm_register_platform_bus_fdt_creator(ARMPlatformBusFDTParams *fdt_pa= rams); =20 +/** + * arm_register_fdt_sysbus_whitelist - register supported sysbus device ty= pes + * + * Add supported dynamic sysbus device types to machine class. + */ +void arm_register_fdt_sysbus_whitelist(MachineClass *mc); + #endif diff --git a/include/hw/boards.h b/include/hw/boards.h index 269d0ba399..6576f6a5b0 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -42,6 +42,7 @@ bool machine_dump_guest_core(MachineState *machine); bool machine_mem_merge(MachineState *machine); void machine_register_compat_props(MachineState *machine); HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine= ); +void machine_class_add_sysbus_whitelist(MachineClass *mc, const char *type= ); =20 /** * CPUArchId: @@ -121,7 +122,6 @@ struct MachineClass { no_floppy:1, no_cdrom:1, no_sdcard:1, - has_dynamic_sysbus:1, pci_allow_0_address:1, legacy_fw_cfg_order:1; int is_default; @@ -135,6 +135,7 @@ struct MachineClass { bool rom_file_has_mr; int minimum_page_bits; bool has_hotpluggable_cpus; + strList *dynamic_sysbus_whitelist; =20 HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index d68e3dcdbd..29573a4412 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/arm/sysbus-fdt.c @@ -29,6 +29,7 @@ #include #endif #include "hw/arm/sysbus-fdt.h" +#include "hw/boards.h" #include "qemu/error-report.h" #include "sysemu/device_tree.h" #include "hw/platform-bus.h" @@ -424,6 +425,15 @@ static const NodeCreationPair add_fdt_node_functions[]= =3D { {"", NULL}, /* last element */ }; =20 +void arm_register_fdt_sysbus_whitelist(MachineClass *mc) +{ + int i; + + for (i =3D 0; i < ARRAY_SIZE(add_fdt_node_functions); i++) { + machine_class_add_sysbus_whitelist(mc, add_fdt_node_functions[i].t= ypename); + } +} + /* Generic Code */ =20 /** diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 5f62a0321e..293710a6ea 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -52,6 +52,8 @@ #include "hw/arm/fdt.h" #include "hw/intc/arm_gic.h" #include "hw/intc/arm_gicv3_common.h" +#include "hw/vfio/vfio-calxeda-xgmac.h" +#include "hw/vfio/vfio-amd-xgbe.h" #include "kvm_arm.h" #include "hw/smbios/smbios.h" #include "qapi/visitor.h" @@ -1528,7 +1530,7 @@ static void virt_machine_class_init(ObjectClass *oc, = void *data) * configuration of the particular instance. */ mc->max_cpus =3D 255; - mc->has_dynamic_sysbus =3D true; + arm_register_fdt_sysbus_whitelist(mc); mc->block_default_type =3D IF_VIRTIO; mc->no_cdrom =3D 1; mc->pci_allow_0_address =3D true; diff --git a/hw/core/machine.c b/hw/core/machine.c index 0d92672203..606edffc38 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -332,29 +332,44 @@ static bool machine_get_enforce_config_section(Object= *obj, Error **errp) return ms->enforce_config_section; } =20 -static void error_on_sysbus_device(SysBusDevice *sbdev, void *opaque) +void machine_class_add_sysbus_whitelist(MachineClass *mc, const char *type) { - error_report("Option '-device %s' cannot be handled by this machine", - object_class_get_name(object_get_class(OBJECT(sbdev)))); - exit(1); + strList *item =3D g_new0(strList, 1); + + item->value =3D g_strdup(type); + item->next =3D mc->dynamic_sysbus_whitelist; + mc->dynamic_sysbus_whitelist =3D item; } =20 -static void machine_init_notify(Notifier *notifier, void *data) +static void validate_sysbus_device(SysBusDevice *sbdev, void *opaque) { - Object *machine =3D qdev_get_machine(); - ObjectClass *oc =3D object_get_class(machine); - MachineClass *mc =3D MACHINE_CLASS(oc); + MachineState *machine =3D opaque; + MachineClass *mc =3D MACHINE_GET_CLASS(machine); + bool whitelisted =3D false; + strList *wl; =20 - if (mc->has_dynamic_sysbus) { - /* Our machine can handle dynamic sysbus devices, we're all good */ - return; + for (wl =3D mc->dynamic_sysbus_whitelist; + !whitelisted && wl; + wl =3D wl->next) { + whitelisted |=3D !!object_dynamic_cast(OBJECT(sbdev), wl->value); } =20 + if (!whitelisted) { + error_report("Option '-device %s' cannot be handled by this machin= e", + object_class_get_name(object_get_class(OBJECT(sbdev))= )); + exit(1); + } +} + +static void machine_init_notify(Notifier *notifier, void *data) +{ + MachineState *machine =3D MACHINE(qdev_get_machine()); + /* - * Loop through all dynamically created devices and check whether there - * are sysbus devices among them. If there are, error out. + * Loop through all dynamically created sysbus devices and check if th= ey are + * all whitelisted. If there are non-whitelisted devices, error out. */ - foreach_dynamic_sysbus_device(error_on_sysbus_device, NULL); + foreach_dynamic_sysbus_device(validate_sysbus_device, machine); } =20 HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index dd792a8547..ea039540d8 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -297,7 +297,34 @@ static void pc_q35_machine_options(MachineClass *m) m->default_machine_opts =3D "firmware=3Dbios-256k.bin"; m->default_display =3D "std"; m->no_floppy =3D 1; - m->has_dynamic_sysbus =3D true; + /* The following whitelist is based on the set of available + * sysbus devices when has_dynamic_sysbus was replaced with + * a whitelist. Not every single device in this list is really + * supposed to be supported, but they are kept here for compatibility. + * We can gradually remove unnecessary devices from the whitelist. + */ + machine_class_add_sysbus_whitelist(m, "allwinner-ahci"); + machine_class_add_sysbus_whitelist(m, "amd-iommu"); + machine_class_add_sysbus_whitelist(m, "cfi.pflash01"); + machine_class_add_sysbus_whitelist(m, "esp"); + machine_class_add_sysbus_whitelist(m, "fw_cfg_io"); + machine_class_add_sysbus_whitelist(m, "fw_cfg_mem"); + machine_class_add_sysbus_whitelist(m, "generic-sdhci"); + machine_class_add_sysbus_whitelist(m, "hpet"); + machine_class_add_sysbus_whitelist(m, "intel-iommu"); + machine_class_add_sysbus_whitelist(m, "ioapic"); + machine_class_add_sysbus_whitelist(m, "isabus-bridge"); + machine_class_add_sysbus_whitelist(m, "kvm-ioapic"); + machine_class_add_sysbus_whitelist(m, "kvmclock"); + machine_class_add_sysbus_whitelist(m, "kvmvapic"); + machine_class_add_sysbus_whitelist(m, "SUNW,fdtwo"); + machine_class_add_sysbus_whitelist(m, "sysbus-ahci"); + machine_class_add_sysbus_whitelist(m, "sysbus-fdc"); + machine_class_add_sysbus_whitelist(m, "sysbus-ohci"); + machine_class_add_sysbus_whitelist(m, "unimplemented-device"); + machine_class_add_sysbus_whitelist(m, "virtio-mmio"); + machine_class_add_sysbus_whitelist(m, "xen-backend"); + machine_class_add_sysbus_whitelist(m, "xen-sysdev"); m->max_cpus =3D 288; } =20 diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 94b454551f..3abed05add 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -12,7 +12,9 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "e500.h" +#include "hw/net/fsl_etsec/etsec.h" #include "hw/boards.h" +#include "hw/sysbus.h" #include "sysemu/device_tree.h" #include "sysemu/kvm.h" #include "hw/pci/pci.h" @@ -63,7 +65,7 @@ static void e500plat_machine_init(MachineClass *mc) mc->desc =3D "generic paravirt e500 platform"; mc->init =3D e500plat_init; mc->max_cpus =3D 32; - mc->has_dynamic_sysbus =3D true; + machine_class_add_sysbus_whitelist(mc, TYPE_ETSEC_COMMON); } =20 DEFINE_MACHINE("ppce500", e500plat_machine_init) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6ee566d658..db56d0a653 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3070,7 +3070,7 @@ static void spapr_machine_class_init(ObjectClass *oc,= void *data) mc->default_boot_order =3D ""; mc->default_ram_size =3D 512 * M_BYTE; mc->kvm_type =3D spapr_kvm_type; - mc->has_dynamic_sysbus =3D true; + machine_class_add_sysbus_whitelist(mc, TYPE_SPAPR_PCI_HOST_BRIDGE); mc->pci_allow_0_address =3D true; mc->get_hotplug_handler =3D spapr_get_hotplug_handler; hc->pre_plug =3D spapr_machine_device_pre_plug; --=20 2.11.0.259.g40922b1 From nobody Thu May 2 01:28:12 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.zoho.com; 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 1490304905628644.7383496002944; Thu, 23 Mar 2017 14:35:05 -0700 (PDT) Received: from localhost ([::1]:58839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crANs-00009t-Fl for importer@patchew.org; Thu, 23 Mar 2017 17:35:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAIN-0003dz-IR for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crAIK-0008DA-8V for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crAIK-0008Cl-2L for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:20 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F7967E9DA; Thu, 23 Mar 2017 21:29:20 +0000 (UTC) Received: from localhost (ovpn-116-27.gru2.redhat.com [10.97.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id B47E9852D1; Thu, 23 Mar 2017 21:29:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F7967E9DA Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1F7967E9DA From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 23 Mar 2017 18:28:47 -0300 Message-Id: <20170323212848.8492-4-ehabkost@redhat.com> In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com> References: <20170323212848.8492-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 23 Mar 2017 21:29:20 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 3/4] q35: Remove ioapic devices from sysbus whitelist 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: jgross@suse.com, Thomas Huth , sstabellini@kernel.org, Markus Armbruster , Marcel Apfelbaum , Laszlo Ersek Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" An ioapic device is always created by the q35 machine, so "-device ioapic" and "-device kvm-ioapic" never worked before. Remove it from the sysbus whitelist. Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index ea039540d8..94a3069e16 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -312,9 +312,7 @@ static void pc_q35_machine_options(MachineClass *m) machine_class_add_sysbus_whitelist(m, "generic-sdhci"); machine_class_add_sysbus_whitelist(m, "hpet"); machine_class_add_sysbus_whitelist(m, "intel-iommu"); - machine_class_add_sysbus_whitelist(m, "ioapic"); machine_class_add_sysbus_whitelist(m, "isabus-bridge"); - machine_class_add_sysbus_whitelist(m, "kvm-ioapic"); machine_class_add_sysbus_whitelist(m, "kvmclock"); machine_class_add_sysbus_whitelist(m, "kvmvapic"); machine_class_add_sysbus_whitelist(m, "SUNW,fdtwo"); --=20 2.11.0.259.g40922b1 From nobody Thu May 2 01:28:12 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.zoho.com; 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 1490304978808416.1382524575247; Thu, 23 Mar 2017 14:36:18 -0700 (PDT) Received: from localhost ([::1]:58865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAP3-0000zJ-Mw for importer@patchew.org; Thu, 23 Mar 2017 17:36:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAIQ-0003go-7P for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crAIP-0008GV-HO for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55886) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crAIP-0008Fz-Bk for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 615E44E4D6; Thu, 23 Mar 2017 21:29:25 +0000 (UTC) Received: from localhost (ovpn-116-27.gru2.redhat.com [10.97.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89C7E18351; Thu, 23 Mar 2017 21:29:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 615E44E4D6 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 615E44E4D6 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 23 Mar 2017 18:28:48 -0300 Message-Id: <20170323212848.8492-5-ehabkost@redhat.com> In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com> References: <20170323212848.8492-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 23 Mar 2017 21:29:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 4/4] q35: Remove fw_cfg* from sysbus whitelist 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: jgross@suse.com, Thomas Huth , sstabellini@kernel.org, Markus Armbruster , Marcel Apfelbaum , Laszlo Ersek Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" fw_cfg devices are supposed to be created by the q35 board code, and not manually using -device. Remove them from the whitelist. Suggested-by: Laszlo Ersek Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 94a3069e16..91d7f67e48 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -307,8 +307,6 @@ static void pc_q35_machine_options(MachineClass *m) machine_class_add_sysbus_whitelist(m, "amd-iommu"); machine_class_add_sysbus_whitelist(m, "cfi.pflash01"); machine_class_add_sysbus_whitelist(m, "esp"); - machine_class_add_sysbus_whitelist(m, "fw_cfg_io"); - machine_class_add_sysbus_whitelist(m, "fw_cfg_mem"); machine_class_add_sysbus_whitelist(m, "generic-sdhci"); machine_class_add_sysbus_whitelist(m, "hpet"); machine_class_add_sysbus_whitelist(m, "intel-iommu"); --=20 2.11.0.259.g40922b1