Re: [PATCH 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Kevin Wolf
Am 25.01.2012 17:00, schrieb Joerg Roedel: > On Tue, Jan 24, 2012 at 06:23:50PM +0200, Gleb Natapov wrote: >> On Tue, Jan 24, 2012 at 03:24:50PM +0100, Kevin Wolf wrote: > >>> However, task_switch_interception() itself does some more based on the >>> value of reason, for example it decides whether

Re: [PATCH 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Joerg Roedel
On Fri, Jan 27, 2012 at 01:58:38PM +0100, Kevin Wolf wrote: > Am 25.01.2012 17:00, schrieb Joerg Roedel: > I just retried. I use kvm-kmod and kvm.git with HEAD at ff92e9b5 plus > the tree patches of this series plus a printk to output exit_int_info in > task_switch_intercept(). I ran taskswitch2 f

Adjusting kvm-clock more then 11% (9315508 vs 9311354)

2012-01-27 Thread Sasha Levin
Hi all, I've started getting the following warnings while running a vm under load, starting with 3.3-rc1: [ 5367.103017] [ cut here ] [ 5367.103082] WARNING: at kernel/time/timekeeping.c:863 do_timer+0x360/0x4d0() [ 5367.103082] Adjusting kvm-clock more then 11% (9315508

Re: [PATCH 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Kevin Wolf
Am 27.01.2012 14:34, schrieb Joerg Roedel: > On Fri, Jan 27, 2012 at 01:58:38PM +0100, Kevin Wolf wrote: >> Am 25.01.2012 17:00, schrieb Joerg Roedel: > >> I just retried. I use kvm-kmod and kvm.git with HEAD at ff92e9b5 plus >> the tree patches of this series plus a printk to output exit_int_info

Re: [PATCH 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Joerg Roedel
On Fri, Jan 27, 2012 at 02:55:12PM +0100, Kevin Wolf wrote: > Am 27.01.2012 14:34, schrieb Joerg Roedel: > > On Fri, Jan 27, 2012 at 01:58:38PM +0100, Kevin Wolf wrote: > >> Am 25.01.2012 17:00, schrieb Joerg Roedel: > > > >> I just retried. I use kvm-kmod and kvm.git with HEAD at ff92e9b5 plus >

Re: [PATCH 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Kevin Wolf
Am 27.01.2012 15:17, schrieb Joerg Roedel: > On Fri, Jan 27, 2012 at 02:55:12PM +0100, Kevin Wolf wrote: >> Am 27.01.2012 14:34, schrieb Joerg Roedel: >>> On Fri, Jan 27, 2012 at 01:58:38PM +0100, Kevin Wolf wrote: Am 25.01.2012 17:00, schrieb Joerg Roedel: >>> I just retried. I use kvm-k

Re: [PATCH 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Gleb Natapov
On Fri, Jan 27, 2012 at 04:02:30PM +0100, Kevin Wolf wrote: > Am 27.01.2012 15:17, schrieb Joerg Roedel: > > On Fri, Jan 27, 2012 at 02:55:12PM +0100, Kevin Wolf wrote: > >> Am 27.01.2012 14:34, schrieb Joerg Roedel: > >>> On Fri, Jan 27, 2012 at 01:58:38PM +0100, Kevin Wolf wrote: > Am 25.01.

[PATCH v2 0/3] Fix task switches into/out of VM86

2012-01-27 Thread Kevin Wolf
I believe this should work with both VMX and SVM now. Gleb, Jörg, can one of you test this with SVM? I did some testing on my buggy processor and it looks as good as it gets, but it would be better if you could confirm. Kevin Wolf (3): KVM: x86 emulator: Fix task switch privilege checks KVM: x

[PATCH v2 1/3] KVM: x86 emulator: Fix task switch privilege checks

2012-01-27 Thread Kevin Wolf
Currently, all task switches check privileges against the DPL of the TSS. This is only correct for jmp/call to a TSS. If a task gate is used, the DPL of this take gate is used for the check instead. Exceptions, external interrupts and iret shouldn't perform any check. Signed-off-by: Kevin Wolf --

[PATCH v2 2/3] KVM: x86 emulator: VM86 segments must have DPL 3

2012-01-27 Thread Kevin Wolf
Setting the segment DPL to 0 for at least the VM86 code segment makes the VM entry fail on VMX. Signed-off-by: Kevin Wolf --- arch/x86/kvm/emulate.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 1b98a2c..833969e 10

[PATCH v2 3/3] KVM: x86 emulator: Allow PM/VM86 switch during task switch

2012-01-27 Thread Kevin Wolf
Task switches can switch between Protected Mode and VM86. The current mode must be updated during the task switch emulation so that the new segment selectors are interpreted correctly and privilege checks succeed. VMX code calculates the CPL from the code segment selector and rflags, so it needs r

Re: Kemari

2012-01-27 Thread Vinod Chegu
Thanks for the pointers Mitsuru ! Vinod -- 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 v2 0/3] Fix task switches into/out of VM86

2012-01-27 Thread Gleb Natapov
On Fri, Jan 27, 2012 at 08:23:33PM +0100, Kevin Wolf wrote: > I believe this should work with both VMX and SVM now. Gleb, Jörg, can one of > you test this with SVM? I did some testing on my buggy processor and it looks > as good as it gets, but it would be better if you could confirm. > You forgot

cpu_set online causing a guest to hang.

2012-01-27 Thread Vinod Chegu
Hello, Wanted to check about the current status of the cpu hotplug support in KVM guests. Pl. excuse me if the following is a known issue (pl. point me to the appropriate status/issue/bug-report if it is). I have an RHEL6.2 (x86_64)+ KVM host with a KVM guest running RHEL 6.2. The guest is

Re: [PATCH 0/4 V10] Avoid soft lockup message when KVM is stopped by host

2012-01-27 Thread Eric B Munson
On Tue, 17 Jan 2012, Eric B Munson wrote: > Changes from V9: > Use kvm_for_each_vcpu to iterate online vcpu's > > Changes from V8: > Make KVM_GUEST_PAUSED a per vm ioctl instead of per vcpu > > Changes from V7: > Define KVM_CAP_GUEST_PAUSED and support check > Call mark_page_dirty () after setti

Re: [PATCH V7] Guest stop notification

2012-01-27 Thread Eric B Munson
On Tue, 17 Jan 2012, Eric B Munson wrote: > Often when a guest is stopped from the qemu console, it will report spurious > soft lockup warnings on resume. There are kernel patches being discussed that > will give the host the ability to tell the guest that it is being stopped and > should ignore

Re: [Qemu-devel] [PATCH V7] Guest stop notification

2012-01-27 Thread Anthony Liguori
On 01/17/2012 12:27 PM, Eric B Munson wrote: Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the

Re: Merging kvm-apic into qemu-kvm

2012-01-27 Thread Jan Kiszka
On 2012-01-26 16:49, Avi Kivity wrote: > On 01/26/2012 05:45 PM, Jan Kiszka wrote: >>> I merged the upstream patches one by one, resolving the mechanical and logical conflicts in each step. Was done for that backend/frontend concept, but the adjustments should basically be the same n

Re: [Qemu-devel] [PATCH V7] Guest stop notification

2012-01-27 Thread Jan Kiszka
On 2012-01-27 21:48, Anthony Liguori wrote: > On 01/17/2012 12:27 PM, Eric B Munson wrote: >> Often when a guest is stopped from the qemu console, it will report >> spurious >> soft lockup warnings on resume. There are kernel patches being >> discussed that >> will give the host the ability to tel

Re: [PATCH] vhost-net: Acquire device lock when releasing device

2012-01-27 Thread Sasha Levin
I just noticed that it happened again, and that this patch didn't make it's way in. The patch below indeed fixes the problem for me. Please push it in. On Sun, 2011-11-27 at 19:06 +0200, Michael S. Tsirkin wrote: > On Sun, Nov 27, 2011 at 06:49:27PM +0200, Michael S. Tsirkin wrote: > > On Fri, No

Re: [Qemu-devel] [PATCH V7] Guest stop notification

2012-01-27 Thread Alexander Graf
On 27.01.2012, at 22:49, Jan Kiszka wrote: > On 2012-01-27 21:48, Anthony Liguori wrote: >> On 01/17/2012 12:27 PM, Eric B Munson wrote: >>> Often when a guest is stopped from the qemu console, it will report >>> spurious >>> soft lockup warnings on resume. There are kernel patches being >>> d