Re: Device pass-through

2012-01-06 Thread André Weidemann

On 06.01.2012 08:25, Gordon Messmer wrote:

On 01/05/2012 11:07 AM, Gordon Messmer wrote:

I started with an update to seabios, from the bundled version
0.6.1.2-8.el6 to a rebuilt package from F16, 0.6.2-3.el6. That's enough
to get the guest to boot with the pass-through video card. It doesn't
work, currently, and I'm pretty sure that's because I can't read the ROM
from the card. I'm going to look around for a solution to that and will
update again.


Well, I finally figured out that I have to enable the reading of roms
from the device by writing "1" to the "rom" node in /sys/. Now the
problem is that the rom is 64k, and only 32k are making it into the
guest. I saw a reference to this problem here:
http://www.spinics.net/lists/kvm/msg49946.html

I've updated seabios to 0.6.3, and I've rebuilt the qemu-kvm packages
from F16 on CentOS 6.2 to try those. It took a while, but didn't change
the results. I'm still only able to read 32k of rom from the node in
/sys/ in the guest.

Perhaps I'd have better luck with a different card.

In the meantime, thanks for your advice. I think I'm close, and I'll
keep working on the project. If I get it working, I'll send along
further details with the steps I had to take.


Do you have the ROM as a file on your HDD perhaps? If so, you can try 
the following: -device pci-assign,host=05:00.0,romfile=${ROMFILE}.

This used to work fine for me even with ROM file of around 130k.


Regards,
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: gfx card passthrough broken with latest head

2011-08-21 Thread André Weidemann

Hi,

On 13.08.2011 15:35, André Weidemann wrote:

Hi,
I pulled latest git yesterday and noticed that graphics card pass
through does not work anymore. The VM hangs (probably when initializing
the gfx card) when passing a graphics card to the VM.

I started to do a git bisect but device assignment does not work at all
when doing it.

I started like this:

cd /usr/local/src
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
qemu-kvm-2011-08-12
cd qemu-kvm-2011-08-12
git bisect start
git bisect good fda19064e889d4419dd3dc69ca8e6e7a1535fdf5
git bisect bad 44755ea36fee3f0b1093ef27404def8857602274

Bisecting: 229 revisions left to test after this
[55c0975c5b358e948b9ae7bd7b07eff92508e756] Do constant folding for shift
operations.

./configure --audio-drv-list=alsa --target-list=x86_64-softmmu
--enable-kvm-device-assignment

ERROR: unknown option --enable-kvm-device-assignment

What am I doing wrong?


I continued with "git bisect bad" from this point on, but up to where I 
started, no revision supported device assignment.


I then did a "git bisect reset" and started over again. Now I continued 
with a few "git bisect good" until a revision came up that supported 
device assignment, but then after compiling and running 
qemu-system-x86_64, it exited with a segmentation fault. I continued 
with "git bisect good" until the end but all revision supporting device 
assignment existed with a segmentation fault.


How come so many revision do not support device assignment? Is there a 
trick to enable it?


Any help in this matter is greatly appreciated.

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


gfx card passthrough broken with latest head

2011-08-13 Thread André Weidemann

Hi,
I pulled latest git yesterday and noticed that graphics card pass 
through does not work anymore. The VM hangs (probably when initializing 
the gfx card) when passing a graphics card to the VM.


I started to do a git bisect but device assignment does not work at all 
when doing it.


I started like this:

cd /usr/local/src
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git 
qemu-kvm-2011-08-12

cd qemu-kvm-2011-08-12
git bisect start
git bisect good fda19064e889d4419dd3dc69ca8e6e7a1535fdf5
git bisect bad 44755ea36fee3f0b1093ef27404def8857602274

Bisecting: 229 revisions left to test after this
[55c0975c5b358e948b9ae7bd7b07eff92508e756] Do constant folding for shift 
operations.


./configure --audio-drv-list=alsa --target-list=x86_64-softmmu 
--enable-kvm-device-assignment


ERROR: unknown option --enable-kvm-device-assignment

What am I doing wrong?

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Windows7 crashes inside the VM when starting a certain program

2011-07-30 Thread André Weidemann

On 29.07.2011 13:37, Gleb Natapov wrote:

On Fri, Jul 29, 2011 at 09:20:35AM +0200, André Weidemann wrote:

On 27.07.2011 10:56, Gleb Natapov wrote:

On Tue, Jul 26, 2011 at 12:57:44PM +0200, André Weidemann wrote:

Hi,

On 26.07.2011 12:08, Gleb Natapov wrote:

On Tue, Jul 26, 2011 at 07:29:04AM +0200, André Weidemann wrote:

On 07.07.2011 07:26, André Weidemann wrote:

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain
game. Actually there are two games both from the same company, that make
the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the
screen goes black as usual and the cursor keeps spinning for 3-5 seconds
until Windows crashes. With the second game I get to 3D the login
screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the
VM keeps running without any problems.
When Windows reboots after the first crash and the game is started
again, the message on the following blue screen changes slightly and
stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D
acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run
without any problems. They run a bit choppy on some occasions, but do
that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?


I did some testing and found out that Windows7 does not crash
anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?


The server is currently running on 2 out of 8 cores with kernel boot
parameter "maxcpus=2".

flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good
xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est
tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow
vnmi flexpriority ept vpid

Flags that are present on -cpu host but not -cpu Nehalem (excluding vmx
related flags):

vme dts acpi ss ht tm pbe rdtscp constant_tsc arch_perfmon pebs bts rep_good
xtopology nonstop_tsc aperfmperf dtes64 monitor ds_cpl est tm2 xtpr pdcm  ida

Some of them may be synthetic and some of them may be filtered by KVM.

Can you try to run "-cpu host,-vme,-dts..." (specifying all of those
flags with -). Drop those that qemu does not recognize. See if result
will be the same as with -cpu Nehalem. If yes, then try to find out with
flag make the difference.


I started the VM with all flags that differ between the two CPUs.
After removing the ones qemu-kvm did not recognize, I started the VM
again with the following line:
-cpu 
host,-vme,-acpi,-ss,-ht,-tm,-pbe,-rdtscp,-dtes64,-monitor,-ds_cpl,-est,-tm2,-xtpr,-pdcm
\

Running the program under Windows7 inside the VM, caused Windows to
crash again with a BSoD.
The disassembly of the address f8000288320c shows the following:
http://pastebin.com/7yzTYJSG


Looks like it tries to read MSR_LASTBRANCH_TOS MSR which kvm does not
support. Do you see something interesting in dmesg? I wonder how
availability of the MSR should be checked.


You are right about the MSR. The log file from the time of occurrence 
shows the following:


Jul  4 18:55:12 server kernel: [ 1528.618647] kvm: 3123: cpu1 
kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
Jul  4 18:55:12 server kernel: [ 1528.619444] kvm: 3123: cpu1 unhandled 
rdmsr: 0x1c9



André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Windows7 crashes inside the VM when starting a certain program

2011-07-29 Thread André Weidemann

On 27.07.2011 10:56, Gleb Natapov wrote:

On Tue, Jul 26, 2011 at 12:57:44PM +0200, André Weidemann wrote:

Hi,

On 26.07.2011 12:08, Gleb Natapov wrote:

On Tue, Jul 26, 2011 at 07:29:04AM +0200, André Weidemann wrote:

On 07.07.2011 07:26, André Weidemann wrote:

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain
game. Actually there are two games both from the same company, that make
the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the
screen goes black as usual and the cursor keeps spinning for 3-5 seconds
until Windows crashes. With the second game I get to 3D the login
screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the
VM keeps running without any problems.
When Windows reboots after the first crash and the game is started
again, the message on the following blue screen changes slightly and
stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D
acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run
without any problems. They run a bit choppy on some occasions, but do
that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?


I did some testing and found out that Windows7 does not crash
anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?


The server is currently running on 2 out of 8 cores with kernel boot
parameter "maxcpus=2".

flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good
xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est
tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow
vnmi flexpriority ept vpid

Flags that are present on -cpu host but not -cpu Nehalem (excluding vmx
related flags):

vme dts acpi ss ht tm pbe rdtscp constant_tsc arch_perfmon pebs bts rep_good
xtopology nonstop_tsc aperfmperf dtes64 monitor ds_cpl est tm2 xtpr pdcm  ida

Some of them may be synthetic and some of them may be filtered by KVM.

Can you try to run "-cpu host,-vme,-dts..." (specifying all of those
flags with -). Drop those that qemu does not recognize. See if result
will be the same as with -cpu Nehalem. If yes, then try to find out with
flag make the difference.


