xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Rahul Singh <Rahul.Singh@arm.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	"Bertrand Marquis" <Bertrand.Marquis@arm.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Ian Jackson" <iwj@xenproject.org>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v3 2/3] xen/pci: Refactor PCI MSI intercept related code
Date: Thu, 29 Apr 2021 11:31:15 +0000	[thread overview]
Message-ID: <636D798B-3635-4F3A-ABF0-ECA42695352B@arm.com> (raw)
In-Reply-To: <69e0f583-3c61-afe9-0710-6531f99e8a2e@suse.com>

Hi Jan,

> On 28 Apr 2021, at 3:06 pm, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 26.04.2021 18:21, Rahul Singh wrote:
>> --- a/xen/xsm/flask/hooks.c
>> +++ b/xen/xsm/flask/hooks.c
>> @@ -21,7 +21,7 @@
>> #include <xen/guest_access.h>
>> #include <xen/xenoprof.h>
>> #include <xen/iommu.h>
>> -#ifdef CONFIG_HAS_PCI
>> +#ifdef CONFIG_PCI_MSI_INTERCEPT
>> #include <asm/msi.h>
>> #endif
>> #include <public/xen.h>
>> @@ -114,7 +114,7 @@ static int get_irq_sid(int irq, u32 *sid, struct avc_audit_data *ad)
>>         }
>>         return security_irq_sid(irq, sid);
>>     }
>> -#ifdef CONFIG_HAS_PCI
>> +#ifdef CONFIG_PCI_MSI_INTERCEPT
>>     {
>>         struct irq_desc *desc = irq_to_desc(irq);
>>         if ( desc->msi_desc && desc->msi_desc->dev ) {
>> @@ -874,7 +874,7 @@ static int flask_map_domain_pirq (struct domain *d)
>> static int flask_map_domain_msi (struct domain *d, int irq, const void *data,
>>                                  u32 *sid, struct avc_audit_data *ad)
>> {
>> -#ifdef CONFIG_HAS_PCI
>> +#ifdef CONFIG_PCI_MSI_INTERCEPT
>>     const struct msi_info *msi = data;
>>     u32 machine_bdf = (msi->seg << 16) | (msi->bus << 8) | msi->devfn;
>> 
>> @@ -940,7 +940,7 @@ static int flask_unmap_domain_pirq (struct domain *d)
>> static int flask_unmap_domain_msi (struct domain *d, int irq, const void *data,
>>                                    u32 *sid, struct avc_audit_data *ad)
>> {
>> -#ifdef CONFIG_HAS_PCI
>> +#ifdef CONFIG_PCI_MSI_INTERCEPT
>>     const struct pci_dev *pdev = data;
>>     u32 machine_bdf = (pdev->seg << 16) | (pdev->bus << 8) | pdev->devfn;
>> 
> 
> Is all of this really related to MSI interception? Iirc the code here
> has been around for much longer, and hence is more related to MSI
> support in Xen in general (as required for PV guests in particular).

Yes I agree this code is not related to MSI interception but I decide to move the code 
under CONFIG_PCI_MSI_INTERCEPT flag to gate the code for ARM as to avoid an 
extra flag. We can modify this code once we have more data how MSI will be 
supported for other architecture.  

Regards,
Rahul
> 
> Jan



  reply	other threads:[~2021-04-29 11:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 16:21 [PATCH v3 0/3] xen/pci: Make PCI passthrough code non-x86 specific Rahul Singh
2021-04-26 16:21 ` [PATCH v3 1/3] xen/iommu: Move iommu_update_ire_from_msi(..) to xen/iommu.h Rahul Singh
2021-04-27 15:58   ` Jan Beulich
2021-04-26 16:21 ` [PATCH v3 2/3] xen/pci: Refactor PCI MSI intercept related code Rahul Singh
2021-04-28 10:42   ` Roger Pau Monné
2021-04-28 13:57     ` Jan Beulich
2021-04-29  8:27       ` Rahul Singh
2021-04-29  8:23     ` Rahul Singh
2021-04-28 14:06   ` Jan Beulich
2021-04-29 11:31     ` Rahul Singh [this message]
2021-04-29 11:47       ` Jan Beulich
2021-04-26 16:21 ` [PATCH v3 3/3] xen/pci: Refactor MSI code that implements MSI functionality within XEN Rahul Singh
2021-04-28 11:06   ` Roger Pau Monné
2021-04-28 14:11     ` Jan Beulich
2021-04-28 14:26     ` Julien Grall
2021-04-29 11:59     ` Rahul Singh

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=636D798B-3635-4F3A-ABF0-ECA42695352B@arm.com \
    --to=rahul.singh@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.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 NNTP newsgroup(s).