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] Resetting a PCI device's BAR registers in HVM guest

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Resetting a PCI device's BAR registers in HVM guest
From: Dan Gora <dan.gora@xxxxxxxxx>
Date: Mon, 8 Feb 2010 22:07:06 -0200
Delivery-date: Mon, 08 Feb 2010 16:07:45 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=13T6oH+3NBBZa97ev9vwl2ri5NNBmZf4Kj2MtKANpv4=; b=rLxqQs8PD8MuIc6D0DlORgiFGlFVgjLubrfR4O1geKpNgWCpNOal5sDucZUxXBNqHW uKmsPwFX3WeAELxGnS0qDyVqOHCpmSd2sgy5+nw+arjZZ8Ta9lUSAxjLOFAc66Mt9aFk aQQFEw5onEaL/XGeKM3NuY3nRqI7lPbb3fwcc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=cXtLuQkHxT0BFrYuZJAgEuMM4kr2pTAtHt6K33Wbkvj49GRhWFUeANQ9LhrXdWNrS+ VuznR4ZXeACk22CyfIDiFRVX3P8B1YRIEaWNJ85ABuTCjS7cjCdGE6dSIJ/D3bPvaUAc MuDDJb78oSSRgtWhrAZhxu6EZQZ8H7qPEaB20=
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
Hi,

I have a technical question that I thought would probably be better
here than in xen-users.  Excuse me if I'm wrong...

I'm have a driver for a PCI card of ours which when reset will clear
the card's BAR registers (along with the rest of of the PCI
configuration space).  We need to be able to reset the board while the
machine is running when the driver is being loaded or being unloaded
or we need to update the board level software.  What we typically do
is to suck the BAR registers (and the rest of config space) out of PCI
configuration space in the driver attach routine, then whenever we
reset the board we just dump the same values back in.  As you might
have guessed by now, the problem with running on a HVM guest is that
the BAR registers that are exposed to the guest are not the same as
the ones actually _in_ the hardware (these we can see from the dom0,
but not the domU), so the question is "how can I get access to the
_real_ BAR registers, so that I can get the proper values (the ones
seen from dom0) and put them back"?  pci_read_config_XX just reads the
domU versions.  Is there a xen hypercall for this?  Will the
hypervisor not only trap the reads to config space, but the writes
back as well?

thanks in advance for any info..
dan

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

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