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-changelog

[Xen-changelog] [xen-unstable] HVM device passthru: Correct PCI_EXP_DEVC

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] HVM device passthru: Correct PCI_EXP_DEVCTL_FLR
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Nov 2007 04:20:52 -0800
Delivery-date: Fri, 09 Nov 2007 04:37:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1194427276 0
# Node ID 11dcbf74edf23adc3baca6330408a1f85de8094d
# Parent  b544448502a40d510d3ee678c85e7db6b9f9474c
HVM device passthru: Correct PCI_EXP_DEVCTL_FLR

This patch corrects PCI_EXP_DEVCTL_FLR so that function level reset
will be really executed, and also replaces some magic numbers with
macros.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 tools/ioemu/hw/pass-through.c |   13 +++++++------
 tools/ioemu/hw/pass-through.h |    2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff -r b544448502a4 -r 11dcbf74edf2 tools/ioemu/hw/pass-through.c
--- a/tools/ioemu/hw/pass-through.c     Wed Nov 07 09:13:48 2007 +0000
+++ b/tools/ioemu/hw/pass-through.c     Wed Nov 07 09:21:16 2007 +0000
@@ -127,9 +127,10 @@ void pt_iomem_map(PCIDevice *d, int i, u
     if ( !first_map )
     {
         /* Remove old mapping */
-        ret = xc_domain_memory_mapping(xc_handle, domid, old_ebase >> 12,
-                assigned_device->bases[i].access.maddr >> 12,
-                (e_size+0xFFF) >> 12,
+        ret = xc_domain_memory_mapping(xc_handle, domid,
+                old_ebase >> PAGE_SHIFT,
+                assigned_device->bases[i].access.maddr >> PAGE_SHIFT,
+                (e_size+PAGE_MASK) >> PAGE_SHIFT,
                 DPCI_REMOVE_MAPPING);
         if ( ret != 0 )
         {
@@ -140,9 +141,9 @@ void pt_iomem_map(PCIDevice *d, int i, u
 
     /* Create new mapping */
     ret = xc_domain_memory_mapping(xc_handle, domid,
-            assigned_device->bases[i].e_physbase >> 12,
-            assigned_device->bases[i].access.maddr >> 12,
-            (e_size+0xFFF) >> 12,
+            assigned_device->bases[i].e_physbase >> PAGE_SHIFT,
+            assigned_device->bases[i].access.maddr >> PAGE_SHIFT,
+            (e_size+PAGE_MASK) >> PAGE_SHIFT,
             DPCI_ADD_MAPPING);
     if ( ret != 0 )
         PT_LOG("Error: create new mapping failed!\n");
diff -r b544448502a4 -r 11dcbf74edf2 tools/ioemu/hw/pass-through.h
--- a/tools/ioemu/hw/pass-through.h     Wed Nov 07 09:13:48 2007 +0000
+++ b/tools/ioemu/hw/pass-through.h     Wed Nov 07 09:21:16 2007 +0000
@@ -40,7 +40,7 @@
 /* Misc PCI constants that should be moved to a separate library :) */
 #define PCI_CONFIG_SIZE         (256)
 #define PCI_EXP_DEVCAP_FLR      (1 << 28)
-#define PCI_EXP_DEVCTL_FLR      (0x1b)
+#define PCI_EXP_DEVCTL_FLR      (1 << 15)
 #define PCI_BAR_ENTRIES         (6)
 
 struct pt_region {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] HVM device passthru: Correct PCI_EXP_DEVCTL_FLR, Xen patchbot-unstable <=