I started the VM with all flags that differ between the two CPUs. After 
removing the ones qemu-kvm did not recognize, I started the VM again 
with the following line:
-cpu 
host,-vme,-acpi,-ss,-ht,-tm,-pbe,-rdtscp,-dtes64,-monitor,-ds_cpl,-est,-tm2,-xtpr,-pdcm 
\


Running the program under Windows7 inside the VM, caused Windows to 
crash again with a BSoD.

The disassembly of the address f8000288320c shows the following:
http://pastebin.com/7yzTYJSG

André

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Windows7 crashes inside the VM when starting a certain program

2011-07-28 Thread André Weidemann

Hi,

On 28.07.2011 15:49, Paolo Bonzini wrote:

On 07/28/2011 03:21 PM, Avi Kivity wrote:

I haven't used debuggers very much, so I hope I grabbed the correct
lines from the disassembly:
http://pastebin.com/t3sfvmTg


That's the bug check routine. Can you go up a frame?


Or just do what Gleb suggested. Open the dump, type "!analyze -v" and
cut-paste the address from WinDbg's output into the Disassemble window.


This is the output of "!analyze -v":
http://pastebin.com/sCZSjr8m

...and this is the output from the disassembly window:
http://pastebin.com/AVZuswkT


André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Windows7 crashes inside the VM when starting a certain program

2011-07-28 Thread André Weidemann

Hi Paolo,

On 28.07.2011 14:01, Paolo Bonzini wrote:

On 07/07/2011 07:26 AM, André Weidemann wrote:

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain
game. Actually there are two games both from the same company, that make
the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the
screen goes black as usual and the cursor keeps spinning for 3-5 seconds
until Windows crashes. With the second game I get to 3D the login
screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the
VM keeps running without any problems.
When Windows reboots after the first crash and the game is started
again, the message on the following blue screen changes slightly and
stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH


The blue screens seem to be for the same exception,
0xC096--privileged instruction, only sometimes in user mode (but in
a system service, which also causes a blue screen) sometimes in kernel
mode.

Can you open the produced dump in WinDbg and post a disassemble around
the failing instruction?


I haven't used debuggers very much, so I hope I grabbed the correct 
lines from the disassembly:

http://pastebin.com/t3sfvmTg

André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Windows7 crashes inside the VM when starting a certain program

2011-07-26 Thread André Weidemann

Hi,

On 26.07.2011 12:08, Gleb Natapov wrote:

On Tue, Jul 26, 2011 at 07:29:04AM +0200, André Weidemann wrote:

On 07.07.2011 07:26, André Weidemann wrote:

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain
game. Actually there are two games both from the same company, that make
the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the
screen goes black as usual and the cursor keeps spinning for 3-5 seconds
until Windows crashes. With the second game I get to 3D the login
screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the
VM keeps running without any problems.
When Windows reboots after the first crash and the game is started
again, the message on the following blue screen changes slightly and
stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D
acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run
without any problems. They run a bit choppy on some occasions, but do
that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?


I did some testing and found out that Windows7 does not crash
anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?


The server is currently running on 2 out of 8 cores with kernel boot 
parameter "maxcpus=2".


processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 26
model name  : Intel(R) Core(TM) i7 CPU 920  @ 2.67GHz
stepping: 5
cpu MHz : 1596.000
cache size  : 8192 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 2
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 11
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe 
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good 
xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 
ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi 
flexpriority ept vpid

bogomips: 5405.59
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model   : 26
model name  : Intel(R) Core(TM) i7 CPU 920  @ 2.67GHz
stepping: 5
cpu MHz : 1596.000
cache size  : 8192 KB
physical id : 0
siblings: 2
core id : 1
cpu cores   : 2
apicid  : 2
initial apicid  : 2
fpu : yes
fpu_exception   : yes
cpuid level : 11
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe 
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good 
xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 
ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi 
flexpriority ept vpid

bogomips: 5404.84
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:


the "only" thing crashing, is the application itself.
Why is that? What is different between the "real" CPU and the one
provided by qemu-kvm? How can "-cpu host" cause Windows7 to crash,
while "-cpu Nehalem" "only" crashes the application.

I then had WinDbg attach to the process in question. When the game
crashes the debugger reports an Assertion Failure. This seems so
happen as soon as the game accesses the network through a certain
DLL.
To exclude the emulated e1000 hardware as the cause, I  removed it
from the VM and passed an Intel network card 82574L to it using
these lines:

-device pci-assign,host=04:00.0,id=82574L,addr=0x10 \
-net none \

The network card works under Windows7, but the problem of the
crashing game remains.

Any ideas on how to track the problem are greatly appreciated.


Regards
  André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
Gleb.


 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Windows7 crashes inside the VM when starting a certain program

2011-07-25 Thread André Weidemann

On 07.07.2011 07:26, André Weidemann wrote:

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain
game. Actually there are two games both from the same company, that make
the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the
screen goes black as usual and the cursor keeps spinning for 3-5 seconds
until Windows crashes. With the second game I get to 3D the login
screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the
VM keeps running without any problems.
When Windows reboots after the first crash and the game is started
again, the message on the following blue screen changes slightly and
stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D
acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run
without any problems. They run a bit choppy on some occasions, but do
that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?


I did some testing and found out that Windows7 does not crash anymore 
when changing "-cpu host" to "-cpu Nehalem". After doing so, the "only" 
thing crashing, is the application itself.
Why is that? What is different between the "real" CPU and the one 
provided by qemu-kvm? How can "-cpu host" cause Windows7 to crash, while 
"-cpu Nehalem" "only" crashes the application.


I then had WinDbg attach to the process in question. When the game 
crashes the debugger reports an Assertion Failure. This seems so happen 
as soon as the game accesses the network through a certain DLL.
To exclude the emulated e1000 hardware as the cause, I  removed it from 
the VM and passed an Intel network card 82574L to it using these lines:


-device pci-assign,host=04:00.0,id=82574L,addr=0x10 \
-net none \

The network card works under Windows7, but the problem of the crashing 
game remains.


Any ideas on how to track the problem are greatly appreciated.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Windows7 crashes inside the VM when starting a certain program

2011-07-06 Thread André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain 
game. Actually there are two games both from the same company, that make 
the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the 
screen goes black as usual and the cursor keeps spinning for 3-5 seconds 
until Windows crashes. With the second game I get to 3D the login 
screen. The game then crashes after logging in.

Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the 
VM keeps running without any problems.
When Windows reboots after the first crash and the game is started 
again, the message on the following blue screen changes slightly and 
stays the same(except for the addresses) for every following crash:

http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D 
acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run 
without any problems. They run a bit choppy on some occasions, but do 
that without crashing Windows7 or the VM.


How can I proceed to investigate what is going wrong?

I am using a qemu-kvm git clone from a few days ago 
(d58931037dbb4fbc2fbb33858629d3fabfd1b0d4).


This is my command line:
/usr/local/bin/qemu-system-x86_64 -boot order=ncd -cpu host -vnc 
192.168.3.1:0 -k de -smp 2,cores=1,threads=2,sockets=1 -drive 
file=/mnt/ntfs/Windows7_120G.img,if=ide,index=0,cache=writeback -m 4096 
-drive file=/dev/cdrom1,if=ide,index=3,media=cdrom,cache=none -device 
pci-assign,host=03:00.0,id=radeon6950,addr=0x11 -net 
nic,model=e1000,macaddr=DE:AD:BE:EF:42:42 -net 
tap,script=/usr/local/bin/qemu-ifup -rtc base=localtime -parallel none 
-soundhw hda -usb -device usb-ehci,id=ehci -usbdevice host:045e:00f9 
-chardev stdio,id=seabios -device 
isa-debugcon,iobase=0x402,chardev=seabios -watchdog ib700 
-watchdog-action debug -monitor telnet:127.0.0.1:1,server,nowait,nodelay


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Does anyone successfully use USB drive in Windows7 guest?

2011-06-25 Thread André Weidemann

Hi,

On 25.06.2011 03:32, Flypen CloudMe wrote:

Hi,

Does anyone successfully use USB drive in Windows7 guest? If I pass a
USB drive to Windows7 guest, Device Manager may find this device but
the USB mass storage driver can't be installed successfully. I have
tried many times. Is the emulated USB controller is so old and
Windows7 doesn't support it? I can't use PCI passthrough feature to
pass the whole USB controller to VM, because the hypervisor also needs
to use some USB ports.

