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 9404AC00140 for ; Thu, 18 Aug 2022 15:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344399AbiHRP7d (ORCPT ); Thu, 18 Aug 2022 11:59:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343598AbiHRP72 (ORCPT ); Thu, 18 Aug 2022 11:59:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 552145851A for ; Thu, 18 Aug 2022 08:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660838366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=s6slTsTy/Pyr3LUrFg5ZWWvb0V6yCPma3CmmqBIOSdY=; b=UdJsMMTAldvfaFvCpb85Gwl8SuROWrZFGfHqiNl5xT1QU0H1pWcbrcNdr1UUq4OKm16tVg zpOt8GrjdIjZoYrsgXp0FCWdUcziga8pIJqVgk9+t2bXRDgdJ4H+XqGLjVFwUKPfjRkxRR lZG1ntQTzAfLZbO8jZg/2FDhbSSh8Do= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-145-Vfsq65s3OUCQiQwi3j1tHg-1; Thu, 18 Aug 2022 11:59:25 -0400 X-MC-Unique: Vfsq65s3OUCQiQwi3j1tHg-1 Received: by mail-ed1-f71.google.com with SMTP id o2-20020a056402438200b0043d552deb2aso1198670edc.0 for ; Thu, 18 Aug 2022 08:59:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=s6slTsTy/Pyr3LUrFg5ZWWvb0V6yCPma3CmmqBIOSdY=; b=biF4uilW1JijNlmIsihj3vA5y6uXlfQT3kHtgkBZ0Z4CQzQL1zX3PPNhPfitgE8Exx hmBryalLvtVQKwaqggnKVOj0zpGmS4WdMUcV3+Bu/Q/1t78MfbFha77Cmog69AOX81E8 +jB/Xz5MdxrWkf11ki44rQ2VfJRETYC0W+G7nFQ6Msb6t7lp/278I9OpIuouxmL1ssLs iCnU9MMftKSHY4HeXT50pF8Yx6tZdW6G3nZogMXNWZNKDgTUgs1p2G4CAVj2dbbfGoyP d7S+0Qy4ogIqEJUfxBcNL7FAHrzUTcTy951BCWv5ZvVaJfwLQ2E4NyuCff+njI/HpfWv vQLA== X-Gm-Message-State: ACgBeo3EZqiTb3Sq1j2iZCX5McYGvKidNFCvMbq1fvhkrPhNxvrzSIr9 LeHORRFHuy+LwpByISznKaREqjSFfX5RhRnjfh3rwlF+NIzMzNds2mGTEH231huokCixeXFXPO6 CelBj0x92F6j7dDM4jHcfHkLu/rt+vRgY9zgX1VSzBjSVuGlOC2OepDnkyf1IFQuG3AV+RhLInG BD X-Received: by 2002:a17:907:16ab:b0:731:55c0:e7a1 with SMTP id hc43-20020a17090716ab00b0073155c0e7a1mr2262771ejc.154.1660838364250; Thu, 18 Aug 2022 08:59:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR43/Fekyuhe13hqCkeDMRAWKoBKaprssqUdg/IBU7sIkeVPGzkM+98pWaDy6eX29y9yAdIC3Q== X-Received: by 2002:a17:907:16ab:b0:731:55c0:e7a1 with SMTP id hc43-20020a17090716ab00b0073155c0e7a1mr2262742ejc.154.1660838363940; Thu, 18 Aug 2022 08:59:23 -0700 (PDT) Received: from fedora (nat-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id v2-20020a170906292200b0071cef6c53aesm1000562ejd.0.2022.08.18.08.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 08:59:23 -0700 (PDT) From: Vitaly Kuznetsov To: Sean Christopherson 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 In-Reply-To: References: <20220802160756.339464-1-vkuznets@redhat.com> <20220802160756.339464-2-vkuznets@redhat.com> <878rnltw7b.fsf@redhat.com> Date: Thu, 18 Aug 2022 17:59:22 +0200 Message-ID: <8735dttued.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sean Christopherson writes: > On Thu, Aug 18, 2022, Vitaly Kuznetsov wrote: >> Sean Christopherson writes: >> >> > 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. >> > >> >> First, this patch is kind of unrelated to the series so in case it's the >> only thing which blocks it from being merged -- let's just pull it out >> and discuss separately. > > Regarding the series, are there any true dependencies between the eVMCS patches > (1 - 11) and the VMCS sanitization rework (12 - 26)? I.e. can the VMCS rework > be queued ahead of the eVMCS v1 support? My memory is a bit blurry already but I think PATCH11 ("KVM: VMX: Get rid of eVMCS specific VMX controls sanitization") needs to go before PATCH24 ("KVM: nVMX: Use sanitized allowed-1 bits for VMX control MSRs") to have "bug compatibility" and resolve Jim's concern: guest visible VMX feature MSR values are not supposed to change. Currently, we filter out unsupported features from eVMCS for KVM itself but not for L1 as we expose raw host MSR values there. This is likely broken if L1 decides to *use* these features for real but that's another story. -- Vitaly