xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* VGA Passthrough crashes machine
@ 2011-12-08 12:00 Anthony Wright
  2011-12-14 21:38 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Wright @ 2011-12-08 12:00 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

I've just had my first attempt at getting VGA passthrough to work, and
it crashed the machine. I'm trying to understand whether this is a
problem with my hardware, configuration or a software problem.

I'm running Xen 4.1.2 with Linux 3.1.2


The CPU is an Intel Core i5-650
http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-%284M-Cache-3_20-GHz%29

The Video Card is and Intel Core Processor Integrated Graphics Controller
PCI ID: 8086 0042


I have hidden the vga device with xen-pciback.hide=(00:02.0) on the
kernel command line

The xen config file is:
name        = '11-1'
kernel            = '/usr/lib/xen/boot/hvmloader'
builder           = 'hvm'
device_model      = '/usr/lib/xen/bin/qemu-dm'
boot              = 'c'
serial            = 'pty'
usbdevice         = 'tablet'
disk        = [ 'phy:/dev/Master/Root-11-0001,hda,w' ]
memory      = 1000
vif         = [
'bridge=br-internal,mac=04:fb:7a:22:e8:4a','bridge=br-dmz,mac=04:fb:7a:22:e8:4b','bridge=br-local,mac=04:fb:7a:22:e8:4c'
]
vcpus       = 1
on_poweroff = 'destroy'
on_reboot   = 'destroy'
on_crash    = 'destroy'

gfx_passthru=1
pci=['00:02.0']

When I try to start the DomU I get the following output, I get the
prompt back and then the system reboots.

Parsing config file xen-config
xc: info: VIRTUAL MEMORY ARRANGEMENT:
  Loader:        0000000000100000->00000000001795d0
  TOTAL:         0000000000000000->000000003e000000
  ENTRY ADDRESS: 0000000000100000
xc: info: PHYSICAL MEMORY ALLOCATION:
  4KB PAGES: 0x0000000000000200
  2MB PAGES: 0x00000000000001ef
  1GB PAGES: 0x0000000000000000
libxl: error: libxl_pci.c:712:do_pci_add xc_assign_device failed
Daemon running with PID 2050

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: VGA Passthrough crashes machine
  2011-12-08 12:00 VGA Passthrough crashes machine Anthony Wright
@ 2011-12-14 21:38 ` Konrad Rzeszutek Wilk
  2011-12-15 15:54   ` Anthony Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-12-14 21:38 UTC (permalink / raw)
  To: Anthony Wright; +Cc: xen-devel@lists.xensource.com

On Thu, Dec 08, 2011 at 12:00:07PM +0000, Anthony Wright wrote:
> I've just had my first attempt at getting VGA passthrough to work, and
> it crashed the machine. I'm trying to understand whether this is a
> problem with my hardware, configuration or a software problem.
> 
> I'm running Xen 4.1.2 with Linux 3.1.2
> 
> 
> The CPU is an Intel Core i5-650
> http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-%284M-Cache-3_20-GHz%29

And what is your motherboard? Does it have VT-d?

> 
> The Video Card is and Intel Core Processor Integrated Graphics Controller
> PCI ID: 8086 0042
> 
> 
> I have hidden the vga device with xen-pciback.hide=(00:02.0) on the
> kernel command line
> 
> The xen config file is:
> name        = '11-1'
> kernel            = '/usr/lib/xen/boot/hvmloader'
> builder           = 'hvm'
> device_model      = '/usr/lib/xen/bin/qemu-dm'
> boot              = 'c'
> serial            = 'pty'
> usbdevice         = 'tablet'
> disk        = [ 'phy:/dev/Master/Root-11-0001,hda,w' ]
> memory      = 1000
> vif         = [
> 'bridge=br-internal,mac=04:fb:7a:22:e8:4a','bridge=br-dmz,mac=04:fb:7a:22:e8:4b','bridge=br-local,mac=04:fb:7a:22:e8:4c'
> ]
> vcpus       = 1
> on_poweroff = 'destroy'
> on_reboot   = 'destroy'
> on_crash    = 'destroy'
> 
> gfx_passthru=1
> pci=['00:02.0']
> 
> When I try to start the DomU I get the following output, I get the
> prompt back and then the system reboots.
> 
> Parsing config file xen-config
> xc: info: VIRTUAL MEMORY ARRANGEMENT:
>   Loader:        0000000000100000->00000000001795d0
>   TOTAL:         0000000000000000->000000003e000000
>   ENTRY ADDRESS: 0000000000100000
> xc: info: PHYSICAL MEMORY ALLOCATION:
>   4KB PAGES: 0x0000000000000200
>   2MB PAGES: 0x00000000000001ef
>   1GB PAGES: 0x0000000000000000
> libxl: error: libxl_pci.c:712:do_pci_add xc_assign_device failed
> Daemon running with PID 2050
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: VGA Passthrough crashes machine
  2011-12-14 21:38 ` Konrad Rzeszutek Wilk
@ 2011-12-15 15:54   ` Anthony Wright
  2011-12-15 21:12     ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Wright @ 2011-12-15 15:54 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com

