All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Rahul Singh <rahul.singh@arm.com>
Cc: xen-devel@lists.xenproject.org, bertrand.marquis@arm.com,
	 Jan Beulich <jbeulich@suse.com>, Paul Durrant <paul@xen.org>
Subject: Re: [PATCH v4 2/3] xen/pci: solve compilation error on ARM with HAS_PCI enabled.
Date: Wed, 25 Nov 2020 13:22:41 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2011251320300.7979@sstabellini-ThinkPad-T480s> (raw)
In-Reply-To: <2ce402cfae6d90433626bcdc6314e5ee5dda103f.1606326929.git.rahul.singh@arm.com>

On Wed, 25 Nov 2020, Rahul Singh wrote:
> If mem-sharing, mem-paging, or log-dirty functionality is not enabled
> for architecture when HAS_PCI is enabled, the compiler will throw an
> error.
> 
> Move code to x86 specific file to fix compilation error.
> 
> Also, modify the code to use likely() in place of unlikley() for each
> condition to make code more optimized.
> 
> No functional change intended.
> 
> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> ---
> 
> Changes in v4:
> - fixed minor comments
> 
> ---
>  xen/drivers/passthrough/pci.c       |  8 +-------
>  xen/drivers/passthrough/x86/iommu.c | 13 +++++++++++++
>  xen/include/xen/iommu.h             |  2 ++
>  3 files changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index 3c6ab1bcb6..4c21655b7d 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -20,7 +20,6 @@
>  #include <xen/iommu.h>
>  #include <xen/irq.h>
>  #include <xen/param.h>
> -#include <xen/vm_event.h>
>  #include <xen/delay.h>
>  #include <xen/keyhandler.h>
>  #include <xen/event.h>
> @@ -1418,12 +1417,7 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn, u32 flag)
>      if ( !is_iommu_enabled(d) )
>          return 0;
>  
> -    /* Prevent device assign if mem paging or mem sharing have been 
> -     * enabled for this domain */
> -    if ( d != dom_io &&
> -         unlikely(mem_sharing_enabled(d) ||
> -                  vm_event_check_ring(d->vm_event_paging) ||
> -                  p2m_get_hostp2m(d)->global_logdirty) )
> +    if( !arch_iommu_use_permitted(d) )

code style:

  if ( !arch_iommu_use_permitted(d) )


  reply	other threads:[~2020-11-25 21:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 18:16 [PATCH v4 0/3] xen/arm: Make PCI passthrough code non-x86 specific Rahul Singh
2020-11-25 18:16 ` [PATCH v4 1/3] xen/pci: Move x86 specific code to x86 directory Rahul Singh
2020-11-25 21:16   ` Stefano Stabellini
2020-11-26  9:04   ` Bertrand Marquis
2020-11-27 13:34   ` Jan Beulich
2020-11-25 18:16 ` [PATCH v4 2/3] xen/pci: solve compilation error on ARM with HAS_PCI enabled Rahul Singh
2020-11-25 21:22   ` Stefano Stabellini [this message]
2020-11-26  9:05   ` Bertrand Marquis
2020-11-27 13:47     ` Jan Beulich
2020-11-25 18:16 ` [PATCH v4 3/3] ns16550: Gate all PCI code with CONFIG_X86 Rahul Singh
2020-11-25 18:21   ` Rahul Singh
2020-11-26  9:08     ` Bertrand Marquis
2020-11-25 21:28   ` Stefano Stabellini
2020-11-27 13:58   ` Jan Beulich
2020-11-27 14:16     ` Bertrand Marquis
2020-11-30 21:24       ` Stefano Stabellini
2020-11-27 14:25     ` Rahul Singh
2020-11-27 20:04 ` [PATCH v4 0/3] xen/arm: Make PCI passthrough code non-x86 specific Andrew Cooper
2020-11-27 20:09   ` Andrew Cooper

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=alpine.DEB.2.21.2011251320300.7979@sstabellini-ThinkPad-T480s \
    --to=sstabellini@kernel.org \
    --cc=bertrand.marquis@arm.com \
    --cc=jbeulich@suse.com \
    --cc=paul@xen.org \
    --cc=rahul.singh@arm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.