xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <JBeulich@suse.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/7] x86/viridian: fix xen-hvmcrash when vp_assist page is present
Date: Mon, 20 Mar 2017 11:50:27 +0000	[thread overview]
Message-ID: <d5648274493e49df80d6ac0b249bf0b5@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <58CFCCB80200007800144F18@prv-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 20 March 2017 11:36
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; xen-
> devel@lists.xenproject.org
> Subject: Re: [PATCH 2/7] x86/viridian: fix xen-hvmcrash when vp_assist page
> is present
> 
> >>> On 17.03.17 at 10:57, <paul.durrant@citrix.com> wrote:
> > @@ -288,6 +304,14 @@ static void initialize_vp_assist(struct vcpu *v)
> >       * enlightenment.
> >       */
> >
> > +    if ( v->arch.hvm_vcpu.viridian.vp_assist.va )
> > +    {
> > +        if ( v->arch.hvm_vcpu.viridian.vp_assist.gmfn == gmfn )
> > +            return;
> 
> Is this shortcut valid? I.e. is it not valid for the guest to expect the
> VP assist state to be fully reset if it calls this more than once on a
> vCPU, yet possibly with the same GFN? (It also looks like this isn't
> really part of the corrections you want to make here, according to
> the description.)

Hmm. The spec is not clear. The problem is that doing a save-context followed by restore-context is going through this path. Maybe it's best to leave the teardown in the MSR right and special-case a restore when vp_assist_va is set.

> 
> > --- a/xen/include/asm-x86/hvm/viridian.h
> > +++ b/xen/include/asm-x86/hvm/viridian.h
> > @@ -23,6 +23,7 @@ struct viridian_vcpu
> >  {
> >      struct {
> >          union viridian_vp_assist msr;
> > +        unsigned long gmfn;
> 
> gfn_t ?
> 

Yes, you're right. I should probably precede this with a patch fixing up the gmfn stack variables in viridian.c to use gfn_t for consistency though.

  Paul

> Jan


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

  reply	other threads:[~2017-03-20 11:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17  9:57 [PATCH 0/7] x86/viridian updates Paul Durrant
2017-03-17  9:57 ` [PATCH 1/7] x86/viridian: update to version 5.0a of the specification Paul Durrant
2017-03-20 11:27   ` Jan Beulich
2017-03-20 11:43     ` Paul Durrant
2017-03-20 11:54       ` Jan Beulich
2017-03-17  9:57 ` [PATCH 2/7] x86/viridian: fix xen-hvmcrash when vp_assist page is present Paul Durrant
2017-03-20 11:36   ` Jan Beulich
2017-03-20 11:50     ` Paul Durrant [this message]
2017-03-20 13:42       ` Paul Durrant
2017-03-20 13:58         ` Jan Beulich
2017-03-17  9:57 ` [PATCH 3/7] x86/viridian: don't put Xen version information in CPUID leaf 2 Paul Durrant
2017-03-20 11:41   ` Jan Beulich
2017-03-20 11:57     ` Paul Durrant
2017-03-20 12:03       ` Jan Beulich
2017-03-20 13:08         ` Paul Durrant
2017-03-20 13:20           ` Jan Beulich
2017-03-17  9:57 ` [PATCH 4/7] x86/viridian: get rid of the magic numbers in CPUID leaves 1 and 2 Paul Durrant
2017-03-20 12:15   ` Jan Beulich
2017-03-20 12:56     ` Paul Durrant
2017-03-17  9:57 ` [PATCH 5/7] x86/viridian: add warnings for unimplemented hypercalls and MSRs Paul Durrant
2017-03-20 12:21   ` Jan Beulich
2017-03-20 12:54     ` Paul Durrant
2017-03-17  9:57 ` [PATCH 6/7] x86/viridian: make the threshold for HvNotifyLongSpinWait tunable Paul Durrant
2017-03-20 12:26   ` Jan Beulich
2017-03-20 12:51     ` Paul Durrant
2017-03-20 13:22       ` Jan Beulich
2017-03-20 17:03   ` Andrew Cooper
2017-03-20 17:07     ` Paul Durrant
2017-03-17  9:57 ` [PATCH 7/7] x86/viridian: implement the crash MSRs Paul Durrant
2017-03-20 12:38   ` Jan Beulich
2017-03-20 12:48     ` Paul Durrant
2017-03-20 13:29       ` Jan Beulich
2017-03-20 13:33         ` Paul Durrant

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=d5648274493e49df80d6ac0b249bf0b5@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --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).