All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>, David Vrabel <david.vrabel@citrix.com>
Cc: keir@xen.org, Ian.Campbell@citrix.com, andrew.cooper3@citrix.com,
	tim@xen.org, xen-devel@lists.xenproject.org,
	ian.jackson@eu.citrix.com
Subject: Re: [Patch V2] expand x86 arch_shared_info to support linear p2m list
Date: Mon, 01 Dec 2014 14:11:25 +0100	[thread overview]
Message-ID: <547C68FD.60000@suse.com> (raw)
In-Reply-To: <547C5F31020000780004BB1F@suse.com>

On 12/01/2014 12:29 PM, Jan Beulich wrote:
>>>> On 01.12.14 at 12:19, <david.vrabel@citrix.com> wrote:
>> On 01/12/14 10:15, Jan Beulich wrote:
>>>>>> On 01.12.14 at 10:29, <JGross@suse.com> wrote:
>>>> The x86 struct arch_shared_info field pfn_to_mfn_frame_list_list
>>>> currently contains the mfn of the top level page frame of the 3 level
>>>> p2m tree, which is used by the Xen tools during saving and restoring
>>>> (and live migration) of pv domains and for crash dump analysis. With
>>>> three levels of the p2m tree it is possible to support up to 512 GB of
>>>> RAM for a 64 bit pv domain.
>>>>
>>>> A 32 bit pv domain can support more, as each memory page can hold 1024
>>>> instead of 512 entries, leading to a limit of 4 TB.
>>>>
>>>> To be able to support more RAM on x86-64 switch to a virtual mapped
>>>> p2m list.
>>>>
>>>> This patch expands struct arch_shared_info with a new p2m list virtual
>>>> address, the root of the page table root and a p2m generation count.
>>>> The new information is indicated by the domain to be valid by storing
>>>> ~0UL into pfn_to_mfn_frame_list_list. The hypervisor indicates
>>>> usability of this feature by a new flag XENFEAT_virtual_p2m.
>>>>
>>>> Right now XENFEAT_virtual_p2m will not be set. This will change when
>>>> the Xen tools support the virtual mapped p2m list.
>>>
>>> This seems wrong: XENFEAT_* only reflect hypervisor capabilities.
>>> I.e. the availability of the new functionality may need to be
>>> advertised another way - xenstore perhaps?
>>
>> Xenstore doesn't work for dom0.
>>
>> Shouldn't this be something the guest kernel reports using a ELF note bit?
>>
>> When building a domain (either in Xen for dom0 or in the tools), the
>> builder may provide a linear p2m iff supported by the guest kernel and
>> then (and only then) can it provide a guest with > 512 GiB.
>
> Yes, surely this flag could act as a kernel capability indicator (via
> the XEN_ELFNOTE_SUPPORTED_FEATURES note), like e.g.
> XENFEAT_dom0 already does. Jürgen's final statement, however,
> suggested to me that this is meant to be only consumed by kernels.

Yes. The p2m list built by the domain builder is already linear. It may
just be to small to hold all entries required e.g. for Dom0.

It's Xen-tools and kdump which have to deal with the linear p2m list.
So the guest kernel has to be told if it is allowed to present the
linear list instead of the 3-level tree at pfn_to_mfn_frame_list_list.

As this is true for Dom0 as well, this information must be given by the
hypervisor.

I'm aware that XENFEAT_* is only used for hypervisor capabilities up to
now. As the Xen tools are tightly coupled to the hypervisor I don't see
why the features can't express the capability of the complete Xen
installation instead. Would you prefer introducing another leaf for
that purpose (submap.idx == 1) ?

> Otoh the P2M provided by both Dom0 and DomU builders have always
> been linear anyway; it's the pv-ops kernel that constructs a tree as
> replacement.

Correct.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2014-12-01 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  9:29 [Patch V2] support guest virtual mapped p2m list Juergen Gross
2014-12-01  9:29 ` [Patch V2] expand x86 arch_shared_info to support linear " Juergen Gross
2014-12-01 10:15   ` Jan Beulich
2014-12-01 11:19     ` David Vrabel
2014-12-01 11:29       ` Jan Beulich
     [not found]       ` <547C5F31020000780004BB1F@suse.com>
2014-12-01 13:11         ` Juergen Gross [this message]
2014-12-01 13:37           ` Jan Beulich
     [not found]           ` <547C7D13020000780004BC3D@suse.com>
2014-12-01 14:33             ` Juergen Gross
2014-12-01 16:28               ` Jan Beulich
2014-12-01 16:39                 ` Jürgen Groß

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=547C68FD.60000@suse.com \
    --to=jgross@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.