[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/3] xen: Expose the PMU to the guests


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 7 Oct 2021 10:34:23 +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=EzAwO/q8NGF/QYkQvZ2mKhY4CNs6AwIi9h56az5ci7A=; b=a9Mh1U2B7bjmv1Ef8h1oj6VaPcpmuRudI4O4O8yM0LC+0z4OrR41IwvbqUYct0CTarLfMJgxg+rq/m6hqI61MgSQS/BqV9EtBru1qV7f4706URn/YmqMr8h2HcbO1ptgOk5FWb0eSxHwgO6y2aUqPUmQh3nOAjAcBRf+IUhDrvHHsqYZwFbWo7/R5htCKu936hPhf975WInISd8p8+FWNPYdzZHWzbzKXQ2lX1EfUyqAmCaaeQ6Hnh75mi1YyN95huUXfODR+ACZ33egDmZz7NSri+JExHpbORaNkV1qe81ntZHACBVnPUyby4+uCbifHZDlcUWJB1OizH56QSpVyg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=heKOglbsjamSSuVueQkCtVWhFBXuAIUzuxZHbC2Vb2RE5J0ZCPRCdH8S9k98Tr1HD/6ziY4AcAw1uHXOju3nMj2gZtX7BOHh9eZeDgovPE7O3r4DSawvmL8QCn+SuBfjVgRjaIkDmvI93zXFhnytWqb+2YtYVHARTdc0JA+y+/ZNM6uOsHjbCFXSUfj1o9WJvkRFbMjQf0hOofo21prk62cy2GD/vg6IK9T+GCXXVlknvtxv7oLWl+jeK6vgb87++LIkq/669I4U7RGwP2y92Xn6tIvNj/0D5PfpVW7RFQ35//a7OmvlmBSxB+3ifkoIb2bOhYnNAmMjFCByy/AzgA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, bertrand.marquis@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 07 Oct 2021 08:34:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.10.2021 10:21, Michal Orzel wrote:
> Hi Jan,
> 
> On 07.10.2021 10:03, Jan Beulich wrote:
>> On 06.10.2021 12:58, Michal Orzel wrote:
>>> --- a/xen/arch/x86/domain.c
>>> +++ b/xen/arch/x86/domain.c
>>> @@ -692,6 +692,12 @@ int arch_sanitise_domain_config(struct 
>>> xen_domctl_createdomain *config)
>>>          return -EINVAL;
>>>      }
>>>  
>>> +    if ( config->flags & XEN_DOMCTL_CDF_vpmu )
>>> +    {
>>> +        dprintk(XENLOG_INFO, "vpmu support not ready yet\n");
>>> +        return -EINVAL;
>>> +    }
>>
>> I consider this message potentially misleading (as x86 does have vPMU
>> support, it merely doesn't get enabled this way). But isn't this redundant
>> with ...
>>
>>> @@ -534,6 +535,12 @@ static int sanitise_domain_config(struct 
>>> xen_domctl_createdomain *config)
>>>          return -EINVAL;
>>>      }
>>>  
>>> +    if ( vpmu && !vpmu_is_available )
>>> +    {
>>> +        dprintk(XENLOG_INFO, "vpmu requested but not available\n");
>>> +        return -EINVAL;
>>> +    }
>>
>> ... this? (This message is again potentially misleading.)
>>
> Ok. vpmu_is_available is false for x86 so the check in x86's 
> arch_sanitise_domain_config is redundant.
> I will fix it. When it comes to the message itself "vpmu requested but not 
> available".
> Does the following sound better for you?
> "vpmu requested but the platform does not support it"
> If not, can you please suggest a better message?

While it gets a little long then, appending "at domain creation time" would
disambiguate the text. Or maybe "vPMU cannot be enabled this way"? It's a
debug-only message after all, so its wording can quite well be developer-
focused imo.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.