[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/4] x86/cpuid: Introduce dom0-cpuid command line option
- To: Andrew Cooper <amc96@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 16 Dec 2021 17:46:59 +0100
- 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=YGpcZsPmfXm7FS1GQnBbqGFm0AnbIrTeSIAIwCWe9R0=; b=fTpp3cjfvc/ttDe78wghCuz/vutErA3Sw08I+dLFqn5xEWUoeHte0UqZl3RCodNN5vaGqiZRCDCTE2IEt0GV8cWfg+QuSgbhO9yJJvwRh7jB4zwsI6xL0loTCTffOhLG3iOE9UF9mvvkeDpI6nepe6mAwKQeAZSo5eQOmtea3jak15vj1PphrQ9wRcNhQSbR5jfnBaY9cLogbOg3/ehJB1jvMat/Ma+WCPSxRVJXwoT+kQgucUJnWDYOHV4iU86RHtfAyF1ZxB5+RrK6Z8BHc+/jIHlnr4zLyrRwg40b0kT0o0ogoMIRCLLLiORPZEAJEFu5wPNX8hItkWqeNWqXBw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ImaCDlMh3m7Ma2W/QKo9chBl8TbLMnk4aWrS5H2oVzIhRMPN9B5D7Sr5FJ7jZrh7NoZpC0Ych7wgPgFZ5ZIF3/+BfLO71RXxxcE4DAWzBeQ91/Vqwbnyw6fdkt4D4/UAI9uAwtPUMY+DRbOJwkbF5XxPsG7IergnzQmJA81SZLHTgly1aTWq26BKOJQkAE5VFfthaQOaahF0syrbO/+AEBbVrzC9oE05KFXIstwTAJi1VtsaNksRj9bO1UuLMfJEat6enBgMKNFMcmY+1crroSikuf02rA9vXnC7bHfo5kR6CzyubUOxbG/uwdhz5pmAjJTTe5lMWwEDUofLmgXLzg==
- 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: Thu, 16 Dec 2021 16:47:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16.12.2021 12:56, Andrew Cooper wrote:
> On 15/12/2021 22:21, Andrew Cooper wrote:
>> diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
>> index e11f5a3c9a6b..83a80ba6de70 100644
>> --- a/xen/arch/x86/cpuid.c
>> +++ b/xen/arch/x86/cpuid.c
>> @@ -116,6 +116,23 @@ static int __init parse_xen_cpuid(const char *s)
>> }
>> custom_param("cpuid", parse_xen_cpuid);
>>
>> +static bool __initdata dom0_cpuid_cmdline;
>> +static uint32_t __initdata dom0_enable_feat[FSCAPINTS];
>> +static uint32_t __initdata dom0_disable_feat[FSCAPINTS];
>> +
>> +static void __init _parse_dom0_cpuid(unsigned int feat, bool val)
>> +{
>> + __set_bit(feat, val ? dom0_enable_feat : dom0_disable_feat);
>
> Based on Jan's observation in v1, I've folded this delta in:
>
> diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
> index 83a80ba6de70..39baeae9a6cd 100644
> --- a/xen/arch/x86/cpuid.c
> +++ b/xen/arch/x86/cpuid.c
> @@ -122,7 +122,8 @@ static uint32_t __initdata dom0_disable_feat[FSCAPINTS];
>
> static void __init _parse_dom0_cpuid(unsigned int feat, bool val)
> {
> - __set_bit(feat, val ? dom0_enable_feat : dom0_disable_feat);
> + __set_bit (feat, val ? dom0_enable_feat : dom0_disable_feat);
> + __clear_bit(feat, val ? dom0_disable_feat : dom0_enable_feat );
> }
FAOD my R-b applies with this included; I had meant to reply here
but then replied to the original patch.
Jan
|