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

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB



On 24/01/18 15:10, Boris Ostrovsky wrote:
> On 01/24/2018 07:06 AM, Juergen Gross wrote:
>> On 24/01/18 11:54, Roger Pau Monné wrote:
>>> On Wed, Jan 24, 2018 at 10:42:39AM +0000, George Dunlap wrote:
>>>> On Wed, Jan 24, 2018 at 2:41 AM, Boris Ostrovsky
>>>> <boris.ostrovsky@xxxxxxxxxx> wrote:
>>>>> On 01/18/2018 05:33 AM, Wei Liu wrote:
>>>>>> On Thu, Jan 18, 2018 at 11:31:32AM +0100, Juergen Gross wrote:
>>>>>>> Wei,
>>>>>>>
>>>>>>> On 01/12/17 15:14, Juergen Gross wrote:
>>>>>>>> Instead of locating the RSDP table below 1MB put it just below 4GB
>>>>>>>> like the rest of the ACPI tables in case of PVH guests. This will
>>>>>>>> avoid punching more holes than necessary into the memory map.
>>>>>>>>
>>>>>>>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>>>>>>>> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
>>>>>>> Mind applying this one?
>>>>>> Don't worry, it is in my queue.
>>>>>>
>>>>>> Will come to this and other patches I accumulated soon.
>>>>>>
>>>>>> Wei.
>>>>> This requires kernel changes, doesn't it?
>>>>>
>>>>> https://lists.xenproject.org/archives/html/xen-devel/2017-12/msg00714.html
>>>>>
>>>>> And this series apparently never made it to the tree.
>>>>>
>>>>> PVH guests are broken now on staging.
>>>> And the Linux side of PVH is officially supported now, right?
> 
> 
> AFAIK PVH is still considered a tech preview --- Linux or Xen.
> 
> 
>>>>   Which
>>>> means we need to have some way of being backwards compatible with
>>>> kernels without that patch, even if it does get  backported.
>>> Linux had a bug that on PVH it expected to find the RSDP at the low
>>> 1MiB. The PVHv2 boot protocol has _never_ mentioned that the RSDP
>>> should be below 1MiB. There's just one comment in the start_info
>>> header that says:
>>>
>>> "Xen on x86 will always try to place all the data below the 4GiB
>>> boundary."
>>>
>>> And the RSDP address must be fetched from the rsdp_paddr field of the
>>> start_info.
>>>
>>> I agree that the fact that Linux is broken is bad, but should not
>>> force us to change the protocol. What's more, when booting a PVHv2
>>> Dom0 the RSDP _must_ not be searched in the low 1MiB, or else Dom0 is
>>> going to find the firmware provided RSDP and everything is going to
>>> blow up.
>> Right.
>>
>> My patches to repair this in the Linux kernel are on hold as they are
>> touching the boot parameters between grub2 and the kernel, too. And
>> this caused the kernel no longer booting in some cases as most distros
>> are shipping a grub2 breaking this interface via a non-upstream patch.
>>
>>> IMO, Linux must be fixed and the patch backported up to 4.11.
>> I'll try soon.
> 
> For backports we don't need bootparams changes, do we?
> 
> I suspect we can do as little as removing "#ifdef CONFIG_KEXEC" around
> acpi_rsdp in drivers/acpi/osl.c and then assigning it the value in
> pvh_start_info.rsdp_paddr. (I haven't tried it)

That was the approach I started with (more or less). It was seen as a
layering violation.

I'd rather take the approach like in

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/boot&id=0c89cf36424f7c1177de8a5712514d7cc2eb369f

and have a PVH specific acpi_arch_get_root_pointer() instead one in
arch/x86/kernel/acpi/boot.c. This can later be modified easily to
take the RSDP address from boot params instead.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.