From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Juergen Gross <jgross@suse.com>, Jan Beulich <JBeulich@suse.com>
Cc: "Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
xen-devel@lists.xen.org, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH for-4.10] libxc: load acpi RSDP table at correct address
Date: Tue, 21 Nov 2017 10:44:23 +0000 [thread overview]
Message-ID: <493db532-45c1-cf68-64c5-07bbdb0df0ad@citrix.com> (raw)
In-Reply-To: <3a80222f-bd3e-fa95-8d8d-1f902e1f6b9d@suse.com>
On 21/11/17 09:37, Juergen Gross wrote:
> On 21/11/17 09:46, Jan Beulich wrote:
>>>>> On 21.11.17 at 09:13, <jgross@suse.com> wrote:
>>> On 21/11/17 08:50, Jan Beulich wrote:
>>>>>>> On 20.11.17 at 19:28, <jgross@suse.com> wrote:
>>>>> On 20/11/17 17:14, Jan Beulich wrote:
>>>>>>>>> On 20.11.17 at 16:24, <jgross@suse.com> wrote:
>>>>>>> So without my patch the RSDP table is loaded e.g. at about 6.5MB when
>>>>>>> I'm using grub2 (the loaded grub image is about 5.5MB in size and it
>>>>>>> is being loaded at 1MB).
>>>>>>>
>>>>>>> When I'm using the PVH Linux kernel directly RSDP is just below 1MB
>>>>>>> due to pure luck (the bzImage loader is still using the PV specific
>>>>>>> ELF notes and this results in the loader believing RSDP is loadable
>>>>>>> at this address, which is true, but the tests used to come to this
>>>>>>> conclusion are just not applicable for PVH).
>>>>>>>
>>>>>>> So in your opinion we should revoke the PVH support from Xen 4.10,
>>>>>>> Linux and maybe BSD because RSDP is loaded in middle of RAM of the
>>>>>>> guest?
>>>>>> So what's wrong with it being put wherever the next free memory
>>>>>> location is being determined to be by the loader, just like is being
>>>>>> done for other information, including modules (if any)?
>>>>> The RSDP table is marked as "Reserved" in the memory map. So putting it
>>>>> somewhere in the middle of the guest's memory will force the guest to
>>>>> use 4kB pages instead of 2MB or even 1GB pages. I'd really like to avoid
>>>>> this problem, as we've been hit by the very same in HVM guests before
>>>>> causing quite measurable performance drops.
>>>> This is a valid point.
>>>>
>>>>> So I'd rather put it in the first MB as most kernels have to deal with
>>>>> small pages at beginning of RAM today. An alternative would be to put
>>>>> it just below 4GB where e.g. the console and Xenstore page are located.
>>>> Putting it in the first Mb implies that mappings there will continue to
>>>> be 4k ones. I can't, however, see why for PVH that should be
>>>> necessary: There's no BIOS and nothing legacy that needs to live
>>>> there, so other than HVM it could benefit from using a 1Gb mapping
>>>> even at address zero (even if this might be something that can't
>>>> be achieved right away). So yes, if anything, the allocation should
>>>> be made top down starting from 4Gb. Otoh, I don't see a strict
>>>> need for this area to live below 4Gb in the first place.
>>> The physical RSDP address in the PVH start info block is 32 bits
>>> only. So it can't be above 4GB.
>> struct hvm_start_info {
>> uint32_t magic; /* Contains the magic value 0x336ec578 */
>> /* ("xEn3" with the 0x80 bit of the "E" set).*/
>> uint32_t version; /* Version of this structure. */
>> uint32_t flags; /* SIF_xxx flags. */
>> uint32_t nr_modules; /* Number of modules passed to the kernel. */
>> uint64_t modlist_paddr; /* Physical address of an array of */
>> /* hvm_modlist_entry. */
>> uint64_t cmdline_paddr; /* Physical address of the command line. */
>> uint64_t rsdp_paddr; /* Physical address of the RSDP ACPI data */
>> /* structure. */
>> };
> Oh, it seems I have been looking into an outdated document. Thanks for
> the correction.
>
>> Granted a comment a few lines up in the public header says "NB: Xen
>> on x86 will always try to place all the data below the 4GiB boundary."
> Okay.
The 4GB limit is specifically because we don't know a priori whether it
is a 32 or 64bit guest, and we agreed not to put the tables anywhere you
couldn't reach with paging disabled.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-11-21 10:44 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 8:34 [PATCH for-4.10] libxc: load acpi RSDP table at correct address Juergen Gross
[not found] ` <CAPLaKK5OH3Fj=9EgVZ19=8kiRuHwftWnYduoV7+rkFU_bkWBgQ@mail.gmail.com>
2017-11-20 9:51 ` Roger Pau Monné
2017-11-20 9:55 ` Juergen Gross
2017-11-20 9:58 ` Andrew Cooper
2017-11-20 10:04 ` Juergen Gross
2017-11-20 10:21 ` Andrew Cooper
2017-11-20 10:43 ` Juergen Gross
2017-11-20 10:57 ` Andrew Cooper
2017-11-20 11:20 ` Juergen Gross
2017-11-20 11:50 ` Jan Beulich
2017-11-20 13:56 ` Boris Ostrovsky
2017-11-20 14:11 ` Jan Beulich
2017-11-20 14:14 ` Juergen Gross
2017-11-20 14:20 ` Jan Beulich
2017-11-20 14:25 ` Boris Ostrovsky
2017-11-20 14:36 ` Andrew Cooper
2017-11-20 14:52 ` Boris Ostrovsky
2017-11-20 15:27 ` Juergen Gross
2017-11-20 16:14 ` Boris Ostrovsky
2017-11-20 16:26 ` Jan Beulich
2017-11-20 16:28 ` Boris Ostrovsky
2017-11-20 16:43 ` Jan Beulich
2017-11-20 16:59 ` Boris Ostrovsky
2017-11-21 7:44 ` Jan Beulich
2017-11-21 10:42 ` Andrew Cooper
2017-11-21 11:13 ` Juergen Gross
2017-11-22 10:26 ` Roger Pau Monné
2017-11-20 18:29 ` Juergen Gross
[not found] ` <5A12F2BA02000078001901F3@suse.com>
2017-11-20 15:24 ` Juergen Gross
2017-11-20 16:14 ` Jan Beulich
[not found] ` <5A130D68020000780019032E@suse.com>
2017-11-20 18:28 ` Juergen Gross
2017-11-21 7:50 ` Jan Beulich
[not found] ` <5A13E8DB0200007800190512@suse.com>
2017-11-21 8:13 ` Juergen Gross
2017-11-21 8:46 ` Jan Beulich
[not found] ` <5A13F5DD02000078001905AC@suse.com>
2017-11-21 9:37 ` Juergen Gross
2017-11-21 10:44 ` Andrew Cooper [this message]
2017-11-20 13:51 ` Boris Ostrovsky
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=493db532-45c1-cf68-64c5-07bbdb0df0ad@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xen.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.