Re: [QEMU-KVM]: Megasas + TCM_Loop + SG_IO into Windows XP guests

2010-05-14 Thread Hannes Reinecke
Nicholas A. Bellinger wrote: Greetings Hannes and co, I have been spending a bit of time trying Megasas HBA emulation + TCM_Loop + SG_IO with a Windows XP SP2 KVM guests.. So far, I noticed that hw/scsi-generic.c:execute_command_run() using bdev_aio_ioctl() appears to be broken for XP

Re: KVM and the OOM-Killer

2010-05-14 Thread Athanasius
On Thu, May 13, 2010 at 01:20:31PM +0100, James Stevens wrote: We have a KVM host with 48Gb of RAM and run about 20 KVM clients on it. After some time - different time depending on the kernel version - the VM host kernel will start OOM-Killing the VM clients, even when there is lots of

KVM on RHEL5.5

2010-05-14 Thread TianJing
Hi all, i am trying to install kvm on RHEL5.5, the server is power leader S5000VSA, the CPU is intel E5335, and i check that it support vm. when i run the commamd: modprobe kvm_intel i got the following error message:FATAL: Error inserting kvm_intel

Re: KVM and the OOM-Killer

2010-05-14 Thread James Stevens
echo -16 /proc/pid/oom_adj Thanks for that - yes, I know about oom_adj, but it doesn't (totally) work. udevd has a default of -17 and it got killed anyway. Also, the only thing this server runs is VMs so if they can't be killed oom-killer will just run through the everything else

Re: KVM and the OOM-Killer

2010-05-14 Thread Balbir Singh
* Athanasius k...@miggy.org [2010-05-14 08:33:34]: On Thu, May 13, 2010 at 01:20:31PM +0100, James Stevens wrote: We have a KVM host with 48Gb of RAM and run about 20 KVM clients on it. After some time - different time depending on the kernel version - the VM host kernel will start

Re: KVM and the OOM-Killer

2010-05-14 Thread Balbir Singh
* James Stevens james.stev...@jrcs.co.uk [2010-05-14 09:10:19]: echo -16 /proc/pid/oom_adj Thanks for that - yes, I know about oom_adj, but it doesn't (totally) work. udevd has a default of -17 and it got killed anyway. Also, the only thing this server runs is VMs so if they can't

Re: KVM on RHEL5.5

2010-05-14 Thread Alexander Graf
On 14.05.2010, at 10:10, TianJing wrote: Hi all, i am trying to install kvm on RHEL5.5, the server is power leader S5000VSA, the CPU is intel E5335, and i check that it support vm. when i run the commamd: modprobe kvm_intel i got the following error message:FATAL: Error inserting

Re: [Qemu-devel] [RFC PATCH 0/2] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread Kevin Wolf
Am 13.05.2010 16:03, schrieb MORITA Kazutaka: To support snapshot in a protocol, I'd like to call the hander of the protocol driver in the following functions in block.c: bdrv_snapshot_create bdrv_snapshot_goto bdrv_snapshot_delete bdrv_snapshot_list bdrv_save_vmstate

Re: KVM and the OOM-Killer

2010-05-14 Thread James Stevens
Have you looked at memory cgroups and using that with limits with VMs? The problem was *NOT* that my VMs exhausted all memory. I know that is what normally triggers oom-killer, but you have to understand this mine was a very different scenario, hence I wanted to bring it to people's

Re: qemu-kvm hangs if multipath device is queing

2010-05-14 Thread Kevin Wolf
Hi Peter, Am 12.05.2010 16:01, schrieb Peter Lieven: Hi Kevin, here we go. I created a blocking multipath device (interrupted all paths). qemu-kvm hangs with 100% cpu. also monitor is not responding. If I restore at least one path, the vm is continueing. BR, Peter This seems to be

[RFC PATCH v2 1/3] close all the block drivers before the qemu process exits

2010-05-14 Thread MORITA Kazutaka
This patch calls the close handler of the block driver before the qemu process exits. This is necessary because the sheepdog block driver releases the lock of VM images in the close handler. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block.c |9 + block.h |

[RFC PATCH v2 2/3] block: call the snapshot handlers of the protocol drivers

2010-05-14 Thread MORITA Kazutaka
When snapshot handlers of the format driver is not defined, it is better to call the ones of the protocol driver. This enables us to implement snapshot support in the protocol driver. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block.c | 48

[RFC PATCH v2 0/3] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread MORITA Kazutaka
Hi all, This patch adds a block driver for Sheepdog distributed storage system. Changes from v1 to v2 are: - rebase onto git://repo.or.cz/qemu/kevin.git block - modify the sheepdog driver as a protocol driver - add new patch to call the snapshot handler of the protocol One issue still

[RFC PATCH v2 3/3] block: add sheepdog driver for distributed storage support

