[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Xen with VGA Passthrough on desktop Ubuntu system



Upon further inspection it just may be possible!  I was successfully able to load and unload the radeon module after unbinding it from the PCI device.  I was also successful at binding the PCI device (AMD Radeon 6550 integrated in AMD A8-3870K APU) with pciback.  I still have a problem.

sudo -s
stop lightdm
cd /sys/bus/pci/drivers/radeon
echo 0000:00:01.0 > unbind
rmmod radeon
modprobe xen-pciback
cd /sys/bus/pci/drivers/pciback
echo 0000:00:01.0 > new_slot
echo 0000:00:01.0 > bind

Now to check to see if the device is seen:

xl pci-list-assignable-devices
0000:00:01.0

It is!  That's a good sign, right?

xl create /etc/xen/xenwin.cfg
Parsing config file /etc/xen/xenwin.cfg
xc: info: VIRTUAL MEMORY ARRANGEMENT:
  Loader:        0000000000100000->000000000017c510
  TOTAL:         0000000000000000->000000003f800000
  ENTRY ADDRESS: 00000000001015a0
xc: info: PHYSICAL MEMORY ALLOCATION:
  4KB PAGES: 0x0000000000000200
  2MB PAGES: 0x00000000000001fb
  1GB PAGES: 0x0000000000000000
libxl: error: libxl_pci.c:712:do_pci_add xc_assign_device failed
Daemon running with PID 4222

So what happened here?  The device was not assigned despite being 'assignable'.  The Windows install CD boots but there is no display (only can tell by hard disk LED activity).

Here is my /etc/xen/xenwin.cfg:

kernel = "/usr/lib/xen-4.1/boot/hvmloader"
builder='hvm'
memory = 1024

# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
shadow_memory = 8
name = "xenwin7"
vif = [ 'type=ioemu, bridge=xenbr0' ]
acpi = 1
apic = 1
disk = [ 'file:/etc/xen/xenwin.img,hda,w', 'file:/media/RAID5/Software/Operatin...(nano cut off here)...windows7.iso']
device_model = '/usr/lib/xen-4.1/bin/qemu-dm'

boot="dc"

xen_platform_pci=1
pci=['00:01.0']

serial='pty'
usbdevice='tablet'

I have tried using gfx_passthrough=1 as well, same result.  Please help, can't stand being so close and still stuck :(

Thanks,
Adam Honse

On Tue, Jul 17, 2012 at 2:21 AM, David Erickson <halcyon1981@xxxxxxxxx> wrote:
Your best bet is to have two video cards, one for dom0 and another you
pass through to a guest.  When you boot you need to bind the second
video card to pciback (compile this statically into your kernel), then
it will be assignable to dom0.  There are lots of guides on this that
are Googleable, here are a couple wiki entries of use:

http://wiki.xen.org/wiki/Xen_PCI_Passthrough
http://wiki.xen.org/wiki/Xen_VGA_Passthrough

-D

On Mon, Jul 16, 2012 at 9:32 PM, Adam Honse <calcprogrammer1@xxxxxxxxx> wrote:
> I just found out that Xen supported hardware passthrough, so I've installed
> it on my Ubuntu 12.04 home server/media center as I wanted to play some
> games in Windows.  The CPU is AMD A8-3870K and it appears that hvm itself is
> working.  I was able to boot the Windows 7 install CD with a VNC console.  I
> now want to configure the VGA passthrough.  Upon adding the hardware
> passthrough lines, I received an error along the lines of "PCI device
> xx:xx.x is not assignable".  I modprobe'd the xen-pciback module but it did
> not resolve the issue.  I am thinking that is because the device is in use
> by the system (running the 'radeon' module and the open-source radeon
> drivers).
>
> My question is this, is it possible to have the Dom-0 (native) system use
> the VGA device, and then relinquish control over the device upon starting
> the hardware-passthrough VM?  It seems like it would be possible, shutting
> down the X-server before starting the VM, but I was unable to remove the
> 'radeon' module in my tests.  It keeps saying the module is in use, though
> nothing depends on it and I disconnected all outputs.  If not, is it
> possible to have two guests, a Windows and an Ubuntu guest, that both access
> the hardware passthrough but not at the same time?  Also, how do you go
> about 'reserving' the PCI device in pcibackend so that it is available for
> the VM?
>
> Thanks,
> Adam Honse
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxx
> http://lists.xen.org/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.