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

Re: [Xen-devel] [PATCH] x86-64: revert mmconfig part of c/s 24425:053a44894279


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Thu, 21 Jun 2012 17:26:48 +0100
  • Cc: dgdegra@xxxxxxxxxxxxx
  • Delivery-date: Thu, 21 Jun 2012 16:27:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac1PyqfASEgTtLCiOkSDK6NCflborg==
  • Thread-topic: [Xen-devel] [PATCH] x86-64: revert mmconfig part of c/s 24425:053a44894279

On 21/06/2012 16:29, "Jan Beulich" <JBeulich@xxxxxxxx> 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@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- 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@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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