If I use Windows XP or Linux, the USB drive can work well.



Try the following when starting qemu-kvm. Replace sdX with your USB device.

...
-device usb-ehci,id=ehci \
-drive if=none,id=usbstick,file=/dev/sdX \
-device usb-storage,bus=ehci.0,drive=usbstick \
...

If would like to add the device while your VM is running, you may omit 
the last two lines and add this one instead:

-monitor telnet:127.0.0.1:1,server,nowait,nodelay

Add the device using the two commands below:
echo "drive_add 0 id=usbdrive,if=none,file=/dev/sdX"| /bin/nc -w1 
127.0.0.1 1
echo "device_add usb-storage,id=usbdrive,bus=ehci.0,drive=usbdrive"| 
/bin/nc -w1 127.0.0.1 1


Remove the device by first ejecting the USB drive under Win7. Then use 
this line to remove the drive from the VM:

echo "device_del usbdrive"| /bin/nc -w1 127.0.0.1 1

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: assigned EHCI USB headset not working

2011-06-09 Thread André Weidemann

Hi Jan,

On 09.06.2011 08:53, Jan Kiszka wrote:

On 2011-06-09 08:19, André Weidemann wrote:

Hi Gerd,

On 08.06.2011 14:49, Gerd Hoffmann wrote:

Hi,


The sound device shows up under Windows7 and drivers are installed
automatically. Unfortunately it does not work. All the players I tried,
did not even start playing the sound file, although they detected the
DirectSound Device.


iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked
down.

Any reason why you don't just plug in a virtual sound card? The HDA
emulation should work fine with win7.


Using the hda driver was my first attempt. But the result was not very
convincing. When playing mp3s inside the VM, I could hear music coming
from the speakers, but the sound was very choppy and too slow. It was no
joy listening to it.


Does "export QEMU_AUDIO_DAC_TRY_POLL=0" before invoking qemu helps? It
depends on your host-side interface. Using ALSA here, it is generally
required.

Note that this discussion rather belongs on qemu-devel.


Thank you very much. Setting the variable did the trick.
Could this perhaps be included in the man page? I am sure there will be 
others who will eventually run into the same problem as I did.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: assigned EHCI USB headset not working

2011-06-08 Thread André Weidemann

Hi Gerd,

On 08.06.2011 14:49, Gerd Hoffmann wrote:

Hi,


The sound device shows up under Windows7 and drivers are installed
automatically. Unfortunately it does not work. All the players I tried,
did not even start playing the sound file, although they detected the
DirectSound Device.


iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked
down.

Any reason why you don't just plug in a virtual sound card? The HDA
emulation should work fine with win7.


Using the hda driver was my first attempt. But the result was not very 
convincing. When playing mp3s inside the VM, I could hear music coming 
from the speakers, but the sound was very choppy and too slow. It was no 
joy listening to it.
I assumed that it may be a clocking issue, since the man page for qemu 
lists the module paramter "clocking=48000" for the i810_audio driver. 
The snd_hda_intel module however does not seem to have such a parameter.


I then double checked whether playing an mp3 works on the server, rather 
than from inside the VM. I used mpg123 to test it and mp3s play without 
distortion on the machine.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


assigned EHCI USB headset not working

2011-06-07 Thread André Weidemann

Hi,
I am using latest clone from qemu-kvm git with kernel 2.6.35.7.

Since assigning PCI soundcards, did not yield any usable results, I 
assigned a USB headset to a Windows7 VM.
I used the following two command lines to enable the EHCI controller 
inside the VM and to assign the device to it:


...
-device usb-ehci,id=ehci \
-device usb-host,vendorid=046d,productid=0a01,bus=ehci.0 \
...

Right after starting the VM I see the following output:
...
Booting from Hard Disk...
Booting from :7c00
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1


"info usb" on the monitor looks like this:

  Device 0.1, Port 1, Speed 1.5 Mb/s, Product Microsoft Wireless 
Desktop Rece

  Device 1.1, Port 1, Speed 480 Mb/s, Product Logitech USB Headset


The sound device shows up under Windows7 and drivers are installed 
automatically. Unfortunately it does not work. All the players I tried, 
did not even start playing the sound file, although they detected the 
DirectSound Device.


When connected to a "natively" running Windows7, the USB headset works 
the way it's supposed to.



Any help is greatly appreciated.

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: USB EHCI patch for 0.14.0?

2011-06-06 Thread André Weidemann

Hi David,

On 08.03.2011 19:54, David Ahern wrote:



On 03/08/11 09:23, Erik Rull wrote:

Hi all,

I've found a usb ehci patch here in the mailing list (begin of january)
but it does not fit for 0.14.0.


That was from me and prior work on ehci.



Is there an updated patch for the latest qemu-kvm version?


Try the attached,


I also wanted to give EHCI support a try. Unfortunately your patch does 
not apply to current qemu-kvm git clone. Changes in hw/pc_piix.c and 
usb-linux.c make the patch fail. I was able to fix most rejects by hand, 
but the last reject in usb-linux.c is beyond my knowledge.
I'd really appreciate if you could find the time to post a patch that 
applies to the current git clone.


Thank you very much in advance.
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: IRQ issue on graphics card passthrough

2011-06-05 Thread André Weidemann

Hi Jan,

On 05.06.2011 10:30, Jan Kiszka wrote:

On 2011-06-04 19:50, André Weidemann wrote:

Hi,
as mentioned before I have successfully passed a graphics card from a
Linux host to VM using qemu-kvm.

Shortly after starting the VM and before Windows7 initializes the
graphics card, "info pci" looks like this:
   Bus  0, device   4, function 0:
 VGA controller: PCI device 1002:6719
   IRQ 10.
   BAR0: 32 bit prefetchable memory at 0xe000 [0xefff].
   BAR2: 32 bit memory at 0xfeba [0xfebb].
   BAR4: I/O at 0xc000 [0xc0ff].
   BAR6: 32 bit memory at 0x [0x0001fffe].
   id "radeon6950"

After Windows has initialized the graphics card, "info pci" lists the
following for the graphics card:
   Bus  0, device  4, function 0:
 VGA controller: PCI device 1002:6719
   IRQ 0.
   BAR0: 32 bit prefetchable memory at 0xe000 [0xefff].
   BAR2: 32 bit memory at 0xfeba [0xfebb].
   BAR4: I/O at 0xc000 [0xc0ff].
   BAR6: 32 bit memory at 0x [0x0001fffe].
   id "radeon6950"

Notice that the IRQ changed from 10 to 0...

The graphics card's IRQ under Windows7 is displayed as:
"0xFFFE (-2)".


That's not necessarily pointing to a problem, that just means Windows is
using the device in MSI mode. Does it do the same when running natively?



During another problem of assigning sound cards to a  VM, Jan Kiszka has
pointed me to a patch that addresses an IRQ issue:
http://thread.gmane.org/gmane.comp.emulators.qemu/102540
Unfortuantely it does not help here.


For sure, that patch addresses a legacy interrupt issue, nothing
MSI-related.


It took me some time to get a native Windows7 running on that machine, 
but you are right. The IRQ under Windows("0xFFF6 (-10)") is similar 
to the one inside the VM ("0xFFFE (-2)").


Thank you for your reply.
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


IRQ issue on graphics card passthrough

2011-06-04 Thread André Weidemann

Hi,
as mentioned before I have successfully passed a graphics card from a 
Linux host to VM using qemu-kvm.


Shortly after starting the VM and before Windows7 initializes the 
graphics card, "info pci" looks like this:

  Bus  0, device   4, function 0:
VGA controller: PCI device 1002:6719
  IRQ 10.
  BAR0: 32 bit prefetchable memory at 0xe000 [0xefff].
  BAR2: 32 bit memory at 0xfeba [0xfebb].
  BAR4: I/O at 0xc000 [0xc0ff].
  BAR6: 32 bit memory at 0x [0x0001fffe].
  id "radeon6950"

After Windows has initialized the graphics card, "info pci" lists the 
following for the graphics card:

  Bus  0, device  4, function 0:
VGA controller: PCI device 1002:6719
  IRQ 0.
  BAR0: 32 bit prefetchable memory at 0xe000 [0xefff].
  BAR2: 32 bit memory at 0xfeba [0xfebb].
  BAR4: I/O at 0xc000 [0xc0ff].
  BAR6: 32 bit memory at 0x [0x0001fffe].
  id "radeon6950"

Notice that the IRQ changed from 10 to 0...