2010-05-14 Thread MORITA Kazutaka
Sheepdog is a distributed storage system for QEMU. It provides highly available block level storage volumes to VMs like Amazon EBS. This patch adds a qemu block driver for Sheepdog. Sheepdog features are: - No node in the cluster is special (no metadata node, no control node, etc) - Linear

Re: Prevent IRQ sharing for PCI passthrough

2010-05-14 Thread Dirk Gouders
Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone could give me an answer to that question.

Re: [QEMU-KVM]: Megasas + TCM_Loop + SG_IO into Windows XP guests

2010-05-14 Thread Nicholas A. Bellinger
On Fri, 2010-05-14 at 09:22 +0200, Hannes Reinecke wrote: Nicholas A. Bellinger wrote: Greetings Hannes and co, SNIP So, I ended up needing requiring the following quick hack for hw/scsi-generic.c:execute_command_run() to make SG_IO function synchronously using bdrv_ioctl(), which at

[Autotest][PATCH V2] KVM Test: Add ioquit test case

2010-05-14 Thread Feng Yang
Emulate the powercut under IO workload(dd so far) using kill -9. Then check image in post command. This case want to make sure powercut under IO workload will not break qcow2 image. Now it only work on linux. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/tests/ioquit.py |

Re: Prevent IRQ sharing for PCI passthrough

2010-05-14 Thread Dirk Gouders
There is an ACPI _SRS method which can be used to move interrupts around. However Linux doesn't appear to expose it. Even if it did, the interrupt may be shared on the motherboard, in which case nothing would help (though you might be able to share it with unused devices). The only way

Re: [Qemu-devel] [RFC PATCH 0/2] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread MORITA Kazutaka
At Fri, 14 May 2010 10:32:26 +0200, Kevin Wolf wrote: Am 13.05.2010 16:03, schrieb MORITA Kazutaka: To support snapshot in a protocol, I'd like to call the hander of the protocol driver in the following functions in block.c: bdrv_snapshot_create bdrv_snapshot_goto

Re: [Qemu-devel] [RFC PATCH 0/2] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 11:54, schrieb MORITA Kazutaka: There is another problem to make the sheepdog driver be a protocol; how to deal with protocol specific create_options? For example, sheepdog supports cloning images as a format driver: $ qemu-img create -f sheepdog dst -b sheepdog:src But if

Re: [GIT PULL] last minute vhost-net fix