On 14/12/2011 21:38, Konrad Rzeszutek Wilk wrote:
> On Thu, Dec 08, 2011 at 12:00:07PM +0000, Anthony Wright wrote:
>> I've just had my first attempt at getting VGA passthrough to work, and
>> it crashed the machine. I'm trying to understand whether this is a
>> problem with my hardware, configuration or a software problem.
>>
>> I'm running Xen 4.1.2 with Linux 3.1.2
>>
>>
>> The CPU is an Intel Core i5-650
>> http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-%284M-Cache-3_20-GHz%29
> And what is your motherboard? Does it have VT-d?
That was the important question... I'd missed the BIOS option to enable
VT-d which was disabled by default. I enabled the BIOS option and
everything worked, and it's very cool. :-)

This does beg a couple of other questions though....

Shouldn't I get a nice(ish) error message if I try to start a VGA
passthrough VM on hardware that doesn't support it rather than crashing
the machine?

Can I tell whether hardware will support VGA passthrough without trying
to start a VM that uses it?

Also when I shut down the VM I have to use 'xl destroy' as I'm testing
with Windows. After issuing the 'xl destroy' there is a long pause and
then the error:

    libxl: error: libxl_device.c:470:libxl__wait_for_device_model Device
Model not ready
    libxl: error: libxl_pci.c:892:do_pci_remove Device Model didn't
respond in time

If I pass through more than one device, I get the pause and the message
for each device.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: VGA Passthrough crashes machine
  2011-12-15 15:54   ` Anthony Wright
@ 2011-12-15 21:12     ` Konrad Rzeszutek Wilk
  2011-12-19 15:32       ` Anthony Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-12-15 21:12 UTC (permalink / raw)
  To: Anthony Wright; +Cc: xen-devel@lists.xensource.com

On Thu, Dec 15, 2011 at 03:54:00PM +0000, Anthony Wright wrote:
> On 14/12/2011 21:38, Konrad Rzeszutek Wilk wrote:
> > On Thu, Dec 08, 2011 at 12:00:07PM +0000, Anthony Wright wrote:
> >> I've just had my first attempt at getting VGA passthrough to work, and
> >> it crashed the machine. I'm trying to understand whether this is a
> >> problem with my hardware, configuration or a software problem.
> >>
> >> I'm running Xen 4.1.2 with Linux 3.1.2
> >>
> >>
> >> The CPU is an Intel Core i5-650
> >> http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-%284M-Cache-3_20-GHz%29
> > And what is your motherboard? Does it have VT-d?
> That was the important question... I'd missed the BIOS option to enable
> VT-d which was disabled by default. I enabled the BIOS option and
> everything worked, and it's very cool. :-)
> 
> This does beg a couple of other questions though....
> 
> Shouldn't I get a nice(ish) error message if I try to start a VGA
> passthrough VM on hardware that doesn't support it rather than crashing
> the machine?


There is this http://wiki.xen.org/xenwiki/VTdHowTo which gives you a
nice idea of what works.
> 
> Can I tell whether hardware will support VGA passthrough without trying
> to start a VM that uses it?
> 
> Also when I shut down the VM I have to use 'xl destroy' as I'm testing
> with Windows. After issuing the 'xl destroy' there is a long pause and
> then the error:
> 
>     libxl: error: libxl_device.c:470:libxl__wait_for_device_model Device
> Model not ready
>     libxl: error: libxl_pci.c:892:do_pci_remove Device Model didn't
> respond in time
> 
> If I pass through more than one device, I get the pause and the message
> for each device.

Hm, it looks to be sending 'pci-rem' to the XenStore, but I am not sure
if QEMU understands it. Did you compile Xen 4.1.2 by yourself? Did it
compile with CONFIG_PASSTHROUGH?

You should see some messages in the qemu.log about hot-remove and such.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: VGA Passthrough crashes machine
  2011-12-15 21:12     ` Konrad Rzeszutek Wilk
