Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-07 Thread Eduardo Habkost
On Fri, Nov 04, 2016 at 10:57:27PM +0100, Paolo Bonzini wrote: > > > On 04/11/2016 21:34, David Matlack wrote: > > On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: > >> + case MSR_PLATFORM_INFO: > >> + /* cpuid faulting is supported */ > >> +

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-07 Thread Eduardo Habkost
On Fri, Nov 04, 2016 at 10:57:27PM +0100, Paolo Bonzini wrote: > > > On 04/11/2016 21:34, David Matlack wrote: > > On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: > >> + case MSR_PLATFORM_INFO: > >> + /* cpuid faulting is supported */ > >> + msr_info->data =

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-06 Thread Kyle Huey
On Fri, Nov 4, 2016 at 5:09 PM, David Matlack wrote: > On Fri, Nov 4, 2016 at 2:57 PM, Paolo Bonzini wrote: >> >> On 04/11/2016 21:34, David Matlack wrote: >>> On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: + case

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-06 Thread Kyle Huey
On Fri, Nov 4, 2016 at 5:09 PM, David Matlack wrote: > On Fri, Nov 4, 2016 at 2:57 PM, Paolo Bonzini wrote: >> >> On 04/11/2016 21:34, David Matlack wrote: >>> On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: + case MSR_PLATFORM_INFO: + /* cpuid faulting is

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-04 Thread David Matlack
On Fri, Nov 4, 2016 at 2:57 PM, Paolo Bonzini wrote: > > On 04/11/2016 21:34, David Matlack wrote: >> On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: >>> + case MSR_PLATFORM_INFO: >>> + /* cpuid faulting is supported */ >>> +

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-04 Thread David Matlack
On Fri, Nov 4, 2016 at 2:57 PM, Paolo Bonzini wrote: > > On 04/11/2016 21:34, David Matlack wrote: >> On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: >>> + case MSR_PLATFORM_INFO: >>> + /* cpuid faulting is supported */ >>> + msr_info->data =

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-04 Thread Paolo Bonzini
On 04/11/2016 21:34, David Matlack wrote: > On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: >> + case MSR_PLATFORM_INFO: >> + /* cpuid faulting is supported */ >> + msr_info->data = PLATINFO_CPUID_FAULT; >> + break; > > This

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-04 Thread Paolo Bonzini
On 04/11/2016 21:34, David Matlack wrote: > On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: >> + case MSR_PLATFORM_INFO: >> + /* cpuid faulting is supported */ >> + msr_info->data = PLATINFO_CPUID_FAULT; >> + break; > > This could break

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-04 Thread David Matlack
On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: > Hardware support for faulting on the cpuid instruction is not required to > emulate it, because cpuid triggers a VM exit anyways. KVM handles the relevant > MSRs (MSR_PLATFORM_INFO and MSR_MISC_FEATURES_ENABLE) and upon a >

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-04 Thread David Matlack
On Mon, Oct 31, 2016 at 6:37 PM, Kyle Huey wrote: > Hardware support for faulting on the cpuid instruction is not required to > emulate it, because cpuid triggers a VM exit anyways. KVM handles the relevant > MSRs (MSR_PLATFORM_INFO and MSR_MISC_FEATURES_ENABLE) and upon a > cpuid-induced VM exit

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-01 Thread Paolo Bonzini
On 01/11/2016 19:33, Thomas Gleixner wrote: > On Tue, 1 Nov 2016, Paolo Bonzini wrote: > >> >>> + vcpu->arch.cpuid_fault = false; >> >> This should be conditional on "if (!init_event)". Most MSRs are untouched >> on an INIT IPI. >> >> Otherwise looks good. The patch is independent of the

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-01 Thread Paolo Bonzini
On 01/11/2016 19:33, Thomas Gleixner wrote: > On Tue, 1 Nov 2016, Paolo Bonzini wrote: > >> >>> + vcpu->arch.cpuid_fault = false; >> >> This should be conditional on "if (!init_event)". Most MSRs are untouched >> on an INIT IPI. >> >> Otherwise looks good. The patch is independent of the

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-01 Thread Thomas Gleixner
On Tue, 1 Nov 2016, Paolo Bonzini wrote: > > > + vcpu->arch.cpuid_fault = false; > > This should be conditional on "if (!init_event)". Most MSRs are untouched > on an INIT IPI. > > Otherwise looks good. The patch is independent of the rest, so I would > prefer to take it through the KVM

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-01 Thread Thomas Gleixner
On Tue, 1 Nov 2016, Paolo Bonzini wrote: > > > + vcpu->arch.cpuid_fault = false; > > This should be conditional on "if (!init_event)". Most MSRs are untouched > on an INIT IPI. > > Otherwise looks good. The patch is independent of the rest, so I would > prefer to take it through the KVM

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-01 Thread Paolo Bonzini
> + vcpu->arch.cpuid_fault = false; This should be conditional on "if (!init_event)". Most MSRs are untouched on an INIT IPI. Otherwise looks good. The patch is independent of the rest, so I would prefer to take it through the KVM tree. Thanks, Paolo >

Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-11-01 Thread Paolo Bonzini
> + vcpu->arch.cpuid_fault = false; This should be conditional on "if (!init_event)". Most MSRs are untouched on an INIT IPI. Otherwise looks good. The patch is independent of the rest, so I would prefer to take it through the KVM tree. Thanks, Paolo >

[PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-10-31 Thread Kyle Huey
Hardware support for faulting on the cpuid instruction is not required to emulate it, because cpuid triggers a VM exit anyways. KVM handles the relevant MSRs (MSR_PLATFORM_INFO and MSR_MISC_FEATURES_ENABLE) and upon a cpuid-induced VM exit checks the cpuid faulting state and the CPL.

[PATCH v8 7/7] KVM: x86: virtualize cpuid faulting

2016-10-31 Thread Kyle Huey
Hardware support for faulting on the cpuid instruction is not required to emulate it, because cpuid triggers a VM exit anyways. KVM handles the relevant MSRs (MSR_PLATFORM_INFO and MSR_MISC_FEATURES_ENABLE) and upon a cpuid-induced VM exit checks the cpuid faulting state and the CPL.