From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPECg-0008He-59 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 15:27:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPECb-0008Ne-6L for qemu-devel@nongnu.org; Mon, 18 Jul 2016 15:27:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPECa-0008NS-U2 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 15:27:41 -0400 References: <1468774394-23009-1-git-send-email-marcel@redhat.com> <1468774394-23009-3-git-send-email-marcel@redhat.com> <20160718153459.7aba3a1c@nial.brq.redhat.com> <578CE50C.7040201@redhat.com> <20160718165457.67cdf2b8@nial.brq.redhat.com> From: Marcel Apfelbaum Message-ID: <578D2DA6.3070808@redhat.com> Date: Mon, 18 Jul 2016 22:27:34 +0300 MIME-Version: 1.0 In-Reply-To: <20160718165457.67cdf2b8@nial.brq.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V5 2/7] tests/acpi: add pxb/pxb-pcie tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, lersek@redhat.com On 07/18/2016 05:54 PM, Igor Mammedov wrote: > On Mon, 18 Jul 2016 17:17:48 +0300 > Marcel Apfelbaum wrote: > >> On 07/18/2016 04:34 PM, Igor Mammedov wrote: >>> On Sun, 17 Jul 2016 19:53:09 +0300 >>> Marcel Apfelbaum wrote: >>> >>>> Add an ivshmem device with 1G shared memory to >>>> pxb in order to check the ACPI code of 64bit MMIO allocation. >>> what is forcing ivshmem to be mapped above 4G? >> >> For PC machine: nothing -> ivshmem gets mapped in 32-bit area >> For Q35 machine: there is not enough space for mapping 1G >> in 32-bit area, and maybe there are also alignment constrains. >> You can use this test in verbose mode and see exactly how >> the ranges are distributed. If you want me to run it and add the output, >> please let me know. > No need to post diff, I can do V=1 manually, > the question though is: doesn't PC need ivshmem to go above 4G as well? We have ivshmem in the PC, but if doesn't go over 4G. I left it that way in order to show what happens in both cases. (32-bit and 64-bit) Since is the same code for PC/Q35 it should be enough. Thanks, Marcel > >> >> Thanks, >> Marcel >> >>> >>>> >>>> Suggested-by: Igor Mammedov >>>> Signed-off-by: Marcel Apfelbaum >>>> Tested-by: Laszlo Ersek >>>> --- >>>> tests/bios-tables-test.c | 37 +++++++++++++++++++++++++++++++++++++ >>>> 1 file changed, 37 insertions(+) >>>> >>>> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c >>>> index de4019e..b23c6b0 100644 >>>> --- a/tests/bios-tables-test.c >>>> +++ b/tests/bios-tables-test.c >>>> @@ -864,6 +864,41 @@ static void test_acpi_piix4_tcg_ipmi(void) >>>> free_test_data(&data); >>>> } >>>> >>>> +static void test_acpi_piix4_tcg_pxb(void) >>>> +{ >>>> + test_data data; >>>> + >>>> + memset(&data, 0, sizeof(data)); >>>> + data.machine = MACHINE_PC; >>>> + data.variant = ".pxb"; >>>> + data.required_struct_types = base_required_struct_types; >>>> + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); >>>> + test_acpi_one("-machine accel=tcg" >>>> + " -device pxb,id=pxb,bus_nr=0x80,bus=pci.0" >>>> + " -object memory-backend-file,size=1G,mem-path=/tmp/shmem,share,id=mb" >>>> + " -device ivshmem-plain,memdev=mb,bus=pxb", >>>> + &data); >>>> + free_test_data(&data); >>>> +} >>>> + >>>> +static void test_acpi_q35_tcg_pxb_pcie(void) >>>> +{ >>>> + test_data data; >>>> + >>>> + memset(&data, 0, sizeof(data)); >>>> + data.machine = MACHINE_Q35; >>>> + data.variant = ".pxb_pcie"; >>>> + data.required_struct_types = base_required_struct_types; >>>> + data.required_struct_types_len = ARRAY_SIZE(ipmi_required_struct_types); >>>> + test_acpi_one("-machine q35,accel=tcg" >>>> + " -device pxb-pcie,id=pxb,bus_nr=0x80,bus=pcie.0" >>>> + " -device ioh3420,id=rp,bus=pxb,slot=1" >>>> + " -object memory-backend-file,size=1G,mem-path=/tmp/shmem,share,id=mb" >>>> + " -device ivshmem-plain,memdev=mb,bus=rp", >>>> + &data); >>>> + free_test_data(&data); >>>> +} >>>> + >>>> int main(int argc, char *argv[]) >>>> { >>>> const char *arch = qtest_get_arch(); >>>> @@ -884,6 +919,8 @@ int main(int argc, char *argv[]) >>>> qtest_add_func("acpi/q35/tcg/ipmi", test_acpi_q35_tcg_ipmi); >>>> qtest_add_func("acpi/piix4/tcg/cpuhp", test_acpi_piix4_tcg_cphp); >>>> qtest_add_func("acpi/q35/tcg/cpuhp", test_acpi_q35_tcg_cphp); >>>> + qtest_add_func("acpi/piix4/tcg/pxb", test_acpi_piix4_tcg_pxb); >>>> + qtest_add_func("acpi/q35/tcg/pxb-pcie", test_acpi_q35_tcg_pxb_pcie); >>>> } >>>> ret = g_test_run(); >>>> boot_sector_cleanup(disk); >>> >> >> >