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

Re: [RFC XEN PATCH v9 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 14 Jun 2024 03:11:43 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=sTjKdXIljRw0k4xLpeVRBGmFVG5YT/vjrzgp9ae5AcU=; b=USCUdpSkuE9ARXtWdM5ISAWIrkqSuhl2AkRsAoqzEm1PfE1F9QhmoIsm31h3GqVhrGy6w5+NzgLo5LqQ7AcUi8Cx2BL5O+7YfALPpkjX2h/dkqzteJeSsOBcnTjtfz1uKb4oPI4kuFBSQZzWtOEeBKMHqAzw6y4juGgBSrqzO7gtpjp7p2Yb/m7IeLjB7BvG23s4wJCW1ej68WJlJpAhL1YhFODxnC4yG1GA55qiPsZqiF66I8nWKEAT4TAR8VYoOJnaTJTBgSop2X6EYwr3H0eC7GE1s7LB6KM6X6Z1WrPASA/fP3LVC/1pZ6J+Likkc6t3J7aiwNwEtNRbEinM2A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W/1rwMcORubOtJ+ozlC44yE5MGAfmSm0qiK+J4EwXJeJ6RUukJ9QF2aYEhO/VReQ3KImmOJsTW2pi2Qdo1N9vHZnhIDHk5H1hGiZNeJISbXcRllCPEWa+UawXOCyP8kerL+QNVmR7h5is/lUV4wqjw97xc/AeGZVtYpvthl8Wus+7MXR0zNPRFJ85stjNGffFaAvxVs84d5HyjJWoGZ4e9a2Pyphe6Kxen9pfcIjlHXHoEy70hi+Kf0klFfHZclC+njAp5hZLrSWThh3bDOLfFMbtgZyw39bsz2+JxdVto4s0pDahyOAj9OC9z7skQnpXckdmtfilhdBVJN0CeyeZw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Hildebrand, Stewart" <Stewart.Hildebrand@xxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Delivery-date: Fri, 14 Jun 2024 03:12:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHauLJn3FT0TCW9KkmRq1iRWqwBt7HCqQ8AgAG9m4D//5AdgIAAiWiAgAEvHwCAAW0dgA==
  • Thread-topic: [RFC XEN PATCH v9 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi

On 2024/6/13 20:51, Anthony PERARD wrote:
> On Wed, Jun 12, 2024 at 10:55:14AM +0000, Chen, Jiqian wrote:
>> On 2024/6/12 18:34, Jan Beulich wrote:
>>> On 12.06.2024 12:12, Chen, Jiqian wrote:
>>>> On 2024/6/11 22:39, Jan Beulich wrote:
>>>>> On 07.06.2024 10:11, Jiqian Chen wrote:
>>>>>> +    r = xc_domain_gsi_permission(ctx->xch, domid, gsi, map);
>>>>>
>>>>> Looking at the hypervisor side, this will fail for PV Dom0. In which case 
>>>>> imo
>>>>> you better would avoid making the call in the first place.
>>>> Yes, for PV dom0, the errno is EOPNOTSUPP, then it will do below 
>>>> xc_domain_irq_permission.
>>>
>>> Hence why call xc_domain_gsi_permission() at all on a PV Dom0?
>> Is there a function to distinguish that current dom0 is PV or PVH dom0 in 
>> tools/libs?
> 
> That might have never been needed before, so probably not. There's
> libxl__domain_type() but if that works with dom0 it might return "HVM"
> for PVH dom0. So if xc_domain_getinfo_single() works and give the right
> info about dom0, libxl__domain_type() could be extended to deal with
> dom0 I guess. I don't know if there's a good way to find out which
> flavor of dom0 is running.
Thanks Anthony!
I think here we really need to check is that whether current domain has PIRQ 
flag(X86_EMU_USE_PIRQ) or not.
And it seems xc_domain_gsi_permission already return the information.
If current domain has no PIRQs, then I should use xc_domain_gsi_permission to 
grant permission, otherwise I should
keep the original function xc_domain_irq_permission.

> 
> Cheers,
> 

-- 
Best regards,
Jiqian Chen.

 


Rackspace

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