All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Sergey Dyasli <sergey.dyasli@citrix.com>, xen-devel@lists.xen.org
Cc: Kevin Tian <kevin.tian@intel.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>, Jan Beulich <jbeulich@suse.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v3 4/9] x86/np2m: simplify nestedhvm_hap_nested_page_fault()
Date: Wed, 4 Oct 2017 15:26:15 +0100	[thread overview]
Message-ID: <ae348097-bd1d-3df5-0d8a-3a8d0993520d@citrix.com> (raw)
In-Reply-To: <20171003152104.1432-5-sergey.dyasli@citrix.com>

On 10/03/2017 04:20 PM, Sergey Dyasli wrote:
> There is a possibility for nested_p2m to became stale between
> nestedhvm_hap_nested_page_fault() and nestedhap_fix_p2m().  At the moment
> this is handled by detecting such a race inside nestedhap_fix_p2m() and
> special-casing it.
> 
> Instead, introduce p2m_get_nestedp2m_locked(), which will returned a
> still-locked p2m.  This allows us to call nestedhap_fix_p2m() with the
> lock held and remove the code detecting the special-case.
> 
> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
> Signed-off-by: George Dunlap <george.dunlap@citrix.com>

It seems really strange to have two functions named _locked() which have
different semantics (one of which assumes that the p2m has already been
locked, one which returns a p2m which is locked).  But I can't think of
a better option, so:

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

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

  reply	other threads:[~2017-10-04 14:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 15:20 [PATCH v3 0/9] Nested p2m: allow sharing between vCPUs Sergey Dyasli
2017-10-03 15:20 ` [PATCH v3 1/9] x86/np2m: refactor p2m_get_nestedp2m() Sergey Dyasli
2017-10-03 15:20 ` [PATCH v3 2/9] x86/np2m: flush all np2m objects on nested INVEPT Sergey Dyasli
2017-10-04 14:12   ` George Dunlap
2017-10-03 15:20 ` [PATCH v3 3/9] x86/np2m: remove np2m_base from p2m_get_nestedp2m() Sergey Dyasli
2017-10-03 21:51   ` Boris Ostrovsky
2017-10-03 15:20 ` [PATCH v3 4/9] x86/np2m: simplify nestedhvm_hap_nested_page_fault() Sergey Dyasli
2017-10-04 14:26   ` George Dunlap [this message]
2017-10-03 15:21 ` [PATCH v3 5/9] x86/vvmx: make updating shadow EPTP value more efficient Sergey Dyasli
2017-10-04 14:38   ` George Dunlap
2017-10-04 14:55     ` Andrew Cooper
2017-10-05  8:18       ` Sergey Dyasli
2017-10-05  9:27         ` Jan Beulich
2017-10-05 13:04           ` Sergey Dyasli
2017-10-05 13:12             ` Andrew Cooper
2017-10-06  5:33               ` Nakajima, Jun
2017-10-03 15:21 ` [PATCH v3 6/9] x86/np2m: send flush IPIs only when a vcpu is actively using an np2m Sergey Dyasli
2017-10-04 14:53   ` George Dunlap
2017-10-03 15:21 ` [PATCH v3 7/9] x86/np2m: implement sharing of np2m between vCPUs Sergey Dyasli
2017-10-03 15:21 ` [PATCH v3 8/9] x86/np2m: refactor p2m_get_nestedp2m_locked() Sergey Dyasli
2017-10-03 15:21 ` [PATCH v3 9/9] x86/np2m: add break to np2m_flush_eptp() Sergey Dyasli

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=ae348097-bd1d-3df5-0d8a-3a8d0993520d@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=sergey.dyasli@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --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.