All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <xadimgnik@gmail.com>
To: "'Jan Beulich'" <jbeulich@suse.com>,
	"'Durrant, Paul'" <pdurrant@amazon.co.uk>
Cc: xen-devel@lists.xenproject.org,
	"'Roger Pau Monné'" <roger.pau@citrix.com>,
	pdurrant@amzn.com, "'Wei Liu'" <wl@xen.org>,
	"'Andrew Cooper'" <andrew.cooper3@citrix.com>
Subject: Re: [Xen-devel] [PATCH v3 3/6] x86 / pv: do not treat PGC_extra pages as RAM when constructing dom0
Date: Fri, 6 Mar 2020 13:45:10 -0000	[thread overview]
Message-ID: <001101d5f3bd$74b2c8a0$5e1859e0$@xen.org> (raw)
In-Reply-To: <008c1b23-e347-2306-4ca7-e9b84aeabec6@suse.com>

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Jan Beulich
> Sent: 06 March 2020 13:39
> To: Durrant, Paul <pdurrant@amazon.co.uk>
> Cc: xen-devel@lists.xenproject.org; Andrew Cooper <andrew.cooper3@citrix.com>; Wei Liu <wl@xen.org>;
> pdurrant@amzn.com; Roger Pau Monné <roger.pau@citrix.com>
> Subject: Re: [Xen-devel] [PATCH v3 3/6] x86 / pv: do not treat PGC_extra pages as RAM when
> constructing dom0
> 
> On 06.03.2020 13:03, Durrant, Paul wrote:
> >> -----Original Message-----
> >> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Jan Beulich
> >> Sent: 06 March 2020 11:56
> >> To: pdurrant@amzn.com
> >> Cc: xen-devel@lists.xenproject.org; Durrant, Paul <pdurrant@amazon.co.uk>; Roger Pau Monné
> >> <roger.pau@citrix.com>; Wei Liu <wl@xen.org>; Andrew Cooper <andrew.cooper3@citrix.com>
> >> Subject: Re: [Xen-devel] [PATCH v3 3/6] x86 / pv: do not treat PGC_extra pages as RAM when
> >> constructing dom0
> >>
> >> On 05.03.2020 13:45, pdurrant@amzn.com wrote:
> >>> --- a/xen/arch/x86/pv/dom0_build.c
> >>> +++ b/xen/arch/x86/pv/dom0_build.c
> >>> @@ -792,6 +792,10 @@ int __init dom0_construct_pv(struct domain *d,
> >>>      {
> >>>          mfn = mfn_x(page_to_mfn(page));
> >>>          BUG_ON(SHARED_M2P(get_gpfn_from_mfn(mfn)));
> >>> +
> >>> +        if ( page->count_info & PGC_extra )
> >>> +            continue;
> >>
> >> This surely is a pattern, i.e. there are more similar changes to
> >> make: tboot_gen_domain_integrity() e.g. ignores d->xenpage_list,
> >> and hence with the goal of converting the shared info page would
> >> also want adjustment. For dump_numa() it may be less important,
> >> but it would still look more correct if it too got changed.
> >> audit_p2m() might apparently complain about such pages (and
> >> hence might be a problem with the one PGC_extra page VMX domains
> >> now have). And this is only from me looking at
> >> page_list_for_each(..., &d->page_list) constructs; who knows
> >> what else there is.
> >>
> >
> > Those are dealt with by the is_special_page() patch later on I think.
> 
> Having already looked at that patch as well - I don't think so, no.
> That one only replaces uses of is_xen_heap_page(), but doesn't add
> any checks where such uses simply aren't needed because code is
> looking at ->page_list only.

Well, I did say:

"It didn't seem appropriate to use that macro here though since we know pages on the page list cannot be xenheap pages."

i.e. an open coded check here seems like the right thing to do. If I've missed other places where I need to account for pages which are specifically PGC_extra pages then I'll need to fix them similarly.

  Paul



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


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

  reply	other threads:[~2020-03-06 13:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 12:44 [Xen-devel] [PATCH v3 0/6] remove one more shared xenheap page: shared_info pdurrant
2020-03-05 12:44 ` [Xen-devel] [PATCH v3 1/6] domain: introduce alloc/free_shared_info() helpers pdurrant
2020-03-05 13:23   ` Xia, Hongyan
2020-03-05 13:25     ` Xia, Hongyan
2020-03-06 11:41   ` Jan Beulich
2020-03-05 12:45 ` [Xen-devel] [PATCH v3 2/6] x86 / p2m: remove page_list check in p2m_alloc_table pdurrant
2020-03-06 11:45   ` Jan Beulich
2020-03-06 12:07     ` Durrant, Paul
2020-03-06 12:46       ` Jan Beulich
2020-03-06 12:50         ` Durrant, Paul
2020-03-06 13:06           ` Jan Beulich
2020-03-06 13:11             ` [Xen-devel] [EXTERNAL][PATCH " Paul Durrant
2020-03-06 13:19               ` Jan Beulich
2020-03-06 13:25                 ` Paul Durrant
2020-03-05 12:45 ` [Xen-devel] [PATCH v3 3/6] x86 / pv: do not treat PGC_extra pages as RAM when constructing dom0 pdurrant
2020-03-06 11:56   ` Jan Beulich
2020-03-06 12:03     ` Durrant, Paul
2020-03-06 13:39       ` Jan Beulich
2020-03-06 13:45         ` Paul Durrant [this message]
2020-03-06 13:47           ` Jan Beulich
2020-03-05 12:45 ` [Xen-devel] [PATCH v3 4/6] x86 / ioreq: use a MEMF_no_refcount allocation for server pages pdurrant
2020-03-06 12:03   ` Jan Beulich
2020-03-05 12:45 ` [Xen-devel] [PATCH v3 5/6] mm: add 'is_special_page' macro pdurrant
2020-03-05 15:09   ` Tamas K Lengyel
2020-03-05 15:38     ` Durrant, Paul
2020-03-05 15:58       ` Tamas K Lengyel
2020-03-06  7:02   ` Alan Robinson
2020-03-06  9:22     ` Durrant, Paul
2020-03-06 12:20   ` Jan Beulich
2020-03-06 12:35     ` Paul Durrant
2020-03-06 13:44       ` Jan Beulich
2020-03-06 13:48         ` Paul Durrant
2020-03-06 13:52           ` Jan Beulich
2020-03-06 13:57             ` Paul Durrant
2020-03-06 14:26         ` Julien Grall
2020-03-06 14:50           ` Jan Beulich
2020-03-05 12:45 ` [Xen-devel] [PATCH v3 6/6] domain: use PGC_extra domheap page for shared_info pdurrant

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='001101d5f3bd$74b2c8a0$5e1859e0$@xen.org' \
    --to=xadimgnik@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=pdurrant@amazon.co.uk \
    --cc=pdurrant@amzn.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@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.