Skip to content
Snippets Groups Projects
  1. Aug 28, 2020
  2. Aug 27, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging · 19591e9e
      Peter Maydell authored
      
      virtio,pc,acpi: features, fixes
      
      better number of queues for vhost
      smbios speed options
      acpi fixes
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Thu 27 Aug 2020 13:33:49 BST
      # gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
      # gpg:                issuer "mst@redhat.com"
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * remotes/mst/tags/for_upstream:
        tests/bios-tables-test: add smbios cpu speed test
        hw/smbios: add options for type 4 max-speed and current-speed
        vhost-user-blk-pci: default num_queues to -smp N
        virtio-blk-pci: default num_queues to -smp N
        virtio-scsi-pci: default num_queues to -smp N
        virtio-scsi: introduce a constant for fixed virtqueues
        virtio-pci: add virtio_pci_optimal_num_queues() helper
        Introduce a new flag for i440fx to disable PCI hotplug on the root bus
        acpi: update expected DSDT files with _UID changes
        disassemble-aml: -o actually works
        arm/acpi: fix an out of spec _UID for PCI root
        i386/acpi: fix inconsistent QEMU/OVMF device paths
        acpi: allow DSDT changes
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      19591e9e
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200827' into staging · ac8b279f
      Peter Maydell authored
      
      - document s390x boot devices
      - bug fixes
      
      # gpg: Signature made Thu 27 Aug 2020 13:16:41 BST
      # gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
      # gpg:                issuer "cohuck@redhat.com"
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20200827:
        hw/vfio/ap: Plug memleak in vfio_ap_get_group()
        docs/system/s390x: Add a chapter about s390x boot devices
        virtio-ccw-input: fix description
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      ac8b279f
    • Ying Fang's avatar
      tests/bios-tables-test: add smbios cpu speed test · e1647539
      Ying Fang authored
      
      Add smbios type 4 CPU speed check for we added new options to set
      smbios type 4 "max speed" and "current speed". The default value
      should be 2000 when no option is specified, just as the old version
      did.
      
      We add the test case to one machine of each architecture, though it
      doesn't really run on aarch64 platform for smbios test can't run on
      uefi only platform yet.
      
      Signed-off-by: default avatarYing Fang <fangying1@huawei.com>
      Signed-off-by: default avatarHeyi Guo <guoheyi@huawei.com>
      Message-Id: <20200806035634.376-3-fangying1@huawei.com>
      e1647539
    • Ying Fang's avatar
      hw/smbios: add options for type 4 max-speed and current-speed · c906e039
      Ying Fang authored
      
      Common VM users sometimes care about CPU speed, so we add two new
      options to allow VM vendors to present CPU speed to their users.
      Normally these information can be fetched from host smbios.
      
      Strictly speaking, the "max speed" and "current speed" in type 4
      are not really for the max speed and current speed of processor, for
      "max speed" identifies a capability of the system, and "current speed"
      identifies the processor's speed at boot (see smbios spec), but some
      applications do not tell the differences.
      
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: default avatarYing Fang <fangying1@huawei.com>
      Signed-off-by: default avatarHeyi Guo <guoheyi@huawei.com>
      Message-Id: <20200806035634.376-2-fangying1@huawei.com>
      c906e039
    • Stefan Hajnoczi's avatar
      vhost-user-blk-pci: default num_queues to -smp N · a4eef071
      Stefan Hajnoczi authored
      
      Automatically size the number of request virtqueues to match the number
      of vCPUs.  This ensures that completion interrupts are handled on the
      same vCPU that submitted the request.  No IPI is necessary to complete
      an I/O request and performance is improved.  The maximum number of MSI-X
      vectors and virtqueues limit are respected.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Message-Id: <20200818143348.310613-8-stefanha@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      a4eef071
    • Stefan Hajnoczi's avatar
      virtio-blk-pci: default num_queues to -smp N · 9445e1e1
      Stefan Hajnoczi authored
      
      Automatically size the number of virtio-blk-pci request virtqueues to
      match the number of vCPUs.  Other transports continue to default to 1
      request virtqueue.
      
      A 1:1 virtqueue:vCPU mapping ensures that completion interrupts are
      handled on the same vCPU that submitted the request.  No IPI is
      necessary to complete an I/O request and performance is improved.  The
      maximum number of MSI-X vectors and virtqueues limit are respected.
      
      Performance improves from 78k to 104k IOPS on a 32 vCPU guest with 101
      virtio-blk-pci devices (ioengine=libaio, iodepth=1, bs=4k, rw=randread
      with NVMe storage).
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Message-Id: <20200818143348.310613-7-stefanha@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      9445e1e1
    • Stefan Hajnoczi's avatar
      virtio-scsi-pci: default num_queues to -smp N · 6a558822
      Stefan Hajnoczi authored
      
      Automatically size the number of virtio-scsi-pci, vhost-scsi-pci, and
      vhost-user-scsi-pci request virtqueues to match the number of vCPUs.
      Other transports continue to default to 1 request virtqueue.
      
      A 1:1 virtqueue:vCPU mapping ensures that completion interrupts are
      handled on the same vCPU that submitted the request.  No IPI is
      necessary to complete an I/O request and performance is improved.  The
      maximum number of MSI-X vectors and virtqueues limit are respected.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <20200818143348.310613-6-stefanha@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      6a558822
    • Stefan Hajnoczi's avatar
      virtio-scsi: introduce a constant for fixed virtqueues · 4e5163bd
      Stefan Hajnoczi authored
      
      The event and control virtqueues are always present, regardless of the
      multi-queue configuration.  Define a constant so that virtqueue number
      calculations are easier to read.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Message-Id: <20200818143348.310613-5-stefanha@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      4e5163bd
    • Stefan Hajnoczi's avatar
      virtio-pci: add virtio_pci_optimal_num_queues() helper · 1436f32a
      Stefan Hajnoczi authored
      
      Multi-queue devices achieve the best performance when each vCPU has a
      dedicated queue. This ensures that virtqueue used notifications are
      handled on the same vCPU that submitted virtqueue buffers.  When another
      vCPU handles the the notification an IPI will be necessary to wake the
      submission vCPU and this incurs a performance overhead.
      
      Provide a helper function that virtio-pci devices will use in later
      patches to automatically select the optimal number of queues.
      
      The function handles guests with large numbers of CPUs by limiting the
      number of queues to fit within the following constraints:
      1. The maximum number of MSI-X vectors.
      2. The maximum number of virtqueues.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Message-Id: <20200818143348.310613-4-stefanha@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      1436f32a
    • Ani Sinha's avatar
      Introduce a new flag for i440fx to disable PCI hotplug on the root bus · 3d7e78aa
      Ani Sinha authored
      We introduce a new global flag 'acpi-root-pci-hotplug' for i440fx with which
      we can turn on or off PCI device hotplug on the root bus. This flag can be
      used to prevent all PCI devices from getting hotplugged or unplugged from the
      root PCI bus.
      This feature is targetted mostly towards Windows VMs. It is useful in cases
      where some hypervisor admins want to deploy guest VMs in a way so that the
      users of the guest OSes are not able to hot-eject certain PCI devices from
      the Windows system tray. Laine has explained the use case here in detail:
      https://www.redhat.com/archives/libvir-list/2020-February/msg00110.html
      
      
      
      Julia has resolved this issue for PCIE buses with the following commit:
      530a0963 ("pcie_root_port: Add hotplug disabling option")
      
      This commit attempts to introduce similar behavior for PCI root buses used in
      i440fx machine types (although in this case, we do not have a per-slot
      capability to turn hotplug on or off).
      
      Usage:
         -global PIIX4_PM.acpi-root-pci-hotplug=off
      
      By default, this option is enabled which means that hotplug is turned on for
      the PCI root bus.
      
      The previously existing flag 'acpi-pci-hotplug-with-bridge-support' for PCI-PCI
      bridges remain as is and can be used along with this new flag to control PCI
      hotplug on PCI bridges.
      
      This change has been tested using a Windows 2012R2 server guest image and also
      with a Windows 2019 server guest image on a Ubuntu 18.04 host using the latest
      master qemu from upstream.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Message-Id: <20200821165403.26589-1-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Tested-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      3d7e78aa
    • Michael S. Tsirkin's avatar
      acpi: update expected DSDT files with _UID changes · af1dfe1e
      Michael S. Tsirkin authored
      
      _UID of the PCI root has been changed to 0.
      
      Update expected files accordingly, and re-enable their testing.
      
      Full diff of changed files disassembly:
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.acpihmat.dsl /tmp/new/tests/data/acpi/pc/DSDT.acpihmat.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.acpihmat.dsl	2020-08-04 17:37:55.727798633 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.acpihmat.dsl	2020-08-04 17:42:57.258859861 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.bridge.dsl /tmp/new/tests/data/acpi/pc/DSDT.bridge.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.bridge.dsl	2020-08-04 17:37:55.737798601 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.bridge.dsl	2020-08-04 17:42:57.262859849 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.cphp.dsl /tmp/new/tests/data/acpi/pc/DSDT.cphp.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.cphp.dsl	2020-08-04 17:37:55.745798576 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.cphp.dsl	2020-08-04 17:42:57.265859839 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.dimmpxm.dsl /tmp/new/tests/data/acpi/pc/DSDT.dimmpxm.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.dimmpxm.dsl	2020-08-04 17:37:55.759798533 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.dimmpxm.dsl	2020-08-04 17:42:57.268859830 -0400
      @@ -52,7 +52,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.dsl /tmp/new/tests/data/acpi/pc/DSDT.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.dsl	2020-08-04 17:37:55.713798676 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.dsl	2020-08-04 17:42:57.256859867 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.ipmikcs.dsl /tmp/new/tests/data/acpi/pc/DSDT.ipmikcs.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.ipmikcs.dsl	2020-08-04 17:37:55.765798514 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.ipmikcs.dsl	2020-08-04 17:42:57.270859824 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.memhp.dsl /tmp/new/tests/data/acpi/pc/DSDT.memhp.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.memhp.dsl	2020-08-04 17:37:55.773798489 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.memhp.dsl	2020-08-04 17:42:57.273859814 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/pc/DSDT.numamem.dsl /tmp/new/tests/data/acpi/pc/DSDT.numamem.dsl
      --- /tmp/old/tests/data/acpi/pc/DSDT.numamem.dsl	2020-08-04 17:37:55.782798461 -0400
      +++ /tmp/new/tests/data/acpi/pc/DSDT.numamem.dsl	2020-08-04 17:42:57.276859805 -0400
      @@ -50,7 +50,7 @@
               {
                   Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
               }
           }
      
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.acpihmat.dsl /tmp/new/tests/data/acpi/q35/DSDT.acpihmat.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.acpihmat.dsl	2020-08-04 17:37:55.911798060 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.acpihmat.dsl	2020-08-04 17:42:57.327859646 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.bridge.dsl /tmp/new/tests/data/acpi/q35/DSDT.bridge.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.bridge.dsl	2020-08-04 17:37:55.920798032 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.bridge.dsl	2020-08-04 17:42:57.331859634 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.cphp.dsl /tmp/new/tests/data/acpi/q35/DSDT.cphp.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.cphp.dsl	2020-08-04 17:37:55.930798001 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.cphp.dsl	2020-08-04 17:42:57.336859618 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.dimmpxm.dsl /tmp/new/tests/data/acpi/q35/DSDT.dimmpxm.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.dimmpxm.dsl	2020-08-04 17:37:55.942797963 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.dimmpxm.dsl	2020-08-04 17:42:57.340859606 -0400
      @@ -53,7 +53,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.dsl /tmp/new/tests/data/acpi/q35/DSDT.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.dsl	2020-08-04 17:37:55.898798100 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.dsl	2020-08-04 17:42:57.323859659 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.ipmibt.dsl /tmp/new/tests/data/acpi/q35/DSDT.ipmibt.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.ipmibt.dsl	2020-08-04 17:37:55.952797932 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.ipmibt.dsl	2020-08-04 17:42:57.344859593 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.memhp.dsl /tmp/new/tests/data/acpi/q35/DSDT.memhp.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.memhp.dsl	2020-08-04 17:37:55.962797901 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.memhp.dsl	2020-08-04 17:42:57.348859581 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.mmio64.dsl /tmp/new/tests/data/acpi/q35/DSDT.mmio64.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.mmio64.dsl	2020-08-04 17:37:55.972797870 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.mmio64.dsl	2020-08-04 17:42:57.351859572 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.numamem.dsl /tmp/new/tests/data/acpi/q35/DSDT.numamem.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.numamem.dsl	2020-08-04 17:37:55.983797836 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.numamem.dsl	2020-08-04 17:42:57.354859562 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/q35/DSDT.tis.dsl /tmp/new/tests/data/acpi/q35/DSDT.tis.dsl
      --- /tmp/old/tests/data/acpi/q35/DSDT.tis.dsl	2020-08-04 17:37:55.993797804 -0400
      +++ /tmp/new/tests/data/acpi/q35/DSDT.tis.dsl	2020-08-04 17:42:57.358859550 -0400
      @@ -51,7 +51,7 @@
                   Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
                   Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
                   Name (_ADR, Zero)  // _ADR: Address
      -            Name (_UID, One)  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
      diff -ru /tmp/old/tests/data/acpi/virt/DSDT.dsl /tmp/new/tests/data/acpi/virt/DSDT.dsl
      --- /tmp/old/tests/data/acpi/virt/DSDT.dsl	2020-08-04 17:37:56.121797406 -0400
      +++ /tmp/new/tests/data/acpi/virt/DSDT.dsl	2020-08-04 17:42:57.408859394 -0400
      @@ -641,7 +641,7 @@
                   Name (_CID, "PNP0A03" /* PCI Bus */)  // _CID: Compatible ID
                   Name (_SEG, Zero)  // _SEG: PCI Segment
                   Name (_BBN, Zero)  // _BBN: BIOS Bus Number
      -            Name (_UID, "PCI0")  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Name (_STR, Unicode ("PCIe 0 Device"))  // _STR: Description String
                   Name (_CCA, One)  // _CCA: Cache Coherency Attribute
                   Name (_PRT, Package (0x80)  // _PRT: PCI Routing Table
      diff -ru /tmp/old/tests/data/acpi/virt/DSDT.memhp.dsl /tmp/new/tests/data/acpi/virt/DSDT.memhp.dsl
      --- /tmp/old/tests/data/acpi/virt/DSDT.memhp.dsl	2020-08-04 17:37:56.129797381 -0400
      +++ /tmp/new/tests/data/acpi/virt/DSDT.memhp.dsl	2020-08-04 17:42:57.411859385 -0400
      @@ -643,7 +643,7 @@
                   Name (_CID, "PNP0A03" /* PCI Bus */)  // _CID: Compatible ID
                   Name (_SEG, Zero)  // _SEG: PCI Segment
                   Name (_BBN, Zero)  // _BBN: BIOS Bus Number
      -            Name (_UID, "PCI0")  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Name (_STR, Unicode ("PCIe 0 Device"))  // _STR: Description String
                   Name (_CCA, One)  // _CCA: Cache Coherency Attribute
                   Name (_PRT, Package (0x80)  // _PRT: PCI Routing Table
      diff -ru /tmp/old/tests/data/acpi/virt/DSDT.numamem.dsl /tmp/new/tests/data/acpi/virt/DSDT.numamem.dsl
      --- /tmp/old/tests/data/acpi/virt/DSDT.numamem.dsl	2020-08-04 17:37:56.141797343 -0400
      +++ /tmp/new/tests/data/acpi/virt/DSDT.numamem.dsl	2020-08-04 17:42:57.413859379 -0400
      @@ -641,7 +641,7 @@
                   Name (_CID, "PNP0A03" /* PCI Bus */)  // _CID: Compatible ID
                   Name (_SEG, Zero)  // _SEG: PCI Segment
                   Name (_BBN, Zero)  // _BBN: BIOS Bus Number
      -            Name (_UID, "PCI0")  // _UID: Unique ID
      +            Name (_UID, Zero)  // _UID: Unique ID
                   Name (_STR, Unicode ("PCIe 0 Device"))  // _STR: Description String
                   Name (_CCA, One)  // _CCA: Cache Coherency Attribute
                   Name (_PRT, Package (0x80)  // _PRT: PCI Routing Table
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      af1dfe1e
    • Michael S. Tsirkin's avatar
      disassemble-aml: -o actually works · c27c1cc3
      Michael S. Tsirkin authored
      
      Turns out that option was borken due to weird iasl
      command line handling. Fix it.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c27c1cc3
    • Michael S. Tsirkin's avatar
      arm/acpi: fix an out of spec _UID for PCI root · 9b897b39
      Michael S. Tsirkin authored
      
      On ARM/virt machine type QEMU currently reports an incorrect _UID in
      ACPI.
      
      The particular node in question is the primary PciRoot (PCI0 in ACPI),
      which gets assigned PCI0 in ACPI UID and 0 in the
      DevicePath. This is due to the _UID assigned to it by build_dsdt in
      hw/arm/virt-acpi-build.c Which does not correspond to the primary PCI
      identifier given by pcibus_num in hw/pci/pci.c
      
      In UEFI v2.8, section "10.4.2 Rules with ACPI _HID and _UID" ends with
      the paragraph,
      
          Root PCI bridges will use the plug and play ID of PNP0A03, This will
          be stored in the ACPI Device Path _HID field, or in the Expanded
          ACPI Device Path _CID field to match the ACPI name space. The _UID
          in the ACPI Device Path structure must match the _UID in the ACPI
          name space.
      
      (See especially the last sentence.)
      
      A similar bug has been reported on i386, on that architecture it has
      been reported to confuse at least macOS which uses ACPI UIDs to build
      the DevicePath for NVRAM boot options, while OVMF firmware gets them via
      an internal channel through QEMU.  When UEFI firmware and ACPI have
      different values, this makes the underlying operating system unable to
      report its boot option.
      
      Cc: qemu-stable@nongnu.org
      Reported-by: default avatarVitaly Cheptsov <vit9696@protonmail.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
      9b897b39
    • Michael S. Tsirkin's avatar
      i386/acpi: fix inconsistent QEMU/OVMF device paths · af1b80ae
      Michael S. Tsirkin authored
      macOS uses ACPI UIDs to build the DevicePath for NVRAM boot options,
      while OVMF firmware gets them via an internal channel through QEMU.
      Due to a bug in QEMU ACPI currently UEFI firmware and ACPI have
      different values, and this makes the underlying operating system
      unable to report its boot option.
      
      The particular node in question is the primary PciRoot (PCI0 in ACPI),
      which for some reason gets assigned 1 in ACPI UID and 0 in the
      DevicePath. This is due to the _UID assigned to it by build_dsdt in
      hw/i386/acpi-build.c Which does not correspond to the primary PCI
      identifier given by pcibus_num in hw/pci/pci.c
      
      Reference with the device paths, OVMF startup logs, and ACPI table
      dumps (SysReport):
      https://github.com/acidanthera/bugtracker/issues/1050
      
      
      
      In UEFI v2.8, section "10.4.2 Rules with ACPI _HID and _UID" ends with
      the paragraph,
      
          Root PCI bridges will use the plug and play ID of PNP0A03, This will
          be stored in the ACPI Device Path _HID field, or in the Expanded
          ACPI Device Path _CID field to match the ACPI name space. The _UID
          in the ACPI Device Path structure must match the _UID in the ACPI
          name space.
      
      (See especially the last sentence.)
      
      Considering *extra* root bridges / root buses (with bus number > 0),
      QEMU's ACPI generator actually does the right thing; since QEMU commit
      c96d9286 ("i386/acpi-build: more traditional _UID and _HID for PXB
      root buses", 2015-06-11).
      
      However, the _UID values for root bridge zero (on both i440fx and q35)
      have always been "wrong" (from UEFI perspective), going back in QEMU to
      commit 74523b85 ("i386: add ACPI table files from seabios",
      2013-10-14).
      
      Even in SeaBIOS, these _UID values have always been 1; see commit
      a4d357638c57 ("Port rombios32 code from bochs-bios.", 2008-03-08) for
      i440fx, and commit ecbe3fd61511 ("seabios: q35: add dsdt", 2012-12-01)
      for q35.
      
      Cc: qemu-stable@nongnu.org
      Suggested-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Tested-by: default avatarVitaly Cheptsov <vit9696@protonmail.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
      af1b80ae
Loading