Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-02 Thread Zhi Yong Wu
On Wed, Jun 01, 2011 at 09:32:32AM -0400, Vivek Goyal wrote: Date: Wed, 1 Jun 2011 09:32:32 -0400 From: Vivek Goyal vgo...@redhat.com To: Zhi Yong Wu wu...@linux.vnet.ibm.com Cc: kw...@redhat.com, stefa...@linux.vnet.ibm.com, kvm@vger.kernel.org, guijianf...@cn.fujitsu.com,

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-02 Thread Sasha Levin
Hi, On Mon, 2011-05-30 at 13:09 +0800, Zhi Yong Wu wrote: Hello, all, I have prepared to work on a feature called Disk I/O limits for qemu-kvm projeect. This feature will enable the user to cap disk I/O amount performed by a VM.It is important for some storage resources to be

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-02 Thread Zhi Yong Wu
On Thu, Jun 02, 2011 at 09:17:06AM +0300, Sasha Levin wrote: Date: Thu, 02 Jun 2011 09:17:06 +0300 From: Sasha Levin levinsasha...@gmail.com To: Zhi Yong Wu wu...@linux.vnet.ibm.com Cc: qemu-de...@nongnu.org, kvm@vger.kernel.org, kw...@redhat.com, aligu...@us.ibm.com,

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-02 Thread Sasha Levin
On Thu, 2011-06-02 at 14:29 +0800, Zhi Yong Wu wrote: On Thu, Jun 02, 2011 at 09:17:06AM +0300, Sasha Levin wrote: Date: Thu, 02 Jun 2011 09:17:06 +0300 From: Sasha Levin levinsasha...@gmail.com To: Zhi Yong Wu wu...@linux.vnet.ibm.com Cc: qemu-de...@nongnu.org, kvm@vger.kernel.org,

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: From: John Floren j...@jfloren.net Add support for PS/2 keyboard system with AUX device (aka mouse). The device works with vnc, the guest must be started with the '--vnc' parameter for the device to be initialized. Signed-off-by: John Floren

Re: [PATCH v2] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Ingo Molnar
* Prasad Joshi prasadjoshi...@gmail.com wrote: Summary of performance numbers == There is not much difference with sequential character operations are performed, the code with caching performed better by small margin. The caching code performance raised by 12%

Re: [PATCH 31/31] nVMX: Documentation

2011-06-02 Thread Nadav Har'El
On Wed, Jun 01, 2011, Jan Kiszka wrote about Re: [PATCH 31/31] nVMX: Documentation: Documentation/kvm/nested-vmx.txt | 251 + This needs to go to Documentation/virtual/kvm. Oops, I guess the rug moved under my feet while I was preparing this patch set :-) Avi,

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-02 Thread Zhi Yong Wu
On Thu, Jun 02, 2011 at 10:15:02AM +0300, Sasha Levin wrote: Date: Thu, 02 Jun 2011 10:15:02 +0300 From: Sasha Levin levinsasha...@gmail.com To: Zhi Yong Wu wu...@linux.vnet.ibm.com Cc: kw...@redhat.com, aligu...@us.ibm.com, herb...@gondor.apana.org.au, kvm@vger.kernel.org,

Re: [PATCH v2] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Prasad Joshi
On Thu, Jun 2, 2011 at 8:28 AM, Ingo Molnar mi...@elte.hu wrote: * Prasad Joshi prasadjoshi...@gmail.com wrote: Summary of performance numbers == There is not much difference with sequential character operations are performed, the code with caching performed

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Pekka Enberg
On Wed, 1 Jun 2011, Sasha Levin wrote: From: John Floren j...@jfloren.net Add support for PS/2 keyboard system with AUX device (aka mouse). The device works with vnc, the guest must be started with the '--vnc' parameter for the device to be initialized. Signed-off-by: John Floren

KVM host freezing

2011-06-02 Thread Marc Haber
Hi, I have just started deploying a host doing virtualization with KVM. The box has an Athlon 64 X2, 4 GB RAM and is running Debian squeeze with a locally built 2.6,39 kernel and backported versions of qemu-kvm (0.14.0) and libvirt (0.9.0) from Debian sid. The box is currently hosting five VMs,