@ 2011-12-19 15:32       ` Anthony Wright
  2012-01-03 15:04         ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Wright @ 2011-12-19 15:32 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 3534 bytes --]

On 15/12/2011 21:12, Konrad Rzeszutek Wilk wrote:
> On Thu, Dec 15, 2011 at 03:54:00PM +0000, Anthony Wright wrote:
>> On 14/12/2011 21:38, Konrad Rzeszutek Wilk wrote:
>>> On Thu, Dec 08, 2011 at 12:00:07PM +0000, Anthony Wright wrote:
>>>> I've just had my first attempt at getting VGA passthrough to work, and
>>>> it crashed the machine. I'm trying to understand whether this is a
>>>> problem with my hardware, configuration or a software problem.
>>>>
>>>> I'm running Xen 4.1.2 with Linux 3.1.2
>>>>
>>>>
>>>> The CPU is an Intel Core i5-650
>>>> http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-%284M-Cache-3_20-GHz%29
>>> And what is your motherboard? Does it have VT-d?
>> That was the important question... I'd missed the BIOS option to enable
>> VT-d which was disabled by default. I enabled the BIOS option and
>> everything worked, and it's very cool. :-)
>>
>> This does beg a couple of other questions though....
>>
>> Shouldn't I get a nice(ish) error message if I try to start a VGA
>> passthrough VM on hardware that doesn't support it rather than crashing
>> the machine?
>
> There is this http://wiki.xen.org/xenwiki/VTdHowTo which gives you a
> nice idea of what works.
Unfortunately I spoke a little too soon. I'm running with a Windows 7
Pro, 32 bit iso image, to install a new version of windows into the VM.
It seems to start nicely and I get a pulsing windows logo on the screen,
but it never progresses to the next page, and the VM consumes a huge
amount of CPU. If I run it purely in a VNC session, everything runs
smoothly and quickly. We noticed that there are a lot of VT-d features
disabled, and wondered if this might be the cause. The motherboard is an
intel DQ57TM, and the processor is an Intel Core i5-650, I have enabled
VT-d and FLR within the motherboard which seem to be the only relevant
motherboard switches.

Inside xl dmesg all the additional VT-d features are not enabled (Snoop
Control, Dom0 DMA Passthrough, Queued Invalidation, Interrupt Remapping,
Shared EPT tables) and I wondered if this was the problem. I tried
starting with iommu=1 on the xen command line and without it. The output
from xl dmesg is very similar and the VM behaves the same in both cases,
but I get a number of iommu.c errors messages when the 'iommu=1'
parameter is present. In both cases Xen also outputs a number of mm.c
errors which is similar to a problem I reported a while ago. I have
attach xl dmesg logs from both cases.

>> Can I tell whether hardware will support VGA passthrough without trying
>> to start a VM that uses it?
>>
>> Also when I shut down the VM I have to use 'xl destroy' as I'm testing
>> with Windows. After issuing the 'xl destroy' there is a long pause and
>> then the error:
>>
>>     libxl: error: libxl_device.c:470:libxl__wait_for_device_model Device
>> Model not ready
>>     libxl: error: libxl_pci.c:892:do_pci_remove Device Model didn't
>> respond in time
>>
>> If I pass through more than one device, I get the pause and the message
>> for each device.
> Hm, it looks to be sending 'pci-rem' to the XenStore, but I am not sure
> if QEMU understands it. Did you compile Xen 4.1.2 by yourself? Did it
> compile with CONFIG_PASSTHROUGH?
>
> You should see some messages in the qemu.log about hot-remove and such.
Yes I compiled Xen 4.1.2 by myself, but I don't know is
CONFIG_PASSTHROUGH is enabled or not - there's no mention of it in the
build logs. I see a hot-remove entry in the qemu log, and have attached
the whole log as it's not very long.

Anthony.

[-- Attachment #2: qemu-dm-16-2.log --]
[-- Type: text/plain, Size: 7323 bytes --]

domid: 1
Using file /dev/Master/Disk-root-16-0001 in read-write mode
Strip off blktap sub-type prefix to /workspace/agent/appliance/861ae470cd891983dbad195388406b86/1/win7-pro-32.iso (drv 'aio')
Using file /workspace/agent/appliance/861ae470cd891983dbad195388406b86/1/win7-pro-32.iso in read-only mode
Watching /local/domain/0/device-model/1/logdirty/cmd
Watching /local/domain/0/device-model/1/command
Watching /local/domain/1/cpu
char device redirected to /dev/pts/2
qemu_map_cache_init nr_buckets = 4000 size 327680
shared page at pfn feffd
buffered io page at pfn feffb
Guest uuid = 8c233cf4-fd06-4471-a242-0795bb7ca56e
Register xen platform.
Done register platform.
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
xs_read(/local/domain/0/device-model/1/xen_extended_power_mgmt): read error
xs_read(): vncpasswd get error. /vm/8c233cf4-fd06-4471-a242-0795bb7ca56e/vncpasswd.
medium change watch on `hdb' (index: 1): aio:/workspace/agent/appliance/861ae470cd891983dbad195388406b86/1/win7-pro-32.iso
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
Log-dirty: no command yet.
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
vcpu-set: watch node error.
xs_read(/local/domain/1/log-throttling): read error
qemu: ignoring not-understood drive `/local/domain/1/log-throttling'
medium change watch on `/local/domain/1/log-throttling' - unknown device, ignored
dm-command: hot insert pass-through pci dev 
register_real_device: Assigning real physical device 00:02.0 ...
pt_iomul_init: Error: pt_iomul_init can't open file /dev/xen/pci_iomul: No such file or directory: 0x0:0x2.0x0
pt_register_regions: IO region registered (size=0x00400000 base_addr=0xfe000004)
pt_register_regions: IO region registered (size=0x10000000 base_addr=0xd000000c)
pt_register_regions: IO region registered (size=0x00000008 base_addr=0x0000f161)
setup_vga_pt: vga bios checksum is adjusted!
pt_msi_setup: msi mapped with pirq 37
pci_intx: intx=1
register_real_device: Real physical device 00:02.0 registered successfuly!
IRQ type = MSI-INTx
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
pt_iomem_map: e_phys=e0000000 maddr=d0000000 type=8 len=268435456 index=2 first_map=1
pt_iomem_map: e_phys=f1000000 maddr=fe000000 type=0 len=4194304 index=0 first_map=1
pt_ioport_map: e_phys=c330 pio_base=f160 len=8 index=4 first_map=1
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
igd_pci_read: pci_config_read: 0:0.0: addr=52 len=2 val=ffff0b50
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state.
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
pt_iomem_map: e_phys=ffffffff maddr=fe000000 type=0 len=4194304 index=0 first_map=0
pt_iomem_map: e_phys=ffffffff maddr=d0000000 type=8 len=268435456 index=2 first_map=0
pt_ioport_map: e_phys=ffff pio_base=f160 len=8 index=4 first_map=0
pt_iomem_map: e_phys=f1000000 maddr=fe000000 type=0 len=4194304 index=0 first_map=0
pt_iomem_map: e_phys=e0000000 maddr=d0000000 type=8 len=268435456 index=2 first_map=0
pt_ioport_map: e_phys=c330 pio_base=f160 len=8 index=4 first_map=0
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=4 val=408086
dm-command: hot remove pass-through pci dev 
generate a sci for PHP.
deassert due to disable GPE bit.
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=0 len=2 val=ffff8086
igd_pci_read: pci_config_read: 0:0.0: addr=2 len=2 val=ffff0040

