qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v4 3/3] ACPI/unit-test: Add a new test for pxb-pcie for arm


From: miaoyubo
Subject: RE: [PATCH v4 3/3] ACPI/unit-test: Add a new test for pxb-pcie for arm
Date: Tue, 25 Feb 2020 12:25:40 +0000

> -----Original Message-----
> From: Michael S. Tsirkin [mailto:address@hidden]
> Sent: Tuesday, February 25, 2020 7:25 PM
> To: miaoyubo <address@hidden>
> Cc: address@hidden; address@hidden; Xiexiangyou
> <address@hidden>; address@hidden; qemu-
> address@hidden; address@hidden
> Subject: Re: [PATCH v4 3/3] ACPI/unit-test: Add a new test for pxb-pcie for
> arm
> 
> On Tue, Feb 25, 2020 at 09:50:26AM +0800, Yubo Miao wrote:
> > From: miaoyubo <address@hidden>
> >
> > Currently, pxb-pcie could be defined by the cmdline like
> >     --device pxb-pcie,id=pci.9,bus_nr=128 However pxb-pcie is not
> > described in acpi tables for arm.
> >
> > The formal two patches support pxb-pcie for arm, escpcially the
> > specification for pxb-pcie in DSDT table.
> 
> 
> especially? Pls spell-check comments and commit log, it's not hard to do.
> 

Thanks for pointing out and sorry for the mistakes, 
I will check all the comments and commit log.

> > Add a testcase to make sure the ACPI table is correct for guest.
> >
> > The following table need to be added for this test:
> >     tests/data/acpi/virt/DSDT.pxb
> > Since the ASL diff has 1000+ lines, it would be presented in commit
> > log with the simply diff. the diff are:
> >     Device (PC80) is presented in DSDT.
> >     Resources allocated for Device (PCI0) is changed.
> >
> >   * Disassembling to symbolic ASL+ operators
> >   *
> > - * Disassembly of /home/DSDT, Mon Feb 24 19:35:28 2020
> > + * Disassembly of /home/DSDT.pxb, Mon Feb 24 19:33:38 2020
> >   *
> >   * Original Table Header:
> >   *     Signature        "DSDT"
> > - *     Length           0x000014BB (5307)
> > + *     Length           0x00001F70 (8048)
> >   *     Revision         0x02
> > - *     Checksum         0xD1
> > + *     Checksum         0xCF
> >   *     OEM ID           "BOCHS "
> >   *     OEM Table ID     "BXPCDSDT"
> >   *     OEM Revision     0x00000001 (1)
> >              })
> >          }
> >
> >          {
> >              Name (_HID, "PNP0A08" /* PCI Express Bus */)  // _HID: Hardware
> ID
> >                      WordBusNumber (ResourceProducer, MinFixed, MaxFixed,
> PosDecode,
> >                          0x0000,             // Granularity
> >                          0x0000,             // Range Minimum
> > -                        0x00FF,             // Range Maximum
> > +                        0x007F,             // Range Maximum
> >                          0x0000,             // Translation Offset
> > -                        0x0100,             // Length
> > +                        0x0080,             // Length
> >                          ,, )
> >                      DWordMemory (ResourceProducer, PosDecode, MinFixed,
> MaxFixed, NonCacheable, ReadWrite,
> >                          0x00000000,         // Granularity
> >                          0x10000000,         // Range Minimum
> > -                        0x3EFEFFFF,         // Range Maximum
> > +                        0x3E9EFFFF,         // Range Maximum
> >                          0x00000000,         // Translation Offset
> > -                        0x2EFF0000,         // Length
> > +                        0x2E9F0000,         // Length
> >                          ,, , AddressRangeMemory, TypeStatic)
> >                      DWordIO (ResourceProducer, MinFixed, MaxFixed, 
> > PosDecode,
> EntireRange,
> >                          0x00000000,         // Granularity
> >                          0x00000000,         // Range Minimum
> > -                        0x0000FFFF,         // Range Maximum
> > +                        0x0000BFFF,         // Range Maximum
> >                          0x3EFF0000,         // Translation Offset
> > -                        0x00010000,         // Length
> > +                        0x0000C000,         // Length
> >                          ,, , TypeStatic, DenseTranslation)
> >                      QWordMemory (ResourceProducer, PosDecode, MinFixed,
> MaxFixed, NonCacheable, ReadWrite,
> >                          0x0000000000000000, // Granularity
> >
> > Signed-off-by: miaoyubo <address@hidden>
> 
> 
> Seems to fail in patchew.
> 

The failure is due to CONFIG_PXB is not configured.
Since it is not configured by default, I will add ifdef CONFIG_PXB
before the pxb unit test to solve this problem. 

> > ---
> >  tests/data/acpi/virt/DSDT.pxb               | Bin 0 -> 8048 bytes
> >  tests/qtest/bios-tables-test-allowed-diff.h |   1 +
> >  tests/qtest/bios-tables-test.c              |  54 +++++++++++++++++---
> >  3 files changed, 49 insertions(+), 6 deletions(-)  create mode 100644
> > tests/data/acpi/virt/DSDT.pxb
> 
> This needs to be in a separate patch.
> See instructions in ./tests/qtest/bios-tables-test.c.
> 
> 

Alright, I would separate this patch into three patches.
1. tests/qtest/bios-tables-test-allowed-diff.h
2. Changes made to the unit tests (tests/qtest/bios-tables-test.c)
3. The binary file and clear tests/qtest/bios-tables-test-allowed-diff.h

> > new file mode 100644
> > index
> >
> 0000000000000000000000000000000000000000..6ac0b5212db49513c27ef50da
> 838
> > 240826c2deb7
> > GIT binary patch
> > literal 8048
> >
> >  static void test_acpi_tcg_acpi_hmat(const char *machine)  {
> >      test_data data;
> > @@ -1052,6 +1093,7 @@ int main(int argc, char *argv[])
> >          qtest_add_func("acpi/virt", test_acpi_virt_tcg);
> >          qtest_add_func("acpi/virt/numamem",
> test_acpi_virt_tcg_numamem);
> >          qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp);
> > +        qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb);
> >      }
> >      ret = g_test_run();
> >      boot_sector_cleanup(disk);
> > --
> > 2.19.1
> >

Regards,
Miao



reply via email to

[Prev in Thread] Current Thread [Next in Thread]