The graphics card's IRQ under Windows7 is displayed as:
"0xFFFE (-2)".

During another problem of assigning sound cards to a  VM, Jan Kiszka has 
pointed me to a patch that addresses an IRQ issue: 
http://thread.gmane.org/gmane.comp.emulators.qemu/102540

Unfortuantely it does not help here.

What can I do to examine this issue further?

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics card pass-through working with two pass pci-initialization

2011-05-29 Thread André Weidemann

Hi,

On 29.05.2011 17:22, Jan Kiszka wrote:

On 2010-05-28 20:49, André Weidemann wrote:

Hi,

On 28.05.2011 10:18, Jan Kiszka wrote:

On 2011-05-26 23:19, André Weidemann wrote:

On 27.05.2011 21:50, André Weidemann wrote:

On 27.05.2011 21:40, André Weidemann wrote:


If I am not mistaken then the graphics card needs 2 bars, one with
256MB
and one with 128K. The sound card then needs 1 bar with 16K of PCI
memory.
How big is the PCI memory with seabios?
Is there really not enough space to "squeeze" in those extra 16K?


I obviously forgot to add up the other memory that is used...
32MB go to the standard VGA card. Running qemu-kvm with "-vga none" did
not work, so I left it in. And the e1000 NIC needs another 128K.

I'll see if I can get rid of the standard VGA card. I guess that should
free enough memory for the sound card.


I did some more testing by starting the VM with the paramter "-vga none"
and passed both the VGA card and the sound card to it. With this option
the VM did not boot,


Where did it hang, ie. what IP was reported by info cpus?


I added some debug options and found out, that the VM hangs when trying
to initialize the graphics card ROM.
See here:
http://pastebin.com/S9a8uQfU

And some additional info here:

http://pastebin.com/AC4rw8Ek (info cpus/registers)
http://pastebin.com/yYkn8jL2 (info pci)


Yeah, you definitely run out of PCI memory.

Plus you may suffer from the PAM/SMRAM bug I wrote about in the wiki.
Try if this hack improves the situation:

http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=96e600f43275310364c0310519d6ab6540bb7d25


I applied above patch, but it did not make a difference. The VM did not 
boot with the parameter "-vga none".



I found the time to apply your two patches here:
http://git.kiszka.org/?p=seabios.git;a=shortlog;h=refs/heads/vga-assign
After doing so, Gerds q35 bios branch prints an error message during 
compile.

The error comes from line 33 here:
http://www.kraxel.org/cgit/seabios/tree/src/dev-q35.c?h=kraxel.q35
How do I adjust the memory area here?

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics card pass-through working with two pass pci-initialization

2011-05-28 Thread André Weidemann

Hi,

On 28.05.2011 10:18, Jan Kiszka wrote:

On 2011-05-26 23:19, André Weidemann wrote:

On 27.05.2011 21:50, André Weidemann wrote:

On 27.05.2011 21:40, André Weidemann wrote:


If I am not mistaken then the graphics card needs 2 bars, one with 256MB
and one with 128K. The sound card then needs 1 bar with 16K of PCI
memory.
How big is the PCI memory with seabios?
Is there really not enough space to "squeeze" in those extra 16K?


I obviously forgot to add up the other memory that is used...
32MB go to the standard VGA card. Running qemu-kvm with "-vga none" did
not work, so I left it in. And the e1000 NIC needs another 128K.

I'll see if I can get rid of the standard VGA card. I guess that should
free enough memory for the sound card.


I did some more testing by starting the VM with the paramter "-vga none"
and passed both the VGA card and the sound card to it. With this option
the VM did not boot,


Where did it hang, ie. what IP was reported by info cpus?


I added some debug options and found out, that the VM hangs when trying 
to initialize the graphics card ROM.

See here:
http://pastebin.com/S9a8uQfU

And some additional info here:

http://pastebin.com/AC4rw8Ek (info cpus/registers)
http://pastebin.com/yYkn8jL2 (info pci)


but I could use the monitor to take a look at the
PCI bar assignment. Even though the memory for the standard VGA card is
freed, the soundcard does not seem to get the 16K bar it needs. "info
pci" for the sound card still looks like this:
  Bus  0, device   5, function 0:
 Audio controller: PCI device 8086:3a3e
   IRQ 10.
   BAR0: 32 bit memory at 0x [0x3ffe].

Does anyone have an idea why there was no bar assigned?


Maybe Gerd's patches aren't sufficient and you still need to change
BUILD_MAX_HIGHMEM. See the hacks in
http://git.kiszka.org/?p=seabios.git;a=shortlog;h=refs/heads/vga-assign,
either replacing Gerd's patches or combined with them (I haven't checked
if the latter makes sense).


I do not have access to the machine until tomorrow. I'm curious to see 
if extending the PCI memory window will cure the problem.



Can the kernel be too old? (2.6.35.7.)


It would be good to check the latest kvm kernel to see if that oops is
still present. In that case, please try to collect the backtrace via
serial console, hopefully complete then. We may have an resource cleanup
issue there.


I will see if I can upgrade to the latest kernel tomorrow.



Just to test whether or not two devices can be assigned, I passed
through 2 sound cards. (There is an onbard sound card and the Radeon has
one too).

Each sound card gets its bar assigned as you can see:
   Bus  0, device   4, function 0:
 Audio controller: PCI device 1002:aa80
   IRQ 10.
   BAR0: 32 bit memory at 0xfebf [0xfebf3fff].
   id ""
   Bus  0, device   5, function 0:
 Audio controller: PCI device 8086:3a3e
   IRQ 10.
   BAR0: 32 bit memory at 0xfebf4000 [0xfebf7fff].

but the sound cards do not show inside the Windows VM.

With both sound cards still passed to the VM I then booted an Ubuntu
10.10 image instead of Windows7. It got as far as starting gdm, but then
the entire host and VM became very slow.
The last message I saw on the terminal before gdm started was this:
[   23.030016 ] hda_intel: azx_get_response timeout, switching to
single_cmd mode: last cmd=0x000f
[   29.290017 ] hda_intel: azx_get_response timeout, switching to
single_cmd mode: last cmd=0x200f


Likely some IRQ issue. Please check if latest qemu-kvm.git +
http://thread.gmane.org/gmane.comp.emulators.qemu/102540 makes any
difference.


See above comments. I will try this tomorrow.

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics card pass-through working with two pass pci-initialization

2011-05-27 Thread André Weidemann

On 27.05.2011 21:50, André Weidemann wrote:

On 27.05.2011 21:40, André Weidemann wrote:


If I am not mistaken then the graphics card needs 2 bars, one with 256MB
and one with 128K. The sound card then needs 1 bar with 16K of PCI
memory.
How big is the PCI memory with seabios?
Is there really not enough space to "squeeze" in those extra 16K?


I obviously forgot to add up the other memory that is used...
32MB go to the standard VGA card. Running qemu-kvm with "-vga none" did
not work, so I left it in. And the e1000 NIC needs another 128K.

I'll see if I can get rid of the standard VGA card. I guess that should
free enough memory for the sound card.


I did some more testing by starting the VM with the paramter "-vga none" 
and passed both the VGA card and the sound card to it. With this option 
the VM did not boot, but I could use the monitor to take a look at the 
PCI bar assignment. Even though the memory for the standard VGA card is 
freed, the soundcard does not seem to get the 16K bar it needs. "info 
pci" for the sound card still looks like this:

 Bus  0, device   5, function 0:
Audio controller: PCI device 8086:3a3e
  IRQ 10.
  BAR0: 32 bit memory at 0x [0x3ffe].

Does anyone have an idea why there was no bar assigned?
Can the kernel be too old? (2.6.35.7.)

Just to test whether or not two devices can be assigned, I passed 
through 2 sound cards. (There is an onbard sound card and the Radeon has 
one too).


Each sound card gets its bar assigned as you can see:
  Bus  0, device   4, function 0:
Audio controller: PCI device 1002:aa80
  IRQ 10.
  BAR0: 32 bit memory at 0xfebf [0xfebf3fff].
  id ""
  Bus  0, device   5, function 0:
Audio controller: PCI device 8086:3a3e
  IRQ 10.
  BAR0: 32 bit memory at 0xfebf4000 [0xfebf7fff].

but the sound cards do not show inside the Windows VM.

With both sound cards still passed to the VM I then booted an Ubuntu 
10.10 image instead of Windows7. It got as far as starting gdm, but then 
the entire host and VM became very slow.