2010-05-14 Thread David Miller
From: Michael S. Tsirkin m...@redhat.com Date: Thu, 13 May 2010 11:44:34 +0300 David, if it's not too late, please pull the following last minute fix into 2.6.34. Pulled, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [RFC PATCH v2 3/3] block: add sheepdog driver for distributed storage support

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 11:51, schrieb MORITA Kazutaka: Sheepdog is a distributed storage system for QEMU. It provides highly available block level storage volumes to VMs like Amazon EBS. This patch adds a qemu block driver for Sheepdog. Sheepdog features are: - No node in the cluster is special (no

Re: KVM and the OOM-Killer

2010-05-14 Thread Balbir Singh
* James Stevens james.stev...@jrcs.co.uk [2010-05-14 09:43:04]: Have you looked at memory cgroups and using that with limits with VMs? The problem was *NOT* that my VMs exhausted all memory. I know that is what normally triggers oom-killer, but you have to understand this mine was a very

Re: [RFC PATCH v2 2/3] block: call the snapshot handlers of the protocol drivers

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 11:51, schrieb MORITA Kazutaka: When snapshot handlers of the format driver is not defined, it is better to call the ones of the protocol driver. This enables us to implement snapshot support in the protocol driver. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp

Re: KVM on RHEL5.5

2010-05-14 Thread Amos Kong
On Fri, May 14, 2010 at 4:33 PM, Alexander Graf ag...@suse.de wrote: On 14.05.2010, at 10:10, TianJing wrote: Hi all, i am trying to install kvm on RHEL5.5, the server is power leader S5000VSA, the CPU is intel E5335, and i check that it support vm. when i run the commamd:  modprobe

Re: KVM and the OOM-Killer

2010-05-14 Thread James Stevens
I understand, You could potentially encapsulate all else - except your VM's in a small cgroup and frequently reclaim from there using the memory cgroup. If drop caches works for you, that is good too. I am surprised that cache allocations are causing lowmem exhaustion. I'm suirprised that

Nested Page Faults

2010-05-14 Thread Matteo Signorini
Hi to all, I am working on NPT and have some doubts. Please correct me if I am wrong, In NPT only the first time a page fault happens it is trapped by the host. The following page faults are not trapped by the host in order to reduce page walk overhead. My question is... Which Kvm function

Re: [PATCH 10/12] kvm: enable smp 1

2010-05-14 Thread Alexander Graf
On 12.05.2010, at 23:25, Marcelo Tosatti wrote: Process INIT/SIPI requests and enable -smp 1. Does this enable real SMP or does it still only allow one vcpu to run at a time? Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: Nested Page Faults

2010-05-14 Thread Alexander Graf
On 14.05.2010, at 15:15, Matteo Signorini wrote: Hi to all, I am working on NPT and have some doubts. Please correct me if I am wrong, In NPT only the first time a page fault happens it is trapped by the host. The following page faults are not trapped by the host in order to reduce

Re: [PATCH 10/12] kvm: enable smp 1

2010-05-14 Thread Avi Kivity
On 05/14/2010 05:06 PM, Alexander Graf wrote: On 12.05.2010, at 23:25, Marcelo Tosatti wrote: Process INIT/SIPI requests and enable -smp 1. Does this enable real SMP or does it still only allow one vcpu to run at a time? The realest ever. Still doesn't use in-kernel irqchip

Re: [PATCH 10/12] kvm: enable smp 1

2010-05-14 Thread Alexander Graf
On 14.05.2010, at 17:48, Avi Kivity wrote: On 05/14/2010 05:06 PM, Alexander Graf wrote: On 12.05.2010, at 23:25, Marcelo Tosatti wrote: Process INIT/SIPI requests and enable -smp 1. Does this enable real SMP or does it still only allow one vcpu to run at a time? The

Re: [PATCH 10/12] kvm: enable smp 1

2010-05-14 Thread Jan Kiszka
Alexander Graf wrote: On 14.05.2010, at 17:48, Avi Kivity wrote: On 05/14/2010 05:06 PM, Alexander Graf wrote: On 12.05.2010, at 23:25, Marcelo Tosatti wrote: Process INIT/SIPI requests and enable -smp 1. Does this enable real SMP or does it still only allow one vcpu to run at a

Re: [PATCH 10/12] kvm: enable smp 1

2010-05-14 Thread Alexander Graf
On 14.05.2010, at 17:54, Jan Kiszka wrote: Alexander Graf wrote: On 14.05.2010, at 17:48, Avi Kivity wrote: On 05/14/2010 05:06 PM, Alexander Graf wrote: On 12.05.2010, at 23:25, Marcelo Tosatti wrote: Process INIT/SIPI requests and enable -smp 1. Does this enable real SMP or does

Re: Prevent IRQ sharing for PCI passthrough

2010-05-14 Thread Avi Kivity
On 05/14/2010 12:37 PM, Dirk Gouders wrote: Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone

kvm-intel does not load when Intel TXT is enabled

2010-05-14 Thread Andrej Podzimek
Hello, when I enable Intel TXT (Trusted Execution Technology) in the BIOS settings of my Lenovo W510, the kvm-intel module does not load and says 'kvm: disabled by bios', despite the fact that both VT-x and VT-d are enabled. Disabling TXT enables hardware virtualization and kvm-intel works as

Re: [PATCH] test: emulator: lmsw may not clear cr0.pe

2010-05-14 Thread Marcelo Tosatti
On Wed, May 12, 2010 at 11:00:10AM +0300, Avi Kivity wrote: Signed-off-by: Avi Kivity a...@redhat.com --- kvm/user/test/x86/emulator.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) Applied, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH] device-assignment: fix failure to exit on shared IRQ

2010-05-14 Thread Marcelo Tosatti
On Wed, May 12, 2010 at 05:12:10AM -0400, Alex Williamson wrote: Since c1699988, piix config space isn't programmed until the first system reset. This means that when we call assign_irq() from assigned_initfn(), we're going to get back an irq of 0x0, which unfortunately matches our

Re: [PATCH][v2 0/3] Some MMU related fix/clean up

2010-05-14 Thread Marcelo Tosatti
On Wed, May 12, 2010 at 04:40:39PM +0800, Sheng Yang wrote: Sheng Yang (3): KVM: x86: Check LMA bit before set_efer KVM: Clean up duplicate assignment VMX: x86: Only reset MMU when necessary arch/x86/kvm/mmu.c |5 ++--- arch/x86/kvm/x86.c | 22 -- 2 files

Re: [PATCH] KVM: MMU: Segregate shadow pages with different cr0.wp

2010-05-14 Thread Marcelo Tosatti
On Wed, May 12, 2010 at 11:48:18AM +0300, Avi Kivity wrote: When cr0.wp=0, we may shadow a gpte having u/s=1 and r/w=0 with an spte having u/s=0 and r/w=1. This allows excessive access if the guest sets cr0.wp=1 and accesses through this spte. Fix by making cr0.wp part of the base role;

Re: [PATCH 2/2] pci: allow sysfs file owner to read device dependent config space

