Re: [Xen-devel] [PATCH 6/6] x86: introduce dr_mask_idx() helper function...

2019-03-11 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 08 March 2019 17:10 > To: Jan Beulich ; Paul Durrant > Cc: Roger Pau Monne ; Wei Liu ; > xen-devel de...@lists.xenproject.org> > Subject: Re: [PATCH 6/6] x86: introduce dr_mask_idx() helper function... > > On 08/03/2019 16:58, Jan

Re: [Xen-devel] [PATCH 6/6] x86: introduce dr_mask_idx() helper function...

2019-03-08 Thread Andrew Cooper
On 08/03/2019 16:58, Jan Beulich wrote: On 07.01.19 at 13:02, wrote: >> @@ -202,13 +201,10 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t >> *val) >> */ >> #ifdef CONFIG_HVM >> if ( v == current && is_hvm_domain(d) && v->arch.hvm.flag_dr_dirty ) >> -

Re: [Xen-devel] [PATCH 6/6] x86: introduce dr_mask_idx() helper function...

2019-03-08 Thread Jan Beulich
>>> On 07.01.19 at 13:02, wrote: > @@ -202,13 +201,10 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t > *val) > */ > #ifdef CONFIG_HVM > if ( v == current && is_hvm_domain(d) && v->arch.hvm.flag_dr_dirty ) > -rdmsrl(msr, *val); > -else > +

[Xen-devel] [PATCH 6/6] x86: introduce dr_mask_idx() helper function...

2019-01-07 Thread Paul Durrant
...to avoid repeated open-coding. Unfortunately the mapping from MSR index MSR_AMD64_DR_ADDRESS_MASK to the 'idx' value is non-trivial since the MSR index corresponding to idx value 0 is non-consecutive with the MSR indices corresponding to idx values 1-3. This mapping is currently dealt with by