Skip to contentSkip to conversation

pc,virtio: regression, test fixes

GIT PULL Applied Michael S. Tsirkin 2 participants 10 messages Nov 22, 2022 Networking

lore
Share & tools
lore
#0 lore raw

The following changes since commit 2c8311241d1f7377bb4ff76064b1d1fe15166413:

Update VERSION for v7.2.0-rc1 (2022-11-15 18:56:38 -0500)

are available in the Git repository at:

https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

for you to fetch changes up to b7c61789e653086618d1825858a97b3d9891e822:

virtio: disable error for out of spec queue-enable (2022-11-22 05:19:00 -0500)

----------------------------------------------------------------
pc,virtio: regression, test fixes

fixes regressions:
virtio error message triggered by seabios
failure in vhost due to VIRTIO_F_RING_RESET
broken keyboard under seabios

some biosbits test fixes

there's still a known regression with migration and vsock, not fixed yet.

----------------------------------------------------------------
Ani Sinha (2):
MAINTAINERS: add mst to list of biosbits maintainers acpi/tests/avocado/bits: keep the work directory when BITS_DEBUG is set in env

Igor Mammedov (3):
tests: acpi: whitelist DSDT before moving PRQx to _SB scope
acpi: x86: move RPQx field back to _SB scope
tests: acpi: x86: update expected DSDT after moving PRQx fields in _SB scope

John Snow (1):
tests/avocado: configure acpi-bits to use avocado timeout

Michael S. Tsirkin (1):
virtio: disable error for out of spec queue-enable

Stefano Garzarella (1):
vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

 hw/block/vhost-user-blk.c                     |   1 +
 hw/isa/lpc_ich9.c                             |  16 ++++------------
 hw/isa/piix3.c                                |  12 ++++--------
 hw/net/vhost_net.c                            |   1 +
 hw/scsi/vhost-scsi.c                          |   1 +
 hw/scsi/vhost-user-scsi.c                     |   1 +
 hw/virtio/vhost-user-fs.c                     |   1 +
 hw/virtio/vhost-user-gpio.c                   |   1 +
 hw/virtio/vhost-user-i2c.c                    |   1 +
 hw/virtio/vhost-user-rng.c                    |  11 +++++++++--
 hw/virtio/vhost-vsock-common.c                |   1 +
 hw/virtio/virtio.c                            |   7 +++++++
 net/vhost-vdpa.c                              |   1 +
 MAINTAINERS                                   |   1 +
 tests/avocado/acpi-bits.py                    |  23 +++++++++++------------
 tests/data/acpi/pc/DSDT                       | Bin 6501 -> 6458 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6461 -> 6418 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7826 -> 7783 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 9575 -> 9532 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6965 -> 6922 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8155 -> 8112 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6461 -> 6418 bytes
 tests/data/acpi/pc/DSDT.hpbrroot              | Bin 3107 -> 3064 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6573 -> 6530 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7860 -> 7817 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6359 -> 6316 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6507 -> 6464 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 6699 -> 6656 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8412 -> 8310 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8429 -> 8327 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9737 -> 9635 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8691 -> 8589 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8458 -> 8356 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11541 -> 11439 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32552 -> 32450 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8876 -> 8774 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9738 -> 9636 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 10066 -> 9964 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8487 -> 8385 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8500 -> 8398 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8429 -> 8327 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9771 -> 9669 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9542 -> 9440 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 8732 -> 8630 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8270 -> 8168 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8418 -> 8316 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8513 -> 8411 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 9018 -> 8916 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 9044 -> 8942 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9521 -> 9419 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35775 -> 35673 bytes
 51 files changed, 45 insertions(+), 34 deletions(-)
#1 lore raw

[PULL 1/8] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

From: Stefano Garzarella <[email protected]>

Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") enabled VIRTIO_F_RING_RESET by default for all virtio devices.

This feature is not currently emulated by QEMU, so for vhost and vhost-user devices we need to make sure it is supported by the offloaded device emulation (in-kernel or in another process).
To do this we need to add VIRTIO_F_RING_RESET to the features bitmap passed to vhost_get_features(). This way it will be masked if the device does not support it.

This issue was initially discovered with vhost-vsock and vhost-user-vsock, and then also tested with vhost-user-rng which confirmed the same issue. They fail when sending features through VHOST_SET_FEATURES ioctl or VHOST_USER_SET_FEATURES message, since VIRTIO_F_RING_RESET is negotiated by the guest (Linux >= v6.0), but not supported by the device.

