Re: [Xen-devel] [PATCH 05/10] VMX: add help functions to support PML

2015-04-09 Thread Tim Deegan
At 10:35 +0800 on 27 Mar (1427452549), Kai Huang wrote: > +void vmx_vcpu_disable_pml(struct vcpu *v) > +{ > +ASSERT(vmx_vcpu_pml_enabled(v)); > + I think this function ought to call vmx_vcpu_flush_pml_buffer() before disabling PML. That way we don't need to worry about losing any information

Re: [Xen-devel] [PATCH 05/10] VMX: add help functions to support PML

2015-04-09 Thread Tim Deegan
Hi, At 10:35 +0800 on 27 Mar (1427452549), Kai Huang wrote: > +void vmx_vcpu_flush_pml_buffer(struct vcpu *v) > +{ > +uint64_t *pml_buf; > +unsigned long pml_idx; > + > +ASSERT(vmx_vcpu_pml_enabled(v)); > + > +vmx_vmcs_enter(v); > + > +__vmread(GUEST_PML_INDEX, &pml_idx); > + >

Re: [Xen-devel] [PATCH 05/10] VMX: add help functions to support PML

2015-03-30 Thread Kai Huang
On Mon, Mar 30, 2015 at 5:54 PM, Andrew Cooper wrote: > On 30/03/15 07:43, Kai Huang wrote: >> >> >> On 03/28/2015 05:09 AM, Andrew Cooper wrote: >>> On 27/03/15 02:35, Kai Huang wrote: >>> +} + +int vmx_vcpu_enable_pml(struct vcpu *v) +{ +struct domain *d = v->domain;

Re: [Xen-devel] [PATCH 05/10] VMX: add help functions to support PML

2015-03-30 Thread Andrew Cooper
On 30/03/15 07:43, Kai Huang wrote: > > > On 03/28/2015 05:09 AM, Andrew Cooper wrote: >> On 27/03/15 02:35, Kai Huang wrote: >> >>> +} >>> + >>> +int vmx_vcpu_enable_pml(struct vcpu *v) >>> +{ >>> +struct domain *d = v->domain; >>> + >>> +ASSERT(!vmx_vcpu_pml_enabled(v)); >>> + >>> +v-

Re: [Xen-devel] [PATCH 05/10] VMX: add help functions to support PML

2015-03-29 Thread Kai Huang
On 03/28/2015 05:09 AM, Andrew Cooper wrote: On 27/03/15 02:35, Kai Huang wrote: This patch adds help functions to enable/disable PML, and flush PML buffer for single vcpu and particular domain for further use. Signed-off-by: Kai Huang --- xen/arch/x86/hvm/vmx/vmcs.c| 190 +

Re: [Xen-devel] [PATCH 05/10] VMX: add help functions to support PML

2015-03-27 Thread Andrew Cooper
On 27/03/15 02:35, Kai Huang wrote: > This patch adds help functions to enable/disable PML, and flush PML buffer for > single vcpu and particular domain for further use. > > Signed-off-by: Kai Huang > --- > xen/arch/x86/hvm/vmx/vmcs.c| 190 > + > xen/i