Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 20 November 2015 15:03 > To: Paul Durrant > Cc: Andrew Cooper; Ian Campbell; Ian Jackson; Stefano Stabellini; Wei Liu; > xen-de...@lists.xenproject.org; Keir (Xen.org) > Subject: RE: [PATCH v3] x86/hvm/viridian: flu

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Jan Beulich
>>> On 20.11.15 at 14:41, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 20 November 2015 12:27 >> While you can't "and" that mask into input_params.vcpu_mask, >> wouldn't using it allow you to avoid the scratch pCPU mask >> variable? > > I'm not sure. After flushing the ASIDs I

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Paul Durrant
> -Original Message- > From: Paul Durrant > Sent: 20 November 2015 13:41 > To: 'Jan Beulich' > Cc: Andrew Cooper; Ian Campbell; Ian Jackson; Stefano Stabellini; Wei Liu; > xen-de...@lists.xenproject.org; Keir (Xen.org) > Subject: RE: [PATCH v3] x86/hvm/viridian: flush remote tlbs by hyperca

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 20 November 2015 12:27 > To: Paul Durrant > Cc: Andrew Cooper; Ian Campbell; Ian Jackson; Stefano Stabellini; Wei Liu; > xen-de...@lists.xenproject.org; Keir (Xen.org) > Subject: RE: [PATCH v3] x86/hvm/viridian: flu

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Andrew Cooper
On 20/11/15 09:15, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 19 November 2015 17:09 >> To: Paul Durrant; xen-de...@lists.xenproject.org >> Cc: Ian Jackson; Stefano Stabellini; Ian Campbell; Wei Liu; Keir (Xen.org); >> Jan >

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Jan Beulich
>>> On 20.11.15 at 10:15, wrote: >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 19 November 2015 17:09 >> On 19/11/15 16:57, Paul Durrant wrote: >> >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> >> Sent: 19 November 2015 16:07 >> >> On 19/11/15 13:19, Paul Durrant

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 20 November 2015 09:45 > To: Andrew Cooper; Paul Durrant > Cc: Ian Campbell; Ian Jackson; Stefano Stabellini; Wei Liu; xen- > de...@lists.xenproject.org; Keir (Xen.org) > Subject: RE: [PATCH v3] x86/hvm/viridian: fl

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Jan Beulich
>>> On 20.11.15 at 10:15, wrote: >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 19 November 2015 17:09 >> On 19/11/15 16:57, Paul Durrant wrote: >> >>> +/* >> >>> + * For each specified virtual CPU flush all ASIDs to invalidate >> >>> + * TLB entries the

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-20 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 19 November 2015 17:09 > To: Paul Durrant; xen-de...@lists.xenproject.org > Cc: Ian Jackson; Stefano Stabellini; Ian Campbell; Wei Liu; Keir (Xen.org); > Jan > Beulich > Subject: Re: [PATCH v3] x86/hvm/vi

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-19 Thread Andrew Cooper
On 19/11/15 16:57, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 19 November 2015 16:07 >> To: Paul Durrant; xen-de...@lists.xenproject.org >> Cc: Ian Jackson; Stefano Stabellini; Ian Campbell; Wei Liu; Keir (Xen.org); >> Jan >

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-19 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 19 November 2015 16:07 > To: Paul Durrant; xen-de...@lists.xenproject.org > Cc: Ian Jackson; Stefano Stabellini; Ian Campbell; Wei Liu; Keir (Xen.org); > Jan > Beulich > Subject: Re: [PATCH v3] x86/hvm/vi

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-19 Thread Andrew Cooper
On 19/11/15 13:19, Paul Durrant wrote: > @@ -561,10 +584,81 @@ int viridian_hypercall(struct cpu_user_regs *regs) > switch ( input.call_code ) > { > case HvNotifyLongSpinWait: > +/* > + * See Microsoft Hypervisor Top Level Spec. section 18.5.1. > + */ >

Re: [Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-19 Thread Jan Beulich
>>> On 19.11.15 at 14:19, wrote: > The Microsoft Hypervisor Top Level Functional Spec. (section 3.4) defines > two bits in CPUID leaf 0x4004:EAX for the hypervisor to recommend > whether or not to issue a hypercall for local or remote TLB flush. > > Whilst it's doubtful whether using a hyperc

[Xen-devel] [PATCH v3] x86/hvm/viridian: flush remote tlbs by hypercall

2015-11-19 Thread Paul Durrant
The Microsoft Hypervisor Top Level Functional Spec. (section 3.4) defines two bits in CPUID leaf 0x4004:EAX for the hypervisor to recommend whether or not to issue a hypercall for local or remote TLB flush. Whilst it's doubtful whether using a hypercall for local TLB flush would be any more ef