Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2491728rwb; Mon, 3 Oct 2022 01:13:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM722dNBWz5juw7USopR4qdsTZh3eYleOL8pYIBJiZ893vh7LNT2YbhlNp7R1hHcrp/bqEP3 X-Received: by 2002:a17:90b:4b11:b0:202:998b:71b1 with SMTP id lx17-20020a17090b4b1100b00202998b71b1mr11149938pjb.208.1664784812693; Mon, 03 Oct 2022 01:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664784812; cv=none; d=google.com; s=arc-20160816; b=wvVKfMFzkiIQXDAboOsQj4yLyZ8ziPuUTnLneoFCMoOUO3Fn1L/QUwJRiIR1HmK+/V c3oJi2wI4k5pibp2rbkem3SB/70HPOQXNiLKsoqmkveBo1XPsTKO4T6Syzk4VMXsqCtt WITww3S0cIA06d/LlTGoh/RF9MHAMLe3oOKi45OsC0oHca+r0z+2BPtVfee57W0/oNbG KhI4ykFp2mQadPM17e3o7w7yfY2Qb5gla/cPsOIbqLOF+5DtdHWyVb2xQfgJnV8AKPs3 OJh4Yj33r22eXhKmLSSXTn41RgFpVyB+zsq0I2xlRiPkk137DVxkDKh1GMj2Mtdv4Y2P u31Q== 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=zbaFuksXBNDzwZM4A701gLiX2EIoI9LUbO5HCycMoo8=; b=JGx1G0sHxjNL7YWUykw1QLSHZC34S3jEjWEHSFA97k7qTnQIVswvVVkv6lUU7Jkg/a Ar4+wPnvlp9s5h/upFbiWMOzU3Q6EaqWDM1m61WvzGeIIDtVDtNBXKugADLV4Vfw9OGo krZx9ASk0pJ4kWVzV4dX59se4CxV5qYT0Vo9NKPoXyVjyft2a2Oabaq5ck/oj/O1PLzl si/ItW2ZnkSwZcUccL+Z2IZUJW8s96zHn8upw1MRhUnYLufAz2tXYfwj3j5mxKwGx2F2 zL9APVhZDgxydO7nJ4HT/NvYOocS7VXbkyDDdXkWMY+1S1KzeTG3TrMp2xvtZmoFRjsm nzKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LMCJoQCF; 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 17-20020a631051000000b004085af5007bsi2437818pgq.428.2022.10.03.01.13.20; Mon, 03 Oct 2022 01:13:32 -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=LMCJoQCF; 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 S231824AbiJCHiF (ORCPT + 99 others); Mon, 3 Oct 2022 03:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbiJCHgT (ORCPT ); Mon, 3 Oct 2022 03:36:19 -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 370B752FEB; Mon, 3 Oct 2022 00:22:41 -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 B4B97B80E68; Mon, 3 Oct 2022 07:22:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EEB5C433C1; Mon, 3 Oct 2022 07:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781752; bh=zx0lIhTTWkTHbaqVJgfXdGCdmWiTPo43a/7iEi0fMXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LMCJoQCF9QnW13YdZ87x4SLvzlaZualjQtIN1KpPPuEzxVQcsgTbNd2wKOjwBs39n zJ4bbXcf7+pr20yT8JkyMgpF8att/NzSJYW/req6wsBP6bTRryBH0LnwzYZjQPdJwy Ym9SR2ZPqZPLj40qzWRUR3Ow4v87DVc4xDMv18do= 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.10 50/52] KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest Date: Mon, 3 Oct 2022 09:11:57 +0200 Message-Id: <20221003070720.210734354@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070718.687440096@linuxfoundation.org> References: <20221003070718.687440096@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 6e1ea5e85e59..6f44274aa949 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -661,8 +661,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