[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/4] x86/cpuid: Split dom0 handling out of init_domain_cpuid_policy()
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 16 Dec 2021 17:38:10 +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=o9fVBrIu8Eyy5mI7mHuVMZhP/7KqArnv20cCL6W0zP0=; b=T4zXE2DbRl6rr/V4CMGijAQy8sHAEFou6VsUE9db6zXSPK6IbFT5BDVs3i8XhwoKmns7tHAZKrsHZ7CEbA3sL9KqkwUGrnz1U9QAvTNWrGktRhvt1mnyDPq99tPqHy2/KW1XH+YBBTuzaOG2MW1t4d2e9NkUcin8FaAZ8nkHNZTy4cuY06/TooXD6f3u2EwZLBgVCgK97Pn+SfGxqoF9wHdH2LVsWb1EP1k5eisCRJUJR+HRFr+iDj3DDfyIGOe3l0rB+ePY8dYAhHGfoLJsSIrcNQUrbE2Icn3bqzyZ+bwD6G+RaZ//Q3RSE20lhGssLAlb9Qezu/i72mBiwcUxrg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B8FD3GVQ5MvkNb8CRhaNKAms8lWvAuci5gCtIe8wyXLwSQL6c8kRT+G8LJCjEveJY2Sgysz3eZcM2y/h8OEdexn29cqOks0MuXVeg7bJgeFXy/+1ny/Byu4TCMrY8gWQeBrA4pi9Z35KkVst6CkLWDXh0uYG59ggzKjH6KnydbXxm0bCrKpIKVnYdfwzR/Cr9XBnWYKvZmj7K+k0w4+sJGU4eKHo5WA/EK/T4PjtkGyzpK87FWmMyWT1hujmyffV40NktJpVJBUxLdOV1Zz7fmRikbP4Cz7XGxIiov/pqlLueVXvf6LdIaGi7W7qY7z/FkeGxloKxdemHwyVQqtt1Q==
- 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:38:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 15.12.2021 23:21, Andrew Cooper wrote:
> To implement dom0-cpuid= support, the special cases would need extending.
> However there is already a problem with late hwdom where the special cases
> override toolstack settings, which is unintended and poor behaviour.
>
> Introduce a new init_dom0_cpuid_policy() for the purpose, moving the ITSC and
> ARCH_CAPS logic. The is_hardware_domain() can be dropped, and for now there
> is no need to rerun recalculate_cpuid_policy(); this is a relatively expensive
> operation, and will become more-so over time.
Would you mind leaving it there in a commented out form, hinting at when
it may need re-enabling?
> Rearrange the logic in create_dom0() to make room for a call to
> init_dom0_cpuid_policy(). The AMX plans for having variable sized XSAVE
> states require that modifications to the policy happen before vCPUs are
> created.
>
> Additionally, factor out domid into a variable so we can be slightly more
> correct in the case of a failure, and also print the error from
> domain_create(). This will at least help distinguish -EINVAL from -ENOMEM.
>
> No practical change in behaviour.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Preferably with said comment added:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
|