Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2494295rwb; Mon, 3 Oct 2022 01:16:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Y8uKWktNuShs3/GfZ4luPo+Im4tdLaabYEjIDMJbCKTe4cUr7JXt/Dza6jwRiHRLsUIMw X-Received: by 2002:a63:4626:0:b0:43b:383d:d1e with SMTP id t38-20020a634626000000b0043b383d0d1emr18160592pga.619.1664785003853; Mon, 03 Oct 2022 01:16:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664785003; cv=none; d=google.com; s=arc-20160816; b=BXsS7I1PF5kVgjE0uHW1ae/MyWKK37Ue8OpQFNlbmBabPM2F3VWbPfSgp1ictWoZPx KH72Kxe4n56/GiA19psmwUUjckc48dO3RRv8VUIr1am5L8lzTdoI6HS+k8r0EyLLqUEe gVFGYoloa1v0lMlvss/SMlnIza4+vFci9raT//s3hFHWVuc4ujrmyJ2bfrtXTXS3eMj9 AP52mTLVqSkAI22z4YbCYQaWns2vijVgNppdxRSdV3FfRho+Pd+xRIyxwfnLXE/FJMvG PlXAJHmhqDjqHdY8MnP224Z8E6Ej94ztwu0+bleFJQm/3sxMMClQ5Ly4v2ICh3EZorDV 09TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RTqme1khKt/PyEFI30kHRlUBuTE607QAku7PoWX9ID0=; b=Rk+ySTLXHLfr8Rn84cWpO9lbVReIhMWnwEfhMJF2DBg4j3ueQSFZaGRv6jVFH+Qgps FBT6Ja2WJprRLZPGa+lzr1TnCUAe1UNC33N4Nc/FbxQWGXYfD65gCvXRBMxIGK2d0weE T4NFNXpYhUy7PAa1CKaqGnjvaQ+6RLSfYMtUFdyO+leIlzYr2hjkzIjEZCws/tuggD17 FCu4NvEsh/30Fch6xqEwO36EERWzf3SZBrKU07cIHK0whyojBNJpOt6liWAPKHnWXfJa AMV8BMP0Lm3C/0oiErgeias/m6rxuLefgc0aDZE1WxrpPQf4l1/cDEusrOeXM5wnXMgc Flbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oPLs8XKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a63de05000000b0043c24cec6b4si9979394pgg.739.2022.10.03.01.16.32; Mon, 03 Oct 2022 01:16:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oPLs8XKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231391AbiJCHaY (ORCPT + 99 others); Mon, 3 Oct 2022 03:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbiJCH26 (ORCPT ); Mon, 3 Oct 2022 03:28:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDE01018; Mon, 3 Oct 2022 00:19:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 72313B80E95; Mon, 3 Oct 2022 07:19:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E10FBC433C1; Mon, 3 Oct 2022 07:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781575; bh=2BT/09rp4C8+jPg12InhUK6xH/uesRF7DABT2lfDI7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oPLs8XKM4ghCj14lUX1mYlotuIccE5ytTvSf6zauVzxqR/LRE4koZA22YeT6QFsSi d5WeknLjILIh+qLLWS3fAZXBtd3+2wsoA1+B95cDMRSIAoyis75xTYVIgFaQFjuDfS b54v/ZftiB6+V3YIO7p+ovkFZPOGLsWz9nKKZ/mE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jim Mattson , Paolo Bonzini , Sasha Levin Subject: [PATCH 5.15 70/83] KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest Date: Mon, 3 Oct 2022 09:11:35 +0200 Message-Id: <20221003070723.747928220@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jim Mattson [ Upstream commit aae2e72229cdb21f90df2dbe4244c977e5d3265b ] The only thing reported by CPUID.9 is the value of IA32_PLATFORM_DCA_CAP[31:0] in EAX. This MSR doesn't even exist in the guest, since CPUID.1:ECX.DCA[bit 18] is clear in the guest. Clear CPUID.9 in KVM_GET_SUPPORTED_CPUID. Fixes: 24c82e576b78 ("KVM: Sanitize cpuid") Signed-off-by: Jim Mattson Message-Id: <20220922231854.249383-1-jmattson@google.com> Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/cpuid.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index b17c9b00669e..d85a0808a446 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -718,8 +718,6 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) entry->edx = 0; } break; - case 9: - break; case 0xa: { /* Architectural Performance Monitoring */ struct x86_pmu_capability cap; union cpuid10_eax eax; -- 2.35.1