qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
Hi, I'd like to ask for advice with following problem. I have windows 2008 terminal server guest running on 2.6.36 x86_64 host (kvm 0.13.0). guest has 4GB of RAM, 40GB storage on top of LVM volume and two cores. So far everything was running fine, but during periodic maintenance I wanted to

Re: [Qemu-devel] Re: [PATCH 09/21] Introduce event-tap.

2011-01-06 Thread Yoshiaki Tamura
2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at 10:45:13PM +0900, Yoshiaki Tamura wrote: 2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at 09:20:53PM +0900, Yoshiaki Tamura wrote: 2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Stefan Hajnoczi
On Thu, Jan 6, 2011 at 7:48 AM, Nikola Ciprich extmaill...@linuxbox.cz wrote: So windows started checking disk integrity, but the problem is, that it's waaay too slow - after ~12 hours, it's still running and seeems like it'll take ages to finish. Please post your KVM command-line. Have you

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 09:48 AM, Nikola Ciprich wrote: Hi, I'd like to ask for advice with following problem. I have windows 2008 terminal server guest running on 2.6.36 x86_64 host (kvm 0.13.0). guest has 4GB of RAM, 40GB storage on top of LVM volume and two cores. So far everything was running fine,

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
Hello Stefan! Please post your KVM command-line. /usr/bin/qemu-kvm -S -M pc-0.13 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -name vmwts02 -uuid 1e501300-dc48-11df-a690-00304834195b -nodefconfig -nodefaults -chardev

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
Hello Avi! On Thu, Jan 06, 2011 at 11:08:32AM +0200, Avi Kivity wrote: Let's start with a few 'kvm_stat -1' snapshots while this is going on. here it is, but note that there are few more machines running on this host. but they're almost idle in contrast to this windows one, so I hope it's not

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 11:20 AM, Nikola Ciprich wrote: Hello Avi! On Thu, Jan 06, 2011 at 11:08:32AM +0200, Avi Kivity wrote: Let's start with a few 'kvm_stat -1' snapshots while this is going on. here it is, but note that there are few more machines running on this host. but they're almost idle in

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 11:27 AM, Avi Kivity wrote: On 01/06/2011 11:20 AM, Nikola Ciprich wrote: Hello Avi! On Thu, Jan 06, 2011 at 11:08:32AM +0200, Avi Kivity wrote: Let's start with a few 'kvm_stat -1' snapshots while this is going on. here it is, but note that there are few more machines

Flow Control and Port Mirroring Revisited

2011-01-06 Thread Simon Horman
Hi, Back in October I reported that I noticed a problem whereby flow control breaks down when openvswitch is configured to mirror a port[1]. I have (finally) looked into this further and the problem appears to relate to cloning of skbs, as Jesse Gross originally suspected. More specifically, in

Re: [Qemu-devel] Re: [PATCH 09/21] Introduce event-tap.

2011-01-06 Thread Michael S. Tsirkin
On Thu, Jan 06, 2011 at 05:47:27PM +0900, Yoshiaki Tamura wrote: 2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at 10:45:13PM +0900, Yoshiaki Tamura wrote: 2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at 09:20:53PM +0900, Yoshiaki Tamura wrote:

Re: [Qemu-devel] Re: [PATCH 09/21] Introduce event-tap.

2011-01-06 Thread Yoshiaki Tamura
2011/1/6 Michael S. Tsirkin m...@redhat.com: On Thu, Jan 06, 2011 at 05:47:27PM +0900, Yoshiaki Tamura wrote: 2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at 10:45:13PM +0900, Yoshiaki Tamura wrote: 2011/1/4 Michael S. Tsirkin m...@redhat.com: On Tue, Jan 04, 2011 at

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
- run trace-cmd record -e kvm -b 10 -P pid1 -P pid2, ctrl-C after a seems like it's not possible to specify multiple pids, so I've run 4 commands in parallel. Also I can't get monitor information since vm is started using libvirt, so I've just used all machine's qemu-kvm pids.. hope it's OK

KVM TSC trapping

