Re: [PATCHv2] fix regression caused by e48672fa25e879f7ae21785c7efd187738139593

2011-03-26 Thread Nikola Ciprich
> So something bothers me still about this bug. What you did correctly > restores the old behavior - but it shouldn't be fixing a bug. > > The only reason you need to schedule an update for the KVM clock area is > if a new VCPU has been created, you have an unstable TSC.. or something > chan

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

2011-03-26 Thread Joerg Roedel
On Sat, Mar 26, 2011 at 11:43:47AM +0200, Avi Kivity wrote: > On 03/25/2011 11:29 AM, Joerg Roedel wrote: >> This patch add intercept checks into the KVM instruction >> emulator to check for the 8 instructions that access the >> descriptor table addresses. >> >> >> +static struct opcode group6[] =

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

2011-03-26 Thread Joerg Roedel
On Sat, Mar 26, 2011 at 11:37:42AM +0200, Avi Kivity wrote: > On 03/25/2011 11:29 AM, Joerg Roedel wrote: >> This patch adds all necessary intercept checks for >> instructions that access the crX registers. >> >> >> @@ -3871,11 +3871,89 @@ static void svm_fpu_deactivate(struct kvm_vcpu *vcpu) >>

Re: 2.6.38.1 general protection fault

2011-03-26 Thread Tomasz Chmielewski
On 26.03.2011 10:15, Avi Kivity wrote: > On 03/25/2011 11:32 AM, Tomasz Chmielewski wrote: >> 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 (...) > 0: 55 push %rbp > 1: 48 89 e5 mo

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

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:29 AM, Joerg Roedel wrote: 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 :-) Th

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

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:29 AM, Joerg Roedel wrote: 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 fram

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

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:29 AM, Joerg Roedel wrote: This patch add intercept checks for emulated one-byte instructions to the KVM instruction emulation path. #undef PRE_EX @@ -3990,6 +3997,13 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu, else vmcb->c

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

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:29 AM, Joerg Roedel wrote: This patch add intercept checks into the KVM instruction emulator to check for the 8 instructions that access the descriptor table addresses. +static struct opcode group6[] = { + DI(ModRM,sldt), + DI(ModRM,str), + DI(

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

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:29 AM, Joerg Roedel wrote: This patch adds all necessary intercept checks for instructions that access the crX registers. @@ -3871,11 +3871,89 @@ static void svm_fpu_deactivate(struct kvm_vcpu *vcpu) update_cr0_intercept(svm); } +#define POST_EX(exit) { .exit_code =

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

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:29 AM, Joerg Roedel wrote: This patch adds a callback into kvm_x86_ops so that svm and vmx code can do intercept checks on emulated instructions. +/* + * This struct is used to carry enough information from the instruction + * decoder to main KVM so that a decision can be made

Re: 2.6.38.1 general protection fault

2011-03-26 Thread Avi Kivity
On 03/25/2011 11:32 AM, Tomasz Chmielewski wrote: 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 k