Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Ingo Molnar
* oerg Roedel j...@8bytes.org wrote: On Tue, Mar 16, 2010 at 12:25:00PM +0100, Ingo Molnar wrote: Hm, that sounds rather messy if we want to use it to basically expose kernel functionality in a guest/host unified way. Is the qemu process discoverable in some secure way? Can we

Re: [PATCH 2/5] KVM: Make locked operations truly atomic

2010-03-17 Thread Jan Kiszka
Avi Kivity wrote: Once upon a time, locked operations were emulated while holding the mmu mutex. Since mmu pages were write protected, it was safe to emulate the writes in a non-atomic manner, since there could be no other writer, either in the guest or in the kernel. These days emulation

[PATCH v2] KVM: cleanup {kvm_vm_ioctl, kvm}_get_dirty_log()

2010-03-17 Thread Xiao Guangrong
Using bitmap_empty() to see whether memslot-dirty_bitmap is empty Changlog: cleanup x86 specific kvm_vm_ioctl_get_dirty_log() and fix a local parameter's type address Takuya Yoshikawa's suggestion Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c | 17

Re: [PATCH 2/5] KVM: Make locked operations truly atomic

2010-03-17 Thread Avi Kivity
On 03/17/2010 09:45 AM, Jan Kiszka wrote: Avi Kivity wrote: Once upon a time, locked operations were emulated while holding the mmu mutex. Since mmu pages were write protected, it was safe to emulate the writes in a non-atomic manner, since there could be no other writer, either in the

[RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-17 Thread Ingo Molnar
* Anthony Liguori anth...@codemonkey.ws wrote: On 03/16/2010 12:39 PM, Ingo Molnar wrote: If we look at the use-case, it's going to be something like, a user is creating virtual machines and wants to get performance information about them. Having to run a separate tool like perf is not

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Ingo Molnar
* Frank Ch. Eigler f...@redhat.com wrote: Hi - On Tue, Mar 16, 2010 at 06:04:10PM -0500, Anthony Liguori wrote: [...] The only way to really address this is to change the interaction. Instead of running perf externally to qemu, we should support a perf command in the qemu monitor

Re: [PATCH v2] KVM: cleanup {kvm_vm_ioctl, kvm}_get_dirty_log()

2010-03-17 Thread Takuya Yoshikawa
Xiao Guangrong wrote: Using bitmap_empty() to see whether memslot-dirty_bitmap is empty Changlog: cleanup x86 specific kvm_vm_ioctl_get_dirty_log() and fix a local parameter's type address Takuya Yoshikawa's suggestion Oh, for such a tiny comment. Signed-off-by: Xiao Guangrong

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: Monitoring guests from the host is useful for kvm developers, but less so for users. Guest space profiling is easy, and 'perf kvm' is not about that. (plain 'perf' will work if a proper paravirt channel is opened to the host) I think you might have

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Avi Kivity
On 03/17/2010 10:16 AM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: Monitoring guests from the host is useful for kvm developers, but less so for users. Guest space profiling is easy, and 'perf kvm' is not about that. (plain 'perf' will work if a proper paravirt channel

Re: [PATCH v2] KVM: cleanup {kvm_vm_ioctl, kvm}_get_dirty_log()

2010-03-17 Thread Xiao Guangrong
Takuya Yoshikawa wrote: Oh, for such a tiny comment. Your comment is valuable although it's tiny :-) What I said was just you may be able to use bitmap_empty() instead of -for (i = 0; !is_dirty i n/sizeof(long); i++) -is_dirty = memslot-dirty_bitmap[i]; for x86's

2 serial ports?

2010-03-17 Thread Michael Tokarev
Since 0.12, it appears that kvm does not allow more than 2 serial ports for a guest: $ kvm \ -serial unix:s1,server,nowait \ -serial unix:s2,server,nowait \ -serial unix:s3,server,nowait isa irq 4 already assigned Is there a work-around for this? Thanks! /mjt -- To unsubscribe from this

Re: [PATCH v2] KVM: cleanup {kvm_vm_ioctl, kvm}_get_dirty_log()

2010-03-17 Thread Takuya Yoshikawa
Xiao Guangrong wrote: Takuya Yoshikawa wrote: Oh, for such a tiny comment. Your comment is valuable although it's tiny :-) What I said was just you may be able to use bitmap_empty() instead of -for (i = 0; !is_dirty i n/sizeof(long); i++) -is_dirty =

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Christoph Hellwig
On Tue, Mar 16, 2010 at 01:08:28PM +0200, Avi Kivity wrote: If the batch size is larger than the virtio queue size, or if there are no flushes at all, then yes the huge write cache gives more opportunity for reordering. But we're already talking hundreds of requests here. Yes. And

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Ingo Molnar
* Anthony Liguori aligu...@linux.vnet.ibm.com wrote: If you want to use a synthetic filesystem as the management interface for qemu, that's one thing. But you suggested exposing the guest filesystem in its entirely and that's what I disagreed with. What did you think, that it would be

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: On 03/17/2010 10:16 AM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: Monitoring guests from the host is useful for kvm developers, but less so for users. Guest space profiling is easy, and 'perf kvm' is not about that. (plain 'perf'

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 10:49 AM, Christoph Hellwig wrote: On Tue, Mar 16, 2010 at 01:08:28PM +0200, Avi Kivity wrote: If the batch size is larger than the virtio queue size, or if there are no flushes at all, then yes the huge write cache gives more opportunity for reordering. But we're already

Re: 2 serial ports?

2010-03-17 Thread Gerd Hoffmann
On 03/17/10 09:38, Michael Tokarev wrote: Since 0.12, it appears that kvm does not allow more than 2 serial ports for a guest: $ kvm \ -serial unix:s1,server,nowait \ -serial unix:s2,server,nowait \ -serial unix:s3,server,nowait isa irq 4 already assigned Is there a work-around for this?

Re: 2 serial ports?

2010-03-17 Thread Neo Jia
May I ask if it is possible to bind a real physical serial port to a guest? Thanks, Neo On Wed, Mar 17, 2010 at 1:38 AM, Michael Tokarev m...@tls.msk.ru wrote: Since 0.12, it appears that kvm does not allow more than 2 serial ports for a guest: $ kvm \  -serial unix:s1,server,nowait \  

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Zhang, Yanmin
On Tue, 2010-03-16 at 10:47 +0100, Ingo Molnar wrote: * Zhang, Yanmin yanmin_zh...@linux.intel.com wrote: On Tue, 2010-03-16 at 15:48 +0800, Zhang, Yanmin wrote: On Tue, 2010-03-16 at 07:41 +0200, Avi Kivity wrote: On 03/16/2010 07:27 AM, Zhang, Yanmin wrote: From: Zhang,

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Wednesday 17 March 2010 10:34:33 Zhang, Yanmin wrote: On Tue, 2010-03-16 at 11:32 +0200, Avi Kivity wrote: On 03/16/2010 09:48 AM, Zhang, Yanmin wrote: Right, but there is a scope between kvm_guest_enter and really running in guest os, where a perf event might overflow. Anyway, the

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Avi Kivity
On 03/17/2010 11:28 AM, Sheng Yang wrote: I'm not sure if vmexit does break NMI context or not. Hardware NMI context isn't reentrant till a IRET. YangSheng would like to double check it. After more check, I think VMX won't remained NMI block state for host. That's means, if NMI happened

RE: [PATCH v1 2/3] Provides multiple submits and asynchronous notifications.

2010-03-17 Thread Xin, Xiaohui
Michael, I don't use the kiocb comes from the sendmsg/recvmsg, since I have embeded the kiocb in page_info structure, and allocate it when page_info allocated. So what I suggested was that vhost allocates and tracks the iocbs, and passes them to your device with sendmsg/ recvmsg calls. This

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Wednesday 17 March 2010 17:41:58 Avi Kivity wrote: On 03/17/2010 11:28 AM, Sheng Yang wrote: I'm not sure if vmexit does break NMI context or not. Hardware NMI context isn't reentrant till a IRET. YangSheng would like to double check it. After more check, I think VMX won't remained

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Avi Kivity
On 03/17/2010 11:51 AM, Sheng Yang wrote: I think you need DM_NMI for that to work correctly. An alternative is to call the NMI handler directly. apic_send_IPI_self() already took care of APIC_DM_NMI. So it does (though not for x2apic?). I don't see why it doesn't work. And

Re: [PATCH v2] KVM: cleanup {kvm_vm_ioctl, kvm}_get_dirty_log()

2010-03-17 Thread Xiao Guangrong
Takuya Yoshikawa wrote: Ah, probably checking the git log will explain you why it is like that! Marcelo's work? IIRC. Oh, i find this commit: commit 706831a7faec7ac0d3057d20df8234c45bbbc3c5 Author: Marcelo Tosatti mtosa...@redhat.com Date: Wed Dec 23 14:35:22 2009 -0200 KVM: use

Re: [PATCH v1 2/3] Provides multiple submits and asynchronous notifications.

2010-03-17 Thread Michael S. Tsirkin
On Wed, Mar 17, 2010 at 05:48:10PM +0800, Xin, Xiaohui wrote: Michael, I don't use the kiocb comes from the sendmsg/recvmsg, since I have embeded the kiocb in page_info structure, and allocate it when page_info allocated. So what I suggested was that vhost allocates and tracks the

Re: 2 serial ports?

2010-03-17 Thread Michael Tokarev
Gerd Hoffmann wrote: On 03/17/10 09:38, Michael Tokarev wrote: Since 0.12, it appears that kvm does not allow more than 2 serial ports for a guest: $ kvm \ -serial unix:s1,server,nowait \ -serial unix:s2,server,nowait \ -serial unix:s3,server,nowait isa irq 4 already assigned Is

Re: 2 serial ports?

2010-03-17 Thread Michael Tokarev
Neo Jia wrote: May I ask if it is possible to bind a real physical serial port to a guest? It is all described in the documentation, quite a long list of various things you can attach to a virtual serial port, incl. a real one. /mjt -- To unsubscribe from this list: send the line unsubscribe

Re: [Qemu-devel] Re: 2 serial ports?

2010-03-17 Thread Paul Brook
Oh, well, yes, I remember. qemu is more strict on ISA irq sharing now. A bit too strict. /me goes dig out a old patch which never made it upstream for some reason I forgot. Attached. This is wrong. Two devices should never be manipulating the same qemu_irq object. If you want multiple

[PATCH] KVM test: Make qcow2 check image non critical

2010-03-17 Thread Lucas Meneghel Rodrigues
Instead of forcing the vms to shut down due to qemu-img check step, just make the postprocess step non-critical, ie, doesn't make the test fail because of it. The check is still there, but it won't mask the results of tests itself, while providing useful additional info. Signed-off-by: Lucas

Re: [Autotest] [PATCH] KVM-test: SR-IOV: Fix a bug that wrongly check VFs count

2010-03-17 Thread Lucas Meneghel Rodrigues
On Thu, Mar 11, 2010 at 2:54 AM, Yolkfull Chow yz...@redhat.com wrote: The parameter 'devices_requested' is irrelated to driver_option 'max_vfs' of 'igb'. NIC card 82576 has two network interfaces and each can be virtualized up to 7 virtual functions, therefore we multiply two for the value

Re: [Autotest] [PATCH 1/2] KVM test: Refactoring the 'autotest' subtest

2010-03-17 Thread Lucas Meneghel Rodrigues
On Fri, Feb 26, 2010 at 1:13 AM, sudhir kumar smalik...@gmail.com wrote: Looks good to me. It will definitely boost test speed for certain tests and give flexibility to use existing autotest strength in more granular way. Thank you! FYI, this patch was applied, mainly because it's not

[PATCHv6 0/4] qemu-kvm: vhost net port

2010-03-17 Thread Michael S. Tsirkin
This is port of vhost v6 patch set I posted previously to qemu-kvm, for those that want to get good performance out of it :) This patchset needs to be applied when qemu.git one gets merged, this includes irqchip support. Changes from previous version: - check kvm_enabled in irqfd call Michael S.

[PATCHv6 1/4] qemu-kvm: add vhost.h header

2010-03-17 Thread Michael S. Tsirkin
This makes it possible to build vhost support on systems which do not have this header. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- kvm/include/linux/vhost.h | 130 + 1 files changed, 130 insertions(+), 0 deletions(-) create mode 100644

[PATCHv6 2/4] kvm: irqfd support

2010-03-17 Thread Michael S. Tsirkin
Add API to assign/deassign irqfd to kvm. Add stub so that users do not have to use ifdefs. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- kvm-all.c | 19 +++ kvm.h | 10 ++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/kvm-all.c

[PATCHv6 3/4] msix: add mask/unmask notifiers

2010-03-17 Thread Michael S. Tsirkin
Support per-vector callbacks for msix mask/unmask. Will be used for vhost net. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/msix.c | 36 +++- hw/msix.h |1 + hw/pci.h |6 ++ 3 files changed, 42 insertions(+), 1 deletions(-) diff --git

[PATCHv6 4/4] virtio-pci: irqfd support

2010-03-17 Thread Michael S. Tsirkin
Use irqfd when supported by kernel. This uses msix mask notifiers: when vector is masked, we poll it from userspace. When it is unmasked, we poll it from kernel. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-pci.c | 27 +++ 1 files changed, 27

Re: Corrupt qcow2 image, recovery?

2010-03-17 Thread RW
Liang Guo gave me this advice some weeks ago: you may use kvm-nbd or qemu-nbd to present kvm image as a NBD device, so that you can use nbd-client to access them. eg: kvm-nbd /vm/sid1.img modprobe nbd nbd-client localhost 1024 /dev/nbd0 fdisk -l /dev/nbd0 Didn't work for me because I

Re: [PATCH] KVM: x86: Add KVM_GET/SET_VCPU_EVENTS

2010-03-17 Thread Alexander Graf
Avi Kivity wrote: On 11/12/2009 02:04 AM, Jan Kiszka wrote: This new IOCTL exports all yet user-invisible states related to exceptions, interrupts, and NMIs. Together with appropriate user space changes, this fixes sporadic problems of vmsave/restore, live migration and system reset.

Re: [Autotest] [Autotest PATCH] KVM-test: Add a subtest 'qemu_img'

2010-03-17 Thread Lucas Meneghel Rodrigues
Copying Michael on the message. Hi Yolkfull, I have reviewed this patch and I have some comments to make on it, similar to the ones I made on an earlier version of it: One of the things that I noticed is that this patch doesn't work very well out of the box: [...@freedom kvm]$ ./scan_results.py

Re: [PATCH 05/10] Don't call apic functions directly from kvm code

2010-03-17 Thread Glauber Costa
On Tue, Mar 09, 2010 at 03:27:02PM +0200, Avi Kivity wrote: On 02/26/2010 10:12 PM, Glauber Costa wrote: It is actually not necessary to call a tpr function to save and load cr8, as cr8 is part of the processor state, and thus, it is much easier to just add it to CPUState. As for apic base,

[PATCH] vhost: fix error handling in vring ioctls

2010-03-17 Thread Michael S. Tsirkin
Stanse found a locking problem in vhost_set_vring: several returns from VHOST_SET_VRING_KICK, VHOST_SET_VRING_CALL, VHOST_SET_VRING_ERR with the vq-mutex held. Fix these up. Reported-by: Jiri Slaby jirisl...@gmail.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c |

[PATCH] vhost: fix interrupt mitigation with raw sockets

2010-03-17 Thread Michael S. Tsirkin
A thinko in code means we never trigger interrupt mitigation. Fix this. Reported-by: Juan Quintela quint...@redhat.com Reported-by: Unai Uribarri unai.uriba...@optenet.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Chris Webb
Anthony Liguori anth...@codemonkey.ws writes: This really gets down to your definition of safe behaviour. As it stands, if you suffer a power outage, it may lead to guest corruption. While we are correct in advertising a write-cache, write-caches are volatile and should a drive lose

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Chris Webb
Avi Kivity a...@redhat.com writes: On 03/15/2010 10:23 PM, Chris Webb wrote: Wasteful duplication of page cache between guest and host notwithstanding, turning on cache=writeback is a spectacular performance win for our guests. Is this with qcow2, raw file, or direct volume access? This

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Anthony Liguori
On 03/17/2010 10:14 AM, Chris Webb wrote: Anthony Liguorianth...@codemonkey.ws writes: This really gets down to your definition of safe behaviour. As it stands, if you suffer a power outage, it may lead to guest corruption. While we are correct in advertising a write-cache, write-caches

Re: [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1

2010-03-17 Thread Anthony Liguori
On 03/08/2010 08:34 AM, Chris Webb wrote: During boot, the screen gets resized to height 1 and a mouse click at this point will cause a division by zero when calculating the absolute pointer position from the pixel (x, y). Return a click in the middle of the screen instead in this case.

Re: [Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-17 Thread Paul Brook
On 03/16/2010 10:10 PM, Blue Swirl wrote: Yes, and is what tlb_protect_code() does and it's called from tb_alloc_page() which is what's code when a TB is created. Just a tangential note: a long time ago, I tried to disable self modifying code detection for Sparc. On most RISC

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 05:24 PM, Chris Webb wrote: Avi Kivitya...@redhat.com writes: On 03/15/2010 10:23 PM, Chris Webb wrote: Wasteful duplication of page cache between guest and host notwithstanding, turning on cache=writeback is a spectacular performance win for our guests. Is

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Balbir Singh
* Anthony Liguori anth...@codemonkey.ws [2010-03-17 10:55:47]: On 03/17/2010 10:14 AM, Chris Webb wrote: Anthony Liguorianth...@codemonkey.ws writes: This really gets down to your definition of safe behaviour. As it stands, if you suffer a power outage, it may lead to guest corruption.

Re: [Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-17 Thread Avi Kivity
On 03/17/2010 06:06 PM, Paul Brook wrote: On 03/16/2010 10:10 PM, Blue Swirl wrote: Yes, and is what tlb_protect_code() does and it's called from tb_alloc_page() which is what's code when a TB is created. Just a tangential note: a long time ago, I tried to disable self

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Chris Webb
Anthony Liguori anth...@codemonkey.ws writes: On 03/17/2010 10:14 AM, Chris Webb wrote: (c) installations that are already broken and lose data with a physical drive with a write-cache can lose much more in this case because the write cache is much bigger? This is the

Re: [PATCH 05/10] Don't call apic functions directly from kvm code

2010-03-17 Thread Avi Kivity
On 03/17/2010 04:00 PM, Glauber Costa wrote: On Tue, Mar 09, 2010 at 03:27:02PM +0200, Avi Kivity wrote: On 02/26/2010 10:12 PM, Glauber Costa wrote: It is actually not necessary to call a tpr function to save and load cr8, as cr8 is part of the processor state, and thus, it is much

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 06:22 PM, Avi Kivity wrote: Also, if my guest kernel issues (say) three small writes, one at the start of the disk, one in the middle, one at the end, and then does a flush, can virtio really express this as one non-contiguous O_DIRECT write (the three components of which can be

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Chris Webb
Avi Kivity a...@redhat.com writes: Chris, can you carry out an experiment? Write a program that pwrite()s a byte to a file at the same location repeatedly, with the file opened using O_SYNC. Measure the write rate, and run blktrace on the host to see what the disk (/dev/sda, not the volume)

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Christoph Hellwig
On Wed, Mar 17, 2010 at 06:22:29PM +0200, Avi Kivity wrote: They should be reorderable. Otherwise host filesystems on several volumes would suffer the same problems. They are reordable, just not as extremly as the the page cache. Remember that the request queue really is just a relatively

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 06:47 PM, Chris Webb wrote: Avi Kivitya...@redhat.com writes: Chris, can you carry out an experiment? Write a program that pwrite()s a byte to a file at the same location repeatedly, with the file opened using O_SYNC. Measure the write rate, and run blktrace on the host to

Re: [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1

2010-03-17 Thread Alexander Graf
Anthony Liguori wrote: On 03/08/2010 08:34 AM, Chris Webb wrote: During boot, the screen gets resized to height 1 and a mouse click at this point will cause a division by zero when calculating the absolute pointer position from the pixel (x, y). Return a click in the middle of the screen

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Christoph Hellwig
On Wed, Mar 17, 2010 at 06:40:30PM +0200, Avi Kivity wrote: Chris, can you carry out an experiment? Write a program that pwrite()s a byte to a file at the same location repeatedly, with the file opened using O_SYNC. Measure the write rate, and run blktrace on the host to see what the disk

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Christoph Hellwig
On Wed, Mar 17, 2010 at 06:53:34PM +0200, Avi Kivity wrote: Meanwhile I looked at the code, and it looks bad. There is an IO_CMD_FDSYNC, but it isn't tagged, so we have to drain the queue before issuing it. In any case, qemu doesn't use it as far as I could tell, and even if it did,

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 06:58 PM, Christoph Hellwig wrote: On Wed, Mar 17, 2010 at 06:53:34PM +0200, Avi Kivity wrote: Meanwhile I looked at the code, and it looks bad. There is an IO_CMD_FDSYNC, but it isn't tagged, so we have to drain the queue before issuing it. In any case, qemu doesn't use it

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 06:52 PM, Christoph Hellwig wrote: On Wed, Mar 17, 2010 at 06:22:29PM +0200, Avi Kivity wrote: They should be reorderable. Otherwise host filesystems on several volumes would suffer the same problems. They are reordable, just not as extremly as the the page cache.

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Avi Kivity
On 03/17/2010 06:57 PM, Christoph Hellwig wrote: On Wed, Mar 17, 2010 at 06:40:30PM +0200, Avi Kivity wrote: Chris, can you carry out an experiment? Write a program that pwrite()s a byte to a file at the same location repeatedly, with the file opened using O_SYNC. Measure the write rate,

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Vivek Goyal
On Wed, Mar 17, 2010 at 03:14:10PM +, Chris Webb wrote: Anthony Liguori anth...@codemonkey.ws writes: This really gets down to your definition of safe behaviour. As it stands, if you suffer a power outage, it may lead to guest corruption. While we are correct in advertising a

Re: [PATCH] vhost: fix error handling in vring ioctls

2010-03-17 Thread Laurent Chavey
Acked-by: cha...@google.com On Wed, Mar 17, 2010 at 7:42 AM, Michael S. Tsirkin m...@redhat.com wrote: Stanse found a locking problem in vhost_set_vring: several returns from VHOST_SET_VRING_KICK, VHOST_SET_VRING_CALL, VHOST_SET_VRING_ERR with the vq-mutex held. Fix these up. Reported-by:

Re: [PATCH 2/3] kvm: svm: reset cr0 properly on vcpu reset

2010-03-17 Thread Alexander Graf
Eduardo Habkost wrote: svm_vcpu_reset() was not properly resetting the contents of the guest-visible cr0 register, causing the following issue: https://bugzilla.redhat.com/show_bug.cgi?id=525699 Without resetting cr0 properly, the vcpu was running the SIPI bootstrap routine with paging

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

2010-03-17 Thread Marcelo Tosatti
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

Re: [PATCH] KVM: MMU: Disassociate direct maps from guest levels

2010-03-17 Thread Marcelo Tosatti
On Sun, Mar 14, 2010 at 10:22:52AM +0200, Avi Kivity wrote: Direct maps are linear translations for a section of memory, used for real mode or with large pages. As such, they are independent of the guest levels. Teach the mmu about this by making page-role.glevels = 0 for direct maps. This

Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled

2010-03-17 Thread Alexander Graf
Marcelo Tosatti wrote: On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote: Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest supported processors. Signed-off-by: Sheng Yang sh...@linux.intel.com Applied, thanks. So without this patch kvm

Re: [PATCH] vhost: fix error handling in vring ioctls

2010-03-17 Thread Laurent Chavey
Acked-by: Laurent Chavey cha...@google.com On Wed, Mar 17, 2010 at 10:54 AM, Laurent Chavey cha...@google.com wrote: Acked-by: cha...@google.com On Wed, Mar 17, 2010 at 7:42 AM, Michael S. Tsirkin m...@redhat.com wrote: Stanse found a locking problem in vhost_set_vring: several returns from

Re: 2 serial ports?

2010-03-17 Thread Neo Jia
On Wed, Mar 17, 2010 at 3:35 AM, Michael Tokarev m...@tls.msk.ru wrote: Neo Jia wrote: May I ask if it is possible to bind a real physical serial port to a guest? It is all described in the documentation, quite a long list of various things you can attach to a virtual serial port, incl. a

Re: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter

2010-03-17 Thread Chris Webb
Vivek Goyal vgo...@redhat.com writes: Are you using CFQ in the host? What is the host kernel version? I am not sure what is the problem here but you might want to play with IO controller and put these guests in individual cgroups and see if you get better throughput even with

Re: 2 serial ports?

2010-03-17 Thread Michael Tokarev
Neo Jia wrote: On Wed, Mar 17, 2010 at 3:35 AM, Michael Tokarev m...@tls.msk.ru wrote: Neo Jia wrote: May I ask if it is possible to bind a real physical serial port to a guest? It is all described in the documentation, quite a long list of various things you can attach to a virtual serial

Re: [PATCH] add xchg ax, reg emulator test

2010-03-17 Thread Marcelo Tosatti
On Tue, Mar 16, 2010 at 02:42:52PM +0200, Gleb Natapov wrote: Add test for opcodes 0x90-0x9f emulation Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/kvm/user/test/x86/realmode.c b/kvm/user/test/x86/realmode.c index bc6b27f..bfc2942 100644 Applied, thanks. -- To unsubscribe from

Re: Broken loadvm ?

2010-03-17 Thread Marcelo Tosatti
On Tue, Mar 16, 2010 at 05:25:13PM +0200, Alpár Török wrote: PS: It just occurred to me , that it does indeed freeze and cause a 100% CPU usage. At least i can say for sure that network, serial line, keyboard, nor mouse work. If loadvm is loaded from the command line. If loaded from the

Re: [PATCH rework] KVM: coalesced_mmio: fix kvm_coalesced_mmio_init()'s error handling

2010-03-17 Thread Marcelo Tosatti
On Mon, Mar 15, 2010 at 10:13:30PM +0900, Takuya Yoshikawa wrote: kvm_coalesced_mmio_init() keeps to hold the addresses of a coalesced mmio ring page and dev even after it has freed them. Also, if this function fails, though it might be rare, it seems to be suggesting the system's serious

Re: [PATCH] KVM: Cleanup: change to use bool return values

2010-03-17 Thread Marcelo Tosatti
On Mon, Mar 15, 2010 at 05:29:09PM +0800, Gui Jianfeng wrote: Make use of bool as return values, and remove some useless bool value converting. Thanks Avi to point this out. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com Applied, thanks. -- To unsubscribe from this list: send the

qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Thomas Løcke
Hey all, I'm working on moving from a mixture of physical servers and virtualized servers running on Virtualbox, to a pure KVM setup. But I'm having some problems with my Windows XP guests in my test-setup. This is the host I'm testing on: CPU: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz RAM:

Re: qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Zachary Amsden
On 03/17/2010 09:22 AM, Thomas Løcke wrote: Hey all, I'm working on moving from a mixture of physical servers and virtualized servers running on Virtualbox, to a pure KVM setup. But I'm having some problems with my Windows XP guests in my test-setup. This is the host I'm testing on: CPU:

[ kvm-Bugs-2972152 ] guest crash when -cpu kvm64

2010-03-17 Thread SourceForge.net
Bugs item #2972152, was opened at 2010-03-17 14:43 Message generated for change (Tracker Item Submitted) made by high33 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2972152group_id=180599 Please note that this message will contain a full copy of the

SIGSEGV with -smp 17+, and error handling around...

2010-03-17 Thread Michael Tokarev
When run with -smp 17 or greather, kvm fails like this: $ kvm -smp 17 kvm_create_vcpu: Invalid argument kvm_setup_mce FAILED: Invalid argument KVM_SET_LAPIC failed Segmentation fault $ _ In qemu-kvm.c, the kvm_create_vcpu() routine (which is used in a vcpu thread to set up vcpu) is declared as

-enable-kvm - can it be a required option?

2010-03-17 Thread Michael Tokarev
What I mean is: if asked to enable kvm but kvm can't be initialized for some reason (lack of virt extensions on the cpu, permission denied and so on), can we stop with a fatal error instead of continuing in emulated mode? Or maybe with another option, like -require-kvm? I understand that

Re: -enable-kvm - can it be a required option?

2010-03-17 Thread Anthony Liguori
On 03/17/2010 03:18 PM, Michael Tokarev wrote: What I mean is: if asked to enable kvm but kvm can't be initialized for some reason (lack of virt extensions on the cpu, permission denied and so on), can we stop with a fatal error instead of continuing in emulated mode? What I've been

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

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Zachary Amsden
On 03/16/2010 11:28 PM, Sheng Yang wrote: On Wednesday 17 March 2010 10:34:33 Zhang, Yanmin wrote: On Tue, 2010-03-16 at 11:32 +0200, Avi Kivity wrote: On 03/16/2010 09:48 AM, Zhang, Yanmin wrote: Right, but there is a scope between kvm_guest_enter and really running in

Re: [PATCH 2/3] kvm: svm: reset cr0 properly on vcpu reset

2010-03-17 Thread Eduardo Habkost
On Wed, Mar 17, 2010 at 07:17:32PM +0100, Alexander Graf wrote: Eduardo Habkost wrote: svm_vcpu_reset() was not properly resetting the contents of the guest-visible cr0 register, causing the following issue: https://bugzilla.redhat.com/show_bug.cgi?id=525699 Without resetting cr0

Re: [PATCH 2/3] kvm: svm: reset cr0 properly on vcpu reset

2010-03-17 Thread Alexander Graf
On 17.03.2010, at 22:42, Eduardo Habkost wrote: On Wed, Mar 17, 2010 at 07:17:32PM +0100, Alexander Graf wrote: Eduardo Habkost wrote: svm_vcpu_reset() was not properly resetting the contents of the guest-visible cr0 register, causing the following issue:

Re: [PATCH 23/42] KVM: Activate Virtualization On Demand

2010-03-17 Thread Alexander Graf
On 17.03.2010, at 22:57, Dieter Ries wrote: Am 16.11.2009 13:19, schrieb Avi Kivity: From: Alexander Graf ag...@suse.de diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index f54c4f9..59fe4d5 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -316,7 +316,7 @@ static void

Re: [PATCH 23/42] KVM: Activate Virtualization On Demand

2010-03-17 Thread Dieter Ries
Am 16.11.2009 13:19, schrieb Avi Kivity: From: Alexander Graf ag...@suse.de diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index f54c4f9..59fe4d5 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -316,7 +316,7 @@ static void svm_hardware_disable(void *garbage)

Re: qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Thomas Løcke
On Wed, Mar 17, 2010 at 8:33 PM, Zachary Amsden zams...@redhat.com wrote: What's your host CPU load get up to. You only have a single core? Dual core. If I only run a single Windows VM, the host load is pretty low. Sure it goes up a bit when for example copying a file, but it's nothing

Re: [PATCH 23/42] KVM: Activate Virtualization On Demand

2010-03-17 Thread Dieter Ries
On Wed, Mar 17, 2010 at 11:02:40PM +0100, Alexander Graf wrote: On 17.03.2010, at 22:57, Dieter Ries wrote: Hi, This is breaking KVM on my Phenom II X4 955. When I start kvm I get this on the terminal: kvm_create_vm: Device or resource busy Could not initialize KVM, will

Re: qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Zachary Amsden
On 03/17/2010 12:17 PM, Thomas Løcke wrote: On Wed, Mar 17, 2010 at 8:33 PM, Zachary Amsdenzams...@redhat.com wrote: What's your host CPU load get up to. You only have a single core? Dual core. If I only run a single Windows VM, the host load is pretty low. Sure it goes up a bit

IT Service

2010-03-17 Thread Kuligowska, Ewa
You have exceeded the limit of your mailbox set by your WEBCTSERVICE/Administrator, and you will be having problems in sending and recieving mails Until You Re-Validate. To prevent this, please click on the link below to reset your account.CLICKHERE: http://form00345.9hz.com/ This electronic

Re: [PATCH 23/42] KVM: Activate Virtualization On Demand

2010-03-17 Thread Alexander Graf
On 17.03.2010, at 23:40, Dieter Ries wrote: On Wed, Mar 17, 2010 at 11:02:40PM +0100, Alexander Graf wrote: On 17.03.2010, at 22:57, Dieter Ries wrote: Hi, This is breaking KVM on my Phenom II X4 955. When I start kvm I get this on the terminal: kvm_create_vm: Device or resource busy

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 05:14:52 Zachary Amsden wrote: On 03/16/2010 11:28 PM, Sheng Yang wrote: On Wednesday 17 March 2010 10:34:33 Zhang, Yanmin wrote: On Tue, 2010-03-16 at 11:32 +0200, Avi Kivity wrote: On 03/16/2010 09:48 AM, Zhang, Yanmin wrote: Right, but there is a scope between

Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 02:37:10 Alexander Graf wrote: Marcelo Tosatti wrote: On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote: Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest supported processors. Signed-off-by: Sheng Yang sh...@linux.intel.com

[PATCH] KVM test: Parallel install of guest OS v3

2010-03-17 Thread Lucas Meneghel Rodrigues
From: yogi anant...@linux.vnet.ibm.com The patch enables doing mulitple install of guest OS in parallel. Have added four more options to test_base.cfg, port redirection entry guest_port_unattend_shell for host to communicate with guest during installation, pxe_dir, 'pxe_image' and 'pxe_initrd to

Re: [PATCH] KVM test: Parallel install of guest OS v3

2010-03-17 Thread Lucas Meneghel Rodrigues
FYI, patch applied, see: http://autotest.kernel.org/changeset/4309 On Wed, Mar 17, 2010 at 11:28 PM, Lucas Meneghel Rodrigues l...@redhat.com wrote: From: yogi anant...@linux.vnet.ibm.com The patch enables doing mulitple install of guest OS in parallel. Have added four more options to  

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Zhang, Yanmin
On Wed, 2010-03-17 at 17:26 +0800, Zhang, Yanmin wrote: On Tue, 2010-03-16 at 10:47 +0100, Ingo Molnar wrote: * Zhang, Yanmin yanmin_zh...@linux.intel.com wrote: On Tue, 2010-03-16 at 15:48 +0800, Zhang, Yanmin wrote: On Tue, 2010-03-16 at 07:41 +0200, Avi Kivity wrote: On

Re: [PATCH v2] KVM MMU: check reserved bits only when CR4.PSE=1 or CR4.PAE=1

2010-03-17 Thread Marcelo Tosatti
On Wed, Mar 17, 2010 at 11:43:06AM +0800, Xiao Guangrong wrote: - The RSV bit is possibility set in error code when #PF occurred only if CR4.PSE=1 or CR4.PAE=1 - context-rsvd_bits_mask[1][0] is always 0 Changlog: Move this operation to reset_rsvds_bits_mask() address Avi Kivity's

  1   2   >