2010-05-14 Thread Greg KH
On Wed, May 12, 2010 at 06:29:57PM -0700, Chris Wright wrote: The PCI config space bin_attr read handler has a hardcoded CAP_SYS_ADMIN check to verify privileges before allowing a user to read device dependent config space. This is meant to protect from an unprivileged user potentially

Re: [PATCH 2/2] pci: allow sysfs file owner to read device dependent config space

2010-05-14 Thread Jesse Barnes
On Fri, 14 May 2010 12:09:23 -0700 Greg KH g...@kroah.com wrote: On Wed, May 12, 2010 at 06:29:57PM -0700, Chris Wright wrote: The PCI config space bin_attr read handler has a hardcoded CAP_SYS_ADMIN check to verify privileges before allowing a user to read device dependent config space.

Re: [PATCH] kvm: remove CAP_SYS_RAWIO requirement from kvm_vm_ioctl_assign_irq

2010-05-14 Thread Marcelo Tosatti
On Wed, May 12, 2010 at 09:46:31AM -0400, Alex Williamson wrote: Remove this check in an effort to allow kvm guests to run without root privileges. This capability check doesn't seem to add any security since the device needs to have already been added via the assign device ioctl and the io

[PATCH RFC] virtio_blk: Use blk-iopoll for host-guest notify

2010-05-14 Thread Stefan Hajnoczi
This patch adds blk-iopoll interrupt mitigation to virtio-blk. Instead of processing completed requests inside the virtqueue interrupt handler, a softirq is scheduled to process up to a maximum number of completed requests in one go. If the number of complete requests exceeds the maximum number,

Re: [PATCH RFC] virtio_blk: Use blk-iopoll for host-guest notify

2010-05-14 Thread Brian Jackson
On Friday, May 14, 2010 03:47:37 pm Stefan Hajnoczi wrote: This patch adds blk-iopoll interrupt mitigation to virtio-blk. Instead of processing completed requests inside the virtqueue interrupt handler, a softirq is scheduled to process up to a maximum number of completed requests in one go.

Re: [PATCH 1/2] test: Add test for sub acc,imm

2010-05-14 Thread Marcelo Tosatti
On Wed, May 12, 2010 at 05:00:43PM +0300, Mohammed Gamal wrote: Adds tests fot sub acc, imm Signed-off-by: Mohammed Gamal m.gamal...@gmail.com --- kvm/user/test/x86/realmode.c | 44 ++ 1 files changed, 44 insertions(+), 0 deletions(-) Applied

Re: [PATCH 3/7] KVM: move vcpu locking to dispatcher for generic vcpu ioctls

2010-05-14 Thread Marcelo Tosatti
On Thu, May 13, 2010 at 02:17:35PM +0300, Avi Kivity wrote: All vcpu ioctls need to be locked, so instead of locking each one specifically we lock at the generic dispatcher. This patch only updates generic ioctls and leaves arch specific ioctls alone. Signed-off-by: Avi Kivity

Re: [PATCH 1/5] KVM MMU: fix objects free

2010-05-14 Thread Marcelo Tosatti
On Thu, May 13, 2010 at 10:06:02AM +0800, Xiao Guangrong wrote: Where to alloc, where to free Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) Applied all (4 was already fixed),

system_powerdown not working for qemu-kvm 0.12.4?

2010-05-14 Thread Teck Choon Giam
Hi, Anyone encountered the same issue as me about system_powerdown no longer working since upgraded to qemu-kvm 0.12.4? Thanks. Kindest regards, Giam Teck Choon -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo

RFC: kvmclock / tsc server side fix

2010-05-14 Thread Zachary Amsden
I believe this fixes the root cause of the kvmclock warp. It's quite a plausible phenomenon, and explains why it was so easy to produce. Currently it depends on some other patches; I can send a whole patchset, but with all the patch activity, it isn't clear what has been applied and to what

[PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git

2010-05-14 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Greetings Kevin and hch, After pulling from upstream qemu-kvm.git/master into the megasas qemu-kvm.git tree, I ran into some breakage with scsi-generic devices returning an -ESPIPE exception in bdrv_open() - find_image_format() - bdrv_read(), and

[PATCH 1/2] [block]: Fix scsi-generic breakage in find_image_format()

2010-05-14 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds a special BlockDriverState-sg check in block.c:find_image_format() after bdrv_file_open() - block/raw-posix.c:hdev_open() has been called to determine if we are dealing with a Linux host scsi-generic device or not. The patch then

[PATCH 2/2] [block]: Skip refresh_total_sectors() for scsi-generic devices

2010-05-14 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds a BlockDriverState-sg check in block.c:bdrv_common_open() to skip the new refresh_total_sectors() call once we know we are working with a scsi-generic device. We go ahead and skip this call for scsi-generic devices because