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

Re: [RFC XEN PATCH v5 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Date: Mon, 26 Feb 2024 06:04:01 +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=Q1uDBRPAeRQ7Hl1rBOx0+UzHvS6fO69g6G8GdJbVNWs=; b=AKdHyI0S7zVpyYRt6KO4IyKo/MG93CUrarU1IIH0iLOig/gXxEAn/CWtY7oDcqRcCa73XL9E/SwscKhi9cX5eb1zRwIdBDBnhVyi+pyLAkOnrMWYIF1Z/RM+bbubydrChI1yuz4aaBqzsvPm0FGJ4BCMc398g0ekr4Rsd+dutfzEyFUiDxunKHLClxOOvNrSVYqS96DXaru9OUE5wlvNJyt/L5dt089QNoEvIkpNb2a1GLuF1/lpn7zgXS6r1YsWMeE/eN5adGOBQifbyKyZ8Kn33BAcSvG0WUTzXigAyVdFXcnwcrGBSODKIqmrqppjuXywBk53bh+eJR8TZMVYkg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bBSrLIHo3R5UUwBkElMiUPVv1elX2nl8ALqF/lt1EZFEIEmAV6qRo/pbkUh/I+y7kiUlk1lzZK++XA/Oa/4QZEw1YihC/I4g7Vb03XhhJx8aveTPp8FI1Mlnq01reasF8TdlbcQ/LxY/8SDD8gn74j72tyS9rQcTSewxlC/RJNwH/Bd1wjsSZ9XJ7/w5La7GPSG2ZM9H9BFwdRpkHPPiPRS5VAaGsBQlQ1Do4NSyLASGr37AOrBop8eLIDiWTkkQbCjxGGL876tpe7xHXOUwUFsNj2aP2n3D7Z9w2TEBbGTlssSkVUe/Frv69bnMYafttnHxRj4gnAiS+AyxxLLpiA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Hildebrand, Stewart" <Stewart.Hildebrand@xxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Delivery-date: Mon, 26 Feb 2024 06:04:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHaRR62LJvUheASc0e0D+dOwe/lNLEXWJqAgAWWDwA=
  • Thread-topic: [RFC XEN PATCH v5 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0

On 2024/2/23 08:44, Stefano Stabellini wrote:
> On Fri, 12 Jan 2024, Jiqian Chen wrote:
>> On PVH dom0, the gsis don't get registered, but
>> the gsi of a passthrough device must be configured for it to
>> be able to be mapped into a hvm domU.
>> On Linux kernel side, it calles PHYSDEVOP_setup_gsi for
>> passthrough devices to register gsi when dom0 is PVH.
>> So, add PHYSDEVOP_setup_gsi for above purpose.
>>
>> Co-developed-by: Huang Rui <ray.huang@xxxxxxx>
>> Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
>> ---
>>  xen/arch/x86/hvm/hypercall.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
>> index 493998b42ec5..46f51ee459f6 100644
>> --- a/xen/arch/x86/hvm/hypercall.c
>> +++ b/xen/arch/x86/hvm/hypercall.c
>> @@ -76,6 +76,12 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
>> arg)
>>      case PHYSDEVOP_unmap_pirq:
>>          break;
>>  
>> +    case PHYSDEVOP_setup_gsi:
>> +        if ( !is_hardware_domain(currd) )
>> +            return -EOPNOTSUPP;
>> +        ASSERT(!has_pirq(currd));
> 
> Do we really need this assert? I understand that the use case right now
> is for !has_pirq(currd) but in general it doesn't seem to me that
> PHYSDEVOP_setup_gsi and !has_pirq should be tied together.
Make sense, thanks for explanation, I will delete this in next version.

> 
> Aside from that, it looks fine.
> 
> 
>> +        break;
>> +
>>      case PHYSDEVOP_eoi:
>>      case PHYSDEVOP_irq_status_query:
>>      case PHYSDEVOP_get_free_pirq:
>> -- 
>> 2.34.1
>>

-- 
Best regards,
Jiqian Chen.

 


Rackspace

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