Re: [PATCH 14/35] kvm: Drop return value of kvm_cpu_exec

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

 



Am 06.01.2011 18:56, Marcelo Tosatti wrote:
> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
> 
> It is not used, it is not needed, so let's remove it.
> 

Please do not apply this for now. Digging deeper into execution loop
issues, it turned out that we likely do need the return code to clean up
the kvm mess in cpu_exec.

Jan

> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
> Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
> ---
>  kvm-all.c  |    6 ++----
>  kvm-stub.c |    4 ++--
>  kvm.h      |    2 +-
>  3 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 2538283..7518f2c 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -850,7 +850,7 @@ void kvm_cpu_synchronize_post_init(CPUState *env)
>      env->kvm_vcpu_dirty = 0;
>  }
>  
> -int kvm_cpu_exec(CPUState *env)
> +void kvm_cpu_exec(CPUState *env)
>  {
>      struct kvm_run *run = env->kvm_run;
>      int ret;
> @@ -943,7 +943,7 @@ int kvm_cpu_exec(CPUState *env)
>  #ifdef KVM_CAP_SET_GUEST_DEBUG
>              if (kvm_arch_debug(&run->debug.arch)) {
>                  env->exception_index = EXCP_DEBUG;
> -                return 0;
> +                return;
>              }
>              /* re-enter, this exception was guest-internal */
>              ret = 1;
> @@ -960,8 +960,6 @@ int kvm_cpu_exec(CPUState *env)
>          env->exit_request = 0;
>          env->exception_index = EXCP_INTERRUPT;
>      }
> -
> -    return ret;
>  }
>  
>  int kvm_ioctl(KVMState *s, int type, ...)
> diff --git a/kvm-stub.c b/kvm-stub.c
> index 5384a4b..352c6a6 100644
> --- a/kvm-stub.c
> +++ b/kvm-stub.c
> @@ -79,9 +79,9 @@ void kvm_cpu_synchronize_post_init(CPUState *env)
>  {
>  }
>  
> -int kvm_cpu_exec(CPUState *env)
> +void kvm_cpu_exec(CPUState *env)
>  {
> -    abort ();
> +    abort();
>  }
>  
>  int kvm_has_sync_mmu(void)
> diff --git a/kvm.h b/kvm.h
> index 60a9b42..51ad56f 100644
> --- a/kvm.h
> +++ b/kvm.h
> @@ -46,7 +46,7 @@ int kvm_has_xcrs(void);
>  #ifdef NEED_CPU_H
>  int kvm_init_vcpu(CPUState *env);
>  
> -int kvm_cpu_exec(CPUState *env);
> +void kvm_cpu_exec(CPUState *env);
>  
>  #if !defined(CONFIG_USER_ONLY)
>  int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size);


Attachment: signature.asc
Description: OpenPGP digital signature


[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