2011-01-06 Thread Zachary Amsden
On top of my last patchset, I now implement TSC trapping and a flexible migration scheme for maintaining stable TSC across migration. Since it is administratively configured, it can be selectively enabled only for VMs which require it. In particular, VMs which use KVM clock probably do not want

[PATCH 1/3] KVM: Move struct kvm_io_device to kvm_host.h

2011-01-06 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h Signed-off-by: Sheng Yang sh...@linux.intel.com --- include/linux/kvm_host.h | 23 +++ virt/kvm/iodev.h | 25 + 2 files changed, 24 insertions(+), 24 deletions(-) diff --git

[PATCH 0/3 v7] MSI-X MMIO support for KVM

2011-01-06 Thread Sheng Yang
Change from v6: 1. Discard PBA support. But we can still add it later. 2. Fix one memory reference bug 3. Add automatically MMIO unregister after device was deassigned. 4. Update according to Avi's comments. 5. Add documents for new API. Notice this patchset depends on two PCI patches named:

[PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-06 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/Makefile|2 +- arch/x86/kvm/x86.c |8 +- include/linux/kvm.h | 21 include/linux/kvm_host.h | 25 virt/kvm/assigned-dev.c | 44

[PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-06 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- Documentation/kvm/api.txt | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..4978b94 100644 ---

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 11:42 AM, Nikola Ciprich wrote: - run trace-cmd record -e kvm -b 10 -P pid1 -P pid2, ctrl-C after a seems like it's not possible to specify multiple pids, so Did you get 'overrun: something' reports from trace-cmd, where something != 0? If you're not sure, please run the

[PATCH 0/4 v7] qemu-kvm: MSI-X MMIO support for assigned device

2011-01-06 Thread Sheng Yang
Update with kernel patches v7. Sheng Yang (4): qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit qemu-kvm: Ioctl for MSIX MMIO support qemu-kvm: Header file update for MSI-X MMIO support qemu-kvm: MSI-X MMIO support for assigned device

[PATCH 3/4] qemu-kvm: Header file update for MSI-X MMIO support

2011-01-06 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm/include/linux/kvm.h | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index e46729e..7b6d5b9 100644 --- a/kvm/include/linux/kvm.h +++

[PATCH 4/4] qemu-kvm: MSI-X MMIO support for assigned device

2011-01-06 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c | 93 +-- hw/device-assignment.h |3 ++ qemu-kvm.c | 40 qemu-kvm.h | 11 ++ 4 files changed, 135 insertions(+), 12

[PATCH 1/4] qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit

2011-01-06 Thread Sheng Yang
The old MSI-X enabling method assume the entries are written before MSI-X enabled, but some OS didn't obey this, e.g. FreeBSD. This patch would fix this. Also, according to the PCI spec, mask bit of MSI-X table should be set after reset. Signed-off-by: Sheng Yang sh...@linux.intel.com ---

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Eric Dumazet
Le jeudi 06 janvier 2011 à 18:33 +0900, Simon Horman a écrit : Hi, Back in October I reported that I noticed a problem whereby flow control breaks down when openvswitch is configured to mirror a port[1]. I have (finally) looked into this further and the problem appears to relate to

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
Did you get 'overrun: something' reports from trace-cmd, where something != 0? nope, all entries were 0. Dan, is there a way to hijack the monitor so we can run some commands on it? Things like 'info registers' and disassembly. AFAIK that's intentionally not possible :( pity.. Looks

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Michael S. Tsirkin
On Thu, Jan 06, 2011 at 06:33:12PM +0900, Simon Horman wrote: Hi, Back in October I reported that I noticed a problem whereby flow control breaks down when openvswitch is configured to mirror a port[1]. Apropos the UDP flow control. See this

Re: [KVM TSC trapping / migration 2/2] Add TSC KHZ MSR

2011-01-06 Thread Alexander Graf
Am 06.01.2011 um 11:10 schrieb Zachary Amsden zams...@redhat.com: Use an MSR to allow soft migration to hosts which do not support TSC trapping. Rather than make this a required element of any migration protocol, we allow the TSC rate to be exported as a data field (useful in its own

Re: [KVM TSC trapping / migration 1/2] Add TSC trapping for SVM and VMX

2011-01-06 Thread Alexander Graf
Am 06.01.2011 um 11:10 schrieb Zachary Amsden zams...@redhat.com: Reasons to trap the TSC are numerous, but we want to avoid it as much as possible for performance reasons. We provide two conservative modes via modules parameters and userspace hinting. First, the module can be loaded with

[PATCH 0/3] Fix a couple of races in vmexit.flat

2011-01-06 Thread Avi Kivity
This patchset fixes a couple of races and speeds up an important function. Avi Kivity (3): smp: fix race in async on_cpu() smp: speed up cpu_count() vmexit: fix race in joining smp tests lib/x86/smp.c | 33 +++-- x86/vmexit.c |9 + 2 files

[PATCH 2/3] smp: speed up cpu_count()

2011-01-06 Thread Avi Kivity
cpu_count() is used in important places, like vmexit.flat's measuring loop, yet it is ridiculously slow as it talks to the firmware config interface. Speed it up by reading the value from memory. Signed-off-by: Avi Kivity a...@redhat.com --- lib/x86/smp.c |4 +++- 1 files changed, 3

[PATCH 1/3] smp: fix race in async on_cpu()

2011-01-06 Thread Avi Kivity
We fire off the IPI, but don't wait for the other cpu to pickk up the function and data before returning. Fix by making the other cpu ACK the receipt of the IPI (but still execute the result asynchrously). Signed-off-by: Avi Kivity a...@redhat.com --- lib/x86/smp.c | 29

[PATCH 3/3] vmexit: fix race in joining smp tests

2011-01-06 Thread Avi Kivity
'nr_cpus_done' is not incremented atomically; this has been observed to cause tests to stall. Fix by using a proper atomic increment. Signed-off-by: Avi Kivity a...@redhat.com --- x86/vmexit.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/x86/vmexit.c

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 12:25 PM, Nikola Ciprich wrote: Did you get 'overrun: something' reports from trace-cmd, where something != 0? nope, all entries were 0. Dan, is there a way to hijack the monitor so we can run some commands on it? Things like 'info registers' and disassembly. AFAIK that's

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Daniel P. Berrange
On Thu, Jan 06, 2011 at 12:19:21PM +0200, Avi Kivity wrote: On 01/06/2011 11:42 AM, Nikola Ciprich wrote: - run trace-cmd record -e kvm -b 10 -P pid1 -P pid2, ctrl-C after a seems like it's not possible to specify multiple pids, so Did you get 'overrun: something' reports from

Re: FIXED: Re: [Qemu-devel] possible regression in qemu-kvm 0.13.0 (memtest)

2011-01-06 Thread Stefan Hajnoczi
On Wed, Jan 5, 2011 at 5:01 PM, Serge E. Hallyn se...@hallyn.com wrote: I don't see this patch in the git tree, nor a revert of the buggy commit.  Was any decision made on this? Blue Swirl posted a patch a few days ago: [PATCH] pc: move port 92 stuff back to pc.c from pckbd.c It hasn't been

Re: [KVM TSC trapping / migration 2/2] Add TSC KHZ MSR

2011-01-06 Thread Zachary Amsden
On 01/06/2011 12:34 AM, Alexander Graf wrote: Am 06.01.2011 um 11:10 schrieb Zachary Amsdenzams...@redhat.com: Use an MSR to allow soft migration to hosts which do not support TSC trapping. Rather than make this a required element of any migration protocol, we allow the TSC rate to be

Re: [KVM TSC trapping / migration 1/2] Add TSC trapping for SVM and VMX

2011-01-06 Thread Zachary Amsden
On 01/06/2011 12:41 AM, Alexander Graf wrote: Am 06.01.2011 um 11:10 schrieb Zachary Amsdenzams...@redhat.com: Reasons to trap the TSC are numerous, but we want to avoid it as much as possible for performance reasons. We provide two conservative modes via modules parameters and userspace

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Simon Horman
On Thu, Jan 06, 2011 at 12:27:55PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 06, 2011 at 06:33:12PM +0900, Simon Horman wrote: Hi, Back in October I reported that I noticed a problem whereby flow control breaks down when openvswitch is configured to mirror a port[1]. Apropos the

Re: [KVM TSC trapping / migration 1/2] Add TSC trapping for SVM and VMX

2011-01-06 Thread Avi Kivity
On 01/06/2011 12:10 PM, Zachary Amsden wrote: Reasons to trap the TSC are numerous, but we want to avoid it as much as possible for performance reasons. We provide two conservative modes via modules parameters and userspace hinting. First, the module can be loaded with tsc_auto=1 as a module

Re: [KVM TSC trapping / migration 1/2] Add TSC trapping for SVM and VMX

2011-01-06 Thread Alexander Graf
On 06.01.2011, at 12:30, Zachary Amsden wrote: On 01/06/2011 12:41 AM, Alexander Graf wrote: Am 06.01.2011 um 11:10 schrieb Zachary Amsdenzams...@redhat.com: Reasons to trap the TSC are numerous, but we want to avoid it as much as possible for performance reasons. We provide two

Re: [KVM TSC trapping / migration 2/2] Add TSC KHZ MSR

2011-01-06 Thread Alexander Graf
On 06.01.2011, at 12:27, Zachary Amsden wrote: On 01/06/2011 12:34 AM, Alexander Graf wrote: Am 06.01.2011 um 11:10 schrieb Zachary Amsdenzams...@redhat.com: Use an MSR to allow soft migration to hosts which do not support TSC trapping. Rather than make this a required element of any

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-06 Thread Michael Goldish
On 01/05/2011 06:21 PM, Avi Kivity wrote: On 01/05/2011 06:12 PM, Avi Kivity wrote: On 01/05/2011 05:45 PM, Michael Goldish wrote: In complex tests (KVM) an exception string is often not informative enough and the traceback and source code have to be examined in order to figure out what

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Michael S. Tsirkin
On Thu, Jan 06, 2011 at 08:30:52PM +0900, Simon Horman wrote: On Thu, Jan 06, 2011 at 12:27:55PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 06, 2011 at 06:33:12PM +0900, Simon Horman wrote: Hi, Back in October I reported that I noticed a problem whereby flow control breaks down

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
OK, got test environment running, but it seems to be running much faster there :( but as dan suggested, I can type monitor commands using virsh, so I can (carefully:)) continue debugging on this production machine.. here's info registers: RAX=0007 RBX=00ac

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
If you have a new enough libvirt, then you can also send commands directly using 'virsh qemu-monitor-command' (checking whether you need JSON or HMP syntax first - in this case you can see it needs HMP). Thanks Dan! didn't know this is possible, works pretty well! n. Regards, Daniel --

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Simon Horman
On Thu, Jan 06, 2011 at 02:07:22PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 06, 2011 at 08:30:52PM +0900, Simon Horman wrote: On Thu, Jan 06, 2011 at 12:27:55PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 06, 2011 at 06:33:12PM +0900, Simon Horman wrote: Hi, Back in October

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Simon Horman
On Thu, Jan 06, 2011 at 11:22:42AM +0100, Eric Dumazet wrote: Le jeudi 06 janvier 2011 à 18:33 +0900, Simon Horman a écrit : Hi, Back in October I reported that I noticed a problem whereby flow control breaks down when openvswitch is configured to mirror a port[1]. I have (finally)

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Michael S. Tsirkin
On Thu, Jan 06, 2011 at 09:29:02PM +0900, Simon Horman wrote: On Thu, Jan 06, 2011 at 02:07:22PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 06, 2011 at 08:30:52PM +0900, Simon Horman wrote: On Thu, Jan 06, 2011 at 12:27:55PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 06, 2011 at

cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Dominik Klein
Hi I am playing with cgroups and try to limit block io for guests. The proof of concept is: # mkdir /dev/cgroup/blkio # mount -t cgroup -o blkio blkio /dev/cgroup/blkio/ # cd blkio/ # mkdir test # cd test/ # ls -l /dev/vdisks/kirk lrwxrwxrwx 1 root root 7 2011-01-06 13:46 /dev/vdisks/kirk -

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 02:18 PM, Nikola Ciprich wrote: OK, got test environment running, but it seems to be running much faster there :( Same host kernel? but as dan suggested, I can type monitor commands using virsh, so I can (carefully:)) continue debugging on this production machine.. here's info

Re: Flow Control and Port Mirroring Revisited

2011-01-06 Thread Eric Dumazet
Le jeudi 06 janvier 2011 à 21:44 +0900, Simon Horman a écrit : Hi Eric ! Thanks for the advice. I had thought about the socket buffer but at some point it slipped my mind. In any case the following patch seems to implement the change that I had in mind. However my discussions Michael

Re: [Fwd: Re: [RFC -v3 PATCH 2/3] sched: add yield_to function]

2011-01-06 Thread Hillf Danton
On Wed, Jan 5, 2011 at 5:41 PM, Peter Zijlstra pet...@infradead.org wrote: On Wed, 2011-01-05 at 00:38 +0100, Tommaso Cucinotta wrote: Il 04/01/2011 19:15, Dario Faggioli ha scritto: Forwarded Message From: Peter Zijlstraa.p.zijls...@chello.nl To: Rik van

Re: [libvirt] cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Daniel P. Berrange
On Thu, Jan 06, 2011 at 02:15:37PM +0100, Dominik Klein wrote: Hi I am playing with cgroups and try to limit block io for guests. The proof of concept is: # mkdir /dev/cgroup/blkio # mount -t cgroup -o blkio blkio /dev/cgroup/blkio/ # cd blkio/ # mkdir test # cd test/ # ls -l

Re: [PATCH] pci-assign: Fix transition MSI-INTx

2011-01-06 Thread Avi Kivity
On 01/04/2011 11:04 PM, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com Make sure to re-register the IRQ of an assigned device as INTx when the guest disables MSI[X] mode again. Signed-off-by: Jan Kiszkajan.kis...@siemens.com Cc: More Reviewers --- hw/device-assignment.c |6

Re: [libvirt] cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Dominik Klein
Did you just echo the main qemu-kvm PID, or did you also add the PIDs of every thread too ? From this description of the problem, I'd guess you've only confined the main process thread and thus the I/O VCPU threads are not confined. That was indeed correct. I was mislead by the fact that no

Re: [PATCH] pci-assign: Fix transition MSI-INTx

2011-01-06 Thread Alex Williamson
On Thu, 2011-01-06 at 15:40 +0200, Avi Kivity wrote: On 01/04/2011 11:04 PM, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com Make sure to re-register the IRQ of an assigned device as INTx when the guest disables MSI[X] mode again. Signed-off-by: Jan

Host's write request is 4KB larger than that of the guest?

2011-01-06 Thread Duy Le (Dan)
Hi there, I used a raw disk image to host a VM. I later used blktrace to capture write requests issued from the guest to commit data to a physical disk and found that the request size of the host is 8 blocks (4KB) larger than that of the guest. Here is a part of the trace. --- Guest 251,32 0

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
Same host kernel? yes, I also disabled KSM now, se below. (qemu) cpu 1 (qemu) info registers RAX= RBX= RCX=0002 RDX=55a9 RSI=fa8003660450 RDI=0001 RBP=0080 RSP=f880009f7cc0 R8 = R9

Re: [PATCH] pci-assign: Fix transition MSI-INTx

2011-01-06 Thread Michael S. Tsirkin
On Tue, Jan 04, 2011 at 10:04:30PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com Make sure to re-register the IRQ of an assigned device as INTx when the guest disables MSI[X] mode again. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Acked-by: Michael S. Tsirkin

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-06 Thread Hillf Danton
On Thu, Jan 6, 2011 at 12:57 AM, Mike Galbraith efa...@gmx.de wrote: sched: Add yield_to(task, preempt) functionality. Currently only implemented for fair class tasks. Add a yield_to_task method() to the fair scheduling class. allowing the caller of yield_to() to accelerate another thread in

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Avi Kivity
On 01/06/2011 03:55 PM, Nikola Ciprich wrote: Same host kernel? yes, I also disabled KSM now, se below. (qemu) cpu 1 (qemu) info registers RAX= RBX= RCX=0002 RDX=55a9 RSI=fa8003660450 RDI=0001 RBP=0080

GPU Pass-through need help.

2011-01-06 Thread Prasad Joshi
Hello All, I am trying to pass-through a GPU PCIe ATI Radeon to VM. Here is a log on VM. pra...@prasad-virtual-machine:~$ dmesg | grep -i -e drm -e radeon [2.162294] [drm] Initialized drm 1.1.0 20060810 [2.459594] [drm] radeon defaulting to kernel modesetting. [2.459596] [drm] radeon

Re: Host's write request is 4KB larger than that of the guest?

2011-01-06 Thread Avi Kivity
On 01/06/2011 03:53 PM, Duy Le (Dan) wrote: Hi there, I used a raw disk image to host a VM. I later used blktrace to capture write requests issued from the guest to commit data to a physical disk and found that the request size of the host is 8 blocks (4KB) larger than that of the guest. Here

no screen output for '-vga vmware' at boot time

2011-01-06 Thread Harald Dunkel
Hi folks, Booting Debian Squeeze on the guest I get a line Loading initrd... the rest of the boot procedure is omitted. The initrd message is not scrolled off the screen. The guest seems to boot, though. Kdm is shown as usual. If I switch back to /dev/tty1, then I finally see the last

Re: qemu-kvm-0.13.0 - winsows 2008 - chkdisk too slow

2011-01-06 Thread Nikola Ciprich
$ perf record -a -f -g $ perf report -g here we go: here we go: - 49.72% _raw_spin_lock ▒ - 32.32% kvm_mmu_pte_write

[PATCH 0/2] vmx_vcpu_run micro-optimizations

2011-01-06 Thread Avi Kivity
A couple of minor optimizations to the vmx_vcpu_run assembly code. Avi Kivity (2): KVM: VMX: Simplify saving guest rcx in vmx_vcpu_run KVM: VMX: Avoid atomic operation in vmx_vcpu_run arch/x86/kvm/vmx.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) -- To unsubscribe

[PATCH 1/2] KVM: VMX: Simplify saving guest rcx in vmx_vcpu_run

2011-01-06 Thread Avi Kivity
Change push top-of-stack pop guest-rcx pop dummy to pop guest-rcx which is the same thing, only simpler. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c

[PATCH 2/2] KVM: VMX: Avoid atomic operation in vmx_vcpu_run

2011-01-06 Thread Avi Kivity
Instead of exchanging the guest and host rcx, have separate storage for each. This allows us to avoid using the xchg instruction, which is is a little slower than normal operations. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |7 +-- 1 files changed, 5

[KVM-AUTOTEST PATCH 2/5] kvm_config: print directly to stdout instead of using logging

2011-01-06 Thread Eduardo Habkost
From: Eduardo Habkost ehabk...@raisama.net If the whole purpose of running kvm_config.py directly is to print the dictionary contents, it is better to simply dump the information to stdout instead of adding the logginging info and timestamp clutter to every single line. Signed-off-by: Eduardo

[KVM-AUTOTEST PATCH 1/5] kvm_config: accept multiple filenames as argument

2011-01-06 Thread Eduardo Habkost
From: Eduardo Habkost ehabk...@raisama.net Useful to test and debug cases where config settings are concatenated together, without the need to change the base .cfg file. Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm_config.py |9 ++--- 1 files changed, 6

[KVM-AUTOTEST PATCH 5/5] kvm_config: inform filename and line number on error message

2011-01-06 Thread Eduardo Habkost
From: Eduardo Habkost ehabk...@raisama.net Include the filename and line number on the Using variants in this context is not allowed exception error message. Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm_config.py |2 +- 1 files changed, 1 insertions(+), 1

[KVM-AUTOTEST PATCH 0/5] small kvm_config usability changes

2011-01-06 Thread Eduardo Habkost
From: Eduardo Habkost ehabk...@raisama.net This series introduce some changes on kvm_config.py to make it more usable when running it directly from the command-line. Eduardo Habkost (5): kvm_config: accept multiple filenames as argument kvm_config: print directly to stdout instead of using

[KVM-AUTOTEST PATCH 3/5] kvm_config: store filename on configreader

2011-01-06 Thread Eduardo Habkost
From: Eduardo Habkost ehabk...@raisama.net It will be useful to generate better error messages. Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm_config.py |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_config.py

[KVM-AUTOTEST PATCH 4/5] kvm_config: add helper to raise exception informing line number

2011-01-06 Thread Eduardo Habkost
From: Eduardo Habkost ehabk...@raisama.net Useful for syntax or other errors on the config file. We want to tell the user on which file:line the error is located. Signed-off-by: Eduardo Habkost ehabk...@raisama.net --- client/tests/kvm/kvm_config.py | 16 +++- 1 files changed, 15

[KVM-AUTOTEST PATCH] kvm_config: don't store filename on config class

2011-01-06 Thread Eduardo Habkost
[Extra patch that may be added to the series I submitted previously] A single 'config' object may parse multiple files, and most of the data needed to parse a file is passed as argument to the parse() method, except for the filename. As we're now tracking the filename on the configreader object

Re: FIXED: Re: [Qemu-devel] possible regression in qemu-kvm 0.13.0 (memtest)

2011-01-06 Thread Serge E. Hallyn
Thanks, Stefan. That patch actually doesn't compile for me, because it leaves references in hw/pckbd.c to both ioport92_write and ioport92_read, which it deletes from there. Should ioport92_read just be renamed to outport_read instead of delted, and the remaining references changed to

Re: [PATCH] KVM: PPC: Fix SPRG get/set for Book3S and BookE

2011-01-06 Thread Marcelo Tosatti
On Wed, Dec 29, 2010 at 01:51:25PM -0600, Peter Tyser wrote: Previously SPRGs 4-7 were improperly read and written in kvm_arch_vcpu_ioctl_get_regs() and kvm_arch_vcpu_ioctl_set_regs(); Signed-off-by: Peter Tyser pty...@xes-inc.com --- I noticed this while grepping for somthing unrelated and

[PATCH 01/35] kvm: Enable user space NMI injection for kvm guest

2011-01-06 Thread Marcelo Tosatti
From: Lai Jiangshan la...@cn.fujitsu.com Make use of the new KVM_NMI IOCTL to send NMIs into the KVM guest if the user space raised them. (example: qemu monitor's nmi command) Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Acked-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo

[PATCH 29/35] kvm: Drop smp_cpus argument from init functions

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com No longer used. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm-all.c |4 ++-- kvm-stub.c |2 +- kvm.h |4 ++-- target-i386/kvm.c |2 +-

[PATCH 32/35] kvm: Flush coalesced mmio buffer on IO window exits

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com We must flush pending mmio writes if we leave kvm_cpu_exec for an IO window. Otherwise we risk to loose those requests when migrating to a different host during that window. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti

[PATCH 00/35] [PULL] qemu-kvm.git uq/master queue

2011-01-06 Thread Marcelo Tosatti
The following changes since commit 23979dc5411befabe9049e37075b2b6320debc4e: microblaze: Use more TB chaining (2011-01-05 02:23:09 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Jan Kiszka (27): kvm: x86: Fix DPL write back

[PATCH 15/35] kvm: Stop on all fatal exit reasons

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Ensure that we stop the guest whenever we face a fatal or unknown exit reason. If we stop, we also have to enforce a cpu loop exit. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm-all.c |

[PATCH 22/35] kvm: x86: Refactor msr_star/hsave_pa setup and checks

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Simplify kvm_has_msr_star/hsave_pa to booleans and push their one-time initialization into kvm_arch_init. Also handle potential errors of that setup procedure. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti

[PATCH 19/35] kvm: x86: Prepare kvm_get_mp_state for in-kernel irqchip

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com This code path will not yet be taken as we still lack in-kernel irqchip support. But qemu-kvm can already make use of it and drop its own mp_state access services. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti

[PATCH 11/35] kvm: x86: Prevent sign extension of DR7 in guest debugging mode

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com This unbreaks guest debugging when the 4th hardware breakpoint used for guest debugging is a watchpoint of 4 or 8 byte lenght. The 31st bit of DR7 is set in that case and used to cause a sign extension to the high word which was breaking the guest state (vm

[PATCH 03/35] Clean up cpu_inject_x86_mce()

2011-01-06 Thread Marcelo Tosatti
From: Jin Dongming jin.dongm...@np.css.fujitsu.com Clean up cpu_inject_x86_mce() for later patch. Signed-off-by: Jin Dongming jin.dongm...@np.css.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/helper.c | 27 +-- 1 files changed, 17

[PATCH 10/35] kvm: x86: Remove obsolete SS.RPL/DPL aligment

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com This seems to date back to the days KVM didn't support real mode. The check is no longer needed and, even worse, is corrupting the guest state in case SS.RPL != DPL. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com

[PATCH 18/35] kvm: x86: Align kvm_arch_put_registers code with comment

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com The ordering doesn't matter in this case, but better keep it consistent. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/kvm.c |6 +++--- 1 files changed, 3 insertions(+), 3

[PATCH 33/35] kvm: Do not use qemu_fair_mutex

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com The imbalance in the hold time of qemu_global_mutex only exists in TCG mode. In contrast to TCG VCPUs, KVM drops the global lock during guest execution. We already avoid touching the fairness lock from the IO-thread in KVM mode, so also stop using it from

[PATCH 21/35] kvm: x86: Fix xcr0 reset mismerge

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com For unknown reasons, xcr0 reset ended up in kvm_arch_update_guest_debug on upstream merge. Fix this and also remove the misleading comment (1 is THE reset value). Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti

[PATCH 23/35] kvm: x86: Reset paravirtual MSRs

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Make sure to write the cleared MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK, and MSR_KVM_ASYNC_PF_EN to the kernel state so that a freshly booted guest cannot be disturbed by old values. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Glauber Costa

[PATCH 17/35] x86: Optionally dump code bytes on cpu_dump_state

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Introduce the cpu_dump_state flag CPU_DUMP_CODE and implement it for x86. This writes out the code bytes around the current instruction pointer. Make use of this feature in KVM to help debugging fatal vm exits. Signed-off-by: Jan Kiszka

[PATCH 14/35] kvm: Drop return value of kvm_cpu_exec

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com It is not used, it is not needed, so let's remove it. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm-all.c |6 ++ kvm-stub.c |4 ++-- kvm.h |2 +- 3 files changed, 5

[PATCH 26/35] kvm: Eliminate KVMState arguments

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com QEMU supports only one VM, so there is only one kvm_state per process, and we gain nothing passing a reference to it around. Eliminate any need to refer to it outside of kvm-all.c. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Alexander Graf

[PATCH 12/35] kvm: x86: Fix a few coding style violations

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com --- target-i386/kvm.c | 335 + 1 files changed, 182 insertions(+), 153 deletions(-)

[PATCH 02/35] kvm: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension()

2011-01-06 Thread Marcelo Tosatti
From: Lai Jiangshan la...@cn.fujitsu.com simple cleanup and use existing helper: kvm_check_extension(). Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm-all.c |2 +- target-i386/kvm.c |4 ++-- 2 files changed, 3

[PATCH 13/35] kvm: Fix coding style violations

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm-all.c | 139 ++-- 1 files changed, 79 insertions(+), 60

[PATCH 31/35] kvm: x86: Rework identity map and TSS setup for larger BIOS sizes

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com In order to support loading BIOSes 256K, reorder the code, adjusting the base if the kernel supports moving the identity map. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- target-i386/kvm.c | 63

[PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com If kvmclock is used, which implies the kernel supports it, register a kvmclock device with the sysbus. Its main purpose is to save and restore the kernel state on migration, but this will also allow to visualize it one day. Signed-off-by: Jan Kiszka

[PATCH 08/35] kvm: introduce kvm_inject_x86_mce_on

2011-01-06 Thread Marcelo Tosatti
From: Jin Dongming jin.dongm...@np.css.fujitsu.com Pass a table instead of multiple args. Note: kvm_inject_x86_mce(env, bank, status, mcg_status, addr, misc, abort_on_error); is equal to: struct kvm_x86_mce mce = { .bank = bank, .status = status,

[PATCH 35/35] kvm: x86: Only read/write MSR_KVM_ASYNC_PF_EN if supported

2011-01-06 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com If the kernel does not support KVM_CAP_ASYNC_PF, it also does not know about the related MSR. So skip it during state synchronization in that case. Fixes annoying kernel warnings. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo

  1   2   >