From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5871EC00140 for ; Tue, 2 Aug 2022 16:28:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237680AbiHBQ22 (ORCPT ); Tue, 2 Aug 2022 12:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbiHBQ2U (ORCPT ); Tue, 2 Aug 2022 12:28:20 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0684C37F80 for ; Tue, 2 Aug 2022 09:28:19 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id y141so14034244pfb.7 for ; Tue, 02 Aug 2022 09:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=m5JXOmTfBKNUXaoyaUbMC0qVBYGlHYto5nPX9Patf5M=; b=N3NHL+iPO2a8XKIjeTt0N8pPFLwVwZlbHqWt5VKUt27XsormudLJOb4NQoxPULnpGV S3Hfe5bmahuKbxOHGW5KmgZyIjQwUDkx2n913wEB3xVzIuCxS3z9twvBoYubojbCC7b9 8dCkyh6jv3mhM4rYqRiQqahOfZaz/cgGCgetM9RwgLfjLbkNA+oOH/WAIY23L0HCjPak OxdK4wAsJHtwld6FCG4S2cb7+/hLvQg4ir+i/dVHOURKO1YpU0gnEKeQw1Ldbn49/WMo 00otGN7UcAsKISwh5gABrijybH0x+OOo0hmeyLRYZGRUzYUbkLdkm2W8e5/LJexmfZNk aD9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=m5JXOmTfBKNUXaoyaUbMC0qVBYGlHYto5nPX9Patf5M=; b=iX96hgM7KXRA+TXukIOtg9OijJ/KE6muD0Fner5MUF6lxfYLrj+5Bl2Rl08CY9L2O+ hCZyu+ZqbPHzDI+h2Mpgj9ppqeJe0cfiSY0AULunKeU/28atNZPf4n+sHthPWDToT/fd cgVZSRgBXxPFxbDACEWfRGb10V2EfXtKVQedy/j9qIqcHvsuVthosnw3/1uwns9Uc3xF 8GVsspuXa1vMBrmf2EM476yrKLr7ONzijPh9oK7+726b9pjohl8wJwLvplhqNtqey3Hw FsUK/Bjo6flznFakSfccVty+QM0R8K9edF/GT8499TQk3LEDsFg24jNxDNDhk33ma3l9 BXOw== X-Gm-Message-State: AJIora+yHLJy2h+0uP38mkeK8D6PA8L/fpnq2cZk6ul/nUCp+J06mxeJ G8ExpzT+rMKOfalKDDciNpBH9A== X-Google-Smtp-Source: AA6agR4MVlTUXHxYv42qQK7I867lJYSH5V8kCMUvlZJOb5W6zuqliBqtjyG++1chXju46MQoWV9twg== X-Received: by 2002:a05:6a00:cd5:b0:52b:1744:af86 with SMTP id b21-20020a056a000cd500b0052b1744af86mr21392255pfv.19.1659457698396; Tue, 02 Aug 2022 09:28:18 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id z16-20020a170902ccd000b0016c4e4538c9sm12033114ple.7.2022.08.02.09.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 09:28:18 -0700 (PDT) Date: Tue, 2 Aug 2022 16:28:14 +0000 From: Sean Christopherson To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, Paolo Bonzini , Anirudh Rayabharam , Wanpeng Li , Jim Mattson , Maxim Levitsky , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 24/25] KVM: VMX: Cache MSR_IA32_VMX_MISC in vmcs_config Message-ID: References: <20220714091327.1085353-1-vkuznets@redhat.com> <20220714091327.1085353-25-vkuznets@redhat.com> <87fsie1v8q.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fsie1v8q.fsf@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 02, 2022, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > On Thu, Jul 14, 2022, Vitaly Kuznetsov wrote: > >> @@ -2613,6 +2614,8 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf, > >> if (((vmx_msr_high >> 18) & 15) != 6) > >> return -EIO; > >> > >> + rdmsrl(MSR_IA32_VMX_MISC, misc_msr); > > > > Might make sense to sanitize fields that KVM doesn't use and that are not exposed > > to L1. Not sure it's worthwhile though as many of the bits fall into a grey area, > > e.g. all the SMM stuff isn't technically used by KVM, but that's largely because > > much of it just isn't relevant to virtualization. > > > > I'm totally ok leaving it as-is, though maybe name it "unsanitized_misc" or so > > to make that obvious? > > I couldn't convince myself to add 'unsanitized_' prefix as I don't think > it significantly reduces possible confusion (the quiestion would be > 'sanitized for what and in which way?') so a need for 'git grep' seems > imminent anyway. Yeah, no objection to leaving it alone. VMX_MISC is such an oddball MSR that it practically comes with disclaimers anyways :-)