The last message I saw on the terminal before gdm started was this:
[   23.030016 ] hda_intel: azx_get_response timeout, switching to 
single_cmd mode: last cmd=0x000f
[   29.290017 ] hda_intel: azx_get_response timeout, switching to 
single_cmd mode: last cmd=0x200f


So it seems there is a problem of some kind when 2 devices are passed to 
a VM.

Did anyone else ever notice anything similar?

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics card pass-through working with two pass pci-initialization

2011-05-27 Thread André Weidemann

On 27.05.2011 21:40, André Weidemann wrote:


If I am not mistaken then the graphics card needs 2 bars, one with 256MB
and one with 128K. The sound card then needs 1 bar with 16K of PCI memory.
How big is the PCI memory with seabios?
Is there really not enough space to "squeeze" in those extra 16K?


I obviously forgot to add up the other memory that is used...
32MB go to the standard VGA card. Running qemu-kvm with "-vga none" did 
not work, so I left it in. And the e1000 NIC needs another 128K.


I'll see if I can get rid of the standard VGA card. I guess that should 
free enough memory for the sound card.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics card pass-through working with two pass pci-initialization

2011-05-27 Thread André Weidemann

Hi,

On 27.05.2011 13:09, Jan Kiszka wrote:

On 2011-05-27 07:32, André Weidemann wrote:



Here is my setup:
Intel DX58SO
Core i7 920
Radeon HD 6950
Kernel 2.6.35.7
qemu-kvm git pull from May 26th



One thing that is not working is the pass-through of a second device, a
sound card in my case. As soon as I pass 2 devices to the VM, Windows
does not boot anymore.
If I continue and remove the second device from the command line the VM
does not boot anymore with the passed through gfx card. The graphics
card drivers crashes Windows, with the error message of not being able
to reset the graphics card. A reboot of the host cures this problem.


Does it make a difference when you preserve the function address by
specifying -device pci-assign,host=03:00.0,addr=XX.0 and -device
pci-assign,host=03:00.1,addr=XX.1 (where XX is some free slot number in
the guest)?


I did some further testing in assigning both the VGA and the sound card.
If I pass the devices to the VM like this:

-device pci-assign,host=03:00.0,addr=0x4 \ #VGA
-device pci-assign,host=00:1b.0,addr=0x5 \ #Sound

Windows boots up, but the sound card is not visible as a device inside 
the VM.


Running "info pci" in the monitor shows this:
  Bus  0, device   4, function 0:
VGA controller: PCI device 1002:6719
  IRQ 11.
  BAR0: 32 bit prefetchable memory at 0xe000 [0xefff].
  BAR2: 32 bit memory at 0xfeba [0xfebb].
  BAR4: I/O at 0xc000 [0xc0ff].
  BAR6: 32 bit memory at 0x [0x0001fffe].
  id ""
  Bus  0, device   5, function 0:
Audio controller: PCI device 8086:3a3e
  IRQ 10.
  BAR0: 32 bit memory at 0x [0x3ffe].
  id ""


If I switch the order of the two devices to this:

-device pci-assign,host=00:1b.0,addr=0x4 \ #Sound
-device pci-assign,host=03:00.0,addr=0x5 \ #VGA

I get the following error and kvm crashes:

http://pastebin.com/KmKEqhWK

It looks like the free PCI memory was not enough to assign the graphics 
card after assigning the sound card.



If I only assign the sound card, then "info pci" in the monitor looks 
like this:

  Bus  0, device   4, function 0:
Audio controller: PCI device 8086:3a3e
  IRQ 10.
  BAR0: 32 bit memory at 0xfebf [0xfebf3fff].
  id ""

The device is then visible inside the VM and working.


If I am not mistaken then the graphics card needs 2 bars, one with 256MB 
and one with 128K. The sound card then needs 1 bar with 16K of PCI memory.

How big is the PCI memory with seabios?
Is there really not enough space to "squeeze" in those extra 16K?

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Graphics card pass-through working with two pass pci-initialization

2011-05-26 Thread André Weidemann

Hi Gerd,
I managed to pass through a graphics card to a Windows7 VM using your 
kraxel.q35 seabios branch 
(http://www.kraxel.org/cgit/seabios/log/?h=kraxel.q35).


Here is my setup:
Intel DX58SO
Core i7 920
Radeon HD 6950
Kernel 2.6.35.7
qemu-kvm git pull from May 26th

The gfx card is working well on the desktop even with Aero turned on.
I tried various 3D Games which worked good (some were a bit choppy ;-) 
though).


There were 2 games that made Windows crash.
What is the way to debug what went wrong here?

One thing that is not working is the pass-through of a second device, a 
sound card in my case. As soon as I pass 2 devices to the VM, Windows 
does not boot anymore.
If I continue and remove the second device from the command line the VM 
does not boot anymore with the passed through gfx card. The graphics 
card drivers crashes Windows, with the error message of not being able 
to reset the graphics card. A reboot of the host cures this problem.


These are the command lines I used to start the VM:

echo "1002 6719" > /sys/bus/pci/drivers/pci-stub/new_id
echo :03:00.0 > /sys/bus/pci/devices/\:03\:00.0/driver/unbind
echo :03:00.0 > /sys/bus/pci/drivers/pci-stub/bind
echo "1002 6719" > /sys/bus/pci/drivers/pci-stub/remove_id

qemu-system-x86_64 \
-boot order=cd -cpu host -vnc 192.168.3.1:0 -k de \
-smp 2,cores=2,sockets=1 \
-drive file=${IMAGE},if=ide,index=0,cache=writeback -m 4096 \
-drive file=/dev/sda3,if=ide,index=1,cache=none \ 
-drive file=/dev/sdb3,if=ide,index=2,cache=none \

-drive file=/dev/cdrom,if=ide,index=3,media=cdrom,cache=none \
-device pci-assign,host=03:00.0 \
-net nic,model=e1000,macaddr=DE:AD:BE:EF:42:42 \
-net tap,script=/usr/local/bin/qemu-ifup \
-usb -usbdevice host:045e:00f9 \
-monitor telnet:192.168.3.1:1,server,nowait,nodelay

Thank you very much for your work.

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics pass-through

2011-01-28 Thread André Weidemann

Hi Alex,

On 28.01.2011 01:45, Alex Williamson wrote:


Do you mind sharing these patches?


Attached.


Thank you for attaching the patch. Unfortunately it does not apply to 
current clone of the qemu-kvm git repository. The file hw/vfio.c does 
not exist in the public repository, but your patch contains lines for 
hw/vfio.c.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Graphics pass-through

2011-01-27 Thread André Weidemann

Hi Alex,

On 26.01.2011 06:12, Alex Williamson wrote:


So while your initial results are promising, my guess is that you're
using card specific drivers and still need to consider some of the
harder problems with generic support for vga assignment.  I hacked on
this for a bit trying to see if I could get vga assignment working
with the vfio driver.  Setting up the legacy access and preventing
qemu from stealing it back should get you basic vga modes and might
even allow the option rom to run to initialize the card for pre-boot.
I was able to get this far on a similar ATI card.  I never hard much
luck with other cards though, and I was never able to get the vesa
extensions working.  Thanks,


Do you mind sharing these patches?

Thank you very much
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] GPGPU Support In KVM

2010-11-24 Thread André Weidemann

Hi,
On 24.11.2010 15:06, Prasad Joshi wrote:

I have been following the KVM mailing list last few months and have learned 
that the KVM does not have the GPU pass-through support. As far as I can 
understand, adding GPU pass-through would make GPU device available to VM as a 
Graphics Card, let me know if I am wrong. After the completion GPGPU support in 
VM I would love to work on this support as well.

Please let me know your thoughts.


There is already someone who was working on GPU pass-trough for KVM. 
Search the mailing list archives for _Fede_. Back in June he said that 
he would need to debug a BIOS issue in order to make it work.

Maybe you two should get together.
I hope this helps. I am really looking forward to see this in KVM.

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: GPGPU passthrough in linux kvm

2010-10-15 Thread André Weidemann

Hi Federico,

On 15.06.2010 18:18, Fede wrote:

On Wed, Jun 9, 2010 at 18:51, Adhyas Avasthi  wrote:

I read an old email thread which talked about GPGPU passthroughin
linux-kvm. Was this implemented?

If not, are there some quick hacks I can use to enable it in my tree?
Right now, I try to follow the same commands as I do for NIC
passthrough, but it complains that my device is busy. I have two
NVidia Graphics cards on my box.


I'm working on it. It doesn't work because graphics cards have BIOSes.

I need to debug some issues with the BIOS of my 9600GT, but I think
I'm quite close to succeed.


