Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbeAIJf4 (ORCPT + 1 other); Tue, 9 Jan 2018 04:35:56 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:39714 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753038AbeAIJfw (ORCPT ); Tue, 9 Jan 2018 04:35:52 -0500 X-Google-Smtp-Source: ACJfBosrD0kfpjlMO40U2L87MbS/Ts3VVNHkJPrkTdQmDwsR+hYfvjh1mVMskPJWZm9O7D+HaK2sng== Subject: Re: [PATCH] KVM: VMX: use same MSR bitmaps for 32-/64-bit modes, fix MSR bitmaps for processor tracing From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1515167000-51323-1-git-send-email-pbonzini@redhat.com> Message-ID: <4a6185ee-b6db-260a-08d2-34483953f2b5@redhat.com> Date: Tue, 9 Jan 2018 10:35:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1515167000-51323-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 05/01/2018 16:43, Paolo Bonzini wrote: > KVM has a small optimization where it doesn't save/restore > MSR_KERNEL_GS_BASE if the guest is in 32-bit mode. However, > this complicates the code noticeably by doubling the number of > possible MSR bitmaps. In addition, pt_disable_intercept_for_msr > was only updating the "basic" MSR bitmap, because x2apic and > x2apic_apicv are memcpy'd just once in hardware_setup. > > Remove the long-mode bitmaps set, and touch all the three remaining > bitmaps in vmx_disable_intercept_for_msr and vmx_enable_intercept_for_msr. > > Fixes: 3bd1f85e893daec4f3982d1d45b6bfc0683442c4 > Cc: Luwei Kang > Signed-off-by: Paolo Bonzini > --- > arch/x86/kvm/vmx.c | 126 ++++++++++++++++++++--------------------------------- > 1 file changed, 48 insertions(+), 78 deletions(-) Scratch it, this patch is wrong. You cannot change the MSR bitmaps, they are shared across all VCPUs. Paolo