All of lore.kernel.org
 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 v2] x86/hvm: re-work viridian APIC assist code
Date: Thu, 18 Jan 2018 16:27:38 +0000	[thread overview]
Message-ID: <e8539124b648485eaf313a8614cdd640@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5A60D78E02000078001A0051@prv-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 18 January 2018 16:21
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; xen-
> devel@lists.xenproject.org
> Subject: Re: [PATCH v2] x86/hvm: re-work viridian APIC assist code
> 
> >>> On 18.01.18 at 16:10, <paul.durrant@citrix.com> wrote:
> > -int viridian_complete_apic_assist(struct vcpu *v)
> > +bool viridian_apic_assist_completed(struct vcpu *v)
> >  {
> >      uint32_t *va = v->arch.hvm_vcpu.viridian.vp_assist.va;
> > -    int vector;
> >
> >      if ( !va )
> > -        return 0;
> > +        return false;
> >
> > -    if ( *va & 1u )
> > -        return 0; /* Interrupt not yet processed by the guest. */
> > -
> > -    vector = v->arch.hvm_vcpu.viridian.vp_assist.vector;
> > -    v->arch.hvm_vcpu.viridian.vp_assist.vector = 0;
> > +    if ( v->arch.hvm_vcpu.viridian.vp_assist.pending &&
> > +         !(*va & 1u) )
> > +    {
> > +        /* An EOI has been avoided */
> > +        v->arch.hvm_vcpu.viridian.vp_assist.pending = false;
> > +        return true;
> > +    }
> 
> Especially with such a non-atomic update, please remind me: Despite
> them having struct vcpu * parameters, these functions are all only
> ever called with v == current? If the answer is yes, then
> Reviewed-by: Jan Beulich <jbeulich@suse.com>

Thanks. The answer is yes. They are only called from the vlapic code for the current vlapic AFAICT.

> with one more cosmetic remark:
> 
> > @@ -120,9 +120,9 @@ void viridian_time_ref_count_thaw(struct domain
> *d);
> >  void viridian_vcpu_deinit(struct vcpu *v);
> >  void viridian_domain_deinit(struct domain *d);
> >
> > -void viridian_start_apic_assist(struct vcpu *v, int vector);
> > -int viridian_complete_apic_assist(struct vcpu *v);
> > -void viridian_abort_apic_assist(struct vcpu *v);
> > +void viridian_set_apic_assist(struct vcpu *v);
> > +bool viridian_apic_assist_completed(struct vcpu *v);
> > +void viridian_clear_apic_assist(struct vcpu *v);
> 
> Could I talk you into naming them all viridian_apic_assist_...()?
> 

Sure. I'll send a v3 with that fixed and your R-b.

  Paul

> Jan


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

  reply	other threads:[~2018-01-18 16:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 15:10 [PATCH v2] x86/hvm: re-work viridian APIC assist code Paul Durrant
2018-01-18 16:21 ` Jan Beulich
2018-01-18 16:27   ` Paul Durrant [this message]
2018-08-24 23:38 ` David Woodhouse
2018-09-03 10:12   ` Paul Durrant
2018-09-04 20:31     ` David Woodhouse
2018-09-05  9:36       ` Paul Durrant
2018-09-05  9:40         ` David Woodhouse
2018-09-05  9:43           ` Paul Durrant
2018-09-05 10:40             ` Paul Durrant
2018-09-05 10:45               ` David Woodhouse
2018-09-05 10:48                 ` Paul Durrant
2020-08-11 13:25   ` [Xen-devel] " David Woodhouse
2020-08-12 13:43     ` Roger Pau Monné
2020-08-13  8:10     ` Paul Durrant
2020-08-13  9:45       ` Roger Pau Monné
2020-08-14 14:13         ` David Woodhouse
2020-08-14 14:41           ` Roger Pau Monné
2020-08-19  7:12         ` Jan Beulich
2020-08-19  8:26           ` Roger Pau Monné

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=e8539124b648485eaf313a8614cdd640@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 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.