All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>, xen-devel <xen-devel@lists.xen.org>
Cc: dgdegra@tycho.nsa.gov
Subject: Re: [PATCH] x86-64: revert mmconfig part of c/s 24425:053a44894279
Date: Thu, 21 Jun 2012 17:26:48 +0100	[thread overview]
Message-ID: <CC0909D8.363BB%keir.xen@gmail.com> (raw)
In-Reply-To: <4FE359F6020000780008B299@nat28.tlf.novell.com>

On 21/06/2012 16:29, "Jan Beulich" <JBeulich@suse.com> wrote:

> These additions did not fulfill their purpose - they checked hypervisor
> config space accesses instead of guest (Dom0) ones.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

> --- a/xen/arch/x86/x86_64/mmconfig_64.c
> +++ b/xen/arch/x86/x86_64/mmconfig_64.c
> @@ -14,7 +14,6 @@
>  #include <xen/xmalloc.h>
>  #include <xen/pci.h>
>  #include <xen/pci_regs.h>
> -#include <xsm/xsm.h>
>  
>  #include "mmconfig.h"
>  
> @@ -59,7 +58,6 @@ int pci_mmcfg_read(unsigned int seg, uns
>                unsigned int devfn, int reg, int len, u32 *value)
>  {
>      char __iomem *addr;
> -    uint32_t mbdf;
>  
>      /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
>      if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) {
> @@ -67,12 +65,6 @@ err:        *value = -1;
>          return -EINVAL;
>      }
>  
> -    mbdf = (seg << 16) | (bus << 8) | devfn;
> -    if (xsm_pci_config_permission(current->domain, mbdf, reg, reg + len - 1,
> 0)) {
> -        *value = -1;
> -        return -EPERM;
> -    }
> -
>      addr = pci_dev_base(seg, bus, devfn);
>      if (!addr)
>          goto err;
> @@ -96,16 +88,11 @@ int pci_mmcfg_write(unsigned int seg, un
>                 unsigned int devfn, int reg, int len, u32 value)
>  {
>      char __iomem *addr;
> -    uint32_t mbdf;
>  
>      /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
>      if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
>          return -EINVAL;
>  
> -    mbdf = (seg << 16) | (bus << 8) | devfn;
> -    if (xsm_pci_config_permission(current->domain, mbdf, reg, reg + len - 1,
> 1))
> -        return -EPERM;
> -
>      addr = pci_dev_base(seg, bus, devfn);
>      if (!addr)
>          return -EINVAL;
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

      reply	other threads:[~2012-06-21 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 15:29 [PATCH] x86-64: revert mmconfig part of c/s 24425:053a44894279 Jan Beulich
2012-06-21 16:26 ` Keir Fraser [this message]

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=CC0909D8.363BB%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=xen-devel@lists.xen.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.