From: Paolo Bonzini Subject: Re: [PATCH v2 3/6] KVM: nVMX: fix SMI injection in guest mode Date: Wed, 20 Sep 2017 09:53:54 +0200 Message-ID: References: <20170919153708.9019-1-lprosek@redhat.com> <20170919153708.9019-4-lprosek@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: rkrcmar@redhat.com To: Ladi Prosek , kvm@vger.kernel.org Return-path: Received: from mail-wm0-f43.google.com ([74.125.82.43]:46116 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbdITHx5 (ORCPT ); Wed, 20 Sep 2017 03:53:57 -0400 Received: by mail-wm0-f43.google.com with SMTP id i189so4686009wmf.1 for ; Wed, 20 Sep 2017 00:53:56 -0700 (PDT) In-Reply-To: <20170919153708.9019-4-lprosek@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 19/09/2017 17:37, Ladi Prosek wrote: > + if (nested_cpu_has_ept(vmcs12)) { > + /* > + * 34.14.1 Default Treatment of SMI Delivery > + * Bit 0 of the 32-bit field at offset SMBASE + 8000H + 7EE0H > + * indicates whether the cpu was in VMX non-root operation with > + * EPT enabled. > + * The 64-bit field at offset SMBASE + 8000H + 7ED8H holds the > + * value of the EPT pointer. > + */ > + put_smstate(u32, smstate, 0x7ee0, > + get_smstate(u32, smstate, 0x7ee0) | 1); This is zero, so it should be enough to just write 1 here. But, it is not clear to me why this is needed. Since we use the AMD format for the SMM state save area anyway, I'm inclined to omit it... Paolo > + put_smstate(u64, smstate, 0x7ed8, vmcs12->ept_pointer); > + }