xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Ian Jackson <iwj@xenproject.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Kevin Tian <kevin.tian@intel.com>,
	"Julien Grall" <julien@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH for-4.15 v2] VMX: use a single, global APIC access page
Date: Mon, 22 Feb 2021 11:09:28 +0100	[thread overview]
Message-ID: <YDOC2ACTf0bmryG1@Air-de-Roger> (raw)
In-Reply-To: <dfdd4440-3c37-8cb5-b7d3-a86b7c697b2e@suse.com>

On Mon, Feb 22, 2021 at 08:51:59AM +0100, Jan Beulich wrote:
> On 19.02.2021 18:05, Ian Jackson wrote:
> > Jan Beulich writes ("Re: [PATCH v2] VMX: use a single, global APIC access page"):
> >> While this patch was triggered not just by Julien's observation of
> >> the early p2m insertion being a problem, but also many earlier
> >> times of running into this odd code, it is - especially at this
> >> stage - perhaps a possible option to split the change into just
> >> the movement of the set_mmio_p2m_entry() invocation and all the
> >> rest, in order to defer that rest until after 4.15.
> > 
> > I infer that this contains a bugfix, but perhaps other
> > changes/improvements too.
> > 
> > George, I think you're our expert on this refcounting stuff - what do
> > you think of this ?
> > 
> > I guess my key question is whether this change will introduce risk by
> > messing with the complex refcounting machineryt - or remove it by
> > removing an interaction with the refcounting.
> 
> If anything, then the latter, but largely neither afaict - there's no
> change in this regard here at all as far as the guest could affect
> behavior, due to the page getting inserted as p2m_mmio_direct, and
> guest_remove_page() having
> 
>     if ( p2mt == p2m_mmio_direct )
>     {
>         rc = clear_mmio_p2m_entry(d, gmfn, mfn, PAGE_ORDER_4K);
>         goto out_put_gfn;
>     }
> 
> before any refcounting logic is reached. The removal of interaction
> is because now the page doesn't get associated with a domain (and
> hence doesn't become subject to refcounting) at all.
> 
> The risk of the change stems from going from using a per-domain
> page to using a single, system-wide one, which indeed was the subject
> of v1 discussion. In any event the consideration towards splitting
> the change would cover either concern. Perhaps I should really do so
> and submit as v3 ...

I agree it would be less risky to keep using a per-domain page, and
switch to a global one after the release. From the discussion in v1 I
don't think we where able to spot any specific issues apart from
guests possibly being able to access shared data in this page from
passthrough devices. I would at least feel more confortable with
that approach given the point we are in the release process.

Thanks, Roger.


  reply	other threads:[~2021-02-22 10:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 16:45 [PATCH v2] VMX: use a single, global APIC access page Jan Beulich
2021-02-19 16:59 ` Jan Beulich
2021-02-19 17:05   ` [PATCH for-4.15 v2] VMX: use a single, global APIC access page [and 1 more messages] Ian Jackson
2021-02-22  7:51     ` [PATCH for-4.15 v2] VMX: use a single, global APIC access page Jan Beulich
2021-02-22 10:09       ` Roger Pau Monné [this message]
2021-02-22 11:22         ` [PATCH for-4.15 v2] VMX: use a single, global APIC access page [and 1 more messages] Ian Jackson
2021-02-22 10:26       ` [PATCH for-4.15 v2] VMX: use a single, global APIC access page George Dunlap
2021-02-22 10:50         ` Jan Beulich

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=YDOC2ACTf0bmryG1@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=kevin.tian@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).