Are you still working on implementing this feature?
Did you make some progress in debugging the BIOS issue?
I am still very much looking forward to kvm being able to pass a video 
card to a VM.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: VM not booting anymore after Ubuntu upgrade

2010-08-04 Thread André Weidemann

On 04.08.2010 13:29, Avi Kivity wrote:

On 08/04/2010 02:22 PM, André Weidemann wrote:

On 04.08.2010 12:31, Avi Kivity wrote:

On 08/04/2010 10:38 AM, André Weidemann wrote:



Please enable ftrace:

# mount -t debugfs debugfs /sys/kernel/debug
# cd /sys/kernel/debug/tracing
# echo 10 > buffer_size_kb
# echo kvm > set_event
# echo 1 > tracing on

run the guest and kill qemu immediately when you get to the blank
screen
(use SDL so you can see it immediately). Then post
/sys/kernel/debug/trace somewhere.


I ran the trace and put the ouptut here:
http://ilpss8.dyndns.org/~andrew/qemu-kvm.trace.gz




<...>-26008 [001] 5175193.046430: kvm_exit: reason exception rip 0xfc842
<...>-26008 [001] 5175193.046430: kvm_page_fault: address fc842
error_code 9
<...>-26008 [001] 5175193.046432: kvm_entry: vcpu 0
<...>-26008 [001] 5175193.046434: kvm_exit: reason cr_access rip 0xfc796
<...>-26008 [001] 5175193.046435: kvm_cr: cr_write 0 = 0x10
<...>-26008 [001] 5175193.046442: kvm_entry: vcpu 0
<...>-26008 [001] 5175193.046444: kvm_exit: reason exception rip 0xfc799
<...>-26008 [001] 5175193.046447: kvm_entry: vcpu 0
<...>-26008 [001] 5175193.046449: kvm_exit: reason exception rip 0xfc799
<...>-26008 [001] 5175193.046449: kvm_page_fault: address feffd066
error_code 9
<...>-26008 [001] 5175193.046453: kvm_inj_virq: irq 13

#GP at fc799.

fc78f: 0f 20 c0 mov %cr0,%eax
fc792: 66 83 e0 fe and $0xfffe,%eax
fc796: 0f 22 c0 mov %eax,%cr0
fc799: ea 9e c7 00 f0 ljmp $0xf000,$0xc79e

I think we're in big real mode and your kernel has trouble emulating the
ljmp. Can you try latest seabios[1]? Commit 0f788893a8bba has a
workaround.


[1] git://git.linuxtogo.org/home/kevin/seabios.git


Thank you very much. Running qemu-kvm with the latest seabios fixed
the problem. The VM is running fine again.



Still I'd like to get this fixed. What's your host kernel version?


'uname -a' shows the following:
Linux vm-server 2.6.32-22-generic #35-Ubuntu SMP Tue Jun 1 14:18:25 UTC 
2010 x86_64 GNU/Linux


André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: VM not booting anymore after Ubuntu upgrade

2010-08-04 Thread André Weidemann

On 04.08.2010 12:31, Avi Kivity wrote:

On 08/04/2010 10:38 AM, André Weidemann wrote:



Please enable ftrace:

# mount -t debugfs debugfs /sys/kernel/debug
# cd /sys/kernel/debug/tracing
# echo 10 > buffer_size_kb
# echo kvm > set_event
# echo 1 > tracing on

run the guest and kill qemu immediately when you get to the blank screen
(use SDL so you can see it immediately). Then post
/sys/kernel/debug/trace somewhere.


I ran the trace and put the ouptut here:
http://ilpss8.dyndns.org/~andrew/qemu-kvm.trace.gz




<...>-26008 [001] 5175193.046430: kvm_exit: reason exception rip 0xfc842
<...>-26008 [001] 5175193.046430: kvm_page_fault: address fc842
error_code 9
<...>-26008 [001] 5175193.046432: kvm_entry: vcpu 0
<...>-26008 [001] 5175193.046434: kvm_exit: reason cr_access rip 0xfc796
<...>-26008 [001] 5175193.046435: kvm_cr: cr_write 0 = 0x10
<...>-26008 [001] 5175193.046442: kvm_entry: vcpu 0
<...>-26008 [001] 5175193.046444: kvm_exit: reason exception rip 0xfc799
<...>-26008 [001] 5175193.046447: kvm_entry: vcpu 0
<...>-26008 [001] 5175193.046449: kvm_exit: reason exception rip 0xfc799
<...>-26008 [001] 5175193.046449: kvm_page_fault: address feffd066
error_code 9
<...>-26008 [001] 5175193.046453: kvm_inj_virq: irq 13

#GP at fc799.

fc78f: 0f 20 c0 mov %cr0,%eax
fc792: 66 83 e0 fe and $0xfffe,%eax
fc796: 0f 22 c0 mov %eax,%cr0
fc799: ea 9e c7 00 f0 ljmp $0xf000,$0xc79e

I think we're in big real mode and your kernel has trouble emulating the
ljmp. Can you try latest seabios[1]? Commit 0f788893a8bba has a workaround.


[1] git://git.linuxtogo.org/home/kevin/seabios.git


Thank you very much. Running qemu-kvm with the latest seabios fixed the 
problem. The VM is running fine again.


Best Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: VM not booting anymore after Ubuntu upgrade

2010-08-04 Thread André Weidemann

On 04.08.2010 09:05, Avi Kivity wrote:

On 08/04/2010 09:55 AM, André Weidemann wrote:

On 04.08.2010 08:48, Avi Kivity wrote:

On 08/04/2010 08:39 AM, André Weidemann wrote:

Hi,
I recently upgraded my machine from Ubuntu 9.10 to 10.4 (x86_64).
Ever since I upgraded my machine I cannot get qemu-kvm to start again.

I did not install the kvm package provided by Ubuntu. Instead I pulled
todays git from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git and
ran ./configure && make -j6 && make install.
The configure output can be found here: http://pastebin.org/447003

I am using the following command line to boot qemu-kvm:

qemu-system-x86_64 -vnc :2 -k de -m 1024 -drive
file=/dev/sda,if=ide,index=0


/dev/sda? is this not the host disk?


It is not the host disk. For some reason the Marvell Controller is found 
before the Intel ICH10. So the additional disk I put in for testing 
becomes sda.




When connecting to the VNC console I only get a black screen.


Does the monitor work? add -monitor stdio to the command line and type
'info registers' after you get the bla[nc]k screen.



This is the monitor output:

QEMU 0.13.50 monitor - type 'help' for more information
(qemu) info registers
EAX=0010 EBX= ECX=6e82 EDX=00b81013
ESI=f201 EDI=000c8c00 EBP=000e8550 ESP=6e78
EIP=0008bc2f EFL=00010086 [--S--P-] CPL=3 II=0 A20=1 SMM=0 HLT=0
ES =   f300
CS =   f300


This guest is very confused (what is it?)


This guest is a Windows 7 Pro 64bit. But it does not matter which image 
I try to boot. Even a PXE network boot results in the same behavior.



Please enable ftrace:

# mount -t debugfs debugfs /sys/kernel/debug
# cd /sys/kernel/debug/tracing
# echo 10 > buffer_size_kb
# echo kvm > set_event
# echo 1 > tracing on

run the guest and kill qemu immediately when you get to the blank screen
(use SDL so you can see it immediately). Then post
/sys/kernel/debug/trace somewhere.


I ran the trace and put the ouptut here:
http://ilpss8.dyndns.org/~andrew/qemu-kvm.trace.gz

Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: VM not booting anymore after Ubuntu upgrade

2010-08-03 Thread André Weidemann

On 04.08.2010 08:48, Avi Kivity wrote:

On 08/04/2010 08:39 AM, André Weidemann wrote:

Hi,
I recently upgraded my machine from Ubuntu 9.10 to 10.4 (x86_64).
Ever since I upgraded my machine I cannot get qemu-kvm to start again.

I did not install the kvm package provided by Ubuntu. Instead I pulled
todays git from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git and
ran ./configure && make -j6 && make install.
The configure output can be found here: http://pastebin.org/447003

I am using the following command line to boot qemu-kvm:

qemu-system-x86_64 -vnc :2 -k de -m 1024 -drive
file=/dev/sda,if=ide,index=0

When connecting to the VNC console I only get a black screen.


Does the monitor work? add -monitor stdio to the command line and type
'info registers' after you get the bla[nc]k screen.



This is the monitor output:

