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

[Xen-devel] [PATCH] vtd: avoid redundant context mapping

To: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>, "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] vtd: avoid redundant context mapping
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Tue, 30 Dec 2008 17:02:26 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc:
Delivery-date: Tue, 30 Dec 2008 01:02:59 -0800
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: AclqHdJXEecvnnr6Q+Ozl7bgkuAxJQALXwqQ
Thread-topic: [PATCH] vtd: avoid redundant context mapping
After changeset 18934 (VT-d: Fix PCI-X device assignment), my assigned PCI 
E1000 NIC doesn't work in guest.
The NIC is 03:00.0. Its parent bridge is: 00:1e.0.
In domain_context_mapping():
   case DEV_TYPE_PCI:
   After we domain_context_mapping_one() 03:00.0 and 00:1e.0, the 'secbus' is 3 
and 'bus' is 0,  so we domain_context_mapping_one() 03:00.0 again -- this 
redundant invocation returns -EINVAL because we have created the mapping but 
haven't changed pdev->domain from Dom0 to a new domain at this time and 
eventually the XEN_DOMCTL_assign_device hypercall returns a failure. 
The attached patch detects this case and avoids the redundant invocation.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>

Attachment: avoid_redundant_mapping.patch
Description: avoid_redundant_mapping.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] vtd: avoid redundant context mapping, Cui, Dexuan <=