Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933164AbeAOJxf (ORCPT + 1 other); Mon, 15 Jan 2018 04:53:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50552 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932521AbeAOJxd (ORCPT ); Mon, 15 Jan 2018 04:53:33 -0500 Subject: Re: [PATCH 5/8] KVM: SVM: fix comment To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: rkrcmar@redhat.com, liran.alon@oracle.com, jmattson@google.com, aliguori@amazon.com, thomas.lendacky@amd.com, dwmw@amazon.co.uk, bp@alien8.de, x86@kernel.org References: <20180109120311.27565-1-pbonzini@redhat.com> <20180109120311.27565-6-pbonzini@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <9e1504dc-514c-8bbd-f941-f1edca5e8f50@redhat.com> Date: Mon, 15 Jan 2018 10:53:22 +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: <20180109120311.27565-6-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 15 Jan 2018 09:53:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 09.01.2018 13:03, Paolo Bonzini wrote: > If always==true, then read/write bits are cleared from > the MSR permission bitmap, thus passing-through the MSR. > Fix the comment to match reality. > > Signed-off-by: Paolo Bonzini > --- > arch/x86/kvm/svm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 55dde3896898..31ace8d7774a 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -236,7 +236,7 @@ struct amd_svm_iommu_ir { > > static const struct svm_direct_access_msrs { > u32 index; /* Index of the MSR */ > - bool always; /* True if intercept is always on */ > + bool always; /* True if intercept is always off */ > } direct_access_msrs[] = { > { .index = MSR_STAR, .always = true }, > { .index = MSR_IA32_SYSENTER_CS, .always = true }, > The function set_msr_interception() is really named confusingly. If we pass in a "1", we clear the bit, resulting in no interception. So 1==no intercept, 0==intercept. This function would be better named "disable_msr_interception" or sth. like that. Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb