From: Nadav Har'El Subject: Re: PATCH: nVMX: Better MSR_IA32_FEATURE_CONTROL handling Date: Thu, 15 Mar 2012 19:40:14 +0200 Message-ID: <20120315174014.GA21487@fermat.math.technion.ac.il> References: <20120307155846.GA17631@fermat.math.technion.ac.il> <4F578A53.20809@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Julian Stecklina To: Avi Kivity Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:18353 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031089Ab2CORkn (ORCPT ); Thu, 15 Mar 2012 13:40:43 -0400 Content-Disposition: inline In-Reply-To: <4F578A53.20809@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Mar 07, 2012, Avi Kivity wrote about "Re: PATCH: nVMX: Better MSR_IA32_FEATURE_CONTROL handling": > > struct page *apic_access_page; > > + u64 msr_ia32_feature_control; > > }; >... > (msrs_to_save). The variable itself should live in vcpu->arch, even if > some bits are vendor specific. Does this MSR exist in AMD? I was under the impression that it is an Intel-only MSR, and that AMD has something different, the VM_CR MSR, so it didn't make sense to put this in vcpu->arch. Is my impression wrong? I seems, by the way, that svm.c has vm_cr_msr in svm->nested, basically the same what I did, not in vcpu->arch. Why is this bad? Also, it seems that VM_CR is also not on the list on msrs_to_save. A bug? > > @@ -1999,7 +2000,7 @@ static int vmx_get_vmx_msr(struct kvm_vc > > > > switch (msr_index) { > > case MSR_IA32_FEATURE_CONTROL: > > - *pdata = 0; > > + *pdata = to_vmx(vcpu)->nested.msr_ia32_feature_control; > > break; > > In a separate patch, please move this outside vmx_get_vmx_msr(). It's > not a vmx msr. I agree, I'll move it. But if it's a VMX-only MSR, I want to leave it in vmx.c, and not move it to x86.c. -- Nadav Har'El | Thursday, Mar 15 2012, nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |If I am not for myself, who will be for http://nadav.harel.org.il |me? If I am only for myself, who am I?