[GIT PULL] More power management updates for 2.6.39

2011-03-25 Thread Rafael J. Wysocki
Hi Linus, Please pull additional power management updates for 2.6.39 from: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6.git syscore They make subsystems that x86 depends on use struct syscore_ops objects instead of sysdevs for "core" power management, which reduces the code s

Re: "KVM internal error. Suberror: 1" with ancient 2.4 kernel as guest

2011-03-25 Thread Wei Xu
Jiri & Avi: I attached the patched I did for movq and movdqa emulation. Please note: (1) I only implemented those two. Other instructions like addq may be following same way. (2) I use same guest_fx_image to hold value and fxsave/fxrstor to copy to/from registers. This is not very efficient I admi

KVM, iSCSI and High Availability

2011-03-25 Thread Marcin M. Jessa
Hi. Over the last several days I've been reading, asking questions, searching the Internet to find a viable HA stack for Ubuntu with KVM virtualization and shared iSCSI storage. And I'm nearly as confused as when I started. Basically I'm trying to build a KVM enviroment with an iSCSI SAN and

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-25 Thread Rusty Russell
On Thu, 24 Mar 2011 16:28:22 +0200, "Michael S. Tsirkin" wrote: > On Thu, Mar 24, 2011 at 11:00:53AM +1030, Rusty Russell wrote: > > > With simply removing the notify here, it does help the case when TX > > > overrun hits too often, for example for 1K message size, the single > > > TCP_STREAM per

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-25 Thread Rusty Russell
On Thu, 24 Mar 2011 10:46:49 -0700, Shirley Ma wrote: > On Thu, 2011-03-24 at 16:28 +0200, Michael S. Tsirkin wrote: > > Several other things I am looking at, wellcome cooperation: > > 1. It's probably a good idea to update avail index > >immediately instead of upon kick: for RX > >this mi

2.6.38.1 general protection fault