QEMU 0.13.50 monitor - type 'help' for more information
(qemu) info registers
EAX=0010 EBX= ECX=6e82 EDX=00b81013
ESI=f201 EDI=000c8c00 EBP=000e8550 ESP=6e78
EIP=0008bc2f EFL=00010086 [--S--P-] CPL=3 II=0 A20=1 SMM=0 HLT=0
ES =   f300
CS =   f300
SS =   f300
DS =   f300
FS =   f300
GS =   f300
LDT=   8200
TR = feffd000 2088 8b00
GDT= 000fce38 0037
IDT= 000fdcf0 
CR0=0010 CR2= CR3= CR4=
DR0= DR1= DR2= DR3=
DR6=0ff0 DR7=0400
EFER=
FCW=037f FSW= [ST=0] FTW=00 MXCSR=
FPR0=  FPR1= 
FPR2=  FPR3= 
FPR4=  FPR5= 
FPR6=  FPR7= 
XMM00= 
XMM01=
XMM02= 
XMM03=
XMM04= 
XMM05=
XMM06= 
XMM07=


Regards,
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


VM not booting anymore after Ubuntu upgrade

2010-08-03 Thread André Weidemann

Hi,
I recently upgraded my machine from Ubuntu 9.10 to 10.4 (x86_64).
Ever since I upgraded my machine I cannot get qemu-kvm to start again.

I did not install the kvm package provided by Ubuntu. Instead I pulled 
todays git from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git and 
ran ./configure && make -j6 && make install.

The configure output can be found here: http://pastebin.org/447003

I am using the following command line to boot qemu-kvm:

qemu-system-x86_64 -vnc :2 -k de -m 1024 -drive file=/dev/sda,if=ide,index=0

When connecting to the VNC console I only get a black screen.

I did an strace -p $(pidof qemu-system-x86_64) and I only see those 
lines looping endlessly:


timer_gettime(0, {it_interval={0, 0}, it_value={0, 0}}) = 0
timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 25}}, NULL) = 0
timer_gettime(0, {it_interval={0, 0}, it_value={0, 225694}}) = 0
select(14, [5 8 10 11 13], [], [], {1, 0}) = 1 (in [11], left {0, 97})
read(11, "\1\0\0\0\0\0\0\0", 512)   = 8
select(14, [5 8 10 11 13], [], [], {1, 0}) = 1 (in [13], left {0, 999876})
read(13, 
"\16\0\0\0\0\0\0\0\376\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
128) = 128
rt_sigaction(SIGALRM, NULL, {0x49f430, ~[KILL STOP RTMIN RT_1], 
SA_RESTORER, 0x7f145a4c48f0}, 8) = 0

write(12, "\1\0\0\0\0\0\0\0", 8)= 8
read(13, 0x7fff5dbaa570, 128)   = -1 EAGAIN (Resource 
temporarily unavailable)



Can anyone help me on what is going (wr)on(g) here?

Thank you in advance
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Qemu-KVM 0.12.3 and Multipath -> Assertion

2010-05-08 Thread André Weidemann

Hi Kevin,
On 04.05.2010 14:20, Kevin Wolf wrote:


Am 04.05.2010 13:38, schrieb Peter Lieven:

hi kevin,

i set a breakpint at bmdma_active_if. the first 2 breaks encountered
when the last path in the multipath
failed, but the assertion was not true.
when i kicked one path back in the breakpoint was reached again, this
time leading to an assert.
the stacktrace is from the point shortly before.

hope this helps.


Hm, looks like there's something wrong with cancelling requests -
bdrv_aio_cancel might decide that it completes a request (and
consequently calls the callback for it) whereas the IDE emulation
decides that it's done with the request before calling bdrv_aio_cancel.

I haven't looked in much detail what this could break, but does
something like this help?


Your attached patch fixes the problem I had as well. I ran 3 consecutive 
tests tonight, which all finished without crashing the VM.
I reported my "assertion failed" error on March 14th while doing disk 
perfomance tests using iozone in an Ubuntu 9.10 VM with qemu-kvm 0.12.3.


Thank you very much.
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Qemu-KVM 0.12.3 and Multipath -> Assertion

2010-05-03 Thread André Weidemann

Hi Peter,
On 03.05.2010 23:26, Peter Lieven wrote:


Hi Qemu/KVM Devel Team,

i'm using qemu-kvm 0.12.3 with latest Kernel 2.6.33.3.
As backend we use open-iSCSI with dm-multipath.

Multipath is configured to queue i/o if no path is available.

If we create a failure on all paths, qemu starts to consume 100%
CPU due to i/o waits which is ok so far.

1 odd thing: The Monitor Interface is not responding any more ...

What es a really blocker is that KVM crashes with:
kvm: /usr/src/qemu-kvm-0.12.3/hw/ide/internal.h:507: bmdma_active_if:
Assertion `bmdma->unit != (uint8_t)-1' failed.

after the multipath has reestablisched at least one path.

Any ideas? I remember this was working with earlier kernel/kvm/qemu
versions.



I have the same issue on my machine, although I am using local storage 
(LVM or a physical disk) to write my data to.
I reported the "Assertion failed" on March 17th to the list. Marcello 
and Avi had asked some question back then, but I don't know if they have 
come up with a fix for it.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm crashes with Assertion ... failed.

2010-03-24 Thread André Weidemann

Hi,

On 24.03.2010 17:23, Avi Kivity wrote:


On 03/24/2010 06:20 PM, André Weidemann wrote:

Does this happen with a guest installed on kvm, or just with the guest
that (guessing from the name) was imported from vmware?



I booted the VM via PXE into an Ubuntu Live CD image. I only added the
Windows disk image, so I could copy the resulting Excel file (from
iozone) to this disk. The Windows 7 on this disk was installed under
kvm 0.12.3.



What version of Ubuntu? Can you post a way to reproduce this reliably
(how you created the disk etc.)




In that particular case I ran Ubuntu Desktop 9.10 x86_64 inside the VM. 
I set my server up so I can boot any machine on the network via PXE. I 
used the live CD that you can download here: 
http://141.30.3.84/ubuntu-releases/9.10/ubuntu-9.10-desktop-amd64.iso


Since this setup is a very special I booted the VM from the CD-ISO and 
installed Ubuntu onto an LV(100GB). This way I think, it is easier to 
reproduce.


At first I installed Ubuntu on an LV which resides on a VG that is on a 
RAID5 created via mdadm (4x 1TB HDDs).


Here is the command line, I used to start the VM:
qemu-system-x86_64 -cpu core2duo -vga cirrus -boot order=d -vnc 
192.168.3.42:2 -k de -smp 4,cores=4 -m 1024 -net 
nic,model=e1000,macaddr=DE:AD:BE:EF:12:3A -net 
tap,script=/usr/local/bin/qemu-ifup  -monitor pty -name 
Ubuntu9.10test,process=Ubuntu9.10test -cdrom 
/tftpboot/ubuntu-9.10-desktop-amd64.iso -drive 
file=/dev/storage/UbuntuTest,if=ide,index=1,cache=none,aio=native


I booted into the Ubuntu Live CD and chose to install Ubuntu from the 
desktop. I had the partitioner install Ubuntu onto the entire disk. I 
did not setup any partitions manually. During the install process, the 
VM crashed again. The VM did not always crash at same stage of the 
installation process. But it nevertheless did, every time I tried to 
install it and I tried 3 times in a row.


I then changes index=1 to index=0 and ran another 3 tests. Ubuntu 
crashed 2 out of 3 times during installation.


To rule out the problem to be related to the LV on the RAID5, I then 
installed Ubuntu on a physical drive(250GB SATA). Therefore I changes 
the command line to this:
qemu-system-x86_64 -cpu core2duo -vga cirrus -boot order=d -vnc 
192.168.3.42:2 -k de -smp 4,cores=4 -m 1024 -net 
nic,model=e1000,macaddr=DE:AD:BE:EF:12:3A -net 
tap,script=/usr/local/bin/qemu-ifup  -monitor pty -name 
Ubuntu9.10test,process=Ubuntu9.10test -cdrom 
/tftpboot/ubuntu-9.10-desktop-amd64.iso -drive 
file=/dev/sdg,if=ide,index=0,cache=none,aio=native
I gave it another three tries. 2 out of 3 installations made the VM 
crash at around 95% and 43%.


So the crash does not seem to be related to running iozone inside the 
VM, but to disk access in general.


On the Server I am running Ubuntu Server 9.10 x86_64 with kernel 
2.6.31-20-server. The server is equipped with an Intel Q9300 CPU and 8GB 
RAM.

If you need more information, let me know.

 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm crashes with Assertion ... failed.

2010-03-24 Thread André Weidemann

Hi,
On 24.03.2010 13:17, Avi Kivity wrote:

On 03/17/2010 11:14 PM, André Weidemann wrote:

qemu-system-x86_64 -cpu core2duo -vga cirrus -boot order=ndc -vnc
192.168.3.42:2 -k de -smp 4,cores=4 -drive
file=/vmware/Windows7Test_600G.img,if=ide,index=0,cache=writeback -m
1024 -net nic,model=e1000,macaddr=DE:AD:BE:EF:12:3A -net
tap,script=/usr/local/bin/qemu-ifup -monitor pty -name
Windows7test,process=Windows7test -drive
file=/dev/storage/Windows7test,if=ide,index=1,cache=none,aio=native


Andre,

Can you try qemu-kvm-0.12.3 ?



I did the following:
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
qemu-kvm-2010-03-17
cd qemu-kvm-2010-03-17
git checkout -b test qemu-kvm-0.12.3
./configure
make -j6 && make install

I started the VM again exactly as I did the last time and it crashed
again with the same error message.
"qemu-system-x86_64:
/usr/local/src/qemu-kvm-2010-03-17/hw/ide/internal.h:507:
bmdma_active_if: Assertion `bmdma->unit != (uint8_t)-1' failed."



