Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-18 Thread Boris Ostrovsky
On 12/18/2015 10:19 AM, Jan Beulich wrote: On 18.12.15 at 16:12, wrote: On 12/18/2015 01:21 AM, Tian, Kevin wrote: From: Boris Ostrovsky [mailto:boris.ostrov...@oracle.com] Sent: Thursday, December 17, 2015 10:42 PM On 12/17/2015 09:29 AM, Jan Beulich wrote: On 17.12.15 at 15:26, wrote: On

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-18 Thread Jan Beulich
>>> On 18.12.15 at 16:12, wrote: > On 12/18/2015 01:21 AM, Tian, Kevin wrote: >>> From: Boris Ostrovsky [mailto:boris.ostrov...@oracle.com] >>> Sent: Thursday, December 17, 2015 10:42 PM >>> >>> On 12/17/2015 09:29 AM, Jan Beulich wrote: >>> On 17.12.15 at 15:26, wrote: > On 12/17/2015 09

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-18 Thread Boris Ostrovsky
On 12/18/2015 01:21 AM, Tian, Kevin wrote: From: Boris Ostrovsky [mailto:boris.ostrov...@oracle.com] Sent: Thursday, December 17, 2015 10:42 PM On 12/17/2015 09:29 AM, Jan Beulich wrote: On 17.12.15 at 15:26, wrote: On 12/17/2015 09:18 AM, Jan Beulich wrote: On 17.12.15 at 15:12, wrote: On

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Tian, Kevin
> From: Boris Ostrovsky [mailto:boris.ostrov...@oracle.com] > Sent: Thursday, December 17, 2015 10:42 PM > > On 12/17/2015 09:29 AM, Jan Beulich wrote: > On 17.12.15 at 15:26, wrote: > >> On 12/17/2015 09:18 AM, Jan Beulich wrote: > >> On 17.12.15 at 15:12, wrote: > On 12/17/2015 0

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Boris Ostrovsky
On 12/17/2015 09:29 AM, Jan Beulich wrote: On 17.12.15 at 15:26, wrote: On 12/17/2015 09:18 AM, Jan Beulich wrote: On 17.12.15 at 15:12, wrote: On 12/17/2015 09:01 AM, Jan Beulich wrote: @@ -415,8 +416,10 @@ static int core2_vpmu_verify(struct vcpu enabled_cntrs |= (1ULL <<

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Jan Beulich
>>> On 17.12.15 at 15:26, wrote: > On 12/17/2015 09:18 AM, Jan Beulich wrote: > On 17.12.15 at 15:12, wrote: >>> On 12/17/2015 09:01 AM, Jan Beulich wrote: @@ -415,8 +416,10 @@ static int core2_vpmu_verify(struct vcpu enabled_cntrs |= (1ULL << i); }

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Boris Ostrovsky
On 12/17/2015 09:18 AM, Jan Beulich wrote: On 17.12.15 at 15:12, wrote: On 12/17/2015 09:01 AM, Jan Beulich wrote: @@ -415,8 +416,10 @@ static int core2_vpmu_verify(struct vcpu enabled_cntrs |= (1ULL << i); } -if ( vpmu_is_set(vcpu_vpmu(v), VPMU_CPU_HAS_DS) && -

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Jan Beulich
>>> On 17.12.15 at 15:12, wrote: > On 12/17/2015 09:01 AM, Jan Beulich wrote: >> @@ -415,8 +416,10 @@ static int core2_vpmu_verify(struct vcpu >> enabled_cntrs |= (1ULL << i); >> } >> >> -if ( vpmu_is_set(vcpu_vpmu(v), VPMU_CPU_HAS_DS) && >> - !is_canonical_addre

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Boris Ostrovsky
On 12/17/2015 09:01 AM, Jan Beulich wrote: For one, loading the MSR with a possibly non-canonical address was possible since the verification is conditional, while the MSR load wasn't. And then for PV guests we need to further limit the range of valid addresses to exclude the hypervisor range. S

Re: [Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Andrew Cooper
On 17/12/15 14:01, Jan Beulich wrote: > For one, loading the MSR with a possibly non-canonical address was > possible since the verification is conditional, while the MSR load > wasn't. And then for PV guests we need to further limit the range of > valid addresses to exclude the hypervisor range. >

[Xen-devel] [PATCH] x86/vPMU: constrain MSR_IA32_DS_AREA loads

2015-12-17 Thread Jan Beulich
For one, loading the MSR with a possibly non-canonical address was possible since the verification is conditional, while the MSR load wasn't. And then for PV guests we need to further limit the range of valid addresses to exclude the hypervisor range. Signed-off-by: Jan Beulich --- a/xen/arch/x8