Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2777833yba; Mon, 22 Apr 2019 12:47:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrN9KiOXbTCZVpHgR3CnZzR3IWWHJSLhLvHftQNAR+PEnUo8TwsPxtdlQh01zpUHhTpdh6 X-Received: by 2002:a17:902:f24:: with SMTP id 33mr15677239ply.44.1555962443431; Mon, 22 Apr 2019 12:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555962443; cv=none; d=google.com; s=arc-20160816; b=VVQEIcRcAjkui2+7dVzfHaXzQJOGW4U1AjFIlmm4qelOQitw8r9d9Ka9v8/BFHxyFC FHcuWx86OEXu232+/cQpQy5I3EtOCHy0c2rYUiu5h9Yql72JSA3HdPX/wAfhngjgVI4r WRmFbX21WBR5qM/M0CRFsC2s7cpLBnQjp3acIosno8Ig7IvuBjZvWaAh7j7nGUF4Umwy 7V5S2/6eI/4jGUB5BjzF4PO5XSAyLJD4ydF9uo10fMofvbdbVXUFZrGmYHv/2sfGirXn MNvJW907/9zY0iQJuYTh/utWnDmqKArSxtS9HargEe2WWngbEePFQjiEc4bbAfVZ53BM i5iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FRBTwZ0maoTsUh7B5Urh9z7kfQz2cBzGbVwwXQmm5UA=; b=HQVUZjF+zkslFZV+wPGv0vJdJ8cTBAYol7Z1OQetqCb2l6ELQcvv4OKqdF4qkWSi8m 7WExrkDEa/ESC7YU4uLpGLCAcwOsPTBsR+h8q27nO5Xq7bzFhiFzTVIoKb1HeS5keBXr JEZzVv5MPA8Y1XL2+IogyxlR+2ugzx0TkZb7onAPzAJrqxwL6PcVPm3WwLdzcDvv/1bK xTwscvpJK36XYeWAlJF+EvKEj88UNsIfT+d3T1Gymm4dWfbc0It1GXYDZsc0HRtvj5jC ORGQ2SPTkc93dr2V0upoQ41zaMdLieSmDrDP1JlOW3Cm6SnicJdnvySeu+aEAkriCP4F eV+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qQVgjpPx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si12792556pgq.268.2019.04.22.12.47.07; Mon, 22 Apr 2019 12:47:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qQVgjpPx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729530AbfDVTog (ORCPT + 99 others); Mon, 22 Apr 2019 15:44:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:45800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729516AbfDVTof (ORCPT ); Mon, 22 Apr 2019 15:44:35 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61E62218B0; Mon, 22 Apr 2019 19:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962275; bh=Wlb29ro/DiaP2u5L+KTeA2jOByJ/ULlqQoqPNhGLjgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qQVgjpPxPyLiu4C3bfcwk6kB41FzX8mZI2Faw7QyngVi6uQMRY9Qt1FhlUhvW7OsI knIIcMkBhadFTFGoDoFG1xzC39iD/aKXqf/D4be2MbppAAqsz7UCL4vrjwSz69a8wS 5F9RrRGnMSjhdIqOKSYqne3v8fMBbZ/IMclxUthQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xiaoyao Li , Paolo Bonzini , Sasha Levin , kvm@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 81/98] kvm/x86: Move MSR_IA32_ARCH_CAPABILITIES to array emulated_msrs Date: Mon, 22 Apr 2019 15:41:48 -0400 Message-Id: <20190422194205.10404-81-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194205.10404-1-sashal@kernel.org> References: <20190422194205.10404-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiaoyao Li [ Upstream commit 2bdb76c015df7125783d8394d6339d181cb5bc30 ] Since MSR_IA32_ARCH_CAPABILITIES is emualted unconditionally even if host doesn't suppot it. We should move it to array emulated_msrs from arry msrs_to_save, to report to userspace that guest support this msr. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin (Microsoft) --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7ee802a92bc8..8748789b9540 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1125,7 +1125,7 @@ static u32 msrs_to_save[] = { #endif MSR_IA32_TSC, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA, MSR_IA32_FEATURE_CONTROL, MSR_IA32_BNDCFGS, MSR_TSC_AUX, - MSR_IA32_SPEC_CTRL, MSR_IA32_ARCH_CAPABILITIES, + MSR_IA32_SPEC_CTRL, MSR_IA32_RTIT_CTL, MSR_IA32_RTIT_STATUS, MSR_IA32_RTIT_CR3_MATCH, MSR_IA32_RTIT_OUTPUT_BASE, MSR_IA32_RTIT_OUTPUT_MASK, MSR_IA32_RTIT_ADDR0_A, MSR_IA32_RTIT_ADDR0_B, @@ -1158,6 +1158,7 @@ static u32 emulated_msrs[] = { MSR_IA32_TSC_ADJUST, MSR_IA32_TSCDEADLINE, + MSR_IA32_ARCH_CAPABILITIES, MSR_IA32_MISC_ENABLE, MSR_IA32_MCG_STATUS, MSR_IA32_MCG_CTL, -- 2.19.1