[PATCH] nVMX: Fix bug preventing more than two levels of nesting

2011-06-02 Thread Nadav Har'El
The nested VMX feature is supposed to fully emulate VMX for the guest. This (theoretically) not only allows it to run its own guests, but also also to further emulate VMX for its own guests, and allow arbitrarily deep nesting. This patch fixes a bug (discovered by Kevin Tian) in handling a

Re: [PATCH] kvm tools: Use vesa reserved space for strings and modes

2011-06-02 Thread Pekka Enberg
On Wed, 1 Jun 2011, Sasha Levin wrote: As defined in the spec, the reserved space in struct vesa_general_info should be used to store vesa oem string an a list of possible modes. Signed-off-by: Sasha Levin levinsasha...@gmail.com Francis, could you test this, please? I sent you a copy of the

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Pekka Enberg
On Thu, 2 Jun 2011, Ingo Molnar wrote: Since this is a PS2 keyboard and mouse driver please name it i8042.[ch] like the kernel-side does. that will also make it easier to find the guest-side - host-side pair of guest-driver/host-driver files :-) Fixed, thanks! -- To unsubscribe from this

Re: [PATCH v2] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Ingo Molnar
* Prasad Joshi prasadjoshi...@gmail.com wrote: I am not sure how to induce the delay you mentioned. [...] In the simplest version just add: if (debug__io_delay) udelay(1000); to the code that does a read() from the disk image. This will introduce a 1 msec delay -

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Sasha Levin
On Thu, 2011-06-02 at 11:52 +0300, Pekka Enberg wrote: On Wed, 1 Jun 2011, Sasha Levin wrote: From: John Floren j...@jfloren.net Add support for PS/2 keyboard system with AUX device (aka mouse). The device works with vnc, the guest must be started with the '--vnc' parameter for the

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Pekka Enberg
On Thu, 2 Jun 2011, Sasha Levin wrote: Strange, those are the same errors you're supposed to get when theres no i8042 device at all. Could you verify that hw/pckbd.c is being built? Did the makefile get updated? What I'm seeing here is: [ 49.326316] i8042: PNP: No PS/2 controller found.

Re: [PATCH v2] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Ingo Molnar
* Ingo Molnar mi...@elte.hu wrote: This introduces a ~1msec delay and thus simulates IO, but the delays are *constant* [make sure you use a high-res timers kernel], so they do not result in nearly as much measurement noise as real block IO does. The IO delays will still be there, so

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: On Thu, 2 Jun 2011, Sasha Levin wrote: Strange, those are the same errors you're supposed to get when theres no i8042 device at all. Could you verify that hw/pckbd.c is being built? Did the makefile get updated? What I'm seeing here is: [

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Pekka Enberg
On Thu, 2011-06-02 at 11:18 +0200, Ingo Molnar wrote: * Pekka Enberg penb...@kernel.org wrote: On Thu, 2 Jun 2011, Sasha Levin wrote: Strange, those are the same errors you're supposed to get when theres no i8042 device at all. Could you verify that hw/pckbd.c is being built? Did the

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-02 Thread Michal Suchanek
On 1 June 2011 05:12, Zhi Yong Wu wu...@linux.vnet.ibm.com wrote: On Tue, May 31, 2011 at 03:55:49PM -0400, Vivek Goyal wrote: Date: Tue, 31 May 2011 15:55:49 -0400 From: Vivek Goyal vgo...@redhat.com To: Zhi Yong Wu wu...@linux.vnet.ibm.com Cc: kw...@redhat.com, aligu...@us.ibm.com,

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Sasha Levin
On Thu, 2011-06-02 at 12:15 +0300, Pekka Enberg wrote: On Thu, 2 Jun 2011, Sasha Levin wrote: Strange, those are the same errors you're supposed to get when theres no i8042 device at all. Could you verify that hw/pckbd.c is being built? Did the makefile get updated? What I'm seeing

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: On Thu, 2011-06-02 at 11:18 +0200, Ingo Molnar wrote: * Pekka Enberg penb...@kernel.org wrote: On Thu, 2 Jun 2011, Sasha Levin wrote: Strange, those are the same errors you're supposed to get when theres no i8042 device at all. Could

Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface

2011-06-02 Thread David Gibson
On Wed, Jun 01, 2011 at 08:45:56AM -0700, Richard Henderson wrote: On 06/01/2011 08:35 AM, Eduard - Gabriel Munteanu wrote: Maybe it's not nice, but you're missing the fact upcasting gives you some type safety. With opaques you have none. Lol. Do you understand what container_of does?

Re: [PATCH] kvm tools: Add support for PS/2 keyboard system

2011-06-02 Thread Ingo Molnar
btw., i tried to match up the kernel's i8042.c with kvm's and it was pretty hard due to arbitrary differences. The kernel knows about: --- /* * Status register bits. */ #define I8042_STR_PARITY0x80 #define I8042_STR_TIMEOUT 0x40 #define I8042_STR_AUXDATA

Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface

2011-06-02 Thread David Gibson
On Wed, Jun 01, 2011 at 08:16:44AM -0700, Richard Henderson wrote: On 06/01/2011 07:29 AM, Avi Kivity wrote: On 06/01/2011 05:01 PM, Richard Henderson wrote: +err = dev-mmu-translate(dev, addr,paddr,plen, is_write); I see you didn't take my suggestion for using an opaque

Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

2011-06-02 Thread Michael S. Tsirkin
On Wed, Jun 01, 2011 at 03:24:29AM -0400, Mark Wu wrote: Current index allocation in virtio-blk is based on a monotonically increasing variable index. It could cause some confusion about disk name in the case of hot-plugging disks. And it's impossible to find the lowest available index by just

Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

2011-06-02 Thread Michael S. Tsirkin
On Wed, Jun 01, 2011 at 04:25:48AM -0400, Mark Wu wrote: On 06/01/2011 03:24 AM, Mark Wu wrote: -if (index_to_minor(index)= 1 MINORBITS) -return -ENOSPC; +do { +if (!ida_pre_get(vd_index_ida, GFP_KERNEL)) +return err; + There's a problem

[PATCH 1/3] kvm tools, i8042: Sort status register bits

2011-06-02 Thread Pekka Enberg
This patch sorts the status register bits in preparation for switching over to kernel constant names. Cc: Ingo Molnar mi...@elte.hu Cc: Sasha Levin levinsasha...@gmail.com Signed-off-by: Pekka Enberg penb...@kernel.org --- tools/kvm/hw/i8042.c |9 ++--- 1 files changed, 6 insertions(+),

[PATCH 2/3] kmv tools, i8042: Use kernel status register bit names

2011-06-02 Thread Pekka Enberg
This patch renames the status register bit constant names to be identical with drivers/input/serio/i8042.h. This makes code review easier. Cc: Ingo Molnar mi...@elte.hu Cc: Sasha Levin levinsasha...@gmail.com Signed-off-by: Pekka Enberg penb...@kernel.org --- tools/kvm/hw/i8042.c | 18

[PATCH 3/3] kvm tools, i8042: Use kernel command names

2011-06-02 Thread Pekka Enberg
This patch renames the command constants in hw/i8042.c to use similar names as in linux/i8042.h. Note: we cannot use linux/i8042.h constants directly because they include the command and data. Cc: Ingo Molnar mi...@elte.hu Cc: Sasha Levin levinsasha...@gmail.com Signed-off-by: Pekka Enberg

Re: [PATCH 3/3] kvm tools, i8042: Use kernel command names

2011-06-02 Thread Ingo Molnar
nice! Acked-by: Ingo Molnar mi...@elte.hu Thanks, Ingo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] kvm tools, i8042: Use kernel command names

2011-06-02 Thread Ingo Molnar
ok, with the shared commands it place here's some feature-completeness comparison of the kernel driver and the emulator: guest driver i8042.h | hw/i8042.c emu /* * Status register bits */ #define I8042_STR_PARITY0x80 | missing

Re: [PATCH 3/3] kvm tools, i8042: Use kernel command names

2011-06-02 Thread Pekka Enberg
On Thu, Jun 2, 2011 at 2:19 PM, Ingo Molnar mi...@elte.hu wrote: ok, with the shared commands it place here's some feature-completeness comparison of the kernel driver and the emulator:                                guest driver i8042.h   |   hw/i8042.c emu /*  * Status register bits  */

Re: [PATCH 3/3] kvm tools, i8042: Use kernel command names

2011-06-02 Thread Ingo Molnar
oh, the keyboard driver did not work for me due to: if (vnc) { kbd__init(kvm); vesa__init(kvm); } I don't have VNC installed - i just wanted to see whether the keyboard gets detected. With kbd__init() called unconditionally it works fine here:

Re: [PATCH RFC 2/3] virtio_net: fix tx capacity checks using new API

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 11:40:26AM +0930, Rusty Russell wrote: On Wed, 1 Jun 2011 12:49:54 +0300, Michael S. Tsirkin m...@redhat.com wrote: In the (rare) case where new descriptors are used while virtio_net enables vq callback for the TX vq, virtio_net uses the number of sg entries in the

Re: [PATCH RFC 1/3] virtio_ring: add capacity check API

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 11:41:50AM +0930, Rusty Russell wrote: On Wed, 1 Jun 2011 12:49:46 +0300, Michael S. Tsirkin m...@redhat.com wrote: Add API to check ring capacity. Because of the option to use indirect buffers, this returns the worst case, not the normal case capacity. Can we

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 01:24:57PM +0930, Rusty Russell wrote: On Wed, 1 Jun 2011 12:50:03 +0300, Michael S. Tsirkin m...@redhat.com wrote: Current code might introduce a lot of latency variation if there are many pending bufs at the time we attempt to transmit a new one. This is bad for

[PATCH] kvm tools, i8042: Fix device init failure

2011-06-02 Thread Pekka Enberg
This patch fixes the following device init failure: [0.945942] usbcore: registered new interface driver sisusb [0.947349] i8042: PNP: No PS/2 controller found. Probing ports directly. [0.949033] i8042: [0] 20 - i8042 (command) [0.950370] i8042: [57] -- i8042 (timeout)

Re: [PATCH] kvm tools, i8042: Fix device init failure

2011-06-02 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: static bool kbd_in(struct ioport *ioport, struct kvm *kvm, u16 port, void *data, int size, u32 count) { - u32 result; - - if (port == I8042_COMMAND_REG) { - result = kbd_read_status(); - ioport__write8(data,

Re: KVM host freezing

2011-06-02 Thread Avi Kivity
On 06/02/2011 11:25 AM, Marc Haber wrote: Hi, I have just started deploying a host doing virtualization with KVM. The box has an Athlon 64 X2, 4 GB RAM and is running Debian squeeze with a locally built 2.6,39 kernel and backported versions of qemu-kvm (0.14.0) and libvirt (0.9.0) from Debian

Re: [PATCH] kvm: Document KVM_IOEVENTFD

2011-06-02 Thread Avi Kivity
On 06/01/2011 01:51 PM, Jan Kiszka wrote: On 2011-05-31 15:44, Marcelo Tosatti wrote: On Sat, May 28, 2011 at 02:12:30PM +0300, Sasha Levin wrote: Document KVM_IOEVENTFD that can be used to receive notifications of PIO/MMIO events without triggering an exit. Cc: Avi

Re: [PATCH] kvm tools, i8042: Fix device init failure

2011-06-02 Thread Pekka Enberg
On Thu, Jun 2, 2011 at 4:40 PM, Ingo Molnar mi...@elte.hu wrote: +     case I8042_COMMAND_REG: { +             u8 value = kbd_read_status(); +             ioport__write8(data, value); +             break; +     } +     case I8042_DATA_REG: { +             u32 value = kbd_read_data(); +    

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Krishna Kumar2
OK, I have something very similar, but I still dislike the screw the latency part: this path is exactly what the IBM guys seem to hit. So I created two functions: one tries to free a constant number and another one up to capacity. I'll post that now. Please review this patch to see if it

[PATCH] KVM: Clarify KVM_ASSIGN_PCI_DEVICE documentation

2011-06-02 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com Neither host_irq nor the guest_msi struct are used anymore today. Tag the former, drop the latter to avoid confusion. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Documentation/virtual/kvm/api.txt |7 +-- 1 files changed, 1 insertions(+),

Re: [PATCH] kvm: Document KVM_IOEVENTFD

2011-06-02 Thread Jan Kiszka
On 2011-06-02 15:43, Avi Kivity wrote: On 06/01/2011 01:51 PM, Jan Kiszka wrote: On 2011-05-31 15:44, Marcelo Tosatti wrote: On Sat, May 28, 2011 at 02:12:30PM +0300, Sasha Levin wrote: Document KVM_IOEVENTFD that can be used to receive notifications of PIO/MMIO events without

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 07:47:48PM +0530, Krishna Kumar2 wrote: OK, I have something very similar, but I still dislike the screw the latency part: this path is exactly what the IBM guys seem to hit. So I created two functions: one tries to free a constant number and another one up to

Re: RCU red-black tree (was: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper)

2011-06-02 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: [...] Mathieu, I've started working on converting our MMIO code to use RCU rbtree. It looks like each node contains one key, and the search functions search for a node with a key in a specific range. Instead, the key in interval tree nodes

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Krishna Kumar2
Michael S. Tsirkin m...@redhat.com wrote on 06/02/2011 08:13:46 PM: Please review this patch to see if it looks reasonable: Hmm, since you decided to work on top of my patch, I'd appreciate split-up fixes. OK (that also explains your next comment). 1. Picked comments/code from MST's code

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 08:56:42PM +0530, Krishna Kumar2 wrote: Michael S. Tsirkin m...@redhat.com wrote on 06/02/2011 08:13:46 PM: Please review this patch to see if it looks reasonable: Hmm, since you decided to work on top of my patch, I'd appreciate split-up fixes. OK (that also

[PATCHv2 RFC 0/4] virtio and vhost-net capacity handling

2011-06-02 Thread Michael S. Tsirkin
OK, here's a new attempt to use the new capacity api. I also added more comments to clarify the logic. Hope this is more readable. Let me know pls. This is on top of the patches applied by Rusty. Warning: untested. Posting now to give people chance to comment on the API. Changes from v1: -

[PATCHv2 RFC 3/4] virtio_net: limit xmit polling

2011-06-02 Thread Michael S. Tsirkin
Current code might introduce a lot of latency variation if there are many pending bufs at the time we attempt to transmit a new one. This is bad for real-time applications and can't be good for TCP either. Free up just enough to both clean up all buffers eventually and to be able to xmit the next

[PATCHv2 RFC 2/4] virtio_net: fix tx capacity checks using new API

2011-06-02 Thread Michael S. Tsirkin
In the (rare) case where new descriptors are used while virtio_net enables vq callback for the TX vq, virtio_net uses the number of sg entries in the skb it frees to calculate how many descriptors in the ring have just been made available. But this value is an overestimate: with indirect buffers

[PATCHv2 RFC 1/4] virtio_ring: add capacity check API

2011-06-02 Thread Michael S. Tsirkin
Add API to check ring capacity. Because of the option to use indirect buffers, this returns the worst case, not the normal case capacity. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_ring.c |8 include/linux/virtio.h |5 + 2 files

[PATCHv2 RFC 4/4] Revert virtio: make add_buf return capacity remaining:

2011-06-02 Thread Michael S. Tsirkin
This reverts commit 3c1b27d5043086a485f8526353ae9fe37bfa1065. The only user was virtio_net, and it switched to min_capacity instead. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_ring.c |2 +- include/linux/virtio.h |2 +- 2 files changed, 2

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 08:56:42PM +0530, Krishna Kumar2 wrote: Return value in free_old_xmit() was wrong. Could you check my latest RFC pls? -- MST -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Prasad Joshi
On Thu, Jun 2, 2011 at 9:36 AM, Prasad Joshi prasadjoshi...@gmail.com wrote: On Thu, Jun 2, 2011 at 8:28 AM, Ingo Molnar mi...@elte.hu wrote: * Prasad Joshi prasadjoshi...@gmail.com wrote: Summary of performance numbers == There is not much difference with

Re: [PATCHv2 RFC 0/4] virtio and vhost-net capacity handling

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 06:42:35PM +0300, Michael S. Tsirkin wrote: OK, here's a new attempt to use the new capacity api. I also added more comments to clarify the logic. Hope this is more readable. Let me know pls. This is on top of the patches applied by Rusty. Warning: untested.

Re: [PATCHv2 RFC 3/4] virtio_net: limit xmit polling

2011-06-02 Thread Sridhar Samudrala
On Thu, 2011-06-02 at 18:43 +0300, Michael S. Tsirkin wrote: Current code might introduce a lot of latency variation if there are many pending bufs at the time we attempt to transmit a new one. This is bad for real-time applications and can't be good for TCP either. Free up just enough to

[PATCH v3] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Prasad Joshi
QCOW uses two tables level1 (L1) table and level2 (L2) table. The L1 table points to offset of L2 table. When a QCOW image is probed, the L1 table is cached in the memory to avoid reading it from disk on every access. This caching improves the performance. The similar performance improvement can

[PATCH] kvm tools: Add 'kvm pause' command

2011-06-02 Thread Sasha Levin
This patch adds a 'kvm debug' command that's currently an alias for kill -USR2 `pidof kvm` Which pauses a guest (freezes all VCPU threads). Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile|1 + tools/kvm/include/kvm/kvm-pause.h |6 ++

Re: KVM host freezing

2011-06-02 Thread Marc Haber
On Thu, Jun 02, 2011 at 04:41:30PM +0300, Avi Kivity wrote: On 06/02/2011 11:25 AM, Marc Haber wrote: Is there any possibility that the freezes have to do with the unhandles (rd|wr)msr messages? Very unlikely. What does that mean anyway? It's looked with sufficiently high priority to get

Re: [PATCH v3] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Pekka Enberg
On Thu, Jun 2, 2011 at 11:01 PM, Prasad Joshi prasadjoshi...@gmail.com wrote: QCOW uses two tables level1 (L1) table and level2 (L2) table. The L1 table points to offset of L2 table. When a QCOW image is probed, the L1 table is cached in the memory to avoid reading it from disk on every access.

Re: [PATCH v3] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Pekka Enberg
On Thu, Jun 2, 2011 at 11:01 PM, Prasad Joshi prasadjoshi...@gmail.com wrote: There is not much difference with sequential character operations are performed, the code with caching performed better by small margin. The caching code performance raised by 18% to 24% with sequential block output

Re: [PATCH v3] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Sasha Levin
On Thu, 2011-06-02 at 21:01 +0100, Prasad Joshi wrote: QCOW uses two tables level1 (L1) table and level2 (L2) table. The L1 table points to offset of L2 table. When a QCOW image is probed, the L1 table is cached in the memory to avoid reading it from disk on every access. This caching improves

Re: [PATCH] kvm tools: Add 'kvm pause' command

2011-06-02 Thread Prasad Joshi
On Thu, Jun 2, 2011 at 9:22 PM, Sasha Levin levinsasha...@gmail.com wrote: This patch adds a 'kvm debug' command that's currently an alias for  kill -USR2 `pidof kvm` Which pauses a guest (freezes all VCPU threads). Signed-off-by: Sasha Levin levinsasha...@gmail.com ---  

Re: [PATCH v7 3/4] Mask function7 ebx against host capability word9

2011-06-02 Thread Marcelo Tosatti
On Wed, Jun 01, 2011 at 09:07:51PM +0800, Yang, Wei Y wrote: This patch masks CPUID leaf 7 ebx against host capability word9. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com ---

Re: [PATCH] Revert qemu-kvm: Update kvm_check_many_ioeventfds for qemu-kvm use

2011-06-02 Thread Marcelo Tosatti
On Wed, Jun 01, 2011 at 10:54:23AM +0200, Jan Kiszka wrote: This reverts commit cad7c5d76b30d30fc91dea049fef7340fd96ff3c. We migrated to upstream io-thread, so this hack became obsolete. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Applied, thanks. -- To unsubscribe from this list:

Re: [PATCH] qemu-kvm: Remove some spurious diffs to upstream

2011-06-02 Thread Marcelo Tosatti
On Wed, Jun 01, 2011 at 10:54:45AM +0200, Jan Kiszka wrote: No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target|3 --- block/raw-posix.c |2 -- cutils.c |5 - dma-helpers.c |4

Re: [PATCH] KVM: VMX: Silence warning on 32-bit hosts

2011-06-02 Thread Marcelo Tosatti
On Wed, Jun 01, 2011 at 12:57:30PM +0200, Jan Kiszka wrote: a is unused now on CONFIG_X86_32. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/vmx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Applied, thanks. -- To unsubscribe from this list: send the

Re: [PATCH] KVM: Clarify KVM_ASSIGN_PCI_DEVICE documentation

2011-06-02 Thread Marcelo Tosatti
On Thu, Jun 02, 2011 at 04:16:09PM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com Neither host_irq nor the guest_msi struct are used anymore today. Tag the former, drop the latter to avoid confusion. Signed-off-by: Jan Kiszka jan.kis...@siemens.com ---

Re: [PATCH] kvm: Document KVM_IOEVENTFD

2011-06-02 Thread Marcelo Tosatti
On Thu, Jun 02, 2011 at 04:16:20PM +0200, Jan Kiszka wrote: On 2011-06-02 15:43, Avi Kivity wrote: On 06/01/2011 01:51 PM, Jan Kiszka wrote: On 2011-05-31 15:44, Marcelo Tosatti wrote: On Sat, May 28, 2011 at 02:12:30PM +0300, Sasha Levin wrote: Document KVM_IOEVENTFD that can be used

Re: [PATCH] nVMX: Fix bug preventing more than two levels of nesting

2011-06-02 Thread Marcelo Tosatti
On Thu, Jun 02, 2011 at 11:54:52AM +0300, Nadav Har'El wrote: The nested VMX feature is supposed to fully emulate VMX for the guest. This (theoretically) not only allows it to run its own guests, but also also to further emulate VMX for its own guests, and allow arbitrarily deep nesting.

[PATCH v8 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-06-02 Thread Yang, Wei Y
This patch removes SMEP bit from CR4_RESERVED_BITS. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/include/asm/kvm_host.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[PATCH v8 3/4] Mask function7 ebx against host capability word9

2011-06-02 Thread Yang, Wei Y
This patch masks CPUID leaf 7 ebx against host capability word9. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/kvm/x86.c | 20 +++- 1 files changed, 19 insertions(+), 1

[PATCH v8 0/4] Enable SMEP feature support for KVM

2011-06-02 Thread Yang, Wei Y
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution Protection) in KVM. SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published soon. This patchset is based on Fenghua's SMEP patch series, as

[PATCH v8 2/4] Add SMEP support when setting CR4

2011-06-02 Thread Yang, Wei Y
This patch adds SMEP handling when setting CR4. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/kvm/x86.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff

[PATCH v8 4/4] Add instruction fetch checking when walking guest page table

2011-06-02 Thread Yang, Wei Y
This patch adds instruction fetch checking when walking guest page table. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/kvm/paging_tmpl.h |9 - 1 files changed, 8

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-02 Thread Krishna Kumar2
Michael S. Tsirkin m...@redhat.com wrote on 06/02/2011 09:04:23 PM: Is this where the bug was? Return value in free_old_xmit() was wrong. I will re-do against the mainline kernel. Thanks, - KK Just noting that I'm working on that patch as well, it might be more efficient if we

Re: [PATCH v3] kvm tools: Add QCOW level2 caching support

2011-06-02 Thread Pekka Enberg
On Fri, Jun 3, 2011 at 12:19 AM, Sasha Levin levinsasha...@gmail.com wrote: +static int cache_table(struct qcow *q, u64 *table, u64 offset) +{ +     struct qcow_l2_cache *n; +     struct rb_root *r = q-root; +     struct qcow_l2_cache *lru; + +     n = calloc(1, sizeof(struct

[PATCH 00/13] KVM: PPC: e500: SPE and MMU

2011-06-02 Thread Scott Wood
This patchset contains SPE state management for e500 KVM guests, as well as MMU enhancements (performance, userspace visibility, and support for mapping things that aren't standard kernel-managed pages). They are combined into one patchset because they both touch the MSR update code. Liu Yu (2):

[PATCH 01/13] powerpc/e500: Save SPEFCSR in flush_spe_to_thread()

2011-06-02 Thread Scott Wood
From: yu liu yu@freescale.com giveup_spe() saves the SPE state which is protected by MSR[SPE]. However, modifying SPEFSCR does not trap when MSR[SPE]=0. And since SPEFSCR is already saved/restored in _switch(), not all the callers want to save SPEFSCR again. Thus, saving SPEFSCR should not

[PATCH 02/13] powerpc/e500: SPE register saving: take arbitrary struct offset

2011-06-02 Thread Scott Wood
Previously, these macros hardcoded THREAD_EVR0 as the base of the save area, relative to the base register passed. This base offset is now passed as a separate macro parameter, allowing reuse with other SPE save areas, such as used by KVM. Acked-by: Kumar Gala ga...@kernel.crashing.org

[PATCH 06/13] KVM: PPC: e500: don't use MAS0 as intermediate storage.

2011-06-02 Thread Scott Wood
This avoids races. It also means that we use the shadow TLB way, rather than the hardware hint -- if this is a problem, we could do a tlbsx before inserting a TLB0 entry. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 26 +- 1 files

[PATCH 08/13] KVM: PPC: e500: Support large page mappings of PFNMAP vmas.

2011-06-02 Thread Scott Wood
This allows large pages to be used on guest mappings backed by things like /dev/mem, resulting in a significant speedup when guest memory is mapped this way (it's useful for directly-assigned MMIO, too). This is not a substitute for hugetlbfs integration, but is useful for configurations where

[PATCH 09/13] KVM: PPC: e500: enable magic page

2011-06-02 Thread Scott Wood
This is a shared page used for paravirtualization. It is always present in the guest kernel's effective address space at the address indicated by the hypercall that enables it. The physical address specified by the hypercall is not used, as e500 does not have real mode. Signed-off-by: Scott

[PATCH 07/13] KVM: PPC: e500: Eliminate shadow_pages[], and use pfns instead.

2011-06-02 Thread Scott Wood
This is in line with what other architectures do, and will allow us to map things other than ordinary, unreserved kernel pages -- such as dedicated devices, or large contiguous reserved regions. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |2 -

[PATCH 12/13] KVM: PPC: e500: Don't search over the entire TLB0.

2011-06-02 Thread Scott Wood
Only look in the 4 entries that could possibly contain the entry we're looking for. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c

[PATCH 11/13] KVM: PPC: e500: Add shadow PID support

2011-06-02 Thread Scott Wood
From: Liu Yu yu@freescale.com Dynamically assign host PIDs to guest PIDs, splitting each guest PID into multiple host (shadow) PIDs based on kernel/user and MSR[IS/DS]. Use both PID0 and PID1 so that the shadow PIDs for the right mode can be selected, that correspond both to guest TID = zero

[PATCH 13/13] KVM: PPC: e500: MMU API

2011-06-02 Thread Scott Wood
This implements a shared-memory API for giving host userspace access to the guest's TLB. Signed-off-by: Scott Wood scottw...@freescale.com --- Documentation/virtual/kvm/api.txt | 84 +++- arch/powerpc/include/asm/kvm.h | 35 +++ arch/powerpc/include/asm/kvm_e500.h | 23 +-