Skip to content
Snippets Groups Projects
  1. Dec 22, 2021
  2. Dec 21, 2021
  3. Dec 18, 2021
  4. Dec 17, 2021
  5. Dec 16, 2021
  6. Dec 15, 2021
    • Jean-Philippe Brucker's avatar
      tests/acpi: add expected blob for VIOT test on virt machine · aed17655
      Jean-Philippe Brucker authored
      
      The VIOT blob contains the following:
      
      [000h 0000   4]                    Signature : "VIOT"    [Virtual I/O Translation Table]
      [004h 0004   4]                 Table Length : 00000058
      [008h 0008   1]                     Revision : 00
      [009h 0009   1]                     Checksum : 66
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   2]                   Node count : 0002
      [026h 0038   2]                  Node offset : 0030
      [028h 0040   8]                     Reserved : 0000000000000000
      
      [030h 0048   1]                         Type : 03 [VirtIO-PCI IOMMU]
      [031h 0049   1]                     Reserved : 00
      [032h 0050   2]                       Length : 0010
      
      [034h 0052   2]                  PCI Segment : 0000
      [036h 0054   2]               PCI BDF number : 0008
      [038h 0056   8]                     Reserved : 0000000000000000
      
      [040h 0064   1]                         Type : 01 [PCI Range]
      [041h 0065   1]                     Reserved : 00
      [042h 0066   2]                       Length : 0018
      
      [044h 0068   4]               Endpoint start : 00000000
      [048h 0072   2]            PCI Segment start : 0000
      [04Ah 0074   2]              PCI Segment end : 0000
      [04Ch 0076   2]                PCI BDF start : 0000
      [04Eh 0078   2]                  PCI BDF end : 00FF
      [050h 0080   2]                  Output node : 0030
      [052h 0082   6]                     Reserved : 000000000000
      
      Acked-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-9-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      aed17655
    • Jean-Philippe Brucker's avatar
      tests/acpi: add expected blobs for VIOT test on q35 machine · cf7a3488
      Jean-Philippe Brucker authored
      
      Add expected blobs of the VIOT and DSDT table for the VIOT test on the
      q35 machine.
      
      Since the test instantiates a virtio device and two PCIe expander
      bridges, DSDT.viot has more blocks than the base DSDT.
      
      The VIOT table generated for the q35 test is:
      
      [000h 0000   4]                    Signature : "VIOT"    [Virtual I/O Translation Table]
      [004h 0004   4]                 Table Length : 00000070
      [008h 0008   1]                     Revision : 00
      [009h 0009   1]                     Checksum : 3D
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   2]                   Node count : 0003
      [026h 0038   2]                  Node offset : 0030
      [028h 0040   8]                     Reserved : 0000000000000000
      
      [030h 0048   1]                         Type : 03 [VirtIO-PCI IOMMU]
      [031h 0049   1]                     Reserved : 00
      [032h 0050   2]                       Length : 0010
      
      [034h 0052   2]                  PCI Segment : 0000
      [036h 0054   2]               PCI BDF number : 0010
      [038h 0056   8]                     Reserved : 0000000000000000
      
      [040h 0064   1]                         Type : 01 [PCI Range]
      [041h 0065   1]                     Reserved : 00
      [042h 0066   2]                       Length : 0018
      
      [044h 0068   4]               Endpoint start : 00003000
      [048h 0072   2]            PCI Segment start : 0000
      [04Ah 0074   2]              PCI Segment end : 0000
      [04Ch 0076   2]                PCI BDF start : 3000
      [04Eh 0078   2]                  PCI BDF end : 30FF
      [050h 0080   2]                  Output node : 0030
      [052h 0082   6]                     Reserved : 000000000000
      
      [058h 0088   1]                         Type : 01 [PCI Range]
      [059h 0089   1]                     Reserved : 00
      [05Ah 0090   2]                       Length : 0018
      
      [05Ch 0092   4]               Endpoint start : 00001000
      [060h 0096   2]            PCI Segment start : 0000
      [062h 0098   2]              PCI Segment end : 0000
      [064h 0100   2]                PCI BDF start : 1000
      [066h 0102   2]                  PCI BDF end : 10FF
      [068h 0104   2]                  Output node : 0030
      [06Ah 0106   6]                     Reserved : 000000000000
      
      And the DSDT diff is:
      
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/q35/DSDT, Fri Dec 10 15:03:08 2021
      + * Disassembly of /tmp/aml-H9Y5D1, Fri Dec 10 15:02:27 2021
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00002061 (8289)
      + *     Length           0x000024B6 (9398)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0xFA
      + *     Checksum         0xA7
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPC    "
        *     OEM Revision     0x00000001 (1)
      @@ -3114,6 +3114,339 @@
               }
           }
      
      +    Scope (\_SB)
      +    {
      +        Device (PC30)
      +        {
      +            Name (_UID, 0x30)  // _UID: Unique ID
      +            Name (_BBN, 0x30)  // _BBN: BIOS Bus Number
      +            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
      +            Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
      +            Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      +            {
      +                CreateDWordField (Arg3, Zero, CDW1)
      +                If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
      +                {
      +                    CreateDWordField (Arg3, 0x04, CDW2)
      +                    CreateDWordField (Arg3, 0x08, CDW3)
      +                    Local0 = CDW3 /* \_SB_.PC30._OSC.CDW3 */
      +                    Local0 &= 0x1F
      +                    If ((Arg1 != One))
      +                    {
      +                        CDW1 |= 0x08
      +                    }
      +
      +                    If ((CDW3 != Local0))
      +                    {
      +                        CDW1 |= 0x10
      +                    }
      +
      +                    CDW3 = Local0
      +                }
      +                Else
      +                {
      +                    CDW1 |= 0x04
      +                }
      +
      +                Return (Arg3)
      +            }
      +
      +            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
      +            {
      +                Local0 = Package (0x80){}
      +                Local1 = Zero
      +                While ((Local1 < 0x80))
      +                {
      +                    Local2 = (Local1 >> 0x02)
      +                    Local3 = ((Local1 + Local2) & 0x03)
      +                    If ((Local3 == Zero))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKD,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == One))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKA,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x02))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKB,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x03))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKC,
      +                                Zero
      +                            }
      +                    }
      +
      +                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
      +                    Local4 [One] = (Local1 & 0x03)
      +                    Local0 [Local1] = Local4
      +                    Local1++
      +                }
      +
      +                Return (Local0)
      +            }
      +
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
      +                    0x0000,             // Granularity
      +                    0x0030,             // Range Minimum
      +                    0x0030,             // Range Maximum
      +                    0x0000,             // Translation Offset
      +                    0x0001,             // Length
      +                    ,, )
      +            })
      +        }
      +    }
      +
      +    Scope (\_SB)
      +    {
      +        Device (PC20)
      +        {
      +            Name (_UID, 0x20)  // _UID: Unique ID
      +            Name (_BBN, 0x20)  // _BBN: BIOS Bus Number
      +            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
      +            Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
      +            Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      +            {
      +                CreateDWordField (Arg3, Zero, CDW1)
      +                If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
      +                {
      +                    CreateDWordField (Arg3, 0x04, CDW2)
      +                    CreateDWordField (Arg3, 0x08, CDW3)
      +                    Local0 = CDW3 /* \_SB_.PC20._OSC.CDW3 */
      +                    Local0 &= 0x1F
      +                    If ((Arg1 != One))
      +                    {
      +                        CDW1 |= 0x08
      +                    }
      +
      +                    If ((CDW3 != Local0))
      +                    {
      +                        CDW1 |= 0x10
      +                    }
      +
      +                    CDW3 = Local0
      +                }
      +                Else
      +                {
      +                    CDW1 |= 0x04
      +                }
      +
      +                Return (Arg3)
      +            }
      +
      +            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
      +            {
      +                Local0 = Package (0x80){}
      +                Local1 = Zero
      +                While ((Local1 < 0x80))
      +                {
      +                    Local2 = (Local1 >> 0x02)
      +                    Local3 = ((Local1 + Local2) & 0x03)
      +                    If ((Local3 == Zero))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKD,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == One))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKA,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x02))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKB,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x03))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKC,
      +                                Zero
      +                            }
      +                    }
      +
      +                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
      +                    Local4 [One] = (Local1 & 0x03)
      +                    Local0 [Local1] = Local4
      +                    Local1++
      +                }
      +
      +                Return (Local0)
      +            }
      +
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
      +                    0x0000,             // Granularity
      +                    0x0020,             // Range Minimum
      +                    0x0020,             // Range Maximum
      +                    0x0000,             // Translation Offset
      +                    0x0001,             // Length
      +                    ,, )
      +            })
      +        }
      +    }
      +
      +    Scope (\_SB)
      +    {
      +        Device (PC10)
      +        {
      +            Name (_UID, 0x10)  // _UID: Unique ID
      +            Name (_BBN, 0x10)  // _BBN: BIOS Bus Number
      +            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
      +            Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
      +            Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      +            {
      +                CreateDWordField (Arg3, Zero, CDW1)
      +                If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
      +                {
      +                    CreateDWordField (Arg3, 0x04, CDW2)
      +                    CreateDWordField (Arg3, 0x08, CDW3)
      +                    Local0 = CDW3 /* \_SB_.PC10._OSC.CDW3 */
      +                    Local0 &= 0x1F
      +                    If ((Arg1 != One))
      +                    {
      +                        CDW1 |= 0x08
      +                    }
      +
      +                    If ((CDW3 != Local0))
      +                    {
      +                        CDW1 |= 0x10
      +                    }
      +
      +                    CDW3 = Local0
      +                }
      +                Else
      +                {
      +                    CDW1 |= 0x04
      +                }
      +
      +                Return (Arg3)
      +            }
      +
      +            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
      +            {
      +                Local0 = Package (0x80){}
      +                Local1 = Zero
      +                While ((Local1 < 0x80))
      +                {
      +                    Local2 = (Local1 >> 0x02)
      +                    Local3 = ((Local1 + Local2) & 0x03)
      +                    If ((Local3 == Zero))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKD,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == One))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKA,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x02))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKB,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x03))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKC,
      +                                Zero
      +                            }
      +                    }
      +
      +                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
      +                    Local4 [One] = (Local1 & 0x03)
      +                    Local0 [Local1] = Local4
      +                    Local1++
      +                }
      +
      +                Return (Local0)
      +            }
      +
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
      +                    0x0000,             // Granularity
      +                    0x0010,             // Range Minimum
      +                    0x0010,             // Range Maximum
      +                    0x0000,             // Translation Offset
      +                    0x0001,             // Length
      +                    ,, )
      +            })
      +        }
      +    }
      +
           Scope (\_SB.PCI0)
           {
               Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      @@ -3121,9 +3454,9 @@
                   WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                       0x0000,             // Granularity
                       0x0000,             // Range Minimum
      -                0x00FF,             // Range Maximum
      +                0x000F,             // Range Maximum
                       0x0000,             // Translation Offset
      -                0x0100,             // Length
      +                0x0010,             // Length
                       ,, )
                   IO (Decode16,
                       0x0CF8,             // Range Minimum
      @@ -3278,6 +3611,26 @@
                       }
                   }
      
      +            Device (S10)
      +            {
      +                Name (_ADR, 0x00020000)  // _ADR: Address
      +            }
      +
      +            Device (S18)
      +            {
      +                Name (_ADR, 0x00030000)  // _ADR: Address
      +            }
      +
      +            Device (S20)
      +            {
      +                Name (_ADR, 0x00040000)  // _ADR: Address
      +            }
      +
      +            Device (S28)
      +            {
      +                Name (_ADR, 0x00050000)  // _ADR: Address
      +            }
      +
                   Method (PCNT, 0, NotSerialized)
                   {
                   }
      
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-8-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      cf7a3488
    • Jean-Philippe Brucker's avatar
      tests/acpi: add test case for VIOT · 39d7554b
      Jean-Philippe Brucker authored
      
      Add two test cases for VIOT, one on the q35 machine and the other on
      virt. To test complex topologies the q35 test has two PCIe buses that
      bypass the IOMMU (and are therefore not described by VIOT), and two
      buses that are translated by virtio-iommu.
      
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-7-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      39d7554b
    • Jean-Philippe Brucker's avatar
      tests/acpi: allow updates of VIOT expected data files · 641f32f6
      Jean-Philippe Brucker authored
      
      Create empty data files and allow updates for the upcoming VIOT tests.
      
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-6-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      641f32f6
    • Richard Henderson's avatar
    • Eric Auger's avatar
      tests: qtest: Add virtio-iommu test · becf8873
      Eric Auger authored
      
      Add the framework to test the virtio-iommu-pci device
      and tests exercising the attach/detach, map/unmap API.
      
      Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
      Tested-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Reviewed-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Acked-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20211127072910.1261824-5-eric.auger@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      becf8873
    • Thomas Huth's avatar
      tests/qtest: Add a function to check whether a machine is available · 719051ca
      Thomas Huth authored
      
      It is nowadays possible to build QEMU with a reduced set of machines
      in each binary. However, the qtests still hard-code the expected
      machines and fail if the binary does not feature the required machine.
      Let's get a little bit more flexible here: Add a function that can be
      used to query whether a certain machine is available or not, and use
      it in some tests as an example (more work has to be done in other
      tests which will follow later).
      
      Message-Id: <20211201104347.51922-5-thuth@redhat.com>
      Acked-by: default avatarJohn Snow <jsnow@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      719051ca
    • Thomas Huth's avatar
      tests/qtest: Add a function that gets a list with available machine types · 5516a3b5
      Thomas Huth authored
      
      For the upcoming patches, we will need a way to gets a list with all
      available machine types. Refactor the qtest_cb_for_every_machine()
      to split the related code out into a separate new function, and
      gather the aliases of the various machine types, too.
      
      Message-Id: <20211201104347.51922-4-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      5516a3b5
    • Thomas Huth's avatar
      tests/qtest: Fence the tests that need xlnx-zcu102 with CONFIG_XLNX_ZYNQMP_ARM · bf22f151
      Thomas Huth authored
      
      The 'xlnx-can-test' and the 'fuzz-xlnx-dp-test' need the "xlnx-zcu102"
      machine and thus should only be built and run if CONFIG_XLNX_ZYNQMP_ARM
      is enabled.
      
      Message-Id: <20211201104347.51922-3-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      bf22f151
    • Thomas Huth's avatar
      tests/qtest: Run the PPC 32-bit tests with the 64-bit target binary, too · a9697d09
      Thomas Huth authored
      
      The ppc64 target is a superset of the 32-bit target, so we should
      include the tests here, too. This used to be done in the past already,
      but it got lost during the conversion to meson.
      
      Fixes: a2ce7dbd ("meson: convert tests/qtest to meson")
      Message-Id: <20211201104347.51922-2-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      a9697d09
    • Laurent Vivier's avatar
      tests/libqtest: add a migration test with two couples of failover devices · e1e3d321
      Laurent Vivier authored
      
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Acked-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20211208130350.10178-5-lvivier@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      e1e3d321
    • Laurent Vivier's avatar
      tests/libqtest: add some virtio-net failover migration cancelling tests · 1e2077e2
      Laurent Vivier authored
      
      Add some tests to check the state of the machine if the migration
      is cancelled while we are using virtio-net failover.
      
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Acked-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20211208130350.10178-4-lvivier@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      1e2077e2
    • Laurent Vivier's avatar
      tests/qtest: add some tests for virtio-net failover · e32b96b5
      Laurent Vivier authored
      
      Add test cases to test several error cases that must be
      generated by invalid failover configuration.
      
      Add a combination of coldplug and hotplug test cases to be
      sure the primary is correctly managed according the
      presence or not of the STANDBY feature.
      
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Message-Id: <20211208130350.10178-3-lvivier@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      e32b96b5
    • Laurent Vivier's avatar
      qtest/libqos: add a function to initialize secondary PCI buses · efe84f03
      Laurent Vivier authored
      
      Scan the PCI devices to find bridge and set PCI_SECONDARY_BUS and
      PCI_SUBORDINATE_BUS (algorithm from seabios)
      
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Acked-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20211208130350.10178-2-lvivier@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      efe84f03
  7. Dec 02, 2021
    • Philippe Mathieu-Daudé's avatar
      tests/qtest/fdc-test: Add a regression test for CVE-2021-20196 · cc20926e
      Philippe Mathieu-Daudé authored
      
      Without the previous commit, when running 'make check-qtest-i386'
      with QEMU configured with '--enable-sanitizers' we get:
      
        AddressSanitizer:DEADLYSIGNAL
        =================================================================
        ==287878==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000344
        ==287878==The signal is caused by a WRITE memory access.
        ==287878==Hint: address points to the zero page.
            #0 0x564b2e5bac27 in blk_inc_in_flight block/block-backend.c:1346:5
            #1 0x564b2e5bb228 in blk_pwritev_part block/block-backend.c:1317:5
            #2 0x564b2e5bcd57 in blk_pwrite block/block-backend.c:1498:11
            #3 0x564b2ca1cdd3 in fdctrl_write_data hw/block/fdc.c:2221:17
            #4 0x564b2ca1b2f7 in fdctrl_write hw/block/fdc.c:829:9
            #5 0x564b2dc49503 in portio_write softmmu/ioport.c:201:9
      
      Add the reproducer for CVE-2021-20196.
      
      Suggested-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Reviewed-by: default avatarDarren Kenny <darren.kenny@oracle.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-id: 20211124161536.631563-4-philmd@redhat.com
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      cc20926e
  8. Nov 30, 2021
  9. Nov 29, 2021
    • Juro Bystricky's avatar
      tests/plugin/syscall.c: fix compiler warnings · d5615bbf
      Juro Bystricky authored
      
      Fix compiler warnings. The warnings can result in a broken build.
      This patch fixes warnings such as:
      
      In file included from /usr/include/glib-2.0/glib.h:111,
                       from ../tests/plugin/syscall.c:13:
      ../tests/plugin/syscall.c: In function ‘print_entry’:
      /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘out’ may be
             used uninitialized in this function [-Werror=maybe-uninitialized]
         g_free (*pp);
         ^~~~~~~~~~~~
      ../tests/plugin/syscall.c:82:23: note: ‘out’ was declared here
           g_autofree gchar *out;
                             ^~~
      In file included from /usr/include/glib-2.0/glib.h:111,
                       from ../tests/plugin/syscall.c:13:
      ../tests/plugin/syscall.c: In function ‘vcpu_syscall_ret’:
      /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘out’ may be
              used uninitialized in this function [-Werror=maybe-uninitialized]
         g_free (*pp);
         ^~~~~~~~~~~~
      ../tests/plugin/syscall.c:73:27: note: ‘out’ was declared here
               g_autofree gchar *out;
                                 ^~~
      cc1: all warnings being treated as errors
      
      Signed-off-by: default avatarJuro Bystricky <juro.bystricky@intel.com>
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <20211128011551.2115468-1-juro.bystricky@intel.com>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20211129140932.4115115-9-alex.bennee@linaro.org>
      d5615bbf
    • Alex Bennée's avatar
      tests/avocado: fix tcg_plugin mem access count test · a7c6e562
      Alex Bennée authored
      
      When we cleaned up argument handling the test was missed.
      
      Fixes: 5ae589fa ("tests/plugins/mem: introduce "track" arg and make args not positional")
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20211129140932.4115115-4-alex.bennee@linaro.org>
      a7c6e562
  10. Nov 23, 2021
    • Hanna Reitz's avatar
      iotests/149: Skip on unsupported ciphers · 4dd218fd
      Hanna Reitz authored
      
      Whenever qemu-img or qemu-io report that some cipher is unsupported,
      skip the whole test, because that is probably because qemu has been
      configured with the gnutls crypto backend.
      
      We could taylor the algorithm list to what gnutls supports, but this is
      a test that is run rather rarely anyway (because it requires
      password-less sudo), and so it seems better and easier to skip it.  When
      this test is intentionally run to check LUKS compatibility, it seems
      better not to limit the algorithms but keep the list extensive.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20211117151707.52549-3-hreitz@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      4dd218fd
    • Hanna Reitz's avatar
      iotests: Use aes-128-cbc · cb5a24d7
      Hanna Reitz authored
      
      Our gnutls crypto backend (which is the default as of 8bd0931f)
      supports neither twofish-128 nor the CTR mode.  CBC and aes-128 are
      supported by all of our backends (as far as I can tell), so use
      aes-128-cbc in our iotests.
      
      (We could also use e.g. aes-256-cbc, but the different key sizes would
      lead to different key slot offsets and so change the reference output
      more, which is why I went with aes-128.)
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20211117151707.52549-2-hreitz@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      cb5a24d7
  11. Nov 19, 2021
  12. Nov 17, 2021
  13. Nov 16, 2021
Loading