Re: [PATCH] expose kvmclock upper msr set.

2011-02-27 Thread Avi Kivity
On 02/25/2011 03:11 PM, Glauber Costa wrote: On Thu, 2011-02-24 at 18:54 -0500, Steven Rostedt wrote: On Thu, 2011-02-24 at 20:48 -0300, Glauber Costa wrote: On Thu, 2011-02-24 at 18:24 -0500, Steven Rostedt wrote: On Wed, Feb 23, 2011 at 12:44:14PM -0500, Glauber Costa wrote:

Re: [RFC PATCH 2/3] kvm: Allow memory slot array to grow on demand

2011-02-27 Thread Avi Kivity
On 02/24/2011 08:08 PM, Alex Williamson wrote: @@ -207,7 +206,7 @@ struct kvm_mmu_page { * One bit set per slot which has memory * in this shadow page. */ - DECLARE_BITMAP(slot_bitmap, KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS); + unsigned long

Re: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-02-27 Thread Avi Kivity
On 02/24/2011 07:35 PM, Alex Williamson wrote: On Thu, 2011-02-24 at 12:06 +0200, Avi Kivity wrote: On 02/23/2011 09:28 PM, Alex Williamson wrote: I had forgotten about1M mem, so actually the slot configuration was: 0:1M 1: 1M - 3.5G 2: 4G+ I stacked the deck in favor

Re: EPT: Misconfiguration

2011-02-27 Thread Avi Kivity
Copying netdev: looks like memory corruption in the networking stack. Archive link: http://www.spinics.net/lists/kvm/msg50651.html (for the attachment). On 02/24/2011 11:15 PM, Ruben Kerkhof wrote: On Tue, Feb 15, 2011 at 18:16, Marcelo Tosattimtosa...@redhat.com wrote: This and the

Re: [PATCH] qemu-kvm: Fix non-PCI target build

2011-02-27 Thread Avi Kivity
On 02/23/2011 10:28 AM, Jan Kiszka wrote: Replace obsolete qemu-kvm.h with kvm.h in pci.c and build that module just like upstream does. This fixes non-x86 targets which have no PCI support. Thanks, applied to mainline and stable-0.14. -- error compiling committee.c: too many arguments to

Re: [PATCH] expose kvmclock upper msr set.

2011-02-27 Thread Avi Kivity
On 02/23/2011 07:44 PM, Glauber Costa wrote: We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range for a while now, but we're not exposing it yet, meaning nobody is using it. This simple patch takes care of that. We're exposing them via KVM_GET_SUPPORTED_CPUID, leaf

Re: [RESEND] [PATCH 1/1] qemu-kvm (device-assignment): detecting the pre-fectchable memory region.

2011-02-27 Thread Avi Kivity
On 02/26/2011 06:44 PM, Prasad Joshi wrote: During device assignment the memory pre-fetchable flag was discarded as the IORESOURCE_PREFETCH was defined as 0x1000 when instead it should have been 0x2000. Following small patch fixes the problem, please apply. Applied, thanks. Note this

Re: [PATCH]: Fixes the qemu-kvm compilation failure when configured with disable-kvm

2011-02-27 Thread Avi Kivity
On 02/26/2011 06:38 PM, Prasad Joshi wrote: I pulled the latest qemu-kvm code and configured it with disabled-kvm and related options. Configuration finishes well, but the compilation fails. This is already fixed in tree. -- error compiling committee.c: too many arguments to function -- To

Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors

2011-02-27 Thread Avi Kivity
On 02/24/2011 11:48 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguorialigu...@us.ibm.com diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 000..bd6341c --- /dev/null +++ b/lib/x86/io.h @@ -0,0 +1,40 @@ +#ifndef IO_H +#define IO_H + +static inline unsigned char

Re: [PATCH 2/3] kvm-unit-tests: do not set level sensitive irq when initializing the PIC

2011-02-27 Thread Avi Kivity
On 02/24/2011 11:48 PM, Anthony Liguori wrote: I'm not sure if this was intentional but the QEMU i8259 does not support this flag. I haven't observed any issues with this but I'll happily admit that I'm not very aware of what I'm doing here. Signed-off-by: Anthony Liguorialigu...@us.ibm.com

Re: [PATCH 3/3] kvm-unit-tests: make I/O more friendly to existing QEMU hardware

2011-02-27 Thread Avi Kivity
On 02/24/2011 11:48 PM, Anthony Liguori wrote: Use the serial port for printf() and use the Bochs bios exit port if the testdev port isn't available. This unconditionally switches to use the serial port but tries to use the testdev exit port since that lets you pass an exit status. The only

Re: [Qemu-devel] Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors

2011-02-27 Thread Anthony Liguori
On 02/27/2011 06:44 AM, Avi Kivity wrote: On 02/24/2011 11:48 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguorialigu...@us.ibm.com diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 000..bd6341c --- /dev/null +++ b/lib/x86/io.h @@ -0,0 +1,40 @@ +#ifndef IO_H

Re: [Qemu-devel] Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors

2011-02-27 Thread Avi Kivity
On 02/27/2011 04:01 PM, Anthony Liguori wrote: On 02/27/2011 06:44 AM, Avi Kivity wrote: On 02/24/2011 11:48 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguorialigu...@us.ibm.com diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 000..bd6341c --- /dev/null +++

Re: [PATCH 1/2] KVM: VMX: write new TR selector value into vmcs immediately if it changes during vm86 mode.

2011-02-27 Thread Avi Kivity
On 02/21/2011 12:07 PM, Gleb Natapov wrote: When vm86 is active TR descriptor is updated with vm86 task values, but selector is left intact. vmx_set_segment() makes sure that if TR register is written into while vm86 is active the new values are saved for use after vm86 is deactivated, but since

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Avi Kivity
On 02/21/2011 12:07 PM, Gleb Natapov wrote: Currently vm86 task is initialized on each real mode entry and vcpu reset. Initialization is done by zeroing TSS and updating relevant fields. But since all vcpus are using the same TSS there is a race where one vcpu may use TSS while other vcpu is

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Gleb Natapov
On Sun, Feb 27, 2011 at 05:43:07PM +0200, Avi Kivity wrote: On 02/21/2011 12:07 PM, Gleb Natapov wrote: Currently vm86 task is initialized on each real mode entry and vcpu reset. Initialization is done by zeroing TSS and updating relevant fields. But since all vcpus are using the same TSS

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Avi Kivity
On 02/27/2011 05:52 PM, Gleb Natapov wrote: According to my reading of the code, if KVM_SET_TSS_ADDR is not invoked, the guest would fail both before and after the patch, yes? Hmmm. Actually no. Before the patch guest that doesn't use KVM_SET_TSS_ADDR will use the top of slot zero. Should

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Avi Kivity
On 02/27/2011 05:58 PM, Avi Kivity wrote: The problem with using top of slot zero is that this memory is available for guest use and we do not even put it into e820 map as far as I see. Also there are patches floating around that re-arrange memslots or even put them in a tree. They will break

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Gleb Natapov
On Sun, Feb 27, 2011 at 05:58:54PM +0200, Avi Kivity wrote: On 02/27/2011 05:52 PM, Gleb Natapov wrote: According to my reading of the code, if KVM_SET_TSS_ADDR is not invoked, the guest would fail both before and after the patch, yes? Hmmm. Actually no. Before the patch guest that

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Avi Kivity
On 02/27/2011 06:12 PM, Gleb Natapov wrote: On Sun, Feb 27, 2011 at 05:58:54PM +0200, Avi Kivity wrote: On 02/27/2011 05:52 PM, Gleb Natapov wrote: According to my reading of the code, if KVM_SET_TSS_ADDR is not invoked, the guest would fail both before and after the patch, yes?

Re: [PATCH] kvm,async_pf: add missing kvm_async_pf_hash_reset()

2011-02-27 Thread Avi Kivity
On 02/21/2011 05:21 AM, Lai Jiangshan wrote: The hash array of async gfns may still contain some left gfns after kvm_clear_async_pf_completion_queue() called, need to clear them. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list:

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Gleb Natapov
On Sun, Feb 27, 2011 at 06:04:16PM +0200, Avi Kivity wrote: On 02/27/2011 05:58 PM, Avi Kivity wrote: The problem with using top of slot zero is that this memory is available for guest use and we do not even put it into e820 map as far as I see. Also there are patches floating around that

Re: Q: status of kvm/ subdir in qemu-kvm tarball?

2011-02-27 Thread Avi Kivity
On 02/23/2011 04:57 PM, Jan Kiszka wrote: The only situation where using kernel headers not provided by qemu itself is when you want to build qemu for older kernel and omit some features and runtime tests. But this is hardly a good goal to support. I don't think the goal of the

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Avi Kivity
On 02/27/2011 06:27 PM, Gleb Natapov wrote: Or we can keep the old behaviour. If KVM_SET_TSS_ADDR hasn't been called by the time of the first entry into real mode (the first KVM_CREATE_VCPU?), use the top of the first slot. Do we require that KVM_SET_TSS_ADDR is called before first

Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.

2011-02-27 Thread Gleb Natapov
On Sun, Feb 27, 2011 at 06:31:13PM +0200, Avi Kivity wrote: On 02/27/2011 06:27 PM, Gleb Natapov wrote: Or we can keep the old behaviour. If KVM_SET_TSS_ADDR hasn't been called by the time of the first entry into real mode (the first KVM_CREATE_VCPU?), use the top of the first slot.

Re: Bug inkvm_set_irq

2011-02-27 Thread Michael S. Tsirkin
On Fri, Feb 25, 2011 at 10:07:22AM +0100, Jean-Philippe Menil wrote: Hi, Each time i try tou use vhost_net, i'm facing a kernel bug. I do a modprobe vhost_net, and start guest whith vhost=on. Following is a trace with a kernel 2.6.37, but i had the same problem with 2.6.36 (cf

Re: regression - 2.6.36 - 2.6.37 - kvm - 32bit SMP guests don't boot

2011-02-27 Thread Nikola Ciprich
I was not aware of the thread. Please cc me directly, or add a keyword I track - timekeeping, TSC.. Hello Zachary, thanks for Your time looking at this! That change alone may not bisect well; without further fixes on top of it, you may end up with a hang or stall, which is likely to

Re: Q: status of kvm/ subdir in qemu-kvm tarball?

2011-02-27 Thread Jan Kiszka
On 2011-02-27 17:28, Avi Kivity wrote: On 02/23/2011 04:57 PM, Jan Kiszka wrote: The only situation where using kernel headers not provided by qemu itself is when you want to build qemu for older kernel and omit some features and runtime tests. But this is hardly a good goal to

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote: When trying to start X (and it loads qxl driver) the kvm process just crashes. This is fixed by Gerd's attached patch (taken from rhel repository, don't know why it wasn't pushed to qemu-kvm

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Jan Kiszka
On 2011-02-27 20:03, Alon Levy wrote: On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote: When trying to start X (and it loads qxl driver) the kvm process just crashes. This is fixed by Gerd's attached patch (taken from rhel repository, don't know

[PATCH] spice/qxl: locking fix for qemu-kvm

2011-02-27 Thread Alon Levy
From: Gerd Hoffmann kra...@redhat.com qxl needs to release the qemu lock before calling some libspice functions (and re-aquire it later). In upstream qemu qxl can just use qemu_mutex_{unlock,lock}_iothread. In qemu-kvm this doesn't work, qxl needs additionally save+restore the cpu_single_env

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: On 2011-02-27 20:03, Alon Levy wrote: On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote: When trying to start X (and it loads qxl driver) the kvm process just crashes. This is

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Jan Kiszka
On 2011-02-27 20:16, Alon Levy wrote: On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: On 2011-02-27 20:03, Alon Levy wrote: On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote: When trying to start X (and it loads qxl driver) the kvm

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sun, Feb 27, 2011 at 08:27:01PM +0100, Jan Kiszka wrote: On 2011-02-27 20:16, Alon Levy wrote: On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: On 2011-02-27 20:03, Alon Levy wrote: On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote:

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sun, Feb 27, 2011 at 08:27:01PM +0100, Jan Kiszka wrote: On 2011-02-27 20:16, Alon Levy wrote: On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: On 2011-02-27 20:03, Alon Levy wrote: On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote:

[Bug 30042] New: page allocation failure when using jumbo frames with kvm guests

2011-02-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=30042 Summary: page allocation failure when using jumbo frames with kvm guests Product: Virtualization Version: unspecified Kernel Version: 2.6.35 Platform: All OS/Version: Linux

Re: [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-27 Thread Sheng Yang
On Friday 25 February 2011 16:12:30 Michael S. Tsirkin wrote: On Fri, Feb 25, 2011 at 11:23:30AM +0800, Sheng Yang wrote: On Thursday 24 February 2011 18:22:19 Michael S. Tsirkin wrote: On Thu, Feb 24, 2011 at 05:51:03PM +0800, Sheng Yang wrote: Add a new parameter to IO writing handler,

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

2011-02-27 Thread Sheng Yang
On Friday 25 February 2011 16:29:38 Michael S. Tsirkin wrote: On Fri, Feb 25, 2011 at 02:28:02PM +0800, Sheng Yang wrote: On Thursday 24 February 2011 18:45:08 Michael S. Tsirkin wrote: On Thu, Feb 24, 2011 at 05:51:04PM +0800, Sheng Yang wrote: Then we can support mask bit operation of

[PATCH 0/3] [RFC] Implement multiqueue (RX TX) virtio-net

2011-02-27 Thread Krishna Kumar
This patch series is a continuation of an earlier one that implemented guest MQ TX functionality. This new patchset implements both RX and TX MQ. Qemu changes are not being included at this time solely to aid in easier review. Compatibility testing with old/new combinations of qemu/guest and

[PATCH 1/3] [RFC] Change virtqueue structure

2011-02-27 Thread Krishna Kumar
Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2 files

[PATCH 2/3] [RFC] Changes for MQ virtio-net

2011-02-27 Thread Krishna Kumar
Implement mq virtio-net driver. Though struct virtio_net_config changes, it works with the old qemu since the last element is not accessed unless qemu sets VIRTIO_NET_F_NUMTXQS. Patch also adds a macro for the maximum number of TX vq's (VIRTIO_MAX_TXQS) that the user can specify.

[PATCH 3/3] [RFC] Changes for MQ vhost

2011-02-27 Thread Krishna Kumar
Changes for mq vhost. vhost_net_open is changed to allocate a vhost_net and return. The remaining initializations are delayed till SET_OWNER. SET_OWNER is changed so that the argument is used to determine how many txqs to use. Unmodified qemu's will pass NULL, so this is recognized and handled

[PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-27 Thread Sheng Yang
Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |3 ++- arch/x86/kvm/lapic.c |3 ++- arch/x86/kvm/x86.c

[PATCH 0/4 v11] MSI-X MMIO support for KVM

2011-02-27 Thread Sheng Yang
Change from v9: Update according to the comments of Alex and Michael. Notice this patchset still based on 2.6.37 due to a block bug on assigned device in the upstream now. Sheng Yang (4): KVM: Move struct kvm_io_device to kvm_host.h KVM: Add kvm_io_ext_data to IO handler KVM: Emulate MSI-X

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

2011-02-27 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/include/asm/kvm_host.h |1 + arch/x86/kvm/Makefile |2 +- arch/x86/kvm/mmu.c |2 + arch/x86/kvm/x86.c | 40 -

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

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

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

2011-02-27 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

Re: [PATCH 0/3] [RFC] Implement multiqueue (RX TX) virtio-net

2011-02-27 Thread Michael S. Tsirkin
On Mon, Feb 28, 2011 at 12:04:27PM +0530, Krishna Kumar wrote: This patch series is a continuation of an earlier one that implemented guest MQ TX functionality. This new patchset implements both RX and TX MQ. Qemu changes are not being included at this time solely to aid in easier review.

Re: [Qemu-devel] [PATCH V6 3/4] qmp, nmi: convert do_inject_nmi() to QObject

2011-02-27 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: On 02/25/2011 03:54 AM, Markus Armbruster wrote: Anthony Liguorialigu...@linux.vnet.ibm.com writes: On 02/24/2011 10:20 AM, Markus Armbruster wrote: Anthony Liguorialigu...@linux.vnet.ibm.com writes: On 02/24/2011 02:33