Re: [PATCH 3/7] KVM: move vcpu locking to dispatcher for generic vcpu ioctls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 13, 2010 at 02:17:35PM +0300, Avi Kivity wrote:
> All vcpu ioctls need to be locked, so instead of locking each one specifically
> we lock at the generic dispatcher.
> 
> This patch only updates generic ioctls and leaves arch specific ioctls alone.
> 
> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
> ---
>  arch/ia64/kvm/kvm-ia64.c   |   11 -----------
>  arch/powerpc/kvm/book3s.c  |   16 ----------------
>  arch/powerpc/kvm/booke.c   |   10 ----------
>  arch/powerpc/kvm/powerpc.c |    4 ----
>  arch/s390/kvm/kvm-s390.c   |   16 ----------------
>  arch/x86/kvm/x86.c         |   36 ++----------------------------------
>  virt/kvm/kvm_main.c        |   15 +++++++++++++++
>  7 files changed, 17 insertions(+), 91 deletions(-)
> 

> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index f54ec24..eedb23b 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -4890,8 +4879,6 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
>  {
>  	struct desc_ptr dt;
>  
> -	vcpu_load(vcpu);
> -
>  	kvm_get_segment(vcpu, &sregs->cs, VCPU_SREG_CS);
>  	kvm_get_segment(vcpu, &sregs->ds, VCPU_SREG_DS);
>  	kvm_get_segment(vcpu, &sregs->es, VCPU_SREG_ES);
> @@ -4923,8 +4910,6 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
>  		set_bit(vcpu->arch.interrupt.nr,
>  			(unsigned long *)sregs->interrupt_bitmap);
>  
> -	vcpu_put(vcpu);
> -
>  	return 0;
>  }

Forgot mp_state get/set.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux