From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL Date: Wed, 31 Jan 2018 16:00:43 -0500 Message-ID: <16d89e09-fbfc-4a08-00a6-40cfb4776018@redhat.com> References: <1517427467-28567-1-git-send-email-karahmed@amazon.de> <1517427467-28567-5-git-send-email-karahmed@amazon.de> <06cb88da-f355-41ed-380f-7daa8ddf6159@amazon.com> <67dca2bb-1298-c7fa-f681-018e4edc6725@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: KarimAllah Ahmed , KarimAllah Ahmed , kvm list , LKML , the arch/x86 maintainers , Asit Mallick , Arjan Van De Ven , Dave Hansen , Andi Kleen , Andrea Arcangeli , Linus Torvalds , Tim Chen , Thomas Gleixner , Dan Williams , Jun Nakajima , David Woodhouse , Greg KH , Andy Lutomirski , Ashok Raj To: Jim Mattson Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 31/01/2018 15:54, Jim Mattson wrote: > You seem to be making the assumption that there is one L2. What if > there are 100 L2s, and only one has write-access to IA32_SPEC_CTRL? Or > what if there once was such an L2, but it's been gone for months? The > current mechanism penalizes *all* L2s if any L2, ever, has > write-access to IA32_SPEC_CTRL. Yes, but how would moving the field into struct loaded_vmcs do anything? Only vmon/vmoff would change anything in vmx->nested.vmcs02. Even then, L1 vmexits will also be penalized because L1 has probably done an RDMSR/WRMSR on L2->L1 vmexit. So I don't think it's an issue? Paolo