2011-03-25 Thread Tomasz Chmielewski
I got this on a 2.6.38.1 system which (I think) had some problem accessing guest image on a btrfs filesystem. general protection fault: [#1] SMP last sysfs file: /sys/kernel/uevent_seqnum CPU 0 Modules linked in: ipt_MASQUERADE vhost_net kvm_intel kvm iptable_filter xt_tcpudp iptable_nat

[PATCH 13/13] KVM: SVM: Remove nested sel_cr0_write handling code

2011-03-25 Thread Joerg Roedel
This patch removes all the old code which handled the nested selective cr0 write intercepts. This code was only in place as a work-around until the instruction emulator is capable of doing the same. This is the case with this patch-set and so the code can be removed. Signed-off-by: Joerg Roedel -

[PATCH 08/13] KVM: SVM: Add intercept checks for SVM instructions

2011-03-25 Thread Joerg Roedel
This patch adds the necessary code changes in the instruction emulator and the extensions to svm.c to implement intercept checks for the svm instructions. Signed-off-by: Joerg Roedel --- arch/x86/kvm/emulate.c | 23 ++- arch/x86/kvm/svm.c |8 2 files change

[PATCH 03/13] KVM: X86: Don't write-back cpu-state on X86EMUL_INTERCEPTED

2011-03-25 Thread Joerg Roedel
This patch prevents the changed CPU state to be written back when the emulator detected that the instruction was intercepted by the guest. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_emulate.h |1 + arch/x86/kvm/emulate.c |3 +++ arch/x86/kvm/x86.c

[PATCH 10/13] KVM: SVM: Add intercept checks for remaining twobyte instructions

2011-03-25 Thread Joerg Roedel
This patch adds intercepts checks for the remaining twobyte instructions to the KVM instruction emulator. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_emulate.h |2 ++ arch/x86/kvm/emulate.c |8 arch/x86/kvm/svm.c | 19 ++

[PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-25 Thread Joerg Roedel
This patch adds code to check for IOIO intercepts on instructions decoded by the KVM instruction emulator. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_emulate.h |4 arch/x86/kvm/emulate.c | 10 ++ arch/x86/kvm/svm.c | 36 +

[PATCH 0/13] KVM: Make the instruction emulator aware of Nested Virtualization v2

2011-03-25 Thread Joerg Roedel
Hi, this is version 2 of the patch-set to make the KVM instruction emulator aware of intercepted instructions. Noting the differences to v1 does not make a lot of sense this this is basically a re-implementation so that almost everything changed :-) The re-write was done on the basis of Avi's patc

[PATCH 06/13] KVM: SVM: Add intercept check for accessing dr registers

2011-03-25 Thread Joerg Roedel
This patch adds the intercept checks for instruction accessing the debug registers. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_emulate.h |2 ++ arch/x86/kvm/emulate.c |4 ++-- arch/x86/kvm/svm.c |6 ++ 3 files changed, 10 insertions(+), 2

[PATCH 05/13] KVM: SVM: Add intercept check for emulated cr accesses

2011-03-25 Thread Joerg Roedel
This patch adds all necessary intercept checks for instructions that access the crX registers. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_emulate.h |3 + arch/x86/kvm/emulate.c |8 ++- arch/x86/kvm/svm.c | 80 +++

[PATCH 02/13] KVM: x86 emulator: add SVM intercepts

2011-03-25 Thread Joerg Roedel
From: Avi Kivity Add intercept codes for instructions defined by SVM as interceptable. Signed-off-by: Avi Kivity Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_emulate.h | 35 +++ arch/x86/kvm/emulate.c | 24 +--- 2

[PATCH 04/13] KVM: X86: Add x86 callback for intercept check

2011-03-25 Thread Joerg Roedel
This patch adds a callback into kvm_x86_ops so that svm and vmx code can do intercept checks on emulated instructions. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_host.h | 21 + arch/x86/kvm/svm.c |9 + arch/x86/kvm/x86.c |

[PATCH 11/13] KVM: SVM: Add intercept checks for one-byte instructions

2011-03-25 Thread Joerg Roedel
This patch add intercept checks for emulated one-byte instructions to the KVM instruction emulation path. Signed-off-by: Joerg Roedel --- arch/x86/kvm/emulate.c |4 ++-- arch/x86/kvm/svm.c | 14 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm

[PATCH 09/13] KVM: SVM: Add intercept checks for remaining group7 instructions

2011-03-25 Thread Joerg Roedel
This patch implements the emulator intercept checks for the RDTSCP, MONITOR, and MWAIT instructions. Signed-off-by: Joerg Roedel --- arch/x86/kvm/emulate.c | 15 +-- arch/x86/kvm/svm.c |3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emul

[PATCH 07/13] KVM: SVM: Add intercept checks for descriptor table accesses

2011-03-25 Thread Joerg Roedel
This patch add intercept checks into the KVM instruction emulator to check for the 8 instructions that access the descriptor table addresses. Signed-off-by: Joerg Roedel --- arch/x86/kvm/emulate.c | 13 +++-- arch/x86/kvm/svm.c | 13 + 2 files changed, 24 insertions(+

[PATCH 01/13] KVM: x86 emulator: add framework for instruction

2011-03-25 Thread Joerg Roedel
From: Avi Kivity When running in guest mode, certain instructions can be intercepted by hardware. This also holds for nested guests running on emulated virtualization hardware, in particular instructions emulated by kvm itself. This patch adds a framework for intercepting instructions. If an i

Re: qemu-kvm crash with

2011-03-25 Thread Conor Murphy
Hi, The content of aiocb (gdb) print *aiocb $1 = {common = {pool = 0x9aced0, bs = 0x1270230, cb = 0x45591f , opaque = 0x7f54b0034f60, next = 0x0}, aio_fildes = 16, {aio_iov = 0x7f54b006cd48, aio_ioctl_buf = 0x7f54b006cd48}, aio_niov = 17, aio_nbytes = 65024, ev_signo = 12, aio_offset = 10

[PATCH 0/6] TSC scaling support for KVM v3

2011-03-25 Thread Joerg Roedel
Hi, this is the third round of my patches to support tsc-scaling in KVM. The changes to v2 address Avi's comments from yesterday. Besides that the whole virtual_tsc_khz thing has been moved out of the vm into the vcpu data structure. The mult and shift parts where renamed to tsc_catchup_* because

[PATCH 6/6] KVM: X86: Implement userspace interface to set virtual_tsc_khz

2011-03-25 Thread Joerg Roedel
This patch implements two new vm-ioctls to get and set the virtual_tsc_khz if the machine supports tsc-scaling. Setting the tsc-frequency is only possible before userspace creates any vcpu. Signed-off-by: Joerg Roedel --- Documentation/kvm/api.txt | 23 +++ arch/x86/i

[PATCH 3/6] KVM: X86: Make tsc_delta calculation a function of guest tsc

2011-03-25 Thread Joerg Roedel
The calculation of the tsc_delta value to ensure a forward-going tsc for the guest is a function of the host-tsc. This works as long as the guests tsc_khz is equal to the hosts tsc_khz. With tsc-scaling hardware support this is not longer true and the tsc_delta needs to be calculated using guest_ts

[PATCH 2/6] KVM: X86: Let kvm-clock report the right tsc frequency

2011-03-25 Thread Joerg Roedel
This patch changes the kvm_guest_time_update function to use TSC frequency the guest actually has for updating its clock. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_host.h |6 +++--- arch/x86/kvm/x86.c | 25 +++-- 2 files changed, 18 insertion

[PATCH 4/6] KVM: X86: Implement call-back to propagate virtual_tsc_khz

2011-03-25 Thread Joerg Roedel
This patch implements a call-back into the architecture code to allow the propagation of changes to the virtual tsc_khz of the vcpu. On SVM it updates the tsc_ratio variable, on VMX it does nothing. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/svm.c

[PATCH 5/6] KVM: X86: Delegate tsc-offset calculation to architecture code

2011-03-25 Thread Joerg Roedel
With TSC scaling in SVM the tsc-offset needs to be calculated differently. This patch propagates this calculation into the architecture specific modules so that this complexity can be handled there. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_host.h |2 ++ arch/x86/kvm/svm.c

[PATCH 1/6] KVM: SVM: Implement infrastructure for TSC_RATE_MSR

2011-03-25 Thread Joerg Roedel
This patch enhances the kvm_amd module with functions to support the TSC_RATE_MSR which can be used to set a given tsc frequency for the guest vcpu. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/msr-index.h |1 + arch/x86/kvm/svm.c | 54

Re: [PATCHv2] fix regression caused by e48672fa25e879f7ae21785c7efd187738139593

2011-03-25 Thread Zachary Amsden
On 03/09/2011 05:36 PM, Nikola Ciprich wrote: commit 387b9f97750444728962b236987fbe8ee8cc4f8c moved kvm_request_guest_time_update(vcpu), breaking 32bit SMP guests using kvm-clock. Fix this by moving (new) clock update function to proper place. Signed-off-by: Nikola Ciprich --- diff --git a/arc

Re: qemu-kvm crash with

2011-03-25 Thread Stefan Hajnoczi
On Thu, Mar 24, 2011 at 1:38 PM, Conor Murphy wrote: > #4  _int_free (av=, p=0x7fa24c0009f0, have_lock=0) at > malloc.c:4795 > #5  0x004a18fe in qemu_vfree (ptr=0x7fa24c000a00) at oslib-posix.c:76 > #6  0x0045af3d in handle_aiocb_rw (aiocb=0x7fa2dc034cd0) at > posix-aio-compat.c:30