RE: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-06-13 Thread Mao, Junjie
Terribly sorry for the late reply. I'm out of work for some unexpected issues the last few weeks. > >> > So i think that checking whether EPT _and_ VPID are supported > >> > should be a precondition to enable PCID support for guests. > >> > > >> > >> Should this check be carried out on L0 too? If

Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-29 Thread Avi Kivity
On 05/25/2012 03:59 AM, Marcelo Tosatti wrote: >> > >> > The problem with enabling PCID for the L2 guest is that it can share same >> > PCID >> > values with the L1 hypervisor. >> > >> > However, if the L1 hypervisor enables and configures VPID (given that >> > the L0 hypervisor emulates and exp

Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-24 Thread Marcelo Tosatti
On Wed, May 23, 2012 at 05:02:28AM +, Mao, Junjie wrote: > > > > > > The previous patch regards PCID and INVPCID as a whole because qemu > > doesn't support cpuid leaf 7 configuration at present. This is not the case > > in this > > version. > > > > The problem with cpu_has_hypervisor check is

RE: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-22 Thread Mao, Junjie
> > > > The previous patch regards PCID and INVPCID as a whole because qemu > doesn't support cpuid leaf 7 configuration at present. This is not the case > in this > version. > > > The problem with cpu_has_hypervisor check is that its Linux specific. > > > Any solution should also take into accoun

Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-22 Thread Marcelo Tosatti
On Tue, May 22, 2012 at 12:46:54AM +, Mao, Junjie wrote: > > > > @@ > > > > > -1711,6 +1717,22 @@ static bool vmx_rdtscp_supported(void) > > > > > return cpu_has_vmx_rdtscp(); > > > > > } > > > > > > > > > > +static bool vmx_pcid_supported(void) { > > > > > + /* > > > > > + * Th

RE: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-21 Thread Mao, Junjie
> > > @@ > > > > -1711,6 +1717,22 @@ static bool vmx_rdtscp_supported(void) > > > > return cpu_has_vmx_rdtscp(); > > > > } > > > > > > > > +static bool vmx_pcid_supported(void) { > > > > + /* > > > > +* This function is only for determining whether to expose PCID > > > > bit

Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-21 Thread Marcelo Tosatti
rg' > > Subject: Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with > > EPT > > > > On Fri, May 18, 2012 at 06:17:05AM +, Mao, Junjie wrote: > > > This patch handles PCID/INVPCID for guests. > > > > > > Process-context iden

RE: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-20 Thread Mao, Junjie
> -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Saturday, May 19, 2012 5:51 AM > To: Mao, Junjie > Cc: n...@math.technion.ac.il; 'kvm@vger.kernel.org' > Subject: Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests wi

Re: [PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-18 Thread Marcelo Tosatti
On Fri, May 18, 2012 at 06:17:05AM +, Mao, Junjie wrote: > This patch handles PCID/INVPCID for guests. > > Process-context identifiers (PCIDs) are a facility by which a logical > processor > may cache information for multiple linear-address spaces so that the processor > may retain cached inf