[-- Attachment #3: xl-dmesg-blank --]
[-- Type: text/plain, Size: 5970 bytes --]

 __  __            _  _    _   ____  
 \ \/ /___ _ __   | || |  / | |___ \ 
  \  // _ \ '_ \  | || |_ | |   __) |
  /  \  __/ | | | |__   _|| |_ / __/ 
 /_/\_\___|_| |_|    |_|(_)_(_)_____|
                                     
(XEN) Xen version 4.1.2 (@[unknown]) (gcc version 4.4.3 (GCC) ) Thu Dec  8 10:35:43 GMT 2011
(XEN) Latest ChangeSet: unavailable
(XEN) Bootloader: GNU GRUB 0.97
(XEN) Command line: dom0_mem=800M sched=credit
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: none; EDID transfer time: 0 seconds
(XEN)  EDID info not retrieved because no DDC retrieval method detected
(XEN) Disc information:
(XEN)  Found 2 MBR signatures
(XEN)  Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000009c000 (usable)
(XEN)  000000000009c000 - 00000000000a0000 (reserved)
(XEN)  00000000000e0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 00000000cb40c000 (usable)
(XEN)  00000000cb40c000 - 00000000cb44f000 (ACPI NVS)
(XEN)  00000000cb44f000 - 00000000cb4dd000 (reserved)
(XEN)  00000000cb4dd000 - 00000000cb4f1000 (ACPI NVS)
(XEN)  00000000cb4f1000 - 00000000cb4f3000 (usable)
(XEN)  00000000cb4f3000 - 00000000cb5f9000 (reserved)
(XEN)  00000000cb5f9000 - 00000000cb5fa000 (usable)
(XEN)  00000000cb5fa000 - 00000000cb5ff000 (reserved)
(XEN)  00000000cb5ff000 - 00000000cb600000 (ACPI NVS)
(XEN)  00000000cb600000 - 00000000cb608000 (ACPI data)
(XEN)  00000000cb608000 - 00000000cb609000 (ACPI NVS)
(XEN)  00000000cb609000 - 00000000cb60b000 (ACPI data)
(XEN)  00000000cb60b000 - 00000000cb624000 (ACPI NVS)
(XEN)  00000000cb624000 - 00000000cb645000 (reserved)
(XEN)  00000000cb645000 - 00000000cb688000 (ACPI NVS)
(XEN)  00000000cb688000 - 00000000cb800000 (usable)
(XEN)  00000000cdc00000 - 00000000d0000000 (reserved)
(XEN)  00000000e0000000 - 00000000e4000000 (reserved)
(XEN)  00000000fed1c000 - 00000000fed40000 (reserved)
(XEN)  00000000ff000000 - 0000000100000000 (reserved)
(XEN)  0000000100000000 - 00000001fc000000 (usable)
(XEN)  00000001fc000000 - 0000000200000000 (reserved)
(XEN)  0000000200000000 - 000000022c000000 (usable)
(XEN) System RAM: 7989MB (8180876kB)
(XEN) ACPI: RSDP 000F0410, 0024 (r2  INTEL)
(XEN) ACPI: XSDT CB609E18, 005C (r1 INTEL  DQ57TM    1072009 MSFT    10013)
(XEN) ACPI: FACP CB607D98, 00F4 (r4 INTEL  DQ57TM    1072009 MSFT    10013)
(XEN) ACPI: DSDT CB600018, 6CEA (r1 INTEL  DQ57TM          0 INTL 20051117)
(XEN) ACPI: FACS CB608E40, 0040
(XEN) ACPI: APIC CB607F18, 00CC (r2 INTEL  DQ57TM    1072009 MSFT    10013)
(XEN) ACPI: SSDT CB607C18, 014E (r1 INTEL  DQ57TM          1 MSFT  3000001)
(XEN) ACPI: MCFG CB60AF18, 003C (r1 INTEL  DQ57TM    1072009 MSFT       97)
(XEN) ACPI: ASF! CB609C18, 00A0 (r32 INTEL  DQ57TM          1 TFSM    F4240)
(XEN) ACPI: TCPA CB60AE98, 0032 (r2 INTEL  DQ57TM          1 MSFT  1000013)
(XEN) ACPI: DMAR CB609B18, 00B8 (r1 INTEL  DQ57TM          1 INTL        1)
(XEN) Xen heap: 9MB (9784kB)
(XEN) Domain heap initialised
(XEN) ACPI: 32/64X FACS address mismatch in FADT - cb608f40/00000000cb608e40, using 32
(XEN) Processor #0 6:5 APIC version 21
(XEN) Processor #1 6:5 APIC version 21
(XEN) Processor #4 6:5 APIC version 21
(XEN) Processor #5 6:5 APIC version 21
(XEN) IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
(XEN) Table is not found!
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 3192.077 MHz processor.
(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
(XEN) Intel VT-d Queued Invalidation not enabled.
(XEN) Intel VT-d Interrupt Remapping not enabled.
(XEN) Intel VT-d Shared EPT tables not enabled.
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Enabled directed EOI with ioapic_ack_old on!
(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using old ACK method
(XEN) Platform timer is 3.579MHz ACPI PM Timer
(XEN) Allocated console ring of 16 KiB.
(XEN) VMX: Supported advanced features:
(XEN)  - APIC MMIO access virtualisation
(XEN)  - APIC TPR shadow
(XEN)  - Extended Page Tables (EPT)
(XEN)  - Virtual-Processor Identifiers (VPID)
(XEN)  - Virtual NMI
(XEN)  - MSR direct-access bitmap
(XEN)  - Unrestricted Guest
(XEN) EPT supports 2MB super page.
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging detected.
(XEN) Brought up 4 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN)  Xen  kernel: 32-bit, PAE, lsb
(XEN)  Dom0 kernel: 32-bit, PAE, lsb, paddr 0x1000000 -> 0x1b76000
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN)  Dom0 alloc.:   0000000224000000->0000000226000000 (194067 pages to be allocated)
(XEN)  Init. ramdisk: 000000022b613000->000000022bfffb85
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN)  Loaded kernel: c1000000->c1b76000
(XEN)  Init. ramdisk: c1b76000->c2562b85
(XEN)  Phys-Mach map: c2563000->c262b000
(XEN)  Start info:    c262b000->c262b47c
(XEN)  Page tables:   c262c000->c2645000
(XEN)  Boot stack:    c2645000->c2646000
(XEN)  TOTAL:         c0000000->c2800000
(XEN)  ENTRY ADDRESS: c1779000
(XEN) Dom0 has maximum 4 VCPUs
(XEN) Scrubbing Free RAM: .......................................................................done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 176kB init memory.
(XEN) mm.c:907:d0 Error getting mfn 2409c (pfn 55555555) from L1 entry 000000002409c023 for l1e_owner=0, pg_owner=0
(XEN) mm.c:907:d0 Error getting mfn 2409d (pfn 55555555) from L1 entry 000000002409d023 for l1e_owner=0, pg_owner=0
(XEN) mm.c:907:d0 Error getting mfn 2409e (pfn 55555555) from L1 entry 000000002409e023 for l1e_owner=0, pg_owner=0
(XEN) mm.c:907:d0 Error getting mfn 2409f (pfn 55555555) from L1 entry 000000002409f023 for l1e_owner=0, pg_owner=0

