public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [patch 1/4] QEMU/KVM: only use KVM apic registers if vm is running
Date: Sun, 06 Apr 2008 12:09:55 +0300	[thread overview]
Message-ID: <47F89363.9010707@qumranet.com> (raw)
In-Reply-To: <20080405182319.970264704@localhost.localdomain>

Marcelo Tosatti wrote:
> In the -incoming case the apic regs are not initialized and therefore
> bogus.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> Index: kvm-userspace.io/qemu/qemu-kvm-x86.c
> ===================================================================
> --- kvm-userspace.io.orig/qemu/qemu-kvm-x86.c
> +++ kvm-userspace.io/qemu/qemu-kvm-x86.c
> @@ -27,6 +27,8 @@ static int kvm_has_msr_star;
>  
>  static int lm_capable_kernel;
>  
> +extern int vm_running;
> +
>  int kvm_arch_qemu_create_context(void)
>  {
>      int i;
> @@ -248,7 +250,7 @@ void kvm_arch_load_regs(CPUState *env)
>      sregs.cr3 = env->cr[3];
>      sregs.cr4 = env->cr[4];
>  
> -    if (kvm_irqchip_in_kernel(kvm_context)) {
> +    if (kvm_irqchip_in_kernel(kvm_context) && vm_running) {
>          sregs.cr8 = kvm_get_cr8(kvm_context, env->cpu_index);
>          sregs.apic_base = kvm_get_apic_base(kvm_context, env->cpu_index);
>      } else {
>   

Fishy.   What if the vm is stopped using the monitor?

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-06  9:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-05 18:22 [patch 0/4] fix SMP migration and savevm/loadvm Marcelo Tosatti
2008-04-05 18:22 ` [patch 1/4] QEMU/KVM: only use KVM apic registers if vm is running Marcelo Tosatti
2008-04-06  9:09   ` Avi Kivity [this message]
2008-04-05 18:22 ` [patch 2/4] QEMU/KVM: save and load mp state Marcelo Tosatti
2008-04-06  9:13   ` Avi Kivity
2008-04-05 18:22 ` [patch 3/4] QEMU/KVM: ignore SIG_IPI signals in userspace Marcelo Tosatti
2008-04-06  9:15   ` Avi Kivity
2008-04-07 20:26     ` Marcelo Tosatti
2008-04-08  1:17       ` Avi Kivity
2008-04-05 18:22 ` [patch 4/4] QEMU/KVM: dont read any bits from userspace APIC emulation if its done in-kernel Marcelo Tosatti
2008-04-06  9:18   ` Avi Kivity
2008-04-07 17:35     ` Marcelo Tosatti

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=47F89363.9010707@qumranet.com \
    --to=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=mtosatti@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox