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 8C211C2BB41 for ; Thu, 18 Aug 2022 15:14:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245588AbiHRPOl (ORCPT ); Thu, 18 Aug 2022 11:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245734AbiHRPON (ORCPT ); Thu, 18 Aug 2022 11:14:13 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3626DDEC5 for ; Thu, 18 Aug 2022 08:14:13 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id t2-20020a17090a4e4200b001f21572f3a4so2166618pjl.0 for ; Thu, 18 Aug 2022 08:14:13 -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=OB3CiFphujl95/ikK08Kwi2ZSaKPWn5t2tIbw4ADKb4=; b=MoRQzBYpqTjN4SKXMnU8Gpx1idcrpgx7tNmrtPEoRwv2We84uBjuxrdmq8fgw3o6Jq rhWGHTd+9fKQxjtxeveD6pZd+iyRS6bsVNh3NuvDMRjorvfpT708Xs5M3rC1WhjUlbTG SuP+vhpZqN+vV1x/nANcanuXt1EETfPXXD8QeYskz11vu/2e4/xFVyWfqqAzh+HDAkIg 2aCW124CDujPgylRppn4HbcD/YFjsul+KxtgkFja1FWFeNemiUVQL11B/+0nbOKP2Q9t DqNH5df8HBSc1fxHbQIfUpAhmBQ9jJG4h0ZnSr5I+iCfyIwJK319NV71kuSwoG1/kY81 j8mw== 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=OB3CiFphujl95/ikK08Kwi2ZSaKPWn5t2tIbw4ADKb4=; b=jVBgClYPG2Ou3tgQM+1yEkBmia+MOok1xWutssolRGkhFC3FRAgKKa9HSwOXLuCoQZ 3ZVLHPuel+hrjb0GrTklzqL8IHiG5hTaOM5aevZa+QLqRHPa8lXB1nsMeiUT9XEH5APr X62F9+a6VRvDbuhgiImLubHXUn27y27SV6sN82sJyo/tS81xUGExRZmz1929AyjMZuCE IJ/sMjJtmpVLvRezSH4l9a+aPHw9vwtPE4jtKgQzWK9Jq5KHx6J9euDKWAIFar13EwtV JVSNO71q/7Bq3rZxLTLdfg0duPCMG577aKC7EtTQ/TDopBdyxGHrWb5zfX8/T2sb1vLj VWhg== X-Gm-Message-State: ACgBeo0Dg2N3dDJ6ZPKUd2GKy2dvHUUexg/7YDSGt4tnZ050K3nwh4qt DEfsh4G//P5nwrlq5B8RLdVWOGzUupG2YA== X-Google-Smtp-Source: AA6agR4VL90LrNjDhIEWa1qfqaZidElIQRHhTojkDkxNcgkza16BHoEv97dS7nqEJj1crC25CK3RMw== X-Received: by 2002:a17:90b:3849:b0:1f4:89bb:14dc with SMTP id nl9-20020a17090b384900b001f489bb14dcmr3665168pjb.144.1660835652623; Thu, 18 Aug 2022 08:14:12 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id y17-20020a17090322d100b00172938b2376sm1554793plg.74.2022.08.18.08.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 08:14:10 -0700 (PDT) Date: Thu, 18 Aug 2022 15:14:06 +0000 From: Sean Christopherson To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, Paolo Bonzini , Anirudh Rayabharam , Wanpeng Li , Jim Mattson , Maxim Levitsky , Nathan Chancellor , Michael Kelley , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 01/26] KVM: x86: hyper-v: Expose access to debug MSRs in the partition privilege flags Message-ID: References: <20220802160756.339464-1-vkuznets@redhat.com> <20220802160756.339464-2-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220802160756.339464-2-vkuznets@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 02, 2022, Vitaly Kuznetsov wrote: > For some features, Hyper-V spec defines two separate CPUID bits: one > listing whether the feature is supported or not and another one showing > whether guest partition was granted access to the feature ("partition > privilege mask"). 'Debug MSRs available' is one of such features. Add > the missing 'access' bit. > > Note: hv_check_msr_access() deliberately keeps checking > HV_FEATURE_DEBUG_MSRS_AVAILABLE bit instead of the new HV_ACCESS_DEBUG_MSRS > to not break existing VMMs (QEMU) which only expose one bit. Normally, VMMs > should set either both these bits or none. This is not the right approach long term. If KVM absolutely cannot unconditionally switch to checking HV_ACCESS_DEBUG_MSRS because it would break QEMU users, then we should add a quirk, but sweeping the whole thing under the rug is wrong.