qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8] hw/arm/virt: Add high MMIO PCI region, 512G


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v8] hw/arm/virt: Add high MMIO PCI region, 512G in size
Date: Thu, 3 Sep 2015 19:06:44 +0100

On 24 August 2015 at 08:31, Pavel Fedin <address@hidden> wrote:
> This large region is necessary for some devices like ivshmem and video cards
> 32-bit kernels can be built without LPAE support. In this case such a kernel
> will not be able to use PCI controller which has windows in high addresses.
> In order to work around the problem, "highmem" option is introduced. It
> defaults to on on, but can be manually set to off in order to be able to run
> those old 32-bit guests.
>
> Signed-off-by: Pavel Fedin <address@hidden>
> ---
>  #define TYPE_VIRT_MACHINE   "virt"
> @@ -119,6 +120,7 @@ static const MemMapEntry a15memmap[] = {
>      [VIRT_PCIE_PIO] =           { 0x3eff0000, 0x00010000 },
>      [VIRT_PCIE_ECAM] =          { 0x3f000000, 0x01000000 },
>      [VIRT_MEM] =                { 0x40000000, 30ULL * 1024 * 1024 * 1024 },
> +    [VIRT_PCIE_MMIO_HIGH] =   { 0x8000000000, 0x8000000000 },

These large constants need an ULL suffix, but I'll just add it rather than
forcing you to respin again.

I also added a comment
/* Second PCIe window, 512GB wide at the 512GB boundary */
for the benefit of people like me whose hex-to-gigabytes mental
arithmetic is rusty :-)

>  };
>
>  static const int a15irqmap[] = {
> @@ -666,10 +668,13 @@ static void create_pcie_irq_map(const VirtBoardInfo 
> *vbi, uint32_t
> gic_phandle,

Something in your patch submission path seems to be wrapping long
lines. It would be nice if you could fix it -- I couldn't apply this
patch without manually editing it first.

> @@ -953,6 +995,15 @@ static void virt_instance_init(Object *obj)
>                                      "Set on/off to enable/disable the ARM "
>                                      "Security Extensions (TrustZone)",
>                                      NULL);
> +
> +    /* High memory is enabled by default */
> +    vms->highmem = true;
> +    object_property_add_bool(obj, "highmem", virt_get_highmem,
> +                             virt_set_highmem, NULL);
> +    object_property_set_description(obj, "highmem",
> +                                    "Set on/off to enable/disable using "
> +                                    "physical address space above 32 bits",
> +                                    NULL);
>  }

We should add a note to QEMU's changelog to mention that if
they have a 32-bit kernel on the virt board and the PCI has
stopped working then they need to use this option.
(http://wiki.qemu.org/ChangeLog/2.5)

Did you report the bug where the pci controller driver
fails to start if the second region is out of its range
to the kernel mailing list? (It would be nice to be able
to point to a kernel patch in the changelog too.)

Anyway, applied to target-arm.next.

thanks
-- PMM



reply via email to

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