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] Mapping pci resources for graphics passthrough

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Mapping pci resources for graphics passthrough
From: Alexia Benington <alexbenington@xxxxxxxxx>
Date: Wed, 21 Jan 2009 19:29:28 -0500
Delivery-date: Wed, 21 Jan 2009 16:30:08 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=zN8wGgnseAJPdr6qDI6rnu6bMpIospKpvs9CDlxiZyc=; b=OmSuaz9IZ5y9Cer/ASOE44TLfJuEhZJ2EZ0rG5D7lVjD5DCeC13ukHuoyo1gKXjfab KC+Fo4ODf3LNz9CzIS5yyT530K42X2LG7/W1HYQxapsJ6OakSm9N+1cFuVGiNflui908 VcTa5fZVlqqUUPQllWDYpQP4IcxetsFHeNXAU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aX84JlaEB3/dcXFODqkmIvjBszveADOYAgq3RFVnH6RP36m5DbXUlzZgQruysFOBZS VS2IHtRSSB2WGTxTv4hMASDCXT7/CpFFzivwVAOmsj+xn/tYb3txJv0eR5E+O68jmmBD OirW6en5duL79o6z101HZbDmbHpoefZsa9jlY=
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 all,

I've been trying to understand the pci_setup function in hvmloader.c in Xen unstable. I'm kinda lost at Line 328.
base = (resource->base + bar_sz - 1) & ~(bar_sz - 1)

I'd appreciate if someone could explain to me why base is calculated this way. Specifically, I don't understand the bitwise AND with the one's complements of "bar_sz-1".

The reason why I'm doing this is that I'm hoping to modify hvmloader such that it can map the correct memory for a PCI-e video card. I've been able to passthrough the video card to a HVM guest. However, the OS (tried Linux, Vista or XP) is not able to load the driver correctly, although lspci (on Linux) does show that the video card has been passed through. I suspect it is because the video RAM and ROM has not been mapped as required, thus the video BIOS cannot be loaded. I would like to try out with only one guest first, just to see if it works and leaving out the complexities of multiplexing the graphics card with several guests. It is also fine if dom0 loses control of the graphics card. I can use serial.

Thanks and have a nice day!

Cheers,
Alex
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>