Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-15 Thread Juergen Gross
On 15/04/2019 11:03, Wei Liu wrote: > On Tue, Apr 09, 2019 at 06:53:47PM +0100, Andrew Cooper wrote: >> @@ -692,6 +692,7 @@ unsigned long hvm_get_shadow_gs_base(struct vcpu *v); >> void hvm_set_info_guest(struct vcpu *v); >> void hvm_cpuid_policy_changed(struct vcpu *v); >> void hvm_set_tsc_offs

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-15 Thread Wei Liu
On Tue, Apr 09, 2019 at 06:53:47PM +0100, Andrew Cooper wrote: > @@ -692,6 +692,7 @@ unsigned long hvm_get_shadow_gs_base(struct vcpu *v); > void hvm_set_info_guest(struct vcpu *v); > void hvm_cpuid_policy_changed(struct vcpu *v); > void hvm_set_tsc_offset(struct vcpu *v, uint64_t offset, uint64

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-12 Thread Jan Beulich
>>> On 12.04.19 at 15:52, wrote: > On 12/04/2019 11:46, Jan Beulich wrote: >> >>> The function promising not to alter the pointed-to-object >>> includes the entire child callgraph. >>> >>> >>> The code you insisted Paul to add is: >>> >>> struct vcpu *v = cv->domain->vcpu[cv->vcpu_id]; >>> >>> wh

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-12 Thread Andrew Cooper
On 12/04/2019 11:46, Jan Beulich wrote: > >> The function promising not to alter the pointed-to-object >> includes the entire child callgraph. >> >> >> The code you insisted Paul to add is: >> >> struct vcpu *v = cv->domain->vcpu[cv->vcpu_id]; >> >> which is identical to: >> >> struct vcpu *v = (s

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-12 Thread Jan Beulich
>>> On 12.04.19 at 13:00, wrote: >> -Original Message- >> >> > An optimising compiler which uses an object, and passes a const pointer >> > to that object to a function, is permitted to retain assumptions derived >> > from that state across the function call sequence point, because the A

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-12 Thread Paul Durrant
> -Original Message- > > > An optimising compiler which uses an object, and passes a const pointer > > to that object to a function, is permitted to retain assumptions derived > > from that state across the function call sequence point, because the ABI > > of the function states that the c

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-12 Thread Jan Beulich
>>> On 11.04.19 at 20:20, wrote: > On 10/04/2019 11:24, Jan Beulich wrote: > On 09.04.19 at 19:53, wrote: >>> The series 832c1803^..f61685a6 was committed without adequate review. >>> >>> * Fix the shim build by providing a !CONFIG_HVM declaration for >>>hvm_get_guest_bndcfgs() >>> * Re

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-11 Thread Andrew Cooper
On 10/04/2019 09:28, Paul Durrant wrote: > Again, digging back in mail... > > - > [From Jan] >> +case MSR_IA32_BNDCFGS: >> +if ( !is_hvm_domain(d) || !cp->feat.mpx || >> + !hvm_set_guest_bndcfgs(v, val) ) >> +goto gp_fault; > In both cases the is_hvm_*() chec

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-11 Thread Andrew Cooper
On 10/04/2019 11:24, Jan Beulich wrote: On 09.04.19 at 19:53, wrote: >> The series 832c1803^..f61685a6 was committed without adequate review. >> >> * Fix the shim build by providing a !CONFIG_HVM declaration for >>hvm_get_guest_bndcfgs() >> * Revert the bogus de-const'ing of the vcpu po

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-10 Thread Jan Beulich
>>> On 09.04.19 at 19:53, wrote: > The series 832c1803^..f61685a6 was committed without adequate review. > > * Fix the shim build by providing a !CONFIG_HVM declaration for >hvm_get_guest_bndcfgs() > * Revert the bogus de-const'ing of the vcpu pointer in >vmx_get_guest_bndcfgs(). vmx_v

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-10 Thread Wei Liu
On Wed, Apr 10, 2019 at 10:41:24AM +0100, Andrew Cooper wrote: > On 10/04/2019 09:23, Wei Liu wrote: > > On Tue, Apr 09, 2019 at 06:53:47PM +0100, Andrew Cooper wrote: > >> The series 832c1803^..f61685a6 was committed without adequate review. > >> > >> * Fix the shim build by providing a !CONFIG_H

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-10 Thread Andrew Cooper
On 10/04/2019 09:23, Wei Liu wrote: > On Tue, Apr 09, 2019 at 06:53:47PM +0100, Andrew Cooper wrote: >> The series 832c1803^..f61685a6 was committed without adequate review. >> >> * Fix the shim build by providing a !CONFIG_HVM declaration for >>hvm_get_guest_bndcfgs() >> * Revert the bogus d

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-10 Thread Paul Durrant
> -Original Message- > From: Paul Durrant > Sent: 10 April 2019 09:28 > To: Andrew Cooper ; Xen-devel > > Cc: Andrew Cooper ; Jan Beulich > ; Wei Liu > ; Roger Pau Monne ; Jun Nakajima > ; > Kevin Tian > Subject: RE: [PATCH] x86/msr: Fix fallout from mostly c/s 832c180 > > > -Orig

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-10 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 09 April 2019 18:54 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Wei Liu > ; Roger Pau Monne ; Paul Durrant > ; > Jun Nakajima ; Kevin Tian > Subject: [PATCH] x86/msr: Fix fallout from mostly

Re: [Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-10 Thread Wei Liu
On Tue, Apr 09, 2019 at 06:53:47PM +0100, Andrew Cooper wrote: > The series 832c1803^..f61685a6 was committed without adequate review. > > * Fix the shim build by providing a !CONFIG_HVM declaration for >hvm_get_guest_bndcfgs() > * Revert the bogus de-const'ing of the vcpu pointer in >vm

[Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-09 Thread Andrew Cooper
The series 832c1803^..f61685a6 was committed without adequate review. * Fix the shim build by providing a !CONFIG_HVM declaration for hvm_get_guest_bndcfgs() * Revert the bogus de-const'ing of the vcpu pointer in vmx_get_guest_bndcfgs(). vmx_vmcs_enter() really does mutate the vcpu, and