All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com,
	qemu-devel@nongnu.org, pbonzini@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH V5 2/7] tests/acpi: add pxb/pxb-pcie tests
Date: Mon, 18 Jul 2016 22:27:34 +0300	[thread overview]
Message-ID: <578D2DA6.3070808@redhat.com> (raw)
In-Reply-To: <20160718165457.67cdf2b8@nial.brq.redhat.com>

On 07/18/2016 05:54 PM, Igor Mammedov wrote:
> On Mon, 18 Jul 2016 17:17:48 +0300
> Marcel Apfelbaum <marcel@redhat.com> wrote:
>
>> On 07/18/2016 04:34 PM, Igor Mammedov wrote:
>>> On Sun, 17 Jul 2016 19:53:09 +0300
>>> Marcel Apfelbaum <marcel@redhat.com> 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 <imammedo@redhat.com>
>>>> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
>>>> Tested-by: Laszlo Ersek <lersek@redhat.com>
>>>> ---
>>>>    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);
>>>
>>
>>
>

  reply	other threads:[~2016-07-18 19:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 16:53 [Qemu-devel] [PATCH V5 0/7] pxb: fix 64-bit MMIO allocation Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 1/7] hw/pcie-root-port: Fix PCIe root port initialization Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 2/7] tests/acpi: add pxb/pxb-pcie tests Marcel Apfelbaum
2016-07-18 13:34   ` Igor Mammedov
2016-07-18 14:17     ` Marcel Apfelbaum
2016-07-18 14:54       ` Igor Mammedov
2016-07-18 19:27         ` Marcel Apfelbaum [this message]
2016-07-18 17:52     ` Laszlo Ersek
2016-07-18 19:32       ` Marcel Apfelbaum
2016-07-18 20:08         ` Laszlo Ersek
2016-07-19  9:06           ` [Qemu-devel] edk2 submodule + binaries (Re: [PATCH V5 2/7] tests/acpi: add pxb/pxb-pcie tests) Gerd Hoffmann
2016-07-19  9:30             ` Peter Maydell
2016-07-19 10:05               ` Gerd Hoffmann
2016-07-19 10:40                 ` Laszlo Ersek
2016-07-19  9:59             ` Laszlo Ersek
2016-07-19 10:13               ` Laszlo Ersek
2016-07-19 10:48               ` Gerd Hoffmann
2016-07-19 11:42                 ` Laszlo Ersek
2016-07-19 12:46                   ` Gerd Hoffmann
2016-07-19 14:25                   ` Marcel Apfelbaum
2016-07-19  7:34   ` [Qemu-devel] [PATCH V5 2/7] tests/acpi: add pxb/pxb-pcie tests Igor Mammedov
2016-07-19  8:10     ` Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 3/7] hw/pxb: declare pxb devices as not hot-pluggable Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 4/7] hw/acpi: fix a DSDT table issue when a pxb is present Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 5/7] acpi: refactor pxb crs computation Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 6/7] hw/apci: handle 64-bit MMIO regions correctly Marcel Apfelbaum
2016-07-17 16:53 ` [Qemu-devel] [PATCH V5 7/7] tests/acpi: Add pxb/pxb-pcie tests blobs Marcel Apfelbaum
2016-07-19  5:30 ` [Qemu-devel] [PATCH V5 0/7] pxb: fix 64-bit MMIO allocation Marcel Apfelbaum
2016-07-26 18:30 ` Michael S. Tsirkin
2016-07-27  4:27   ` Marcel Apfelbaum
2016-07-27  4:43     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=578D2DA6.3070808@redhat.com \
    --to=marcel@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.