Skip to contentSkip to conversation

hw/arm/virt: Add virtio-transports property

PATCH Superseded Mohammadfaiz Bawa 3 participants 10 messages Feb 11 – Feb 19

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/arm/virt: Add virtio-transports property

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Usage: -machine virt,virtio-transports=0

---
 hw/arm/virt-acpi-build.c |  2 +-
 hw/arm/virt.c            | 43 ++++++++++++++++++++++++++++++++++++++--
 include/hw/arm/virt.h    |  1 +
 3 files changed, 43 insertions(+), 3 deletions(-)
hw/arm/virt-acpi-build.c +1 -1
index c145678185..27c007fd62 100644
@@ -1150,7 +1150,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
     fw_cfg_acpi_dsdt_add(scope, &memmap[VIRT_FW_CFG]);
     virtio_acpi_dsdt_add(scope, memmap[VIRT_MMIO].base, memmap[VIRT_MMIO].size,
                          (irqmap[VIRT_MMIO] + ARM_SPI_BASE),
-                         0, NUM_VIRTIO_TRANSPORTS);
+                         0, vms->virtio_transports);
     acpi_dsdt_add_pci(scope, memmap, irqmap[VIRT_PCIE] + ARM_SPI_BASE, vms);
     if (vms->acpi_dev) {
         build_ged_aml(scope, "\\_SB."GED_DEVICE,
hw/arm/virt.c +41 -2

73 lines not on this page · raw message

include/hw/arm/virt.h +1 -0
index 3b382bdf49..f898afaa6e 100644
@@ -169,6 +169,7 @@ struct VirtMachineState {
     uint32_t msi_phandle;
     uint32_t iommu_phandle;
     int psci_conduit;
+    uint8_t virtio_transports;
     hwaddr highest_gpa;
     DeviceState *gic;
     DeviceState *acpi_dev;
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Quoted 7 lines

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Usage: -machine virt,virtio-transports=0

Hello,

With keeping in mind that this was documented in this (closed…) issue
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/595

Quoted 61 lines

---

hw/arm/virt-acpi-build.c |  2 +-
hw/arm/virt.c            | 43 ++++++++++++++++++++++++++++++++++++++--
include/hw/arm/virt.h    |  1 +
3 files changed, 43 insertions(+), 3 deletions(-)
hw/arm/virt-acpi-build.c +1 -1
index c145678185..27c007fd62 100644
@@ -1150,7 +1150,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
    fw_cfg_acpi_dsdt_add(scope, &memmap[VIRT_FW_CFG]);
    virtio_acpi_dsdt_add(scope, memmap[VIRT_MMIO].base, memmap[VIRT_MMIO].size,
                         (irqmap[VIRT_MMIO] + ARM_SPI_BASE),
-                         0, NUM_VIRTIO_TRANSPORTS);
+                         0, vms->virtio_transports);
    acpi_dsdt_add_pci(scope, memmap, irqmap[VIRT_PCIE] + ARM_SPI_BASE, vms);
    if (vms->acpi_dev) {
        build_ged_aml(scope, "\\_SB."GED_DEVICE,
hw/arm/virt.c +16 -2
index 390845c503..0a659ba540 100644
@@ -1206,7 +1206,7 @@ static void create_virtio_devices(const VirtMachineState *vms)
     * between kernel versions). For reliable and stable identification
     * of disks users must use UUIDs or similar mechanisms.
     */
-    for (i = 0; i < NUM_VIRTIO_TRANSPORTS; i++) {
+    for (i = 0; i < vms->virtio_transports; i++) {
        int irq = vms->irqmap[VIRT_MMIO] + i;
        hwaddr base = vms->memmap[VIRT_MMIO].base + i * size;
 
@@ -1221,7 +1221,7 @@ static void create_virtio_devices(const VirtMachineState *vms)
     * loop influences virtio device to virtio transport assignment, whereas
     * this loop controls how virtio transports are laid out in the dtb.
     */
-    for (i = NUM_VIRTIO_TRANSPORTS - 1; i >= 0; i--) {
+    for (i = vms->virtio_transports - 1; i >= 0; i--) {
        char *nodename;
        int irq = vms->irqmap[VIRT_MMIO] + i;
        hwaddr base = vms->memmap[VIRT_MMIO].base + i * size;
@@ -2705,6 +2705,36 @@ static void virt_set_highmem_mmio_size(Object *obj, Visitor *v,
    extended_memmap[VIRT_HIGH_PCIE_MMIO].size = size;
 }
 
+static void virt_get_virtio_transports(Object *obj, Visitor *v,
+                                       const char *name, void *opaque,
+                                       Error **errp)
+{
+    VirtMachineState *vms = VIRT_MACHINE(obj);
+    uint8_t transports = vms->virtio_transports;
+
+    visit_type_uint8(v, name, &transports, errp);
+}
+
+static void virt_set_virtio_transports(Object *obj, Visitor *v,
+                                       const char *name, void *opaque,
+                                       Error **errp)
+{

hw/arm/virt.c static void virt_set_highmem_mmio_size(Object *obj, Visitor *v, · line 2731

Quoted 10 lines
hw/arm/virt.c +10 -0
+    VirtMachineState *vms = VIRT_MACHINE(obj);
+    uint8_t transports;
+
+    if (!visit_type_uint8(v, name, &transports, errp)) {
+        return;
+    }
+
+    if (transports > NUM_VIRTIO_TRANSPORTS) {
+        error_setg(errp, "virtio-transports must not exceed %d",
+                   NUM_VIRTIO_TRANSPORTS);

Any particular reason to (keep) capping the maximum to 16?

From a cursory look, base_memmap seems to have room for plenty more.

#2 lore raw

Hi Mohamed,

Thanks for the review!

Quoted 1 line

Any particular reason to (keep) capping the maximum to 16?

To be honest, I simply preserved the existing behavior, "NUM_VIRTIO_TRANSPORTS"
was already hardcoded to 32 in virt.h before this patch.I didn't want to change more than necessary for the scope of this fix.

I don't have strong feelings about this limit. If prefered, I can remove the validation entirely and let uint8_t be the natural limit (255), or we could increase it in a future patch if there's a real need for more transports.

Happy to adjust based on feedback.

Thanks,
Faiz

Quoted 106 lines · Mohamed Mediouni
Quoted 8 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Quoted 7 lines

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Usage: -machine virt,virtio-transports=0

Hello,

With keeping in mind that this was documented in this (closed…) issue
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/595

hw/arm/virt-acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker,

Quoted 13 lines

---

hw/arm/virt-acpi-build.c |  2 +-
hw/arm/virt.c            | 43 ++++++++++++++++++++++++++++++++++++++--
include/hw/arm/virt.h    |  1 +
3 files changed, 43 insertions(+), 3 deletions(-)
hw/arm/virt-acpi-build.c +0 -0
index c145678185..27c007fd62 100644
@@ -1150,7 +1150,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,

VirtMachineState *vms)

hw/arm/virt-acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker, · line 1151

Quoted 2 lines
hw/arm/virt-acpi-build.c +0 -0
    fw_cfg_acpi_dsdt_add(scope, &memmap[VIRT_FW_CFG]);
    virtio_acpi_dsdt_add(scope, memmap[VIRT_MMIO].base,

memmap[VIRT_MMIO].size,

hw/arm/virt-acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)

Quoted 4 lines
hw/arm/virt-acpi-build.c +1 -1
                         (irqmap[VIRT_MMIO] + ARM_SPI_BASE),
-                         0, NUM_VIRTIO_TRANSPORTS);
+                         0, vms->virtio_transports);
    acpi_dsdt_add_pci(scope, memmap, irqmap[VIRT_PCIE] + ARM_SPI_BASE,

vms);

hw/arm/virt.c static void create_virtio_devices(const

Quoted 7 lines
hw/arm/virt-acpi-build.c +0 -0
    if (vms->acpi_dev) {
        build_ged_aml(scope, "\\_SB."GED_DEVICE,
hw/arm/virt.c +0 -0
index 390845c503..0a659ba540 100644
@@ -1206,7 +1206,7 @@ static void create_virtio_devices(const

VirtMachineState *vms)

hw/arm/virt.c static void create_virtio_devices(const

Quoted 9 lines
hw/arm/virt.c +1 -1
     * between kernel versions). For reliable and stable identification
     * of disks users must use UUIDs or similar mechanisms.
     */
-    for (i = 0; i < NUM_VIRTIO_TRANSPORTS; i++) {
+    for (i = 0; i < vms->virtio_transports; i++) {
        int irq = vms->irqmap[VIRT_MMIO] + i;
        hwaddr base = vms->memmap[VIRT_MMIO].base + i * size;
 
@@ -1221,7 +1221,7 @@ static void create_virtio_devices(const

VirtMachineState *vms)

hw/arm/virt.c static void create_virtio_devices(const · line 1221

Quoted 1 line
hw/arm/virt.c +0 -0
     * loop influences virtio device to virtio transport assignment,

whereas

hw/arm/virt.c static void virt_set_highmem_mmio_size(Object

Quoted 8 lines
hw/arm/virt.c +1 -1
     * this loop controls how virtio transports are laid out in the dtb.
     */
-    for (i = NUM_VIRTIO_TRANSPORTS - 1; i >= 0; i--) {
+    for (i = vms->virtio_transports - 1; i >= 0; i--) {
        char *nodename;
        int irq = vms->irqmap[VIRT_MMIO] + i;
        hwaddr base = vms->memmap[VIRT_MMIO].base + i * size;
@@ -2705,6 +2705,36 @@ static void virt_set_highmem_mmio_size(Object

*obj, Visitor *v,

Quoted 17 lines
hw/arm/virt.c +14 -0
    extended_memmap[VIRT_HIGH_PCIE_MMIO].size = size;
 }
 
+static void virt_get_virtio_transports(Object *obj, Visitor *v,
+                                       const char *name, void *opaque,
+                                       Error **errp)
+{
+    VirtMachineState *vms = VIRT_MACHINE(obj);
+    uint8_t transports = vms->virtio_transports;
+
+    visit_type_uint8(v, name, &transports, errp);
+}
+
+static void virt_set_virtio_transports(Object *obj, Visitor *v,
+                                       const char *name, void *opaque,
+                                       Error **errp)
+{

hw/arm/virt.c static void virt_set_highmem_mmio_size(Object *obj, Visitor *v, · line 2731

Quoted 10 lines
hw/arm/virt.c +10 -0
+    VirtMachineState *vms = VIRT_MACHINE(obj);
+    uint8_t transports;
+
+    if (!visit_type_uint8(v, name, &transports, errp)) {
+        return;
+    }
+
+    if (transports > NUM_VIRTIO_TRANSPORTS) {
+        error_setg(errp, "virtio-transports must not exceed %d",
+                   NUM_VIRTIO_TRANSPORTS);

Any particular reason to (keep) capping the maximum to 16?

From a cursory look, base_memmap seems to have room for plenty more.

#3 lore raw
In reply to Mohamed Mediouni
Quoted 8 lines · Mohamed Mediouni
Quoted 8 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Is that a problem? There's a device there, and Windows doesn't support it, so it reports that there's a device there that it doesn't support, which seems reasonable enough.

Quoted 14 lines
Quoted 8 lines

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Usage: -machine virt,virtio-transports=0

Hello,

With keeping in mind that this was documented in this (closed…) issue
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/595

Quoted 8 lines

hw/arm/virt.c static void virt_set_highmem_mmio_size(Object *obj, Visitor *v, · line 2731

Quoted 3 lines
hw/arm/virt.c +3 -0
+    if (transports > NUM_VIRTIO_TRANSPORTS) {
+        error_setg(errp, "virtio-transports must not exceed %d",
+                   NUM_VIRTIO_TRANSPORTS);

Any particular reason to (keep) capping the maximum to 16?

From a cursory look, base_memmap seems to have room for plenty more.

My first question to anybody wanting more than 32 here would be "why are you not using virtio-pci" ? The whole virtio-mmio infra in the virt board is only here because at the time we had no PCI support.

The advantage of this series to me is that it means we have a way for users to say "I'm not using this functionality, just turn it off completely" which lets them reduce the security surface a little.

The other thing worth checking is whether we're correctly following the ACPI spec in exposing virtio-transports with nothing plugged into them, or if we're supposed to be suppressing them.

thanks
-- PMM

#4 lore raw
Quoted 10 lines · Peter Maydell
Quoted 5 lines · Mohamed Mediouni
Quoted 5 lines · Mohammadfaiz Bawa
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Is that a problem? There's a device there, and Windows doesn't support it, so it reports that there's a device there that it doesn't support, which seems reasonable enough.

Hello,

For customers, some security software gets quite unhappy if it sees that there are devices with no drivers installed.

For development it indeed doesn’t matter.

Quoted 19 lines
Quoted 19 lines
Quoted 8 lines

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Usage: -machine virt,virtio-transports=0

Hello,

With keeping in mind that this was documented in this (closed…) issue
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/595

Quoted 3 lines
hw/arm/virt.c +3 -0
+    if (transports > NUM_VIRTIO_TRANSPORTS) {
+        error_setg(errp, "virtio-transports must not exceed %d",
+                   NUM_VIRTIO_TRANSPORTS);
Quoted 9 lines
Quoted 3 lines

Any particular reason to (keep) capping the maximum to 16?

From a cursory look, base_memmap seems to have room for plenty more.

My first question to anybody wanting more than 32 here would be "why are you not using virtio-pci" ? The whole virtio-mmio infra in the virt board is only here because at the time we had no PCI support.

Could it make sense to have it disabled by default for new machine model versions then?

Thank you,
-Mohamed

Quoted 12 lines

The advantage of this series to me is that it means we have a way for users to say "I'm not using this functionality, just turn it off completely" which lets them reduce the security surface a little.

The other thing worth checking is whether we're correctly following the ACPI spec in exposing virtio-transports with nothing plugged into them, or if we're supposed to be suppressing them.

thanks
-- PMM

#5 lore raw

+ Yan

Quoted 4 lines · Mohamed Mediouni
Quoted 4 lines

On 11. Feb 2026, at 16:08, Peter Maydell <[email protected]>

Quoted 2 lines · wrote:
Quoted 2 lines

On Wed, 11 Feb 2026 at 12:50, Mohamed Mediouni <[email protected]>

Quoted 14 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines · Mohammadfaiz Bawa
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Is that a problem? There's a device there, and Windows doesn't support it, so it reports that there's a device there that it doesn't support, which seems reasonable enough.

Quoted 4 lines

Hello,

For customers, some security software gets quite unhappy if it sees that there are devices with no drivers installed.

Agreed. The main issue is production environments where unknown devices can cause problems with security compliance and Microsoft certification.

Quoted 22 lines

For development it indeed doesn’t matter.

Quoted 21 lines
Quoted 21 lines
Quoted 8 lines

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Usage: -machine virt,virtio-transports=0

Hello,

With keeping in mind that this was documented in this (closed…) issue
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/595

hw/arm/virt.c static void virt_set_highmem_mmio_size(Object *obj, Visitor *v, · line 2731

Quoted 3 lines
hw/arm/virt.c +3 -0
+    if (transports > NUM_VIRTIO_TRANSPORTS) {
+        error_setg(errp, "virtio-transports must not exceed %d",
+                   NUM_VIRTIO_TRANSPORTS);

Any particular reason to (keep) capping the maximum to 16?

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

From a cursory look, base_memmap seems to have room for plenty more.

My first question to anybody wanting more than 32 here would be "why are you not using virtio-pci" ? The whole virtio-mmio infra in the virt board is only here because at the time we had no PCI support.

Could it make sense to have it disabled by default for new machine model

versions then?

I think that makes sense. This patch adds the property with the current default i.e. 32. A follow-up patch could set the default to 0 for the latest machine version.

Quoted 11 lines

Thank you,
-Mohamed

Quoted 9 lines

The advantage of this series to me is that it means we have a way for users to say "I'm not using this functionality, just turn it off completely" which lets them reduce the security surface a little.

The other thing worth checking is whether we're correctly following the ACPI spec in exposing virtio-transports with nothing plugged into them, or if we're supposed to be suppressing them.

While researching this issue, I did check x86 microvm, it only adds devices to ACPI when a backend is detected (checks QTAILQ_EMPTY before calling virtio_acpi_dsdt_add). ARM virt currently adds all 32 regardless. So we could also follow similar dynamic suppression but the property approach
gives users explicit control over the number of transports.

Quoted 2 lines
Quoted 2 lines

thanks
-- PMM

#6 lore raw
In reply to Mohammadfaiz Bawa
Quoted 11 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Quoted 3 lines

Usage: -machine virt,virtio-transports=0

Applied to target-arm.next, thanks -- but please could you check up with the ACPI spec about whether it says anything about what to report for empty transports? If it says we should or if it's just vague we should probably match the x86 microvm behaviour of not showing empty transports, since they can never be hotplugged after startup. (This might need to be tied to a machine-version, not sure.) Maybe we should also not report them in the dtb?

thanks
-- PMM

#7 lore raw
Quoted 17 lines · Peter Maydell
Quoted 11 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Quoted 3 lines

Usage: -machine virt,virtio-transports=0

Quoted 8 lines

Applied to target-arm.next, thanks -- but please could you check up with the ACPI spec about whether it says anything about what to report for empty transports? If it says we should or if it's just vague we should probably match the x86 microvm behaviour of not showing empty transports, since they can never be hotplugged after startup. (This might need to be tied to a machine-version, not sure.) Maybe we should also not report them in the dtb?

Looking again at this patch, I had a couple of niggles, so I've dropped this patch from target-arm.next for the moment.

(1) we need to document the new property in
docs/system/arm/virt.rst. Something like

docs/system/arm/virt.rst +5 -0
@@ -226,6 +226,11 @@ dtb-randomness
 dtb-kaslr-seed
   A deprecated synonym for dtb-randomness.
 
+virtio-transports
+  Set the number of virtio-mmio transports to create (between 0 and 32;
+  the default is 32).  Unused transports are harmless, but you can
+  use this property to avoid exposing them to the guest if you wish.
+
 x-oem-id
   Set string (up to 6 bytes) to override the default value of field

OEMID in ACPI
table header.

would do.

(2) I think we should call the property virtio-mmio-transports, to make it clearer to the user that this is MMIO-specific and nothing to do with the much more commonly used PCI virtio. What do you think?

thanks
-- PMM

#8 lore raw
Quoted 28 lines · Peter Maydell
Quoted 17 lines · Peter Maydell
Quoted 11 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Quoted 3 lines

Usage: -machine virt,virtio-transports=0

Quoted 8 lines

Applied to target-arm.next, thanks -- but please could you check up with the ACPI spec about whether it says anything about what to report for empty transports? If it says we should or if it's just vague we should probably match the x86 microvm behaviour of not showing empty transports, since they can never be hotplugged after startup. (This might need to be tied to a machine-version, not sure.) Maybe we should also not report them in the dtb?

Quoted 5 lines

Looking again at this patch, I had a couple of niggles, so I've dropped this patch from target-arm.next for the moment.

(1) we need to document the new property in
docs/system/arm/virt.rst. Something like

Right, sorry about missing that , I'll add the suggested documentation.

Quoted 17 lines
docs/system/arm/virt.rst +5 -0
@@ -226,6 +226,11 @@ dtb-randomness
 dtb-kaslr-seed
   A deprecated synonym for dtb-randomness.
 
+virtio-transports
+  Set the number of virtio-mmio transports to create (between 0 and 32;
+  the default is 32).  Unused transports are harmless, but you can
+  use this property to avoid exposing them to the guest if you wish.
+
 x-oem-id
   Set string (up to 6 bytes) to override the default value of field

OEMID in ACPI
table header.

Quoted 6 lines

would do.

(2) I think we should call the property virtio-mmio-transports, to make it clearer to the user that this is MMIO-specific and nothing to do with the much more commonly used PCI virtio. What do you think?

Yes, virtio-mmio-transports was my initial pick for the property, but I dropped it thinking it was too long.But, I think the clarity here is needed. I'll rename it.

Will send v2 with both changes shortly.

Thanks,
Faiz

Quoted 4 lines

thanks
-- PMM

#9 lore raw
In reply to Peter Maydell
Quoted 26 lines · Peter Maydell
Quoted 11 lines · Mohammadfaiz Bawa

Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager.

Until Windows fixes that by supporting, adding a new machine property 'virtio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely.

Quoted 3 lines

Usage: -machine virt,virtio-transports=0

Applied to target-arm.next, thanks -- but please could you check up with the ACPI spec about whether it says anything about what to report for empty transports? If it says we should or if it's just vague we should probably match the x86 microvm behaviour of not showing empty transports, since they can never be hotplugged after startup. (This might need to be tied to a machine-version, not sure.) Maybe we should also not report them in the dtb?

Quoted 3 lines

thanks
-- PMM

[https://uefi.org/specs/ACPI/6.6/06_Device_Configuration.html#sta-device-status]

The ACPI 6.6 spec (Section 6.3.7) doesn't explicitly forbid listing empty devices, but without a _STA method OSPM assumes they are present and functioning. A simple fix is to not list them at all, matching x86 microvm's approach and applying the same filtering to both ACPI and DTB.

Tying this to the machine-version is a good idea as it may be required for backward compatibility.

Thanks,
Faiz