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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Date: Tue, 18 Jun 2024 06:57:30 +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=5uEM2O6gE80Wmbd/IF65Tij8x9OmILiYI9NuqFdZjSo=; b=eXabIw9wqdAEy6yg4R0PilguvIwt8dsdvxzAg8L/CpB7vDm4YaJRT5IZ9E6+LapiugZGGpFRv5njbD245DiB0wkL9usY83PKRW5u1rgHGFe0hwXm37RHzxFV0ctnQIBtHRrbr3gYKe55h6MGOPlqDDkjgLFD8dSkeyHiuwS6ks2+FajktlpRaDl0yVXwPQ0EmrLGPsDt3OFyODNREfyRHUkNOS9e2nT+W5YyndhotRB06sHVlZgXePFEloNTLqo9CkHo6dqpSgc+38ZlHa1TgT4oz69JEkCjHAHuTQNphjeL1IynvXJuTu7iIbte5t8kHxs7Jm1/r+hWoMhTqIOkRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HTA25Hzd9l5Hx/6fi9sxYi5PEhiGWYMHqzL4HtUfvyCMKgdS1KMN+gPAZeaiUQYsZjenpIQDqOoGzNgcwKN517/hl+SW/8dr+yo1Ejp3VVXYIINlqpaw8TnNm29e+AmfvEC3jCrSsZyp/YJrTQlMRDZHrUpsw35RuZtu+d1K76ov7etBrpCd4wRKM5G6qITX4I1B1kMLHbY8VTpltQFNOtjEU3H3RCzdmvX0rPJJHylORsXf5ctjw1+ArI402RuZSGNzIsKe9QvbNoyStxgVrupgXaPWX0tivQe/fFhwgBYzXq3YInIPo2jMpep29QXPE2G4isGINwhPIhiXf43TRA==
  • 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>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Hildebrand, Stewart" <Stewart.Hildebrand@xxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Delivery-date: Tue, 18 Jun 2024 06:57:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHawJTljFn+TFlFw0Cz/HTewbBwKbHMCqyAgAGSNQA=
  • Thread-topic: [XEN PATCH v10 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0

On 2024/6/17 22:52, Jan Beulich wrote:
> On 17.06.2024 11:00, Jiqian Chen wrote:
>> The gsi of a passthrough device must be configured for it to be
>> able to be mapped into a hvm domU.
>> But When dom0 is PVH, the gsis don't get registered, it causes
>> the info of apic, pin and irq not be added into irq_2_pin list,
>> and the handler of irq_desc is not set, then when passthrough a
>> device, setting ioapic affinity and vector will fail.
>>
>> To fix above problem, on Linux kernel side, a new code will
>> need to call PHYSDEVOP_setup_gsi for passthrough devices to
>> register gsi when dom0 is PVH.
>>
>> So, add PHYSDEVOP_setup_gsi into hvm_physdev_op for above
>> purpose.
>>
>> Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
>> Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
>> Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
>> ---
>> The code link that will call this hypercall on linux kernel side is as 
>> follows:
>> https://lore.kernel.org/xen-devel/20240607075109.126277-3-Jiqian.Chen@xxxxxxx/
> 
> One of my v9 comments was addressed, thanks. Repeating the other, unaddressed
> one here:
> "As to GSIs not being registered: If that's not a problem for Dom0's own
>  operation, I think it'll also want/need explaining why what is sufficient for
>  Dom0 alone isn't sufficient when pass-through comes into play."
I have modified the commit message to describe why GSIs are not registered can 
cause passthrough not work, according to this v9 comment.
" it causes the info of apic, pin and irq not be added into irq_2_pin list, and 
the handler of irq_desc is not set, then when passthrough a device, setting 
ioapic affinity and vector will fail."
What description do you want me to add?

> 
> Jan
> 

-- 
Best regards,
Jiqian Chen.

 


Rackspace

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