Re: [kvm-devel] [PATCH] convert init_rmode_tss to slots_lock

2008-03-19 Thread Avi Kivity
Marcelo Tosatti wrote:
> init_rmode_tss was forgotten during the conversion from mmap_sem to
> slots_lock.
>
>   

Applied, thanks.

> There are several sites reading the slots data without taking   
> slots_lock, including tdp_page_fault. I'll be sending a patch 
> to move acquision to vcpu_run as suggested by Avi later today.
>   

You'll need to acquire it for KVM_SET_MSRS (since that can trigger a 
write, if writing to the clock base).

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] convert init_rmode_tss to slots_lock

2008-03-18 Thread Izik Eidus
Marcelo Tosatti wrote:
> init_rmode_tss was forgotten during the conversion from mmap_sem to
> slots_lock.
>   

yup, good catch.

> There are several sites reading the slots data without taking   
> slots_lock, including tdp_page_fault. I'll be sending a patch 
> to move acquision to vcpu_run as suggested by Avi later today.
>
> INFO: task qemu-system-x86:3748 blocked for more than 120 seconds.
> Call Trace:
>  [] __down_read+0x86/0x9e
>  [] do_page_fault+0x346/0x78e
>  [] trace_hardirqs_on_thunk+0x35/0x3a
>  [] error_exit+0x0/0xa9
>  [] copy_user_generic_string+0x17/0x40
>  [] :kvm:kvm_write_guest_page+0x3e/0x5f
>  [] :kvm_intel:init_rmode_tss+0xa7/0xf9
>  [] :kvm_intel:vmx_vcpu_reset+0x10/0x38a
>  [] :kvm:kvm_arch_vcpu_setup+0x20/0x53
>  [] :kvm:kvm_vm_ioctl+0xad/0x1cf
>  [] __lock_acquire+0x4f7/0xc28
>  [] vfs_ioctl+0x21/0x6b
>  [] do_vfs_ioctl+0x252/0x26b
>  [] sys_ioctl+0x3c/0x5e
>  [] system_call_after_swapgs+0x7b/0x80
>
> Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>
>
> Index: kvm/arch/x86/kvm/vmx.c
> ===
> --- kvm.orig/arch/x86/kvm/vmx.c
> +++ kvm/arch/x86/kvm/vmx.c
> @@ -1480,7 +1480,7 @@ static int init_rmode_tss(struct kvm *kv
>   int ret = 0;
>   int r;
>  
> - down_read(¤t->mm->mmap_sem);
> + down_read(&kvm->slots_lock);
>   r = kvm_clear_guest_page(kvm, fn, 0, PAGE_SIZE);
>   if (r < 0)
>   goto out;
> @@ -1503,7 +1503,7 @@ static int init_rmode_tss(struct kvm *kv
>  
>   ret = 1;
>  out:
> - up_read(¤t->mm->mmap_sem);
> + up_read(&kvm->slots_lock);
>   return ret;
>  }
>  
>
>   


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel