qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref
@ 2024-08-16 16:13 Peter Maydell
  2024-08-16 16:13 ` [PATCH 1/4] hw: add compat machines for 9.2 Peter Maydell
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Peter Maydell @ 2024-08-16 16:13 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Leif Lindholm, Marcin Juszkiewicz, Eric Auger, Radoslaw Biernacki

This patchset enables support for nested (two stage) translations
in the SMMU in the virt and sbsa-ref boards.

Patch 1 is Cornelia's compat-machine machinery patch, which we
need to make this change only happen for virt-9.2 and later;
patch 2 is a trivial "missing comment update" change; patches
3 and 4 are the board changes.

Enabling nested support should be transparent to guests, which
will only enable stage 2 if they actually want it.

thanks
-- PMM

Cornelia Huck (1):
  hw: add compat machines for 9.2

Peter Maydell (3):
  hw/arm/smmuv3: Update comment documenting "stage" property
  hw/arm/virt: Default to two-stage SMMU from virt-9.2
  hw/arm/sbsa-ref: Use two-stage SMMU

 include/hw/arm/virt.h      |  1 +
 include/hw/boards.h        |  3 +++
 include/hw/i386/pc.h       |  3 +++
 hw/arm/sbsa-ref.c          |  1 +
 hw/arm/smmuv3.c            |  1 +
 hw/arm/virt.c              | 19 +++++++++++++++++--
 hw/core/machine.c          |  3 +++
 hw/i386/pc.c               |  3 +++
 hw/i386/pc_piix.c          | 15 ++++++++++++---
 hw/i386/pc_q35.c           | 13 +++++++++++--
 hw/m68k/virt.c             | 11 +++++++++--
 hw/ppc/spapr.c             | 17 ++++++++++++++---
 hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
 13 files changed, 91 insertions(+), 13 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] hw: add compat machines for 9.2
  2024-08-16 16:13 [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Peter Maydell
@ 2024-08-16 16:13 ` Peter Maydell
  2024-08-16 16:13 ` [PATCH 2/4] hw/arm/smmuv3: Update comment documenting "stage" property Peter Maydell
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2024-08-16 16:13 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Leif Lindholm, Marcin Juszkiewicz, Eric Auger, Radoslaw Biernacki

From: Cornelia Huck <cohuck@redhat.com>

Add 9.2 machine types for arm/i440fx/m68k/q35/s390x/spapr.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20240816103723.2325982-1-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/hw/boards.h        |  3 +++
 include/hw/i386/pc.h       |  3 +++
 hw/arm/virt.c              | 11 +++++++++--
 hw/core/machine.c          |  3 +++
 hw/i386/pc.c               |  3 +++
 hw/i386/pc_piix.c          | 15 ++++++++++++---
 hw/i386/pc_q35.c           | 13 +++++++++++--
 hw/m68k/virt.c             | 11 +++++++++--
 hw/ppc/spapr.c             | 17 ++++++++++++++---
 hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
 10 files changed, 80 insertions(+), 13 deletions(-)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 48ff6d8b93f..9a492770cbb 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -732,6 +732,9 @@ struct MachineState {
     } \
     type_init(machine_initfn##_register_types)
 
+extern GlobalProperty hw_compat_9_1[];
+extern const size_t hw_compat_9_1_len;
+
 extern GlobalProperty hw_compat_9_0[];
 extern const size_t hw_compat_9_0_len;
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 4e55d7ef6ea..14ee06287da 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -215,6 +215,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size);
 /* sgx.c */
 void pc_machine_init_sgx_epc(PCMachineState *pcms);
 
+extern GlobalProperty pc_compat_9_1[];
+extern const size_t pc_compat_9_1_len;
+
 extern GlobalProperty pc_compat_9_0[];
 extern const size_t pc_compat_9_0_len;
 
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 687fe0bb8bc..a5d3ad9bf9e 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3301,10 +3301,17 @@ static void machvirt_machine_init(void)
 }
 type_init(machvirt_machine_init);
 
-static void virt_machine_9_1_options(MachineClass *mc)
+static void virt_machine_9_2_options(MachineClass *mc)
 {
 }
-DEFINE_VIRT_MACHINE_AS_LATEST(9, 1)
+DEFINE_VIRT_MACHINE_AS_LATEST(9, 2)
+
+static void virt_machine_9_1_options(MachineClass *mc)
+{
+    virt_machine_9_2_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+}
+DEFINE_VIRT_MACHINE(9, 1)
 
 static void virt_machine_9_0_options(MachineClass *mc)
 {
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 27dcda02483..adaba17ebac 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -34,6 +34,9 @@
 #include "hw/virtio/virtio-iommu.h"
 #include "audio/audio.h"
 
+GlobalProperty hw_compat_9_1[] = {};
+const size_t hw_compat_9_1_len = G_N_ELEMENTS(hw_compat_9_1);
+
 GlobalProperty hw_compat_9_0[] = {
     {"arm-cpu", "backcompat-cntfrq", "true" },
     { "scsi-hd", "migrate-emulated-scsi-request", "false" },
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c74931d577a..0cf4cb0d9f2 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -79,6 +79,9 @@
     { "qemu64-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\
     { "athlon-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },
 
+GlobalProperty pc_compat_9_1[] = {};
+const size_t pc_compat_9_1_len = G_N_ELEMENTS(pc_compat_9_1);
+
 GlobalProperty pc_compat_9_0[] = {
     { TYPE_X86_CPU, "x-amd-topoext-features-only", "false" },
     { TYPE_X86_CPU, "x-l1-cache-per-thread", "false" },
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index d9e69243b4a..746bfe05d38 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -479,13 +479,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
                                      "Use a different south bridge than PIIX3");
 }
 
-static void pc_i440fx_machine_9_1_options(MachineClass *m)
+static void pc_i440fx_machine_9_2_options(MachineClass *m)
 {
     pc_i440fx_machine_options(m);
     m->alias = "pc";
     m->is_default = true;
 }
 
+DEFINE_I440FX_MACHINE(9, 2);
+
+static void pc_i440fx_machine_9_1_options(MachineClass *m)
+{
+    pc_i440fx_machine_9_2_options(m);
+    m->alias = NULL;
+    m->is_default = false;
+    compat_props_add(m->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+    compat_props_add(m->compat_props, pc_compat_9_1, pc_compat_9_1_len);
+}
+
 DEFINE_I440FX_MACHINE(9, 1);
 
 static void pc_i440fx_machine_9_0_options(MachineClass *m)
@@ -493,8 +504,6 @@ static void pc_i440fx_machine_9_0_options(MachineClass *m)
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
 
     pc_i440fx_machine_9_1_options(m);
-    m->alias = NULL;
-    m->is_default = false;
     m->smbios_memory_device_size = 16 * GiB;
 
     compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 9d108b194e4..67162ac8863 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -361,19 +361,28 @@ static void pc_q35_machine_options(MachineClass *m)
                      pc_q35_compat_defaults, pc_q35_compat_defaults_len);
 }
 
-static void pc_q35_machine_9_1_options(MachineClass *m)
+static void pc_q35_machine_9_2_options(MachineClass *m)
 {
     pc_q35_machine_options(m);
     m->alias = "q35";
 }
 
+DEFINE_Q35_MACHINE(9, 2);
+
+static void pc_q35_machine_9_1_options(MachineClass *m)
+{
+    pc_q35_machine_9_2_options(m);
+    m->alias = NULL;
+    compat_props_add(m->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+    compat_props_add(m->compat_props, pc_compat_9_1, pc_compat_9_1_len);
+}
+
 DEFINE_Q35_MACHINE(9, 1);
 
 static void pc_q35_machine_9_0_options(MachineClass *m)
 {
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_machine_9_1_options(m);
-    m->alias = NULL;
     m->smbios_memory_device_size = 16 * GiB;
     compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len);
     compat_props_add(m->compat_props, pc_compat_9_0, pc_compat_9_0_len);
diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
index cda199af8fa..ea5c4a5a570 100644
--- a/hw/m68k/virt.c
+++ b/hw/m68k/virt.c
@@ -366,10 +366,17 @@ type_init(virt_machine_register_types)
 #define DEFINE_VIRT_MACHINE(major, minor) \
     DEFINE_VIRT_MACHINE_IMPL(false, major, minor)
 
-static void virt_machine_9_1_options(MachineClass *mc)
+static void virt_machine_9_2_options(MachineClass *mc)
 {
 }
-DEFINE_VIRT_MACHINE_AS_LATEST(9, 1)
+DEFINE_VIRT_MACHINE_AS_LATEST(9, 2)
+
+static void virt_machine_9_1_options(MachineClass *mc)
+{
+    virt_machine_9_2_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+}
+DEFINE_VIRT_MACHINE(9, 1)
 
 static void virt_machine_9_0_options(MachineClass *mc)
 {
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 370d7c35d3a..8aa3ce7449b 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4838,14 +4838,25 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
     DEFINE_SPAPR_MACHINE_IMPL(false, major, minor, _, tag)
 
 /*
- * pseries-9.1
+ * pseries-9.2
  */
-static void spapr_machine_9_1_class_options(MachineClass *mc)
+static void spapr_machine_9_2_class_options(MachineClass *mc)
 {
     /* Defaults for the latest behaviour inherited from the base class */
 }
 
-DEFINE_SPAPR_MACHINE_AS_LATEST(9, 1);
+DEFINE_SPAPR_MACHINE_AS_LATEST(9, 2);
+
+/*
+ * pseries-9.1
+ */
+static void spapr_machine_9_1_class_options(MachineClass *mc)
+{
+    spapr_machine_9_2_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+}
+
+DEFINE_SPAPR_MACHINE(9, 1);
 
 /*
  * pseries-9.0
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index c483ff8064d..18240a0fd8b 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -871,14 +871,26 @@ static const TypeInfo ccw_machine_info = {
     DEFINE_CCW_MACHINE_IMPL(false, major, minor)
 
 
+static void ccw_machine_9_2_instance_options(MachineState *machine)
+{
+}
+
+static void ccw_machine_9_2_class_options(MachineClass *mc)
+{
+}
+DEFINE_CCW_MACHINE_AS_LATEST(9, 2);
+
 static void ccw_machine_9_1_instance_options(MachineState *machine)
 {
+    ccw_machine_9_2_instance_options(machine);
 }
 
 static void ccw_machine_9_1_class_options(MachineClass *mc)
 {
+    ccw_machine_9_2_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len);
 }
-DEFINE_CCW_MACHINE_AS_LATEST(9, 1);
+DEFINE_CCW_MACHINE(9, 1);
 
 static void ccw_machine_9_0_instance_options(MachineState *machine)
 {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] hw/arm/smmuv3: Update comment documenting "stage" property
  2024-08-16 16:13 [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Peter Maydell
  2024-08-16 16:13 ` [PATCH 1/4] hw: add compat machines for 9.2 Peter Maydell
