Skip to content
Snippets Groups Projects
  1. Oct 02, 2020
  2. Sep 30, 2020
    • Eduardo Habkost's avatar
      bios-tables-test: Remove kernel-irqchip=off option · d1e2d464
      Eduardo Habkost authored
      We don't need to use kernel-irqchip=off for irq0 override if IRQ
      routing is supported by the host, which is the case since 2009
      (IRQ routing was added to KVM in Linux v2.6.30).
      
      This is a more straightforward fix for Launchpad bug #1896263, as
      it doesn't require increasing the complexity of the MSR code.
      kernel-irqchip=off is for debugging only and there's no need to
      increase the complexity of the code just to work around an issue
      that was already fixed in the kernel.
      
      Fixes: https://bugs.launchpad.net/bugs/1896263
      
      
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20200922194732.2100510-1-ehabkost@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d1e2d464
    • Paolo Bonzini's avatar
      tests/tcg: reinstate or replace desired parts of rules.mak · 2c243053
      Paolo Bonzini authored
      
      Commit 660f7930 was a bit overzealous
      with respect to tests/tcg, which needed quiet-command and $(BUILD_DIR).
      Reinstate quiet-command, and replace $(BUILD_DIR) with just the
      current directory.
      
      Reported-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2c243053
    • Paolo Bonzini's avatar
      vl: relocate paths to data directories · ea1edcd7
      Paolo Bonzini authored
      
      As an additional advantage, the logic is now unified between
      POSIX and Win32 systems.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ea1edcd7
    • Paolo Bonzini's avatar
      fuzz: use qemu_get_exec_dir · ec986777
      Paolo Bonzini authored
      
      Make things consistent with how softmmu/vl.c uses os_find_datadir.
      Initializing the path to the executables will also be needed for
      get_relocatable_path to work.
      
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ec986777
    • Paolo Bonzini's avatar
      oslib: do not call g_strdup from qemu_get_exec_dir · a4c13869
      Paolo Bonzini authored
      
      Just return the directory without requiring the caller to free it.
      This also removes a bogus check for NULL in os_find_datadir and
      module_load_one; g_strdup of a static variable cannot return NULL.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a4c13869
    • Paolo Bonzini's avatar
      meson: qtest: set "depends" correctly · fd5eef85
      Paolo Bonzini authored
      
      This does not have any effect on Meson's behavior itself, since "meson test"
      always rebuilds everything (that is one reason why we are not using it...).
      However, mtest2make can use this information to do a selective rebuild
      for the requested suite.
      
      Cc: Thomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fd5eef85
    • Paolo Bonzini's avatar
      meson: clean up build_by_default · 27d551c0
      Paolo Bonzini authored
      
      Build all executables by default except for the known-broken ones.
      
      This also allows running qemu-iotests without manually building
      socket_scm_helper.
      
      Reported-by: default avatarMax Reitz <mreitz@redhat.com>
      Tested-by: default avatarMax Reitz <mreitz@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      27d551c0
    • Claudio Fontana's avatar
      tests: add missing genh dependency · 8a5701e5
      Claudio Fontana authored
      
      Fix high-parallelism builds by forcing all generated headers
      to be created before tests are compiled.
      
      Reported-by: default avatarClaudio Fontana <cfontana@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Tested-by: default avatarClaudio Fontana <cfontana@suse.de>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      8a5701e5
    • Gerd Hoffmann's avatar
      tests/acpi: update expected data files · 7f6c3d1a
      Gerd Hoffmann authored
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20200928104256.9241-13-kraxel@redhat.com
      7f6c3d1a
    • Gerd Hoffmann's avatar
      tests/acpi: add microvm pcie test · 18bb73b3
      Gerd Hoffmann authored
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20200928104256.9241-11-kraxel@redhat.com
      18bb73b3
    • Gerd Hoffmann's avatar
      tests/acpi: factor out common microvm test setup · 62b61b85
      Gerd Hoffmann authored
      
      ... into new test_acpi_microvm_prepare helper
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20200928104256.9241-10-kraxel@redhat.com
      62b61b85
    • Gerd Hoffmann's avatar
      tests/acpi: add empty tests/data/acpi/microvm/DSDT.pcie file · fe1e5cc8
      Gerd Hoffmann authored
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20200928104256.9241-9-kraxel@redhat.com
      fe1e5cc8
    • Gerd Hoffmann's avatar
      tests/acpi: allow updates for expected data files · 928dda43
      Gerd Hoffmann authored
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-id: 20200928104256.9241-8-kraxel@redhat.com
      928dda43
    • Ani Sinha's avatar
      tests/acpi: add DSDT.hpbrroot DSDT table blob to test global i440fx hotplug · 42803552
      Ani Sinha authored
      
      This change adds a new DSDT golden master table blob to test disabling
      hotplug on both pci root bus and pci bridges. Also reverts the change
      in file bios-tables-test-allowed-diff.h to make sure its now empty so that
      future modifications to acpi tables can be caught.
      
      The following is the disassembled diff between DSDT.hpbridge and DSDT.hpbrroot:
      
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/pc/DSDT.hpbridge, Tue Sep 29 17:51:04 2020
      + * Disassembly of tests/data/acpi/pc/DSDT.hpbrroot, Tue Sep 29 17:50:00 2020
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x0000139D (5021)
      + *     Length           0x00000C07 (3079)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0x05
      + *     Checksum         0xAD
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPCDSDT"
        *     OEM Revision     0x00000001 (1)
      @@ -247,38 +247,6 @@
               }
           }
      
      -    Scope (_SB.PCI0)
      -    {
      -        OperationRegion (PCST, SystemIO, 0xAE00, 0x08)
      -        Field (PCST, DWordAcc, NoLock, WriteAsZeros)
      -        {
      -            PCIU,   32,
      -            PCID,   32
      -        }
      -
      -        OperationRegion (SEJ, SystemIO, 0xAE08, 0x04)
      -        Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
      -        {
      -            B0EJ,   32
      -        }
      -
      -        OperationRegion (BNMR, SystemIO, 0xAE10, 0x04)
      -        Field (BNMR, DWordAcc, NoLock, WriteAsZeros)
      -        {
      -            BNUM,   32
      -        }
      -
      -        Mutex (BLCK, 0x00)
      -        Method (PCEJ, 2, NotSerialized)
      -        {
      -            Acquire (BLCK, 0xFFFF)
      -            BNUM = Arg0
      -            B0EJ = (One << Arg1)
      -            Release (BLCK)
      -            Return (Zero)
      -        }
      -    }
      -
           Scope (_SB)
           {
               Scope (PCI0)
      @@ -737,12 +705,6 @@
           Scope (_GPE)
           {
               Name (_HID, "ACPI0006" /* GPE Block Device */)  // _HID: Hardware ID
      -        Method (_E01, 0, NotSerialized)  // _Exx: Edge-Triggered GPE
      -        {
      -            Acquire (\_SB.PCI0.BLCK, 0xFFFF)
      -            \_SB.PCI0.PCNT ()
      -            Release (\_SB.PCI0.BLCK)
      -        }
           }
      
           Scope (\_SB.PCI0)
      @@ -813,22 +775,6 @@
                           )
                   })
               }
      -
      -        Device (PHPR)
      -        {
      -            Name (_HID, "PNP0A06" /* Generic Container Device */)  // _HID: Hardware ID
      -            Name (_UID, "PCI Hotplug resources")  // _UID: Unique ID
      -            Name (_STA, 0x0B)  // _STA: Status
      -            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      -            {
      -                IO (Decode16,
      -                    0xAE00,             // Range Minimum
      -                    0xAE00,             // Range Maximum
      -                    0x01,               // Alignment
      -                    0x14,               // Length
      -                    )
      -            })
      -        }
           }
      
           Scope (\)
      @@ -878,7 +824,6 @@
           {
               Scope (PCI0)
               {
      -            Name (BSEL, Zero)
                   Device (S00)
                   {
                       Name (_ADR, Zero)  // _ADR: Address
      @@ -907,436 +852,6 @@
                   {
                       Name (_ADR, 0x00030000)  // _ADR: Address
                   }
      -
      -            Device (S20)
      -            {
      -                Name (_SUN, 0x04)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00040000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S28)
      -            {
      -                Name (_SUN, 0x05)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00050000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S30)
      -            {
      -                Name (_SUN, 0x06)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00060000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S38)
      -            {
      -                Name (_SUN, 0x07)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00070000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S40)
      -            {
      -                Name (_SUN, 0x08)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00080000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S48)
      -            {
      -                Name (_SUN, 0x09)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00090000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S50)
      -            {
      -                Name (_SUN, 0x0A)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000A0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S58)
      -            {
      -                Name (_SUN, 0x0B)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000B0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S60)
      -            {
      -                Name (_SUN, 0x0C)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000C0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S68)
      -            {
      -                Name (_SUN, 0x0D)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000D0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S70)
      -            {
      -                Name (_SUN, 0x0E)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000E0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S78)
      -            {
      -                Name (_SUN, 0x0F)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000F0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S80)
      -            {
      -                Name (_SUN, 0x10)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00100000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S88)
      -            {
      -                Name (_SUN, 0x11)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00110000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S90)
      -            {
      -                Name (_SUN, 0x12)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00120000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S98)
      -            {
      -                Name (_SUN, 0x13)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00130000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SA0)
      -            {
      -                Name (_SUN, 0x14)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00140000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SA8)
      -            {
      -                Name (_SUN, 0x15)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00150000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SB0)
      -            {
      -                Name (_SUN, 0x16)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00160000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SB8)
      -            {
      -                Name (_SUN, 0x17)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00170000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SC0)
      -            {
      -                Name (_SUN, 0x18)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00180000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SC8)
      -            {
      -                Name (_SUN, 0x19)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00190000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SD0)
      -            {
      -                Name (_SUN, 0x1A)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001A0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SD8)
      -            {
      -                Name (_SUN, 0x1B)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001B0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SE0)
      -            {
      -                Name (_SUN, 0x1C)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001C0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SE8)
      -            {
      -                Name (_SUN, 0x1D)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001D0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SF0)
      -            {
      -                Name (_SUN, 0x1E)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001E0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SF8)
      -            {
      -                Name (_SUN, 0x1F)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001F0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Method (DVNT, 2, NotSerialized)
      -            {
      -                If ((Arg0 & 0x10))
      -                {
      -                    Notify (S20, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x20))
      -                {
      -                    Notify (S28, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x40))
      -                {
      -                    Notify (S30, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x80))
      -                {
      -                    Notify (S38, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0100))
      -                {
      -                    Notify (S40, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0200))
      -                {
      -                    Notify (S48, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0400))
      -                {
      -                    Notify (S50, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0800))
      -                {
      -                    Notify (S58, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x1000))
      -                {
      -                    Notify (S60, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x2000))
      -                {
      -                    Notify (S68, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x4000))
      -                {
      -                    Notify (S70, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x8000))
      -                {
      -                    Notify (S78, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00010000))
      -                {
      -                    Notify (S80, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00020000))
      -                {
      -                    Notify (S88, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00040000))
      -                {
      -                    Notify (S90, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00080000))
      -                {
      -                    Notify (S98, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00100000))
      -                {
      -                    Notify (SA0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00200000))
      -                {
      -                    Notify (SA8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00400000))
      -                {
      -                    Notify (SB0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00800000))
      -                {
      -                    Notify (SB8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x01000000))
      -                {
      -                    Notify (SC0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x02000000))
      -                {
      -                    Notify (SC8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x04000000))
      -                {
      -                    Notify (SD0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x08000000))
      -                {
      -                    Notify (SD8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x10000000))
      -                {
      -                    Notify (SE0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x20000000))
      -                {
      -                    Notify (SE8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x40000000))
      -                {
      -                    Notify (SF0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x80000000))
      -                {
      -                    Notify (SF8, Arg1)
      -                }
      -            }
      -
      -            Method (PCNT, 0, NotSerialized)
      -            {
      -                BNUM = Zero
      -                DVNT (PCIU, One)
      -                DVNT (PCID, 0x03)
      -            }
               }
           }
       }
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200929123011.31836-3-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      42803552
    • Ani Sinha's avatar
      tests/acpi: unit test exercising global pci hotplug off for i440fx · 5645f996
      Ani Sinha authored
      
      This change adds a unit test to exercise the case when hotplug is disabled
      both for pci root bus and the pci bridges by passing the following two
      switches to qemu:
      
        -global PIIX4_PM.acpi-root-pci-hotplug=off
        -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off
      
      bios-tables-test-allowed-diff.h documents the fact that a new DSDT acpi gold
      master binary blob we need to be added to test this. We will do the actual
      addition in the next patch in the series.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200929123011.31836-2-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      5645f996
  3. Sep 29, 2020
    • Peter Maydell's avatar
      Remove texinfo dependency from docker and CI configs · 7cd77fb0
      Peter Maydell authored
      
      We don't need texinfo to build the docs any more, so we can
      drop that dependency from our docker and other CI configs.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-22-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      7cd77fb0
    • Peter Maydell's avatar
      scripts/qapi: Remove texinfo generation support · a27ff0a2
      Peter Maydell authored
      
      We no longer use the generated texinfo format documentation,
      so delete the code that generates it, and the test case for
      the generation.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-17-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      a27ff0a2
    • Peter Maydell's avatar
      tests/qapi-schema: Add test of the rST QAPI doc-comment output · ca1145ee
      Peter Maydell authored
      
      Add a test of the rST output from the QAPI doc-comment generator,
      similar to what we currently have that tests the Texinfo output.
      
      This is a bit more awkward with Sphinx, because the generated output
      is not 100% under our control the way the QAPI-to-Texinfo generator
      was. We can't observe the data we generate, only the Sphinx
      output. Two issues.
      
      One, the output can vary with the Sphinx version. In practice Sphinx's
      plaintext output generation has been identical between at least Sphinx
      1.6 and 3.0, so we use that. (The HTML output has had changes across
      versions). We use an exact-match comparison check, with the
      understanding that perhaps changes in a future Sphinx version might
      require us to implement something more clever to cope with variation
      in the output.
      
      Two, the test can only protect us from changes in the data we generate
      that are visible in plain text.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-16-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Commit message improved]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      ca1145ee
    • Peter Maydell's avatar
      tests/qapi-schema: Convert doc-good.json to rST-style strong/emphasis · b09c8f7a
      Peter Maydell authored
      
      doc-good.json currently uses the old *strong* and _emphasis_ markup.
      As part of the conversion to rST this needs to switch to **strong**
      and *emphasis*, because rST uses underscores as part of its markup
      of hyperlinks and will otherwise warn about the syntax error.
      
      In commit a660eed4 we fixed up the in-tree uses of the
      old markup:
       1) _this_ was replaced with *this*
       2) the only in-tree use of *this* was left alone (turning
          a 'strong' into an 'emphasis')
      (and so currently in-tree nothing is using either new-style
      **strong** or old-style _emphasis_).
      
      Update doc-good.json in a similar way:
       1) replace _this_ with *this*
       2) remove the usage of old-style *this*
      
      (This slightly reduces the coverage for the old Texinfo generator,
      which is about to go away, but is fine for the new rST generator
      because that does not need to handle strong/emphasis itself because
      it is simply passing the entire text as raw rST to Sphinx.)
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-13-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      b09c8f7a
    • Peter Maydell's avatar
      scripts/qapi/parser.py: improve doc comment indent handling · a69a6d4b
      Peter Maydell authored
      
      Make the handling of indentation in doc comments more sophisticated,
      so that when we see a section like:
      
      Notes: some text
             some more text
                indented line 3
      
      we save it for the doc-comment processing code as:
      
      some text
      some more text
         indented line 3
      
      and when we see a section with the heading on its own line:
      
      Notes:
      
      some text
      some more text
         indented text
      
      we also accept that and save it in the same form.
      
      If we detect that the comment document text is not indented as much
      as we expect it to be, we throw a parse error.  (We don't complain
      about over-indented sections, because for rST this can be legitimate
      markup.)
      
      The golden reference for the doc comment text is updated to remove
      the two 'wrong' indents; these now form a test case that we correctly
      stripped leading whitespace from an indented multi-line argument
      definition.
      
      We update the documentation in docs/devel/qapi-code-gen.txt to
      describe the new indentation rules.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-6-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Whitespace between sentences tweaked]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      a69a6d4b
    • Peter Maydell's avatar
      scripts/qapi: Move doc-comment whitespace stripping to doc.py · 99dff36d
      Peter Maydell authored
      
      As we accumulate lines from doc comments when parsing the JSON, the
      QAPIDoc class generally strips leading and trailing whitespace using
      line.strip() when it calls _append_freeform().  This is fine for
      Texinfo, but for rST leading whitespace is significant.  We'd like to
      move to having the text in doc comments be rST format rather than a
      custom syntax, so move the removal of leading whitespace from the
      QAPIDoc class to the texinfo-specific processing code in
      texi_format() in qapi/doc.py.
      
      (Trailing whitespace will always be stripped by the rstrip() in
      Section::append regardless.)
      
      In a followup commit we will make the whitespace in the lines of doc
      comment sections more consistently follow the input source.
      
      There is no change to the generated .texi files before and after this
      commit.
      
      Because the qapi-schema test checks the exact values of the
      documentation comments against a reference, we need to update that
      reference to match the new whitespace.  In the first four places this
      is now correctly checking that we did put in the amount of whitespace
      to pass a rST-formatted list to the backend; in the last two places
      the extra whitespace is 'wrong' and will go away again in the
      following commit.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-5-peter.maydell@linaro.org>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      99dff36d
    • Peter Maydell's avatar
      tests/qapi/doc-good.json: Prepare for qapi-doc Sphinx extension · 63a97cf5
      Peter Maydell authored
      
      doc-good.json tests doc comment parser corner cases.  We're about to
      largely replace it by a Sphinx extension, which will have different
      corner cases.  Tweak the test so it passes both with the old parser
      and the Sphinx extension, by making it match the more restrictive
      rST syntax:
      
       * in a single list the bullet types must all match
       * lists must have leading and following blank lines
       * the rules on when and where indentation matters differ
       * the '|' example syntax is going to go away entirely, so stop
         testing it
      
      This will avoid the tests spuriously breaking when we tighten up the
      parser code in the following commits.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-4-peter.maydell@linaro.org>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      63a97cf5
    • Michael S. Tsirkin's avatar
      tests/acpi: drop unnecessary files · f142e4ed
      Michael S. Tsirkin authored
      
      The last pull added a ton of useless files by mistake.
      Drop them all.
      
      Fixes: 0ed93f4c ("update golden master DSDT binary table blobs for q35")
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      f142e4ed
    • Ani Sinha's avatar
      tests/acpi: update golden master DSDT binary table blobs for q35 · 0ed93f4c
      Ani Sinha authored
      
      In the previously applied commit ("piix4: don't reserve hw resources when
      hotplug is off globally"), we make changes to the ACPI DSDT tables
      such that some ACPI code are not generated when bsel is absent. Since
      as of this point in time, in q35 machines, we do not use bsel for pci
      buses, we need to update the DSDT table blobs.
      This patch updates the DSDT golden master tables for q35 machines.
      At the same time, we clear bios-tables-test-allowed-diff.h for future
      changes which update tables.
      
      Following is a typical diff between the q35 acpi DSDT table blobs:
      
      @@ -1,30 +1,30 @@
       /*
        * Intel ACPI Component Architecture
        * AML/ASL+ Disassembler version 20180105 (64-bit version)
        * Copyright (c) 2000 - 2018 Intel Corporation
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/q35/DSDT, Tue Sep 15 18:52:47 2020
      + * Disassembly of /tmp/aml-3O0DR0, Tue Sep 15 18:52:47 2020
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00001DFE (7678)
      + *     Length           0x00001DF6 (7670)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0xAC
      + *     Checksum         0x17
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPCDSDT"
        *     OEM Revision     0x00000001 (1)
        *     Compiler ID      "BXPC"
        *     Compiler Version 0x00000001 (1)
        */
       DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001)
       {
           Scope (\)
           {
               OperationRegion (DBG, SystemIO, 0x0402, One)
               Field (DBG, ByteAcc, NoLock, Preserve)
               {
                   DBGB,   8
               }
      
      @@ -3113,24 +3113,20 @@
                       Name (_ADR, 0x00010000)  // _ADR: Address
                       Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                       {
                           Return (Zero)
                       }
                   }
      -
      -            Method (PCNT, 0, NotSerialized)
      -            {
      -            }
               }
           }
       }
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-12-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      0ed93f4c
    • Ani Sinha's avatar
      Add ACPI DSDT tables for q35 that are being updated by the next patch · c4bb646f
      Ani Sinha authored
      
      The following patch ("piix4: don't reserve hw resources when
      hotplug is off globally") modifies certain ACPI tables for q35 machines.
      This patch adds those table names to tests/qtest/bios-tables-test-allowed-diff.h
      so that unit tests continue to pass and bisection is not broken.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-10-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c4bb646f
    • Ani Sinha's avatar
      tests/acpi: add newly added acpi DSDT table blob for pci bridge hotplug flag · 8b434b03
      Ani Sinha authored
      
      This patch adds a binary blob corresponding to the DSDT acpi table. It is used
      to unit test the flag 'acpi-pci-hotplug-with-bridge-support' used with pci
      bridges.
      
      This change also clears the file tests/qtest/bios-tables-test-allowed-diff.h
      so that future changes which affect the table can be caught.
      
      The following is the diff between files tests/data/acpi/pc/DSDT.bridge and
      tests/data/acpi/pc/DSDT.hpbridge after disassembly :
      
      @@ -1,30 +1,30 @@
       /*
        * Intel ACPI Component Architecture
        * AML/ASL+ Disassembler version 20180105 (64-bit version)
        * Copyright (c) 2000 - 2018 Intel Corporation
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/pc/DSDT.bridge, Fri Sep 11 23:21:34 2020
      + * Disassembly of /tmp/aml-7UURQ0, Fri Sep 11 23:21:34 2020
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00001A89 (6793)
      + *     Length           0x0000131F (4895)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0x09
      + *     Checksum         0xF9
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPCDSDT"
        *     OEM Revision     0x00000001 (1)
        *     Compiler ID      "BXPC"
        *     Compiler Version 0x00000001 (1)
        */
       DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001)
       {
           Scope (\)
           {
               OperationRegion (DBG, SystemIO, 0x0402, One)
               Field (DBG, ByteAcc, NoLock, Preserve)
               {
                   DBGB,   8
               }
      
      @@ -859,522 +859,32 @@
                       }
      
                       Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                       {
                           Return (Zero)
                       }
                   }
      
                   Device (S18)
                   {
                       Name (_ADR, 0x00030000)  // _ADR: Address
      -                Name (BSEL, One)
      -                Device (S00)
      -                {
      -                    Name (_SUN, Zero)  // _SUN: Slot User Number
      -                    Name (_ADR, Zero)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S08)
      -                {
      -                    Name (_SUN, One)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00010000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S10)
      -                {
      -                    Name (_SUN, 0x02)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00020000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S18)
      -                {
      -                    Name (_SUN, 0x03)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00030000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S20)
      -                {
      -                    Name (_SUN, 0x04)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00040000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S28)
      -                {
      -                    Name (_SUN, 0x05)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00050000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S30)
      -                {
      -                    Name (_SUN, 0x06)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00060000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S38)
      -                {
      -                    Name (_SUN, 0x07)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00070000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S40)
      -                {
      -                    Name (_SUN, 0x08)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00080000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S48)
      -                {
      -                    Name (_SUN, 0x09)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00090000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S50)
      -                {
      -                    Name (_SUN, 0x0A)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x000A0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S58)
      -                {
      -                    Name (_SUN, 0x0B)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x000B0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S60)
      -                {
      -                    Name (_SUN, 0x0C)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x000C0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S68)
      -                {
      -                    Name (_SUN, 0x0D)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x000D0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S70)
      -                {
      -                    Name (_SUN, 0x0E)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x000E0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S78)
      -                {
      -                    Name (_SUN, 0x0F)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x000F0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S80)
      -                {
      -                    Name (_SUN, 0x10)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00100000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S88)
      -                {
      -                    Name (_SUN, 0x11)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00110000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S90)
      -                {
      -                    Name (_SUN, 0x12)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00120000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (S98)
      -                {
      -                    Name (_SUN, 0x13)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00130000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SA0)
      -                {
      -                    Name (_SUN, 0x14)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00140000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SA8)
      -                {
      -                    Name (_SUN, 0x15)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00150000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SB0)
      -                {
      -                    Name (_SUN, 0x16)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00160000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SB8)
      -                {
      -                    Name (_SUN, 0x17)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00170000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SC0)
      -                {
      -                    Name (_SUN, 0x18)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00180000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SC8)
      -                {
      -                    Name (_SUN, 0x19)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x00190000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SD0)
      -                {
      -                    Name (_SUN, 0x1A)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x001A0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SD8)
      -                {
      -                    Name (_SUN, 0x1B)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x001B0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SE0)
      -                {
      -                    Name (_SUN, 0x1C)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x001C0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SE8)
      -                {
      -                    Name (_SUN, 0x1D)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x001D0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SF0)
      -                {
      -                    Name (_SUN, 0x1E)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x001E0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Device (SF8)
      -                {
      -                    Name (_SUN, 0x1F)  // _SUN: Slot User Number
      -                    Name (_ADR, 0x001F0000)  // _ADR: Address
      -                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                    {
      -                        PCEJ (BSEL, _SUN)
      -                    }
      -                }
      -
      -                Method (DVNT, 2, NotSerialized)
      -                {
      -                    If ((Arg0 & One))
      -                    {
      -                        Notify (S00, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x02))
      -                    {
      -                        Notify (S08, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x04))
      -                    {
      -                        Notify (S10, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x08))
      -                    {
      -                        Notify (S18, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x10))
      -                    {
      -                        Notify (S20, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x20))
      -                    {
      -                        Notify (S28, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x40))
      -                    {
      -                        Notify (S30, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x80))
      -                    {
      -                        Notify (S38, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x0100))
      -                    {
      -                        Notify (S40, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x0200))
      -                    {
      -                        Notify (S48, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x0400))
      -                    {
      -                        Notify (S50, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x0800))
      -                    {
      -                        Notify (S58, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x1000))
      -                    {
      -                        Notify (S60, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x2000))
      -                    {
      -                        Notify (S68, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x4000))
      -                    {
      -                        Notify (S70, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x8000))
      -                    {
      -                        Notify (S78, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00010000))
      -                    {
      -                        Notify (S80, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00020000))
      -                    {
      -                        Notify (S88, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00040000))
      -                    {
      -                        Notify (S90, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00080000))
      -                    {
      -                        Notify (S98, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00100000))
      -                    {
      -                        Notify (SA0, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00200000))
      -                    {
      -                        Notify (SA8, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00400000))
      -                    {
      -                        Notify (SB0, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x00800000))
      -                    {
      -                        Notify (SB8, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x01000000))
      -                    {
      -                        Notify (SC0, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x02000000))
      -                    {
      -                        Notify (SC8, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x04000000))
      -                    {
      -                        Notify (SD0, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x08000000))
      -                    {
      -                        Notify (SD8, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x10000000))
      -                    {
      -                        Notify (SE0, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x20000000))
      -                    {
      -                        Notify (SE8, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x40000000))
      -                    {
      -                        Notify (SF0, Arg1)
      -                    }
      -
      -                    If ((Arg0 & 0x80000000))
      -                    {
      -                        Notify (SF8, Arg1)
      -                    }
      -                }
      -
      -                Method (PCNT, 0, NotSerialized)
      -                {
      -                    BNUM = One
      -                    DVNT (PCIU, One)
      -                    DVNT (PCID, 0x03)
      -                }
                   }
      
                   Device (S20)
                   {
                       Name (_SUN, 0x04)  // _SUN: Slot User Number
                       Name (_ADR, 0x00040000)  // _ADR: Address
                       Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
                       {
                           PCEJ (BSEL, _SUN)
                       }
                   }
      
                   Device (S28)
                   {
                       Name (_SUN, 0x05)  // _SUN: Slot User Number
                       Name (_ADR, 0x00050000)  // _ADR: Address
      @@ -1779,22 +1289,21 @@
                       If ((Arg0 & 0x40000000))
                       {
                           Notify (SF0, Arg1)
                       }
      
                       If ((Arg0 & 0x80000000))
                       {
                           Notify (SF8, Arg1)
                       }
                   }
      
                   Method (PCNT, 0, NotSerialized)
                   {
                       BNUM = Zero
                       DVNT (PCIU, One)
                       DVNT (PCID, 0x03)
      -                ^S18.PCNT ()
                   }
               }
           }
       }
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-9-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      8b434b03
    • Ani Sinha's avatar
      tests/acpi: unit test for 'acpi-pci-hotplug-with-bridge-support' bridge flag · 5e3a4862
      Ani Sinha authored
      
      This change adds a new unit test for the global flag
      'acpi-pci-hotplug-with-bridge-support' which is available for cold plugged pci
      bridges in i440fx. The flag can be used to turn off ACPI based hotplug support
      on all pci bridges.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-8-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      5e3a4862
    • Ani Sinha's avatar
      tests/acpi: list added acpi table binary file for pci bridge hotplug test · 0fb41e89
      Ani Sinha authored
      
      The file 'tests/data/acpi/pc/DSDT.hpbridge' is a newly added acpi table file
      for testing the pci bridge option 'acpi-pci-hotplug-with-bridge-support' under
      i440fx. This change documents this fact.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-7-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      0fb41e89
    • Ani Sinha's avatar
      tests/acpi: add a new ACPI table in order to test root pci hotplug on/off · df00a529
      Ani Sinha authored
      
      A new binary ACPI table tests/data/acpi/pc/DSDT.roothp is added in order
      to unit test hotplug on/off capability on the root pci bus for i440fx.
      The diff between the table DSDT.bridge and DSDT.roothp is listed below:
      
      @@ -1,30 +1,30 @@
       /*
        * Intel ACPI Component Architecture
        * AML/ASL+ Disassembler version 20180105 (64-bit version)
        * Copyright (c) 2000 - 2018 Intel Corporation
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/pc/DSDT.bridge, Fri Sep 11 22:51:04 2020
      + * Disassembly of /tmp/aml-UGIHQ0, Fri Sep 11 22:51:04 2020
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00001A89 (6793)
      + *     Length           0x0000140A (5130)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0x09
      + *     Checksum         0xE6
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPCDSDT"
        *     OEM Revision     0x00000001 (1)
        *     Compiler ID      "BXPC"
        *     Compiler Version 0x00000001 (1)
        */
       DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001)
       {
           Scope (\)
           {
               OperationRegion (DBG, SystemIO, 0x0402, One)
               Field (DBG, ByteAcc, NoLock, Preserve)
               {
                   DBGB,   8
               }
      
      @@ -831,61 +831,60 @@
                   Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                   {
                       IO (Decode16,
                           0x0510,             // Range Minimum
                           0x0510,             // Range Maximum
                           0x01,               // Alignment
                           0x0C,               // Length
                           )
                   })
               }
           }
      
           Scope (\_SB)
           {
               Scope (PCI0)
               {
      -            Name (BSEL, Zero)
                   Device (S00)
                   {
                       Name (_ADR, Zero)  // _ADR: Address
                   }
      
                   Device (S10)
                   {
                       Name (_ADR, 0x00020000)  // _ADR: Address
                       Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                       {
                           Return (Zero)
                       }
                   }
      
                   Device (S18)
                   {
                       Name (_ADR, 0x00030000)  // _ADR: Address
      -                Name (BSEL, One)
      +                Name (BSEL, Zero)
                       Device (S00)
                       {
                           Name (_SUN, Zero)  // _SUN: Slot User Number
                           Name (_ADR, Zero)  // _ADR: Address
                           Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
                           {
                               PCEJ (BSEL, _SUN)
                           }
                       }
      
                       Device (S08)
                       {
                           Name (_SUN, One)  // _SUN: Slot User Number
                           Name (_ADR, 0x00010000)  // _ADR: Address
                           Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
                           {
      @@ -1345,456 +1344,30 @@
                               Notify (SE8, Arg1)
                           }
      
                           If ((Arg0 & 0x40000000))
                           {
                               Notify (SF0, Arg1)
                           }
      
                           If ((Arg0 & 0x80000000))
                           {
                               Notify (SF8, Arg1)
                           }
                       }
      
                       Method (PCNT, 0, NotSerialized)
                       {
      -                    BNUM = One
      +                    BNUM = Zero
                           DVNT (PCIU, One)
                           DVNT (PCID, 0x03)
                       }
                   }
      
      -            Device (S20)
      -            {
      -                Name (_SUN, 0x04)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00040000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S28)
      -            {
      -                Name (_SUN, 0x05)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00050000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S30)
      -            {
      -                Name (_SUN, 0x06)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00060000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S38)
      -            {
      -                Name (_SUN, 0x07)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00070000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S40)
      -            {
      -                Name (_SUN, 0x08)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00080000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S48)
      -            {
      -                Name (_SUN, 0x09)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00090000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S50)
      -            {
      -                Name (_SUN, 0x0A)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000A0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S58)
      -            {
      -                Name (_SUN, 0x0B)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000B0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S60)
      -            {
      -                Name (_SUN, 0x0C)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000C0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S68)
      -            {
      -                Name (_SUN, 0x0D)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000D0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S70)
      -            {
      -                Name (_SUN, 0x0E)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000E0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S78)
      -            {
      -                Name (_SUN, 0x0F)  // _SUN: Slot User Number
      -                Name (_ADR, 0x000F0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S80)
      -            {
      -                Name (_SUN, 0x10)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00100000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S88)
      -            {
      -                Name (_SUN, 0x11)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00110000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S90)
      -            {
      -                Name (_SUN, 0x12)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00120000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (S98)
      -            {
      -                Name (_SUN, 0x13)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00130000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SA0)
      -            {
      -                Name (_SUN, 0x14)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00140000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SA8)
      -            {
      -                Name (_SUN, 0x15)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00150000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SB0)
      -            {
      -                Name (_SUN, 0x16)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00160000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SB8)
      -            {
      -                Name (_SUN, 0x17)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00170000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SC0)
      -            {
      -                Name (_SUN, 0x18)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00180000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SC8)
      -            {
      -                Name (_SUN, 0x19)  // _SUN: Slot User Number
      -                Name (_ADR, 0x00190000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SD0)
      -            {
      -                Name (_SUN, 0x1A)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001A0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SD8)
      -            {
      -                Name (_SUN, 0x1B)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001B0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SE0)
      -            {
      -                Name (_SUN, 0x1C)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001C0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SE8)
      -            {
      -                Name (_SUN, 0x1D)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001D0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SF0)
      -            {
      -                Name (_SUN, 0x1E)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001E0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Device (SF8)
      -            {
      -                Name (_SUN, 0x1F)  // _SUN: Slot User Number
      -                Name (_ADR, 0x001F0000)  // _ADR: Address
      -                Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
      -                {
      -                    PCEJ (BSEL, _SUN)
      -                }
      -            }
      -
      -            Method (DVNT, 2, NotSerialized)
      -            {
      -                If ((Arg0 & 0x10))
      -                {
      -                    Notify (S20, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x20))
      -                {
      -                    Notify (S28, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x40))
      -                {
      -                    Notify (S30, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x80))
      -                {
      -                    Notify (S38, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0100))
      -                {
      -                    Notify (S40, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0200))
      -                {
      -                    Notify (S48, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0400))
      -                {
      -                    Notify (S50, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x0800))
      -                {
      -                    Notify (S58, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x1000))
      -                {
      -                    Notify (S60, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x2000))
      -                {
      -                    Notify (S68, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x4000))
      -                {
      -                    Notify (S70, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x8000))
      -                {
      -                    Notify (S78, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00010000))
      -                {
      -                    Notify (S80, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00020000))
      -                {
      -                    Notify (S88, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00040000))
      -                {
      -                    Notify (S90, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00080000))
      -                {
      -                    Notify (S98, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00100000))
      -                {
      -                    Notify (SA0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00200000))
      -                {
      -                    Notify (SA8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00400000))
      -                {
      -                    Notify (SB0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x00800000))
      -                {
      -                    Notify (SB8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x01000000))
      -                {
      -                    Notify (SC0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x02000000))
      -                {
      -                    Notify (SC8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x04000000))
      -                {
      -                    Notify (SD0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x08000000))
      -                {
      -                    Notify (SD8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x10000000))
      -                {
      -                    Notify (SE0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x20000000))
      -                {
      -                    Notify (SE8, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x40000000))
      -                {
      -                    Notify (SF0, Arg1)
      -                }
      -
      -                If ((Arg0 & 0x80000000))
      -                {
      -                    Notify (SF8, Arg1)
      -                }
      -            }
      -
                   Method (PCNT, 0, NotSerialized)
                   {
      -                BNUM = Zero
      -                DVNT (PCIU, One)
      -                DVNT (PCID, 0x03)
                       ^S18.PCNT ()
                   }
               }
           }
       }
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-4-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      df00a529
    • Ani Sinha's avatar
      tests/acpi: add new unit test to test hotplug off/on feature on the root pci bus · 27476395
      Ani Sinha authored
      
      Ability to turn hotplug off on the pci root bus for i440fx was added in commit:
      3d7e78aa ("Introduce a new flag for i440fx to disable PCI hotplug on the
      root bus")
      
      This change adds a unit test in order to test this feature.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-3-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      27476395
    • Ani Sinha's avatar
      tests/acpi: mark addition of table DSDT.roothp for unit testing root pci hotplug · eb9609a1
      Ani Sinha authored
      
      A new binary acpi table tests/data/acpi/pc/DSDT.roothp is added in order to
      unit test the feature flag that can disable/enable root pci bus hotplug on
      i440fx. This feature was added with the commit:
      3d7e78aa ("Introduce a new flag for i440fx to disable PCI hotplug on
      the root bus")
      
      This change documents the fact that this new file addition was made as a part
      of the unit test change.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200918084111.15339-2-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      eb9609a1
    • Igor Mammedov's avatar
      tests: acpi: update acpi blobs with new AML · 6e2e2e8a
      Igor Mammedov authored
      
      here is diff against tests/data/acpi/q35/DSDT
      for currently shipped ovmf binary.
      (once firmware blob is updated, it will negotiate CPU hotplug
      feature which will ad extra hunk sending SMI and Q35 tests will
      need to be updated), but otherwise diff shows new CPU hotplug
      AML that is shared between q35 and pc machines.
      
                   Method (CSCN, 0, Serialized)
                   {
                       Acquire (\_SB.PCI0.PRES.CPLK, 0xFFFF)
      -                Local0 = One
      -                While ((Local0 == One))
      -                {
      -                    Local0 = Zero
      -                    \_SB.PCI0.PRES.CCMD = Zero
      -                    If ((\_SB.PCI0.PRES.CINS == One))
      +                Name (CNEW, Package (0xFF){})
      +                Local3 = Zero
      +                Local4 = One
      +                While ((Local4 == One))
      +                {
      +                    Local4 = Zero
      +                    Local0 = One
      +                    Local1 = Zero
      +                    While (((Local0 == One) && (Local3 < One)))
                           {
      -                        CTFY (\_SB.PCI0.PRES.CDAT, One)
      -                        \_SB.PCI0.PRES.CINS = One
      -                        Local0 = One
      +                        Local0 = Zero
      +                        \_SB.PCI0.PRES.CSEL = Local3
      +                        \_SB.PCI0.PRES.CCMD = Zero
      +                        If ((\_SB.PCI0.PRES.CDAT < Local3))
      +                        {
      +                            Break
      +                        }
      +
      +                        If ((Local1 == 0xFF))
      +                        {
      +                            Local4 = One
      +                            Break
      +                        }
      +
      +                        Local3 = \_SB.PCI0.PRES.CDAT
      +                        If ((\_SB.PCI0.PRES.CINS == One))
      +                        {
      +                            CNEW [Local1] = Local3
      +                            Local1++
      +                            Local0 = One
      +                        }
      +                        ElseIf ((\_SB.PCI0.PRES.CRMV == One))
      +                        {
      +                            CTFY (Local3, 0x03)
      +                            \_SB.PCI0.PRES.CRMV = One
      +                            Local0 = One
      +                        }
      +
      +                        Local3++
                           }
      -                    ElseIf ((\_SB.PCI0.PRES.CRMV == One))
      +
      +                    Local2 = Zero
      +                    While ((Local2 < Local1))
                           {
      -                        CTFY (\_SB.PCI0.PRES.CDAT, 0x03)
      -                        \_SB.PCI0.PRES.CRMV = One
      -                        Local0 = One
      +                        Local3 = DerefOf (CNEW [Local2])
      +                        CTFY (Local3, One)
      +                        Debug = Local3
      +                        \_SB.PCI0.PRES.CSEL = Local3
      +                        \_SB.PCI0.PRES.CINS = One
      +                        Local2++
                           }
                       }
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200923094650.1301166-11-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      6e2e2e8a
    • Igor Mammedov's avatar
      tests: acpi: mark to be changed tables in bios-tables-test-allowed-diff · 2f509200
      Igor Mammedov authored
      
      ... to let tests pass until binary blobs are updated with new AML
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20200923094650.1301166-6-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      2f509200
    • Igor Mammedov's avatar
      cphp: remove deprecated cpu-add command(s) · 63e79833
      Igor Mammedov authored
      
      These were deprecated since 4.0, remove both HMP and QMP variants.
      
      Users should use device_add command instead. To get list of
      possible CPUs and options, use 'info hotpluggable-cpus' HMP
      or query-hotpluggable-cpus QMP command.
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Acked-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
      Acked-by: default avatarCornelia Huck <cohuck@redhat.com>
      Message-Id: <20200915120403.1074579-1-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      63e79833
    • Dima Stepanov's avatar
      tests/qtest/vhost-user-test: prepare the tests for adding new dev class · 892040dc
      Dima Stepanov authored
      
      For now only vhost-user-net device is supported by the test. Other
      vhost-user devices are not tested. As a first step make source code
      refactoring so new devices can reuse the same test routines. To make
      this provide a new vhost_user_ops structure with the methods to
      initialize device, its command line or make a proper vhost-user
      responses.
      
      Signed-off-by: default avatarDima Stepanov <dimastep@yandex-team.ru>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Message-Id: <a48b60fb96fef230b75fff72a2d77040dcb5ef7c.1599813294.git.dimastep@yandex-team.ru>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      892040dc
Loading