qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 6/6] q35: Allow only supported dynamic sysbus


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH v2 6/6] q35: Allow only supported dynamic sysbus devices
Date: Mon, 27 Nov 2017 10:44:34 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 25/11/2017 17:16, Eduardo Habkost wrote:
The only user-creatable sysbus devices in qemu-system-x86_64 are
amd-iommu, intel-iommu, and xen-backend.  xen-backend is handled
by xen_set_dynamic_sysbus(), so we only need to add amd-iommu and
intel-iommu.

Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
Changes series v1 -> v2:
* New patch added to series
---
  hw/i386/pc_q35.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index d0b0e5b422..db2bebb357 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -42,6 +42,8 @@
  #include "exec/address-spaces.h"
  #include "hw/i386/pc.h"
  #include "hw/i386/ich9.h"
+#include "hw/i386/amd_iommu.h"
+#include "hw/i386/intel_iommu.h"

Is a pity we have to add the AMD/Intel header files
only for the type, maybe we should have a header only
with the type names, anyway out of the scope of this series.

Another question, what about I440FX?
I think the AMD vIOMMU can theoretically work with the
conventional PCI machines, I am not sure if it was tested
or intended to work with it.

Reviewed-by: Marcel Apfelbaum <address@hidden>

Thanks,
Marcel

  #include "hw/smbios/smbios.h"
  #include "hw/ide/pci.h"
  #include "hw/ide/ahci.h"
@@ -299,8 +301,8 @@ static void pc_q35_machine_options(MachineClass *m)
      m->default_machine_opts = "firmware=bios-256k.bin";
      m->default_display = "std";
      m->no_floppy = 1;
-    /*TODO: allow only sysbus devices that really work with this machine */
-    machine_class_allow_dynamic_sysbus_dev(m, TYPE_SYS_BUS_DEVICE);
+    machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE);
+    machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
      m->max_cpus = 288;
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]