[-- Attachment #4: xl-dmesg-iommu --]
[-- Type: text/plain, Size: 6273 bytes --]

 __  __            _  _    _   ____  
 \ \/ /___ _ __   | || |  / | |___ \ 
  \  // _ \ '_ \  | || |_ | |   __) |
  /  \  __/ | | | |__   _|| |_ / __/ 
 /_/\_\___|_| |_|    |_|(_)_(_)_____|
                                     
(XEN) Xen version 4.1.2 (@[unknown]) (gcc version 4.4.3 (GCC) ) Thu Dec  8 10:35:43 GMT 2011
(XEN) Latest ChangeSet: unavailable
(XEN) Bootloader: GNU GRUB 0.97
(XEN) Command line: dom0_mem=800M sched=credit iommu=1
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: none; EDID transfer time: 0 seconds
(XEN)  EDID info not retrieved because no DDC retrieval method detected
(XEN) Disc information:
(XEN)  Found 2 MBR signatures
(XEN)  Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000009c000 (usable)
(XEN)  000000000009c000 - 00000000000a0000 (reserved)
(XEN)  00000000000e0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 00000000cb40c000 (usable)
(XEN)  00000000cb40c000 - 00000000cb44f000 (ACPI NVS)
(XEN)  00000000cb44f000 - 00000000cb4dd000 (reserved)
(XEN)  00000000cb4dd000 - 00000000cb4f1000 (ACPI NVS)
(XEN)  00000000cb4f1000 - 00000000cb4f3000 (usable)
(XEN)  00000000cb4f3000 - 00000000cb5f9000 (reserved)
(XEN)  00000000cb5f9000 - 00000000cb5fa000 (usable)
(XEN)  00000000cb5fa000 - 00000000cb5ff000 (reserved)
(XEN)  00000000cb5ff000 - 00000000cb600000 (ACPI NVS)
(XEN)  00000000cb600000 - 00000000cb608000 (ACPI data)
(XEN)  00000000cb608000 - 00000000cb609000 (ACPI NVS)
(XEN)  00000000cb609000 - 00000000cb60b000 (ACPI data)
(XEN)  00000000cb60b000 - 00000000cb624000 (ACPI NVS)
(XEN)  00000000cb624000 - 00000000cb645000 (reserved)
(XEN)  00000000cb645000 - 00000000cb688000 (ACPI NVS)
(XEN)  00000000cb688000 - 00000000cb800000 (usable)
(XEN)  00000000cdc00000 - 00000000d0000000 (reserved)
(XEN)  00000000e0000000 - 00000000e4000000 (reserved)
(XEN)  00000000fed1c000 - 00000000fed40000 (reserved)
(XEN)  00000000ff000000 - 0000000100000000 (reserved)
(XEN)  0000000100000000 - 00000001fc000000 (usable)
(XEN)  00000001fc000000 - 0000000200000000 (reserved)
(XEN)  0000000200000000 - 000000022c000000 (usable)
(XEN) System RAM: 7989MB (8180876kB)
(XEN) ACPI: RSDP 000F0410, 0024 (r2  INTEL)
(XEN) ACPI: XSDT CB609E18, 005C (r1 INTEL  DQ57TM    1072009 MSFT    10013)
(XEN) ACPI: FACP CB607D98, 00F4 (r4 INTEL  DQ57TM    1072009 MSFT    10013)
(XEN) ACPI: DSDT CB600018, 6CEA (r1 INTEL  DQ57TM          0 INTL 20051117)
(XEN) ACPI: FACS CB608E40, 0040
(XEN) ACPI: APIC CB607F18, 00CC (r2 INTEL  DQ57TM    1072009 MSFT    10013)
(XEN) ACPI: SSDT CB607C18, 014E (r1 INTEL  DQ57TM          1 MSFT  3000001)
(XEN) ACPI: MCFG CB60AF18, 003C (r1 INTEL  DQ57TM    1072009 MSFT       97)
(XEN) ACPI: ASF! CB609C18, 00A0 (r32 INTEL  DQ57TM          1 TFSM    F4240)
(XEN) ACPI: TCPA CB60AE98, 0032 (r2 INTEL  DQ57TM          1 MSFT  1000013)
(XEN) ACPI: DMAR CB609B18, 00B8 (r1 INTEL  DQ57TM          1 INTL        1)
(XEN) Xen heap: 9MB (9784kB)
(XEN) Domain heap initialised
(XEN) ACPI: 32/64X FACS address mismatch in FADT - cb608f40/00000000cb608e40, using 32
(XEN) Processor #0 6:5 APIC version 21
(XEN) Processor #1 6:5 APIC version 21
(XEN) Processor #4 6:5 APIC version 21
(XEN) Processor #5 6:5 APIC version 21
(XEN) IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
(XEN) Table is not found!
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 3192.100 MHz processor.
(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
(XEN) Intel VT-d Queued Invalidation not enabled.
(XEN) Intel VT-d Interrupt Remapping not enabled.
(XEN) Intel VT-d Shared EPT tables not enabled.
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Enabled directed EOI with ioapic_ack_old on!
(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using old ACK method
(XEN) Platform timer is 3.579MHz ACPI PM Timer
(XEN) Allocated console ring of 16 KiB.
(XEN) VMX: Supported advanced features:
(XEN)  - APIC MMIO access virtualisation
(XEN)  - APIC TPR shadow
(XEN)  - Extended Page Tables (EPT)
(XEN)  - Virtual-Processor Identifiers (VPID)
(XEN)  - Virtual NMI
(XEN)  - MSR direct-access bitmap
(XEN)  - Unrestricted Guest
(XEN) EPT supports 2MB super page.
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging detected.
(XEN) Brought up 4 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN)  Xen  kernel: 32-bit, PAE, lsb
(XEN)  Dom0 kernel: 32-bit, PAE, lsb, paddr 0x1000000 -> 0x1b76000
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN)  Dom0 alloc.:   0000000224000000->0000000226000000 (194067 pages to be allocated)
(XEN)  Init. ramdisk: 000000022b613000->000000022bfffb85
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN)  Loaded kernel: c1000000->c1b76000
(XEN)  Init. ramdisk: c1b76000->c2562b85
(XEN)  Phys-Mach map: c2563000->c262b000
(XEN)  Start info:    c262b000->c262b47c
(XEN)  Page tables:   c262c000->c2645000
(XEN)  Boot stack:    c2645000->c2646000
(XEN)  TOTAL:         c0000000->c2800000
(XEN)  ENTRY ADDRESS: c1779000
(XEN) Dom0 has maximum 4 VCPUs
(XEN) [VT-D]iommu.c:853: iommu_fault_status: Fault Overflow
(XEN) [VT-D]iommu.c:856: iommu_fault_status: Primary Pending Fault
(XEN) [VT-D]iommu.c:831: DMAR:[DMA Write] Request device [00:02.0] fault addr 400000000, iommu reg = fff16000
(XEN) DMAR:[fault reason 05h] PTE Write access is not set
(XEN) Scrubbing Free RAM: .......................................................................done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 176kB init memory.
(XEN) mm.c:907:d0 Error getting mfn 2409c (pfn 55555555) from L1 entry 000000002409c023 for l1e_owner=0, pg_owner=0
(XEN) mm.c:907:d0 Error getting mfn 2409d (pfn 55555555) from L1 entry 000000002409d023 for l1e_owner=0, pg_owner=0
(XEN) mm.c:907:d0 Error getting mfn 2409e (pfn 55555555) from L1 entry 000000002409e023 for l1e_owner=0, pg_owner=0
(XEN) mm.c:907:d0 Error getting mfn 2409f (pfn 55555555) from L1 entry 000000002409f023 for l1e_owner=0, pg_owner=0

