All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: kvm-devel <kvm@vger.kernel.org>, Avi Kivity <avi@qumranet.com>,
	Hollis Blanchard <hollisb@us.ibm.com>,
	Jerone Young <jyoung5@us.ibm.com>,
	Joerg Roedel <joerg.roedel@amd.com>
Subject: Re: [PATCH 2/11] QEMU/KVM: Cleanup and improve kvm_load/save_registers usage
Date: Mon, 09 Jun 2008 14:16:10 -0500	[thread overview]
Message-ID: <484D817A.7040204@codemonkey.ws> (raw)
In-Reply-To: <483B3525.4010100@web.de>

Jan Kiszka wrote:
> Remove redundant checkes for kvm_enabled() on register updates between
> userspace and kvm kernel driver. Ensure register update across all CPUs
> on "info cpus" monitor command.
>   

This breaks the build when KVM is disabled.  The explicit guard is 
needed to avoid having #ifdefs.  Please revert.

Regards,

Anthony Liguori

> Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
> ---
>  qemu/gdbstub.c |   12 ++++--------
>  qemu/monitor.c |    4 ++--
>  2 files changed, 6 insertions(+), 10 deletions(-)
>
> Index: b/qemu/monitor.c
> ===================================================================
> --- a/qemu/monitor.c
> +++ b/qemu/monitor.c
> @@ -286,8 +286,7 @@ static CPUState *mon_get_cpu(void)
>          mon_set_cpu(0);
>      }
>  
> -    if (kvm_enabled())
> -	kvm_save_registers(mon_cpu);
> +    kvm_save_registers(mon_cpu);
>  
>      return mon_cpu;
>  }
> @@ -315,6 +314,7 @@ static void do_info_cpus(void)
>      mon_get_cpu();
>  
>      for(env = first_cpu; env != NULL; env = env->next_cpu) {
> +        kvm_save_registers(env);
>          term_printf("%c CPU #%d:",
>                      (env == mon_cpu) ? '*' : ' ',
>                      env->cpu_index);
> Index: b/qemu/gdbstub.c
> ===================================================================
> --- a/qemu/gdbstub.c
> +++ b/qemu/gdbstub.c
> @@ -904,8 +904,7 @@ static int gdb_handle_packet(GDBState *s
>              addr = strtoull(p, (char **)&p, 16);
>  #if defined(TARGET_I386)
>              env->eip = addr;
> -	    if (kvm_enabled())
> -		kvm_load_registers(env);
> +            kvm_load_registers(env);
>  #elif defined (TARGET_PPC)
>              env->nip = addr;
>  #elif defined (TARGET_SPARC)
> @@ -928,8 +927,7 @@ static int gdb_handle_packet(GDBState *s
>              addr = strtoull(p, (char **)&p, 16);
>  #if defined(TARGET_I386)
>              env->eip = addr;
> -	    if (kvm_enabled())
> -		kvm_load_registers(env);
> +            kvm_load_registers(env);
>  #elif defined (TARGET_PPC)
>              env->nip = addr;
>  #elif defined (TARGET_SPARC)
> @@ -973,8 +971,7 @@ static int gdb_handle_packet(GDBState *s
>          }
>          break;
>      case 'g':
> -	if (kvm_enabled())
> -	    kvm_save_registers(env);
> +        kvm_save_registers(env);
>          reg_size = cpu_gdb_read_registers(env, mem_buf);
>          memtohex(buf, mem_buf, reg_size);
>          put_packet(s, buf);
> @@ -984,8 +981,7 @@ static int gdb_handle_packet(GDBState *s
>          len = strlen(p) / 2;
>          hextomem((uint8_t *)registers, p, len);
>          cpu_gdb_write_registers(env, mem_buf, len);
> -	if (kvm_enabled())
> -	    kvm_load_registers(env);
> +        kvm_load_registers(env);
>          put_packet(s, "OK");
>          break;
>      case 'm':
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


  reply	other threads:[~2008-06-09 19:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 22:05 [PATCH 0/11] Rework guest debug interface / x86 debug register support -v2 Jan Kiszka
2008-05-26 22:09 ` [PATCH 1/11] QEMU/KVM: Fix deadlocks in monitor and debugger Jan Kiszka
2008-05-27  9:36   ` Avi Kivity
2008-05-27 13:00     ` Jan Kiszka
2008-05-27 13:09       ` Avi Kivity
2008-05-26 22:09 ` [PATCH 2/11] QEMU/KVM: Cleanup and improve kvm_load/save_registers usage Jan Kiszka
2008-06-09 19:16   ` Anthony Liguori [this message]
2008-06-12 12:38     ` Avi Kivity
2008-05-26 22:09 ` [PATCH 3/11] QEMU/KVM: Proper vm_stop on debug events Jan Kiszka
2008-05-26 22:09 ` [PATCH 4/11] QEMU: Enhance cpu_break/watchpoint API and gdbstub integration Jan Kiszka
2008-05-26 22:10 ` [PATCH 5/11] QEMU: Improve SMP debugging support Jan Kiszka
2008-05-26 22:10 ` [PATCH 6/11] QEMU/KVM: Introduce single vcpu pause/resume Jan Kiszka
2008-05-26 22:10 ` [PATCH 7/11] QEMU/KVM: New guest debugging interface Jan Kiszka
2008-05-27 18:31   ` Jan Kiszka
2008-05-26 22:10 ` [PATCH 8/11] QEMU/KVM: Support for SMP guest debugging Jan Kiszka
2008-05-26 22:10 ` [PATCH 9/11] KVM: New guest debugging interface Jan Kiszka
2008-05-26 22:10 ` [PATCH 10/11] KVM-x86: Properly virtualize debug registers Jan Kiszka
2008-05-26 22:10 ` [PATCH 11/11] KVM-x86: Wire up host-managed " Jan Kiszka
2008-05-27  9:50 ` [PATCH 0/11] Rework guest debug interface / x86 debug register support -v2 Avi Kivity
2008-05-27 10:44   ` Jan Kiszka
2008-05-27 18:46   ` Hollis Blanchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=484D817A.7040204@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=hollisb@us.ibm.com \
    --cc=jan.kiszka@web.de \
    --cc=joerg.roedel@amd.com \
    --cc=jyoung5@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.