[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] x86/spec-ctrl: Remove opencoded MSR_ARCH_CAPS check
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 17 May 2023 16:47:05 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Diqu4DfQoU/0R08zs8A2/lkKlcPSB6xmZp8ddCjo/AA=; b=I1Qy/Vv2s5kbgJSXSHRAwNsfnQ/q8GacmdmMgwSO3oglo0cPbELvTJAWvmlJ1znqLyNbaOA7pRinyGVCTIUcxywlQsVaf4ytTeQzGfxvmP2eQisbjMaQC852ZpemFF//ioID0dQu8p+oM25iRITZYhBFZfzBbkl4JoSJCK8Ui8UUs4DcGcH9oYDaeoT4d2PPURAKKwAZZHcU07FygiJuPlYj36joL9dqQ23daNTaVwOkAhM7GuLMSxEQ001pjipykCU9gi7DeQUoVLHZTYHE2aXml/1WBXfq6cDI2NoFoPg6UZf33VbouXRsHqkVLgeCYjTfnCzG6tGS3nqal3EGxQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HEaoRrcKCdnOP7dvoaiBG6oK3cMrJTMb16XW2aK9U/OMn0vYl+87ufUrkcX8r2gd893JZBSiwt0fehE8nbYS29AD+ZJiMhvHfmqVJRi7MQ4Uz1eu8VyVvmJ1/ogwqaPiBPhySmXPdLO18IPKVECAejoeVb9Gp4HqjTwgJBCfl9FKuIf3lVSh+BH6H7/MNeHW1wl6FMMHhx3+dwDs3qa+AXUejRsp+MjYvWzrYaqvpysqihFiX7lFTAFCppFhpGtnO3htUAbc1jVzI1OTLDH9pCvfTs8DvgJoIcm1nrGF/HbZNvVuaGv0PIfO82i8KTAKl+l0HmQbZUuqQ3iRe770iA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 17 May 2023 14:47:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16.05.2023 16:53, Andrew Cooper wrote:
> @@ -401,6 +400,8 @@ static void __init print_details(enum ind_thunk thunk,
> uint64_t caps)
> cpuid_count(7, 2, &tmp, &tmp, &tmp, &_7d2);
> if ( boot_cpu_data.extended_cpuid_level >= 0x80000008 )
> cpuid(0x80000008, &tmp, &e8b, &tmp, &tmp);
> + if ( cpu_has_arch_caps )
> + rdmsrl(MSR_ARCH_CAPABILITIES, caps);
Why do you read the MSR again? I would have expected this to come out
of raw_cpu_policy now (and incrementally the CPUID pieces as well,
later on).
Apart from this, with all the uses further down gone, perhaps there's
not even a need for the raw value, if you used the bitfields in the
printk(). Which in turn raises the question whether the #define-s in
msr-index.h are of much use then anymore.
Jan
|