Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965725AbbEESjL (ORCPT ); Tue, 5 May 2015 14:39:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35197 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965567AbbEESio convert rfc822-to-8bit (ORCPT ); Tue, 5 May 2015 14:38:44 -0400 From: Bandan Das To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, guangrong.xiao@linux.intel.com, Yang Zhang , wanpeng.li@linux.intel.com Subject: Re: [PATCH 08/13] KVM: x86: stubs for SMM support References: <1430393772-27208-1-git-send-email-pbonzini@redhat.com> <1430393772-27208-9-git-send-email-pbonzini@redhat.com> <20150504175102.GC11234@potion.brq.redhat.com> Date: Tue, 05 May 2015 14:38:40 -0400 In-Reply-To: <20150504175102.GC11234@potion.brq.redhat.com> ("Radim \=\?utf-8\?B\?S3LEjW3DocWZIidz\?\= message of "Mon, 4 May 2015 19:51:02 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1419 Lines: 35 Radim Krčmář writes: ... >> + break; > > (I'm not sure if this is supported if IA32_VMX_BASIC[49] = 0. > 34.15.6.4 Saving Guest State > The SMM-transfer monitor (STM) can also discover the current value of > the SMBASE register by using the RDMSR > > but it's not possible to get into STM without having a support for it > noted in IA32_VMX_BASIC[49] and more magic we also don't emulate to > actually enable it.) Where does it mention IA32_VMX_BASIC[49] ? I only see "IA32_VMX_MISC[15] should be 1" in 34.15.6.4. Anyway, I think we should do what the spec says.. >> @@ -7208,6 +7240,8 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu) >> vcpu->arch.regs_avail = ~0; >> vcpu->arch.regs_dirty = ~0; >> >> + vcpu->arch.smbase = 0x30000; > > It's not reset on INIT, only on RESET. (34.11 SMBASE RELOCATION) I remember mentioning it elsewhere - IMO kvm_vcpu_reset() and kvm_vcpu_init() should really be two different interfaces. I don't mean code duplication - one can just call the other but different names will be of some help when it comes to the million places where the spec mentions INIT and RESET have different behavior. Bandan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/