@ 2024-08-16 16:13 ` Peter Maydell
  2024-08-16 16:13 ` [PATCH 3/4] hw/arm/virt: Default to two-stage SMMU from virt-9.2 Peter Maydell
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2024-08-16 16:13 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Leif Lindholm, Marcin Juszkiewicz, Eric Auger, Radoslaw Biernacki

When we added support for nested (stage 1 + stage 2) translation
to the SMMU in commit 58377c363291d we forgot to update the
comment that documents the valid values of the "stage" property.
Add the new "nested" value to it.

Fixes: 58377c363291d ("hw/arm/smmuv3: Support and advertise nesting")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/smmuv3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 39719763897..4c49b5a885f 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -1981,6 +1981,7 @@ static Property smmuv3_properties[] = {
      * Stages of translation advertised.
      * "1": Stage 1
      * "2": Stage 2
+     * "nested": Both stage 1 and stage 2
      * Defaults to stage 1
      */
     DEFINE_PROP_STRING("stage", SMMUv3State, stage),
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] hw/arm/virt: Default to two-stage SMMU from virt-9.2
  2024-08-16 16:13 [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Peter Maydell
  2024-08-16 16:13 ` [PATCH 1/4] hw: add compat machines for 9.2 Peter Maydell
  2024-08-16 16:13 ` [PATCH 2/4] hw/arm/smmuv3: Update comment documenting "stage" property Peter Maydell
@ 2024-08-16 16:13 ` Peter Maydell
  2024-08-16 16:13 ` [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU Peter Maydell
  2024-08-19 10:07 ` [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Eric Auger
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2024-08-16 16:13 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Leif Lindholm, Marcin Juszkiewicz, Eric Auger, Radoslaw Biernacki

Now that our SMMU model supports enabling both stages of translation
at once, we can enable this in the virt board.  This is no change in
behaviour for guests, because if they simply ignore stage 2 and never
configure it then it has no effect.  For the usual backwards
compatibility reasons we enable this only for machine types starting
with 9.2.

(Note that the SMMU is disabled by default on the virt board and is
only created if the user passes the 'iommu=smmuv3' machine option.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/hw/arm/virt.h | 1 +
 hw/arm/virt.c         | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index a4d937ed45a..aca4f8061b1 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -134,6 +134,7 @@ struct VirtMachineClass {
     bool no_cpu_topology;
     bool no_tcg_lpa2;
     bool no_ns_el2_virt_timer_irq;
+    bool no_nested_smmu;
 };
 
 struct VirtMachineState {
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a5d3ad9bf9e..7934b236516 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1408,6 +1408,7 @@ static void create_pcie_irq_map(const MachineState *ms,
 static void create_smmu(const VirtMachineState *vms,
                         PCIBus *bus)
 {
+    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     char *node;
     const char compat[] = "arm,smmu-v3";
     int irq =  vms->irqmap[VIRT_SMMU];
@@ -1424,6 +1425,9 @@ static void create_smmu(const VirtMachineState *vms,
 
     dev = qdev_new(TYPE_ARM_SMMUV3);
 
+    if (!vmc->no_nested_smmu) {
+        object_property_set_str(OBJECT(dev), "stage", "nested", &error_fatal);
+    }
     object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus),
                              &error_abort);
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
@@ -3308,8 +3312,12 @@ DEFINE_VIRT_MACHINE_AS_LATEST(9, 2)
 
 static void virt_machine_9_1_options(MachineClass *mc)
 {
+    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+
     virt_machine_9_2_options(mc);
     compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len);
+    /* 9.1 and earlier have only a stage-1 SMMU, not a nested s1+2 one */
+    vmc->no_nested_smmu = true;
 }
 DEFINE_VIRT_MACHINE(9, 1)
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU
  2024-08-16 16:13 [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Peter Maydell
                   ` (2 preceding siblings ...)
  2024-08-16 16:13 ` [PATCH 3/4] hw/arm/virt: Default to two-stage SMMU from virt-9.2 Peter Maydell
@ 2024-08-16 16:13 ` Peter Maydell
  2024-08-19  9:39   ` Marcin Juszkiewicz
  2024-08-19 10:07 ` [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Eric Auger
  4 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2024-08-16 16:13 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Leif Lindholm, Marcin Juszkiewicz, Eric Auger, Radoslaw Biernacki

Now that our SMMU model supports enabling both stages of translation
at once, we can enable this in the sbsa-ref board.  Existing guest
code that only programs stage 1 and doesn't care about stage 2 should
continue to run with the same behaviour, but guests that do want to
do nested SMMU configurations can now do so.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/sbsa-ref.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index ae37a923015..396abe9c1bd 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -621,6 +621,7 @@ static void create_smmu(const SBSAMachineState *sms, PCIBus *bus)
 
     dev = qdev_new(TYPE_ARM_SMMUV3);
 
+    object_property_set_str(OBJECT(dev), "stage", "nested", &error_abort);
     object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus),
                              &error_abort);
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU
  2024-08-16 16:13 ` [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU Peter Maydell
@ 2024-08-19  9:39   ` Marcin Juszkiewicz
  0 siblings, 0 replies; 7+ messages in thread
From: Marcin Juszkiewicz @ 2024-08-19  9:39 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel
  Cc: Leif Lindholm, Eric Auger, Radoslaw Biernacki

W dniu 16.08.2024 o 18:13, Peter Maydell pisze:
> Now that our SMMU model supports enabling both stages of translation
> at once, we can enable this in the sbsa-ref board.  Existing guest
> code that only programs stage 1 and doesn't care about stage 2 should
> continue to run with the same behaviour, but guests that do want to
> do nested SMMU configurations can now do so.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Yay! Another step in getting (S)BSA ACS pass done:

Operating System View:
  304 : Check SMMU S-EL2 & stage1 support          : Result:  PASS
Hypervisor View:
  352 : Check SMMU S-EL2 & stage2 support          : Result:  PASS

Reviewed-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

> ---
>   hw/arm/sbsa-ref.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index ae37a923015..396abe9c1bd 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -621,6 +621,7 @@ static void create_smmu(const SBSAMachineState *sms, PCIBus *bus)
>   
>       dev = qdev_new(TYPE_ARM_SMMUV3);
>   
> +    object_property_set_str(OBJECT(dev), "stage", "nested", &error_abort);
>       object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus),
>                                &error_abort);
>       sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref
  2024-08-16 16:13 [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Peter Maydell
                   ` (3 preceding siblings ...)
  2024-08-16 16:13 ` [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU Peter Maydell
@ 2024-08-19 10:07 ` Eric Auger
  4 siblings, 0 replies; 7+ messages in thread
From: Eric Auger @ 2024-08-19 10:07 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel
  Cc: Leif Lindholm, Marcin Juszkiewicz, Radoslaw Biernacki

Hi Peter,

On 8/16/24 18:13, Peter Maydell wrote:
> This patchset enables support for nested (two stage) translations
> in the SMMU in the virt and sbsa-ref boards.
>
> Patch 1 is Cornelia's compat-machine machinery patch, which we
> need to make this change only happen for virt-9.2 and later;
> patch 2 is a trivial "missing comment update" change; patches
> 3 and 4 are the board changes.
>
> Enabling nested support should be transparent to guests, which
> will only enable stage 2 if they actually want it.
>
> thanks
> -- PMM

For the whole series:

Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric

>
> Cornelia Huck (1):
>   hw: add compat machines for 9.2
>
> Peter Maydell (3):
>   hw/arm/smmuv3: Update comment documenting "stage" property
>   hw/arm/virt: Default to two-stage SMMU from virt-9.2
>   hw/arm/sbsa-ref: Use two-stage SMMU
>
>  include/hw/arm/virt.h      |  1 +
>  include/hw/boards.h        |  3 +++
>  include/hw/i386/pc.h       |  3 +++
>  hw/arm/sbsa-ref.c          |  1 +
>  hw/arm/smmuv3.c            |  1 +
>  hw/arm/virt.c              | 19 +++++++++++++++++--
>  hw/core/machine.c          |  3 +++
>  hw/i386/pc.c               |  3 +++
>  hw/i386/pc_piix.c          | 15 ++++++++++++---
>  hw/i386/pc_q35.c           | 13 +++++++++++--
>  hw/m68k/virt.c             | 11 +++++++++--
>  hw/ppc/spapr.c             | 17 ++++++++++++++---
>  hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
>  13 files changed, 91 insertions(+), 13 deletions(-)
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-19 10:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16 16:13 [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Peter Maydell
2024-08-16 16:13 ` [PATCH 1/4] hw: add compat machines for 9.2 Peter Maydell
2024-08-16 16:13 ` [PATCH 2/4] hw/arm/smmuv3: Update comment documenting "stage" property Peter Maydell
2024-08-16 16:13 ` [PATCH 3/4] hw/arm/virt: Default to two-stage SMMU from virt-9.2 Peter Maydell
2024-08-16 16:13 ` [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU Peter Maydell
2024-08-19  9:39   ` Marcin Juszkiewicz
2024-08-19 10:07 ` [PATCH 0/4] hw/arm: Enable 'nested' SMMU in virt, sbsa-ref Eric Auger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).