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] Problem when doing direct_remap_area_pages() in a privileged

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Problem when doing direct_remap_area_pages() in a privileged user domain
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Fri, 15 Apr 2005 14:27:12 -0400
Delivery-date: Fri, 15 Apr 2005 18:27:07 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi!

  I have come accross a problem when trying to do a 
direct_remap_area_pages() call in a backend driver that is running in a 
privileged user domain. The call ends up with an error code (-14 = 
-EFAULT). This in turn is caused by the hypervisor call 
HYPERVISOR_mmu_update() which returns an error code of -22 = -EINVAL after 
failing in set_foreigndom due to not (!?!) being privileged. The same call 
returns no error if run in domain-0.
  However, I found the solution to fix this. I needed to make a fake(*) 
PCI device available to the privileged user domain by adding a line like 
pci=['00,07,00'] to the configuration file, because this would actually 
set the privileged flag for the domain in 
xen/common/physdev.c:physdev_pci_access_modify(). I wonder whether the 
setting of this flag should not be moved to some other place?

(*): fake, because I don't really need access to a PCI device in that 
domain

Regards,
   Stefan

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Problem when doing direct_remap_area_pages() in a privileged user domain, Stefan Berger <=