Patchwork [qom-cpu,v2,10/29] kvm: Change kvm_handle_internal_error() argument to CPUState

login
register
mail settings
Submitter Andreas Färber
Date June 16, 2013, 3:57 p.m.
Message ID <1371398269-6213-11-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/251710/
State New
Headers show

Comments

Andreas Färber - June 16, 2013, 3:57 p.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 kvm-all.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Paolo Bonzini - June 17, 2013, 4:16 p.m.
Il 16/06/2013 17:57, Andreas Färber ha scritto:
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  kvm-all.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 1cd4573..1675311 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1520,10 +1520,8 @@ static void kvm_handle_io(uint16_t port, void *data, int direction, int size,
>      }
>  }
>  
> -static int kvm_handle_internal_error(CPUArchState *env, struct kvm_run *run)
> +static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run)
>  {
> -    CPUState *cpu = ENV_GET_CPU(env);
> -
>      fprintf(stderr, "KVM internal error.");
>      if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {
>          int i;
> @@ -1685,7 +1683,7 @@ int kvm_cpu_exec(CPUArchState *env)
>              ret = -1;
>              break;
>          case KVM_EXIT_INTERNAL_ERROR:
> -            ret = kvm_handle_internal_error(env, run);
> +            ret = kvm_handle_internal_error(cpu, run);
>              break;
>          default:
>              DPRINTF("kvm_arch_handle_exit\n");
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Richard Henderson - June 17, 2013, 8:13 p.m.
On 06/16/2013 08:57 AM, Andreas Färber wrote:
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  kvm-all.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

Patch

diff --git a/kvm-all.c b/kvm-all.c
index 1cd4573..1675311 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1520,10 +1520,8 @@  static void kvm_handle_io(uint16_t port, void *data, int direction, int size,
     }
 }
 
-static int kvm_handle_internal_error(CPUArchState *env, struct kvm_run *run)
+static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
-
     fprintf(stderr, "KVM internal error.");
     if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {
         int i;
@@ -1685,7 +1683,7 @@  int kvm_cpu_exec(CPUArchState *env)
             ret = -1;
             break;
         case KVM_EXIT_INTERNAL_ERROR:
-            ret = kvm_handle_internal_error(env, run);
+            ret = kvm_handle_internal_error(cpu, run);
             break;
         default:
             DPRINTF("kvm_arch_handle_exit\n");