Does this happen with a guest installed on kvm, or just with the guest
that (guessing from the name) was imported from vmware?


I booted the VM via PXE into an Ubuntu Live CD image. I only added the 
Windows disk image, so I could copy the resulting Excel file (from 
iozone) to this disk. The Windows 7 on this disk was installed under kvm 
0.12.3.


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm crashes with Assertion ... failed.

2010-03-17 Thread André Weidemann

On 17.03.2010 19:22, Marcelo Tosatti wrote:

On Sun, Mar 14, 2010 at 09:57:52AM +0100, André Weidemann wrote:

Hi,
I cloned the qemu-kvm git repository today with "git clone
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
qemu-kvm-2010-03-14", ran configure and compiled it and did a "make
install". Everything went fine without warnings or errors.
For configure output take a look here: http://pastebin.com/BL4DYCRY

Here is my Server Hardware:
Asus P5Q Mainbaord
Intel Q9300
8GB RAM
RAID5 with mdadm consisting of 4x 1TB disks
The volume /dev/storage/Windows7test mentioned below is on this RAID5.

I ran my virtual machine with the following command:

qemu-system-x86_64 -cpu core2duo -vga cirrus -boot order=ndc -vnc
192.168.3.42:2 -k de -smp 4,cores=4 -drive
file=/vmware/Windows7Test_600G.img,if=ide,index=0,cache=writeback -m
1024 -net nic,model=e1000,macaddr=DE:AD:BE:EF:12:3A -net
tap,script=/usr/local/bin/qemu-ifup  -monitor pty -name
Windows7test,process=Windows7test -drive
file=/dev/storage/Windows7test,if=ide,index=1,cache=none,aio=native


Andre,

Can you try qemu-kvm-0.12.3 ?


I did the following:
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git 
qemu-kvm-2010-03-17

cd qemu-kvm-2010-03-17
git checkout -b test qemu-kvm-0.12.3
./configure
make -j6 && make install

I started the VM again exactly as I did the last time and it crashed 
again with the same error message.
"qemu-system-x86_64: 
/usr/local/src/qemu-kvm-2010-03-17/hw/ide/internal.h:507: 
bmdma_active_if: Assertion `bmdma->unit != (uint8_t)-1' failed."


 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qemu-kvm crashes with Assertion ... failed.

2010-03-14 Thread André Weidemann

Hi,
I cloned the qemu-kvm git repository today with "git clone 
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git qemu-kvm-2010-03-14", 
ran configure and compiled it and did a "make install". Everything went 
fine without warnings or errors.

For configure output take a look here: http://pastebin.com/BL4DYCRY

Here is my Server Hardware:
Asus P5Q Mainbaord
Intel Q9300
8GB RAM
RAID5 with mdadm consisting of 4x 1TB disks
The volume /dev/storage/Windows7test mentioned below is on this RAID5.

I ran my virtual machine with the following command:

qemu-system-x86_64 -cpu core2duo -vga cirrus -boot order=ndc -vnc 
192.168.3.42:2 -k de -smp 4,cores=4 -drive 
file=/vmware/Windows7Test_600G.img,if=ide,index=0,cache=writeback -m 
1024 -net nic,model=e1000,macaddr=DE:AD:BE:EF:12:3A -net 
tap,script=/usr/local/bin/qemu-ifup  -monitor pty -name 
Windows7test,process=Windows7test -drive 
file=/dev/storage/Windows7test,if=ide,index=1,cache=none,aio=native


Windows7Test_600G.img is a qcow2 file and contains a Windows 7 Pro image.
/dev/storage/Windows7test is formated with XFS

After starting the machine with the above command line, I booted into an 
Ubuntu 9.10 x86_64 Live Image via PXE and mounted /dev/sdb1 
(/dev/storage/Windows7test) under /mnt. I then did "cd /mnt/" and ran 
"iozone -Ra -g 2G -b /tmp/iozone-aoi-linux-xls"


iozone ran some test and then kvm simply quit with the following error 
message:
qemu-system-x86_64: 
/usr/local/src/qemu-kvm-2010-03-10/hw/ide/internal.h:510: 
bmdma_active_if: Assertion `bmdma->unit != (uint8_t)-1' failed.


/var/log/syslog contained the folowing:
Mar 14 09:18:14 server kernel: [318080.627468] kvm: 1361: cpu0 
kvm_set_msr_common: MSR_IA32_MCG_STATUS 0x0, nop
Mar 14 09:18:14 server  kernel: [318080.627473] kvm: 1361: cpu0 
kvm_set_msr_common: MSR_IA32_MCG_CTL 0x, nop
Mar 14 09:18:14 server kernel: [318080.627476] kvm: 1361: cpu0 unhandled 
wrmsr: 0x400 data 
Mar 14 09:18:14 server kernel: [318080.627506] kvm: 1361: cpu1 
kvm_set_msr_common: MSR_IA32_MCG_STATUS 0x0, nop
Mar 14 09:18:14 server  kernel: [318080.627509] kvm: 1361: cpu1 
kvm_set_msr_common: MSR_IA32_MCG_CTL 0x, nop
Mar 14 09:18:14 server kernel: [318080.627511] kvm: 1361: cpu1 unhandled 
wrmsr: 0x400 data 
Mar 14 09:18:14 server kernel: [318080.627538] kvm: 1361: cpu2 
kvm_set_msr_common: MSR_IA32_MCG_STATUS 0x0, nop
Mar 14 09:18:14 server kernel: [318080.627540] kvm: 1361: cpu2 
kvm_set_msr_common: MSR_IA32_MCG_CTL 0x, nop
Mar 14 09:18:14 server kernel: [318080.627543] kvm: 1361: cpu2 unhandled 
wrmsr: 0x400 data 



I ws able to reproduce this error 3 times in a row.

Regards,
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Direct access to GPGPU do-able?

2010-02-25 Thread André Weidemann

Hi Federico,

On 01.12.2009 19:33, Fede wrote:


I analyzed both XEN patches and determined where this patch must be
done in KVM. It's just a matter of writing the code.

Currently I'm studying for some final exams, so I will take some time
off before I continue with this port.

And because of hardware related problems, if it's not done in two or
three weeks, then it will be finished in february.



Did you find some time to start working on the patches for KVM, so 
graphic cards will be initialized properly inside VMs?


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


How to properly turn off guest VM on server shutdown?

2010-01-24 Thread André Weidemann

Hi,
is there a mechanism inside qemu-kvm that can shutdown the OS inside a 
VM when the qemu-kvm process receives a kill signal?
I am running Windows7 Pro inside a VM and I would like kvm to shut the 
Windows system down before the process is killed.
I know that VMware can shut down the guest OS when stopping the VMware 
instance. Is there a similar feature in KVM?


Regards
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


passthrough of PCIe graphics card to VM

2009-11-28 Thread André Weidemann

Hi,
I am trying to pass a PCIe graphics card to a VM.
Windows 7 recognizes the card, but can not use it. I can install the 
drivers under Windows, but after a reboot the device is still not 
operational.
Has anyone here accomplished passing a graphics card to a VM and make it 
work?

I'd really appreciate your help.

Kind Regards.
 André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html