[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] tools/libs: Apply MSR policy to a guest
- To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
- Date: Fri, 22 Jan 2021 13:35:32 -0500
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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-SenderADCheck; bh=vLdU/scUf64EG3RN5DB9R7P8AJSBv1b5W7fOfZb9PM4=; b=RS5FS2KxXcEB5XPPLesKWc8xvnQfthG7/CdA18TyTUWhsA2RrtHET1Lx5UFoEQSnzazP9oM8iVaVlAHWeKP0qfcXvZEUTIvDmdBdgTj3F1a16z63yTwWsmtLuFv0sAO9s1FHeTztNSE5obNKZ2EbwvICLpUsLPxpolqJwN+Y6O65a3NjnRqW9XrrvSaaTaC24fprXLt5DlzZzxUIGWXWY9Ux2KTu75hN3AOn5EgqXhH/l03gwIBkD5kFuK6F+2G86E0td1IGzfUx6X5jIzcpMIafM5/9HQK7yVyhVejhXDqMok+S5awmdv+XXV2KoSYMvb2vAr8tTTvJU0fE2eppIQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FVrdkkcXERVCKEPBZwFOF5S3VqYRknSoX+KyZJuRGBc3+mqFCZt7/zJ08M+gto8wnYQkOvrPtKaki86iW9Z+ZLnaXnUI6N6MWMgxTdp/N700ExJQ5NGqjz/4T0Q+jINyTX04MNSEzIS76Ff7IX75JNWW6soRmBPiqTstMAbbEYWm8Odvx0sWAqPWUIlzsOoqEkYRP28NBHH9dthScyzs+0jHV6UBzeWIEqSxys0r8DQEbajllYO/RcAFqBdv4EWE5wY4ojByH9pRA3H6q4z0zabCqnITUZWi2iC73EfulMPl8ZH+CtvOhZg0r+gSuROz/k9VUBg9Krl2rd9cY4zT9w==
- Authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=oracle.com;
- Cc: iwj@xxxxxxxxxxxxxx, wl@xxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, jun.nakajima@xxxxxxxxx, kevin.tian@xxxxxxxxx
- Delivery-date: Fri, 22 Jan 2021 18:35:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 1/22/21 4:56 AM, Julien Grall wrote:
> Hi Boris,
>
> On 20/01/2021 22:49, Boris Ostrovsky wrote:
>> diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c
>> index 19168572fd3e..1f2abf6679d7 100644
>> --- a/tools/libs/light/libxl_dom.c
>> +++ b/tools/libs/light/libxl_dom.c
>> @@ -383,9 +383,10 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
>> /* Construct a CPUID policy, but only for brand new domains. Domains
>> * being migrated-in/restored have CPUID handled during the
>> * static_data_done() callback. */
>> - if (!state->restore)
>> + if (!state->restore) {
>> libxl__cpuid_legacy(ctx, domid, false, info);
>> -
>> + libxl__msr_policy(ctx, domid, info);
>
> AFAICT, this is going to break compilation of the toolst on Arm because
> libxl__msr_policy().
Yes, it will ;-(
>
> However, I am a bit unsure whether we should define a stub for this on Arm.
> It feels to me it would be better to pass an extra boolean (restore) to
> libxl__arch_domain_create() and directly implement it there.
Yes. And move libxl__cpuid_legacy call there too then.
-boris
|