Linux-ACPI Archive mirror
 help / color / mirror / Atom feed
From: "Chen, Jiqian" <Jiqian.Chen@amd.com>
To: "Jürgen Groß" <jgross@suse.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"Huang, Ray" <Ray.Huang@amd.com>,
	"Chen, Jiqian" <Jiqian.Chen@amd.com>
Subject: Re: [RFC KERNEL PATCH v6 3/3] xen/privcmd: Add new syscall to get gsi from irq
Date: Sat, 11 May 2024 02:16:07 +0000	[thread overview]
Message-ID: <BL1PR12MB5849B13B1BC7EAFA6207C57DE7E02@BL1PR12MB5849.namprd12.prod.outlook.com> (raw)
In-Reply-To: <0aac68ac-cf40-4c3d-ac02-95b9a37aaa11@suse.com>

On 2024/5/10 19:27, Jürgen Groß wrote:
> On 10.05.24 12:32, Chen, Jiqian wrote:
>> On 2024/5/10 18:21, Jürgen Groß wrote:
>>> On 10.05.24 12:13, Chen, Jiqian wrote:
>>>> On 2024/5/10 17:53, Jürgen Groß wrote:
>>>>> On 10.05.24 11:06, Chen, Jiqian wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On 2024/5/10 14:46, Jürgen Groß wrote:
>>>>>>> On 19.04.24 05:36, Jiqian Chen wrote:
>>>>>>>> +
>>>>>>>> +    info->type = IRQT_PIRQ;
>>>>>> I am considering whether I need to use a new type(like IRQT_GSI) here to distinguish with IRQT_PIRQ, because function restore_pirqs will process all IRQT_PIRQ.
>>>>>
>>>>> restore_pirqs() already considers gsi == 0 to be not GSI related. Isn't this
>>>>> enough?
>>>> No, it is not enough.
>>>> xen_pvh_add_gsi_irq_map adds the mapping of gsi and irq, but the value of gsi is not 0,
>>>> once restore_pirqs is called, it will do PHYSDEVOP_map_pirq for that gsi, but in pvh dom0, we shouldn't do PHYSDEVOP_map_pirq.
>>>
>>> Okay, then add a new flag to info->u.pirq.flags for that purpose?
>> I feel like adding "new flag to info->u.pirq.flags" is not as good as adding " new type to info->type".
>> Because in restore_pirqs, it considers " info->type != IRQT_PIRQ", if adding " new flag to info->u.pirq.flags", we need to add a new condition in restore_pirqs.
>> And actually this mapping(gsi and irq of pvh) doesn't have pirq, so it is not suitable to add to u.pirq.flags.
> 
> Does this mean there is no other IRQT_PIRQ related activity relevant for those GSIs/IRQs?
Yes, I think so.
> In that case I agree to add IRQT_GSI.
Thank you!
> 
> 
> Juergen

-- 
Best regards,
Jiqian Chen.

  reply	other threads:[~2024-05-11  2:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19  3:36 [RFC KERNEL PATCH v6 0/3] Support device passthrough when dom0 is PVH on Xen Jiqian Chen
2024-04-19  3:36 ` [KERNEL PATCH v6 1/3] xen/pci: Add xen_reset_device_state function Jiqian Chen
2024-04-19  3:36 ` [RFC KERNEL PATCH v6 2/3] xen/pvh: Setup gsi for passthrough device Jiqian Chen
2024-05-10  7:48   ` Juergen Gross
2024-05-10  8:42     ` Chen, Jiqian
2024-04-19  3:36 ` [RFC KERNEL PATCH v6 3/3] xen/privcmd: Add new syscall to get gsi from irq Jiqian Chen
2024-05-10  6:46   ` Jürgen Groß
2024-05-10  9:06     ` Chen, Jiqian
2024-05-10  9:53       ` Jürgen Groß
2024-05-10 10:13         ` Chen, Jiqian
2024-05-10 10:21           ` Jürgen Groß
2024-05-10 10:32             ` Chen, Jiqian
2024-05-10 11:27               ` Jürgen Groß
2024-05-11  2:16                 ` Chen, Jiqian [this message]
2024-05-13  7:47       ` Chen, Jiqian
2024-05-13  7:59         ` Jürgen Groß

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BL1PR12MB5849B13B1BC7EAFA6207C57DE7E02@BL1PR12MB5849.namprd12.prod.outlook.com \
    --to=jiqian.chen@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=bhelgaas@google.com \
    --cc=jgross@suse.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).