Fixes 69e1c14aa2 ("virtio: core: vq reset feature negotation support")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1318

Message-Id: <[email protected]>

---
 hw/block/vhost-user-blk.c      |  1 +
 hw/net/vhost_net.c             |  1 +
 hw/scsi/vhost-scsi.c           |  1 +
 hw/scsi/vhost-user-scsi.c      |  1 +
 hw/virtio/vhost-user-fs.c      |  1 +
 hw/virtio/vhost-user-gpio.c    |  1 +
 hw/virtio/vhost-user-i2c.c     |  1 +
 hw/virtio/vhost-user-rng.c     | 11 +++++++++--
 hw/virtio/vhost-vsock-common.c |  1 +
 net/vhost-vdpa.c               |  1 +
 10 files changed, 18 insertions(+), 2 deletions(-)
hw/block/vhost-user-blk.c +1 -0
index 16ad400889..0d5190accf 100644
@@ -52,6 +52,7 @@ static const int user_feature_bits[] = {
     VIRTIO_F_NOTIFY_ON_EMPTY,
     VIRTIO_F_RING_PACKED,
     VIRTIO_F_IOMMU_PLATFORM,
+    VIRTIO_F_RING_RESET,
     VHOST_INVALID_FEATURE_BIT
 };
 
hw/net/vhost_net.c +1 -0
index feda448878..26e4930676 100644
@@ -75,6 +75,7 @@ static const int user_feature_bits[] = {
     VIRTIO_NET_F_MTU,
     VIRTIO_F_IOMMU_PLATFORM,
     VIRTIO_F_RING_PACKED,
+    VIRTIO_F_RING_RESET,
     VIRTIO_NET_F_RSS,
     VIRTIO_NET_F_HASH_REPORT,
 
hw/scsi/vhost-scsi.c +1 -0
index bdf337a7a2..6a0fd0dfb1 100644
@@ -38,6 +38,7 @@ static const int kernel_feature_bits[] = {
     VIRTIO_RING_F_INDIRECT_DESC,
     VIRTIO_RING_F_EVENT_IDX,
     VIRTIO_SCSI_F_HOTPLUG,
+    VIRTIO_F_RING_RESET,
     VHOST_INVALID_FEATURE_BIT
 };
 
hw/scsi/vhost-user-scsi.c +1 -0
index bc37317d55..b7a71a802c 100644
@@ -36,6 +36,7 @@ static const int user_feature_bits[] = {
     VIRTIO_RING_F_INDIRECT_DESC,
     VIRTIO_RING_F_EVENT_IDX,
     VIRTIO_SCSI_F_HOTPLUG,
+    VIRTIO_F_RING_RESET,
     VHOST_INVALID_FEATURE_BIT
 };
 
hw/virtio/vhost-user-fs.c +1 -0
index 1c40f42045..dc4014cdef 100644
@@ -32,6 +32,7 @@ static const int user_feature_bits[] = {
     VIRTIO_F_NOTIFY_ON_EMPTY,
     VIRTIO_F_RING_PACKED,
     VIRTIO_F_IOMMU_PLATFORM,
+    VIRTIO_F_RING_RESET,
 
     VHOST_INVALID_FEATURE_BIT
 };
hw/virtio/vhost-user-gpio.c +1 -0
index 677d1c7730..5851cb3bc9 100644
@@ -24,6 +24,7 @@ static const int feature_bits[] = {
     VIRTIO_RING_F_INDIRECT_DESC,
     VIRTIO_RING_F_EVENT_IDX,
     VIRTIO_GPIO_F_IRQ,
+    VIRTIO_F_RING_RESET,
     VHOST_INVALID_FEATURE_BIT
 };
 
hw/virtio/vhost-user-i2c.c +1 -0
index 864eba695e..1c9f3d20dc 100644
@@ -16,6 +16,7 @@
 
 static const int feature_bits[] = {
     VIRTIO_I2C_F_ZERO_LENGTH_REQUEST,
+    VIRTIO_F_RING_RESET,
     VHOST_INVALID_FEATURE_BIT
 };
 
hw/virtio/vhost-user-rng.c +9 -2
index 8b47287875..f9084cde58 100644
@@ -16,6 +16,11 @@
 #include "qemu/error-report.h"
 #include "standard-headers/linux/virtio_ids.h"
 
+static const int feature_bits[] = {
+    VIRTIO_F_RING_RESET,
+    VHOST_INVALID_FEATURE_BIT
+};
+
 static void vu_rng_start(VirtIODevice *vdev)
 {
     VHostUserRNG *rng = VHOST_USER_RNG(vdev);
@@ -106,8 +111,10 @@ static void vu_rng_set_status(VirtIODevice *vdev, uint8_t status)
 static uint64_t vu_rng_get_features(VirtIODevice *vdev,
                                     uint64_t requested_features, Error **errp)
 {
-    /* No feature bits used yet */
-    return requested_features;
+    VHostUserRNG *rng = VHOST_USER_RNG(vdev);
+
+    return vhost_get_features(&rng->vhost_dev, feature_bits,
+                              requested_features);
 }
 
 static void vu_rng_handle_output(VirtIODevice *vdev, VirtQueue *vq)
hw/virtio/vhost-vsock-common.c +1 -0
index 29b9ab4f72..a67a275de2 100644
@@ -21,6 +21,7 @@
 
 const int feature_bits[] = {
     VIRTIO_VSOCK_F_SEQPACKET,
+    VIRTIO_F_RING_RESET,
     VHOST_INVALID_FEATURE_BIT
 };
 
net/vhost-vdpa.c +1 -0
index 6811089231..2b4b85d8f8 100644
@@ -69,6 +69,7 @@ const int vdpa_feature_bits[] = {
     VIRTIO_NET_F_CTRL_VQ,
     VIRTIO_F_IOMMU_PLATFORM,
     VIRTIO_F_RING_PACKED,
+    VIRTIO_F_RING_RESET,
     VIRTIO_NET_F_RSS,
     VIRTIO_NET_F_HASH_REPORT,
     VIRTIO_NET_F_GUEST_ANNOUNCE,
Signature · 1 line
MST
#2 lore raw

[PULL 2/8] tests: acpi: whitelist DSDT before moving PRQx to _SB scope

In reply to Michael S. Tsirkin

From: Igor Mammedov <[email protected]>

Message-Id: <[email protected]>

---
 tests/qtest/bios-tables-test-allowed-diff.h | 36 +++++++++++++++++++++
 1 file changed, 36 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +36 -0
index dfb8523c8b..a4587652dd 100644
@@ -1 +1,37 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.acpierst",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.nohpet",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/pc/DSDT.roothp",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.core-count2",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
MST
#3 lore raw

[PULL 5/8] MAINTAINERS: add mst to list of biosbits maintainers

In reply to Michael S. Tsirkin

From: Ani Sinha <[email protected]>

Adding Michael's name to the list of bios bits maintainers so that all changes and fixes into biosbits framework can go through his tree and he is notified.

Message-Id: <[email protected]>

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index be151f0024..f3e0a4fc2e 100644
@@ -1865,6 +1865,7 @@ F: hw/acpi/viot.h
 
 ACPI/AVOCADO/BIOSBITS
 M: Ani Sinha <[email protected]>
+M: Michael S. Tsirkin <[email protected]>
 S: Supported
 F: tests/avocado/acpi-bits/*
 F: tests/avocado/acpi-bits.py
Signature · 1 line
MST
#4 lore raw

[PULL 4/8] tests: acpi: x86: update expected DSDT after moving PRQx fields in _SB scope

In reply to Michael S. Tsirkin

From: Igor Mammedov <[email protected]>

Expected DSDT changes,
pc:
- Field (P40C, ByteAcc, NoLock, Preserve)
+ Scope (\_SB)

                   {
  -                    PRQ0,   8,
  -                    PRQ1,   8,
  -                    PRQ2,   8,
  -                    PRQ3,   8
  +                    Field (PCI0.S08.P40C, ByteAcc, NoLock, Preserve)
  +                    {
  +                        PRQ0,   8,
  +                        PRQ1,   8,
  +                        PRQ2,   8,
  +                        PRQ3,   8
  +                    }
                   }
  -                Alias (PRQ0, \_SB.PRQ0)
  -                Alias (PRQ1, \_SB.PRQ1)
  -                Alias (PRQ2, \_SB.PRQ2)
  -                Alias (PRQ3, \_SB.PRQ3)

q35:
- Field (PIRQ, ByteAcc, NoLock, Preserve)
- {

  -                    PRQA,   8,
  -                    PRQB,   8,
  -                    PRQC,   8,
  -                    PRQD,   8,
  -                    Offset (0x08),
  -                    PRQE,   8,
  -                    PRQF,   8,
  -                    PRQG,   8,
  -                    PRQH,   8
  +                Scope (\_SB)
  +                {
  +                    Field (PCI0.SF8.PIRQ, ByteAcc, NoLock, Preserve)
  +                    {
  +                        PRQA,   8,
  +                        PRQB,   8,
  +                        PRQC,   8,
  +                        PRQD,   8,
  +                        Offset (0x08),
  +                        PRQE,   8,
  +                        PRQF,   8,
  +                        PRQG,   8,
  +                        PRQH,   8
  +                    }
                   }
  -                Alias (PRQA, \_SB.PRQA)
  -                Alias (PRQB, \_SB.PRQB)
  -                Alias (PRQC, \_SB.PRQC)
  -                Alias (PRQD, \_SB.PRQD)
  -                Alias (PRQE, \_SB.PRQE)
  -                Alias (PRQF, \_SB.PRQF)
  -                Alias (PRQG, \_SB.PRQG)
  -                Alias (PRQH, \_SB.PRQH)

Message-Id: <[email protected]>

---
 tests/qtest/bios-tables-test-allowed-diff.h   |  36 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6501 -> 6458 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6461 -> 6418 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7826 -> 7783 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 9575 -> 9532 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6965 -> 6922 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8155 -> 8112 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6461 -> 6418 bytes
 tests/data/acpi/pc/DSDT.hpbrroot              | Bin 3107 -> 3064 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6573 -> 6530 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7860 -> 7817 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6359 -> 6316 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6507 -> 6464 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 6699 -> 6656 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8412 -> 8310 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8429 -> 8327 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9737 -> 9635 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8691 -> 8589 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8458 -> 8356 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11541 -> 11439 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32552 -> 32450 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8876 -> 8774 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9738 -> 9636 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 10066 -> 9964 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8487 -> 8385 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8500 -> 8398 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8429 -> 8327 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9771 -> 9669 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9542 -> 9440 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 8732 -> 8630 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8270 -> 8168 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8418 -> 8316 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8513 -> 8411 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 9018 -> 8916 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 9044 -> 8942 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9521 -> 9419 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35775 -> 35673 bytes
 37 files changed, 36 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -36
index a4587652dd..dfb8523c8b 100644
@@ -1,37 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index f1cf7fab349bd26e0f0fa461c715534c1426fbf5..b688686dc3614f56582991c0974f6ef1964ee6ce 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 5cb477625e96f5526f0c7703ba3b443a0b35eefd..86259be9d1df3fcc89b780f3bae028a5ebd8bbe5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 76e8bef36fdb667447ad0320d35604031aae2c93..e2cc2a6fc9877380ef85c3540654e0691472f27c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index c94c1b54b3ac3085c02307d9564b258e791fcf1e..75016fd4b72aae544658e51c06a2940da31c81da 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index eb3da0e232e4362bd5850e4eebf5916cbc1d565a..53eb0dd7d422e880a668cf3ea01b8b288004042a 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 6553e4c6053aff76ac42dad87d714e4e9ab28f72..9089d994e0324741190b48dfcfb4e6074ba102c1 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 5cb477625e96f5526f0c7703ba3b443a0b35eefd..86259be9d1df3fcc89b780f3bae028a5ebd8bbe5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index ff04ad360beb60571d48bd1e477a4e58e5ee9337..578468f4f00a9373366c92926b512c192dd6675b 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index 83eec58a52b5844a02003665494f63a4ea0b26a7..39427103aadb969721257feb9af66863b25b6ad9 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 9e2201d170a86652951a2a4b234bb58204010642..987a263339225c2cb5ba71cd1aa183c651bb353e 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index c969e0dae410763a5f749c4c4fc842ccbf901fc5..fc7598b76287648f4b35273c91e46417a50b640b 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index 1cecaa64e9ef29b5096ae1ba4882e2c8e080f0ea..85af400cdb5d19c3515f5443f27e23a7813542e4 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index f57a14cd5c48ddded4c5d0b7da037b9d021a9ecb..545512adfa0f9af81a7fafd353679f64f75e501e 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index 8e989819a5f8c470a8933bf9b7af7b988048cce6..2771bcea89b531549557a19538606219a8e222b1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index 03745d78de4c7e9639a4a37553361e0e18258633..b45abca7c289d8ae38faeca1fcaf6370ed621cd4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 3ad9ba3c987ca1cfbafc3778db889602ab53530e..d90fd4723a703df348c12a5a1c1c672b5af60a43 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 8efa1c5ded52b8a9dfbb6945a3c75cdc6ef9b277..279fafa8219140687f1cdaab9739fc2f4c80ed6a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 5f01572dc2cf44aa0e730401e0709b95cd8db604..fdf6d144286860ff7f998df676ca9a50ce988d41 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index 97141f9db208e1948bc2bdb3f3452ac8f78f98b0..b41a4dddc0b7bdeb2349d874a390858453c927f8 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index ca309f6569f1f4016cf7e67117b208d57fbc7365..375aceed6b16528f7986fad46b045eba76af9760 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 622e8e5f3700abffc58683689b9470573c117cd0..a0ecafc36c57c6d4791b511f3febe210713d253c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index cecc1caaab81db8559781d23e45d8c615dc73740..f9c6dd4ee0502ca000509493411b421dfd23b96f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index e5be00b4fa658477a9ae7016ed72ae04430a3b2f..f0659716e3cef916ed0d8f583175a2edbc07141b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index c4f8212c63be2a1d579d6ebc9ac41d4bd5be414b..9c52529919d72a43034b1bbf4d3f1810ba9e22b2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 05fb38820fa9213a20ace5943486ed18ad6a765c..3f32dffdbf3cd7e3791155530cf89417d8f2ec90 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index 03745d78de4c7e9639a4a37553361e0e18258633..b45abca7c289d8ae38faeca1fcaf6370ed621cd4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 2a4635d48c017970ee38d14148b20d38b699b030..28a192c69af3c6df8f003bf8edc9586f0dda35ad 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index 0491761dc7132460b08b443579f0d4cad3fa3163..8fda921296e471f2b8dff8c195652841f95cbcf9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 485f571afd35cbd2044baeb7027ef077ba9a133d..3dba4d84369f1f2850fbdc771072519d34f58072 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 9c2ec9f2c96f6bdf536c28559fd804523134cf2c..b116947dacd4fe9b563ecc7e1510cdb2474011cb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 2302de88e93a22118889cd33a8c63811925cff02..5eb6159d5f6101c0f75a6de6c83ad95ccd2e6176 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 5e4b51d33b8bb88ca2610254e6306c16e5b5b0db..908e7b6606b6141556e9df4ffd3f88f97fe13d98 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index 1723fca4464383694f806f93331d008e84b93fef..ce2c2c29c2c177071d6c1284b1c496e773942bec 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 1a0d6284da01addd0393b8aad96873398411895e..e9e4b7f6ed5094c5ca3635a59367eb1d88b12ad1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index 6927d1cc96565f0e1e4c7f19fd709635873db912..6b436f9cd95776c26bec09066eb621bf97219dc6 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 4a8a4af625edb1fd01a1404e33f34e85c1a252f3..f47f09122287bdd20d7762d3d6dee6e05d944285 100644
GIT binary patch
Signature · 1 line
MST
#5 lore raw

[PULL 6/8] tests/avocado: configure acpi-bits to use avocado timeout

In reply to Michael S. Tsirkin

From: John Snow <[email protected]>

Instead of using a hardcoded timeout, just rely on Avocado's built-in test case timeout. This helps avoid timeout issues on machines where 60 seconds is not sufficient.

Message-Id: <[email protected]>

---
 tests/avocado/acpi-bits.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
tests/avocado/acpi-bits.py +2 -8
index 8745a58a76..ac13e22dc9 100644
@@ -385,12 +385,6 @@ def test_acpi_smbios_bits(self):
         self._vm.launch()
         # biosbits has been configured to run all the specified test suites
         # in batch mode and then automatically initiate a vm shutdown.
-        # sleep for maximum of one minute
-        max_sleep_time = time.monotonic() + 60
-        while self._vm.is_running() and time.monotonic() < max_sleep_time:
-            time.sleep(1)
-
-        self.assertFalse(time.monotonic() > max_sleep_time,
-                         'The VM seems to have failed to shutdown in time')
-
+        # Rely on avocado's unit test timeout.
+        self._vm.wait(timeout=None)
         self.parse_log()
Signature · 1 line
MST
#6 lore raw

[PULL 8/8] virtio: disable error for out of spec queue-enable

In reply to Michael S. Tsirkin

Virtio 1.0 is pretty clear that features have to be negotiated before enabling VQs. Unfortunately Seabios ignored this ever since gaining 1.0 support (UEFI is ok). Comment the error out for now, and add a TODO.

Fixes 3c37f8b8d1 ("virtio: introduce virtio_queue_enable()")
Cc "Kangjie Xu" <[email protected]>

Message-Id: <[email protected]>

---
 hw/virtio/virtio.c | 7 +++++++
 1 file changed, 7 insertions(+)
hw/virtio/virtio.c +7 -0
index 9683b2e158..eb6347ab5d 100644
@@ -2499,10 +2499,17 @@ void virtio_queue_enable(VirtIODevice *vdev, uint32_t queue_index)
 {
     VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
 
+    /*
+     * TODO: Seabios is currently out of spec and triggering this error.
+     * So this needs to be fixed in Seabios, then this can
+     * be re-enabled for new machine types only, and also after
+     * being converted to LOG_GUEST_ERROR.
+     *
     if (!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
         error_report("queue_enable is only suppported in devices of virtio "
                      "1.0 or later.");
     }
+    */
 
     if (k->queue_enable) {
         k->queue_enable(vdev, queue_index);
Signature · 1 line
MST
#7 lore raw

[PULL 3/8] acpi: x86: move RPQx field back to _SB scope

In reply to Michael S. Tsirkin

From: Igor Mammedov <[email protected]>

Commit 47a373faa6b2 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML) moved ISA bridge AML generation to respective devices and was using
aml_alias() to provide PRQx fields in _SB. scope. However, it turned
out that SeaBIOS was not able to process Alias opcode when parsing DSDT,
resulting in lack of keyboard during boot (SeaBIOS console, grub, FreeDOS).

While fix for SeaBIOS is posted
https://mail.coreboot.org/hyperkitty/list/[email protected]/thread/RGPL7HESH5U5JRLEO6FP77CZVHZK5J65/
fixed SeaBIOS might not make into QEMU-7.2 in time. Hence this workaround that puts PRQx back into _SB scope and gets rid of aliases in ISA bridge description, so DSDT will be parsable by broken SeaBIOS.

That brings back hardcoded references to ISA bridge
PCI0.S08.P40C/PCI0.SF8.PIRQ
where middle part now is auto generated based on slot it's plugged in, but it should be fine as bridge initialization also hardcodes PCI address of the bridge so it can't ever move. Once QEMU tree has fixed SeaBIOS blob, we should be able to drop this part and revert back to alias based approach

Message-Id: <[email protected]>

---
 hw/isa/lpc_ich9.c | 16 ++++------------
 hw/isa/piix3.c    | 12 ++++--------
 2 files changed, 8 insertions(+), 20 deletions(-)
hw/isa/lpc_ich9.c +4 -12
index 0b0a83e080..6c44cc9767 100644
@@ -813,12 +813,13 @@ static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
     BusChild *kid;
     ICH9LPCState *s = ICH9_LPC_DEVICE(adev);
     BusState *bus = BUS(s->isa_bus);
+    Aml *sb_scope = aml_scope("\\_SB");
 
     /* ICH9 PCI to ISA irq remapping */
     aml_append(scope, aml_operation_region("PIRQ", AML_PCI_CONFIG,
                                            aml_int(0x60), 0x0C));
     /* Fields declarion has to happen *after* operation region */
-    field = aml_field("PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
+    field = aml_field("PCI0.SF8.PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
     aml_append(field, aml_named_field("PRQA", 8));
     aml_append(field, aml_named_field("PRQB", 8));
     aml_append(field, aml_named_field("PRQC", 8));
@@ -828,17 +829,8 @@ static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
     aml_append(field, aml_named_field("PRQF", 8));
     aml_append(field, aml_named_field("PRQG", 8));
     aml_append(field, aml_named_field("PRQH", 8));
-    aml_append(scope, field);
-
-    /* hack: put fields into _SB scope for LNKx to find them */
-    aml_append(scope, aml_alias("PRQA", "\\_SB.PRQA"));
-    aml_append(scope, aml_alias("PRQB", "\\_SB.PRQB"));
-    aml_append(scope, aml_alias("PRQC", "\\_SB.PRQC"));
-    aml_append(scope, aml_alias("PRQD", "\\_SB.PRQD"));
-    aml_append(scope, aml_alias("PRQE", "\\_SB.PRQE"));
-    aml_append(scope, aml_alias("PRQF", "\\_SB.PRQF"));
-    aml_append(scope, aml_alias("PRQG", "\\_SB.PRQG"));
-    aml_append(scope, aml_alias("PRQH", "\\_SB.PRQH"));
+    aml_append(sb_scope, field);
+    aml_append(scope, sb_scope);
 
     QTAILQ_FOREACH(kid, &bus->children, sibling) {
             call_dev_aml_func(DEVICE(kid->child), scope);
hw/isa/piix3.c +4 -8
index f9b4af5c05..eabad7ba58 100644
@@ -318,24 +318,20 @@ static void build_pci_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
 {
     Aml *field;
     BusChild *kid;
+    Aml *sb_scope = aml_scope("\\_SB");
     BusState *bus = qdev_get_child_bus(DEVICE(adev), "isa.0");
 
     /* PIIX PCI to ISA irq remapping */
     aml_append(scope, aml_operation_region("P40C", AML_PCI_CONFIG,
                                            aml_int(0x60), 0x04));
     /* Fields declarion has to happen *after* operation region */
-    field = aml_field("P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
+    field = aml_field("PCI0.S08.P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
     aml_append(field, aml_named_field("PRQ0", 8));
     aml_append(field, aml_named_field("PRQ1", 8));
     aml_append(field, aml_named_field("PRQ2", 8));
     aml_append(field, aml_named_field("PRQ3", 8));
-    aml_append(scope, field);
-
-    /* hack: put fields into _SB scope for LNKx to find them */
-    aml_append(scope, aml_alias("PRQ0", "\\_SB.PRQ0"));
-    aml_append(scope, aml_alias("PRQ1", "\\_SB.PRQ1"));
-    aml_append(scope, aml_alias("PRQ2", "\\_SB.PRQ2"));
-    aml_append(scope, aml_alias("PRQ3", "\\_SB.PRQ3"));
+    aml_append(sb_scope, field);
+    aml_append(scope, sb_scope);
 
     QTAILQ_FOREACH(kid, &bus->children, sibling) {
         call_dev_aml_func(DEVICE(kid->child), scope);
Signature · 1 line
MST
#8 lore raw

[PULL 7/8] acpi/tests/avocado/bits: keep the work directory when BITS_DEBUG is set in env

In reply to Michael S. Tsirkin

From: Ani Sinha <[email protected]>

Debugging bits issue often involves running the QEMU command line manually outside of the avocado environment with the generated ISO. Hence, its inconvenient if the iso gets cleaned up after the test has finished. This change makes sure that the work directory is kept after the test finishes if the test is run with BITS_DEBUG=1 in the environment so that the iso is available for use with the QEMU command line.

CC Daniel P. Berrangé <[email protected]>

Message-Id: <[email protected]>

---
 tests/avocado/acpi-bits.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
tests/avocado/acpi-bits.py +9 -4
index ac13e22dc9..4be663968c 100644
@@ -260,7 +260,7 @@ def generate_bits_iso(self):
         self.logger.info('using grub-mkrescue for generating biosbits iso ...')
 
         try:
-            if os.getenv('V'):
+            if os.getenv('V') or os.getenv('BITS_DEBUG'):
                 subprocess.check_call([mkrescue_script, '-o', iso_file,
                                        bits_dir], stderr=subprocess.STDOUT)
             else:
@@ -344,7 +344,7 @@ def parse_log(self):
                 self._print_log(log)
                 raise e
             else:
-                if os.getenv('V'):
+                if os.getenv('V') or os.getenv('BITS_DEBUG'):
                     self._print_log(log)
 
     def tearDown(self):
@@ -353,8 +353,13 @@ def tearDown(self):
         """
         if self._vm:
             self.assertFalse(not self._vm.is_running)
-        self.logger.info('removing the work directory %s', self._workDir)
-        shutil.rmtree(self._workDir)
+        if not os.getenv('BITS_DEBUG'):
+            self.logger.info('removing the work directory %s', self._workDir)
+            shutil.rmtree(self._workDir)
+        else:
+            self.logger.info('not removing the work directory %s ' \
+                             'as BITS_DEBUG is ' \
+                             'passed in the environment', self._workDir)
         super().tearDown()
 
     def test_acpi_smbios_bits(self):
Signature · 1 line
MST