[-- Attachment #5: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: VGA Passthrough crashes machine
  2011-12-19 15:32       ` Anthony Wright
@ 2012-01-03 15:04         ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-03 15:04 UTC (permalink / raw)
  To: Anthony Wright; +Cc: xen-devel@lists.xensource.com

On Mon, Dec 19, 2011 at 03:32:51PM +0000, Anthony Wright wrote:
> On 15/12/2011 21:12, Konrad Rzeszutek Wilk wrote:
> > On Thu, Dec 15, 2011 at 03:54:00PM +0000, Anthony Wright wrote:
> >> On 14/12/2011 21:38, Konrad Rzeszutek Wilk wrote:
> >>> On Thu, Dec 08, 2011 at 12:00:07PM +0000, Anthony Wright wrote:
> >>>> I've just had my first attempt at getting VGA passthrough to work, and
> >>>> it crashed the machine. I'm trying to understand whether this is a
> >>>> problem with my hardware, configuration or a software problem.
> >>>>
> >>>> I'm running Xen 4.1.2 with Linux 3.1.2
> >>>>
> >>>>
> >>>> The CPU is an Intel Core i5-650
> >>>> http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-%284M-Cache-3_20-GHz%29
> >>> And what is your motherboard? Does it have VT-d?
> >> That was the important question... I'd missed the BIOS option to enable
> >> VT-d which was disabled by default. I enabled the BIOS option and
> >> everything worked, and it's very cool. :-)
> >>
> >> This does beg a couple of other questions though....
> >>
> >> Shouldn't I get a nice(ish) error message if I try to start a VGA
> >> passthrough VM on hardware that doesn't support it rather than crashing
> >> the machine?
> >
> > There is this http://wiki.xen.org/xenwiki/VTdHowTo which gives you a
> > nice idea of what works.
> Unfortunately I spoke a little too soon. I'm running with a Windows 7
> Pro, 32 bit iso image, to install a new version of windows into the VM.
> It seems to start nicely and I get a pulsing windows logo on the screen,
> but it never progresses to the next page, and the VM consumes a huge
> amount of CPU. If I run it purely in a VNC session, everything runs
> smoothly and quickly. We noticed that there are a lot of VT-d features
> disabled, and wondered if this might be the cause. The motherboard is an
> intel DQ57TM, and the processor is an Intel Core i5-650, I have enabled
> VT-d and FLR within the motherboard which seem to be the only relevant
> motherboard switches.

Are you enabling gfx_passthrough or using the VNC _and_ the PCI
passthrough features (which is what I was using this last week).

Something like this:

builder='hvm'
memory = 2048
name = "Windows7"
vcpus=3
disk = [ 'phy:/dev/vg_guest/Win7_Home,hda,w']
vnc=1
videoram=8
vnclisten="0.0.0.0"
vncpasswd=''
#stdvga=0
serial='pty'
tsc_mode=0
usb=1
usb_add="host:045e:0040"
usbdevice='tablet'
xen_platform_pci=1
# Remember QEMU_AUDIO_DRV=pa
soundhw='es1370'
pci=['01:00.0','01:00.1','02:00.0']


Where the PCI card is:
01:00.0 VGA compatible controller: ATI Technologies Inc RV770 [Radeon HD 4870]
01:00.1 Audio device: ATI Technologies Inc HD48x0 audio

Or are you passing in an Nvidia card?

(The motherboard I am using is an AMD one).
> 
> Inside xl dmesg all the additional VT-d features are not enabled (Snoop
> Control, Dom0 DMA Passthrough, Queued Invalidation, Interrupt Remapping,
> Shared EPT tables) and I wondered if this was the problem. I tried

If it was I would think you would get tons of warnings from the Xen
hypervisor about failed mappings and such. [edit: and it seems you are
getting faults]

> starting with iommu=1 on the xen command line and without it. The output
> from xl dmesg is very similar and the VM behaves the same in both cases,
> but I get a number of iommu.c errors messages when the 'iommu=1'
> parameter is present. In both cases Xen also outputs a number of mm.c
> errors which is similar to a problem I reported a while ago. I have
> attach xl dmesg logs from both cases.

You mean these:

> (XEN) [VT-D]iommu.c:853: iommu_fault_status: Fault Overflow
> (XEN) [VT-D]iommu.c:856: iommu_fault_status: Primary Pending Fault
> (XEN) [VT-D]iommu.c:831: DMAR:[DMA Write] Request device [00:02.0] fault addr 400000000, iommu reg = fff16000
> (XEN) DMAR:[fault reason 05h] PTE Write access is not set

Hm, and 0000:00:02.0 is your VGA card right?

These ones you can ignore:
> (XEN) mm.c:907:d0 Error getting mfn 2409c (pfn 55555555) from L1 entry 000000002409c023 for l1e_owner=0, pg_owner=0
> (XEN) mm.c:907:d0 Error getting mfn 2409d (pfn 55555555) from L1 entry 000000002409d023 for l1e_owner=0, pg_owner=0
> (XEN) mm.c:907:d0 Error getting mfn 2409e (pfn 55555555) from L1 entry 000000002409e023 for l1e_owner=0, pg_owner=0
> (XEN) mm.c:907:d0 Error getting mfn 2409f (pfn 55555555) from L1 entry 000000002409f023 for l1e_owner=0, pg_owner=0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-03 15:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 12:00 VGA Passthrough crashes machine Anthony Wright
2011-12-14 21:38 ` Konrad Rzeszutek Wilk
2011-12-15 15:54   ` Anthony Wright
2011-12-15 21:12     ` Konrad Rzeszutek Wilk
2011-12-19 15:32       ` Anthony Wright
2012-01-03 15:04         ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).