Re: [PATCH 3/3] use upstream kvm_vcpu_ioctl

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

 



On Wed, Oct 14, 2009 at 01:29:13PM -0300, Glauber Costa wrote:
> Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx>
> ---
>  kvm-all.c      |    3 ---
>  qemu-kvm-x86.c |   20 ++++++++++----------
>  qemu-kvm.c     |   26 +++++++++++++-------------
>  qemu-kvm.h     |    1 +
>  4 files changed, 24 insertions(+), 26 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 1356aa8..5ea999e 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -861,7 +861,6 @@ int kvm_vm_ioctl(KVMState *s, int type, ...)
>      return ret;
>  }
>  
> -#ifdef KVM_UPSTREAM
>  int kvm_vcpu_ioctl(CPUState *env, int type, ...)
>  {
>      int ret;
> @@ -879,8 +878,6 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
>      return ret;
>  }
>  
> -#endif
> -
>  int kvm_has_sync_mmu(void)
>  {
>  #ifdef KVM_CAP_SYNC_MMU
> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
> index 8c4140d..fd0e6a9 100644
> --- a/qemu-kvm-x86.c
> +++ b/qemu-kvm-x86.c
> @@ -179,7 +179,7 @@ int kvm_enable_vapic(CPUState *env, uint64_t vapic)
>  		.vapic_addr = vapic,
>  	};
>  
> -	r = ioctl(env->kvm_fd, KVM_SET_VAPIC_ADDR, &va);
> +	r = kvm_vcpu_ioctl(env, KVM_SET_VAPIC_ADDR, &va);
>  	if (r == -1) {
>  		r = -errno;

Please convert the callers to check for < 0, not -1.

--
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