WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] pass-through: Fix I/O BAR mapping probblem

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] pass-through: Fix I/O BAR mapping probblem
From: "Zhao, Yu" <yu.zhao@xxxxxxxxx>
Date: Wed, 6 Aug 2008 17:25:41 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 06 Aug 2008 02:27:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acj3pieC2WU0v9QdSiGqwFyRCxBZTgAAAyYg
Thread-topic: [Xen-devel] [PATCH] pass-through: Fix I/O BAR mapping probblem
Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>

>-----Original Message-----
>From: Zhao, Yu
>Sent: Wednesday, August 06, 2008 5:24 PM
>To: Keir Fraser
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: [Xen-devel] [PATCH] pass-through: Fix I/O BAR mapping probblem
>
>Check BAR type indicator to avoid I/O BAR being mistaken as 64-bit memory BAR.
>
>hw/pass-through.c |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
>diff --git a/hw/pass-through.c b/hw/pass-through.c
>index 7b46234..6d5686f 100644
>--- a/hw/pass-through.c
>+++ b/hw/pass-through.c
>@@ -1511,7 +1511,9 @@ static int pt_bar_reg_parse(
>     /* check 64bit BAR */
>     index = pt_bar_offset_to_index(reg->offset);
>     if ((index > 0) && (index < PCI_ROM_SLOT) &&
>-        (d->config[bar_64] & PCI_BASE_ADDRESS_MEM_TYPE_64))
>+        ((d->config[bar_64] & (PCI_BASE_ADDRESS_SPACE |
>+                               PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
>+         (PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64)))
>     {
>         region = &ptdev->bases[index-1];
>         if (region->bar_flag != PT_BAR_FLAG_UPPER)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>