qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH 6/6] kvm: x86: Prepare kvm_get_mp_state for in-kernel irqchip
Date: Wed, 29 Dec 2010 20:09:57 +0100	[thread overview]
Message-ID: <eb021a1e3b5d723aab32c4810c5e2284fb05a0c8.1293649792.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1293649792.git.jan.kiszka@web.de>
In-Reply-To: <cover.1293649792.git.jan.kiszka@web.de>

From: Jan Kiszka <jan.kiszka@siemens.com>

This code path will not yet be taken as we still lack in-kernel irqchip
support. But qemu-kvm can already make use of it and drop its own
mp_state access services.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 target-i386/kvm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 684430f..30aa51c 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -1198,6 +1198,9 @@ static int kvm_get_mp_state(CPUState *env)
         return ret;
     }
     env->mp_state = mp_state.mp_state;
+    if (kvm_irqchip_in_kernel()) {
+        env->halted = (mp_state.mp_state == KVM_MP_STATE_HALTED);
+    }
     return 0;
 }
 
-- 
1.7.1

      parent reply	other threads:[~2010-12-29 19:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29 19:09 [Qemu-devel] [PATCH 0/6] [uq/master] More KVM upstream cleanups, fixes, enhancements Jan Kiszka
2010-12-29 19:09 ` [Qemu-devel] [PATCH 1/6] kvm: Fix coding style violations Jan Kiszka
2010-12-29 19:09 ` [Qemu-devel] [PATCH 2/6] kvm: Drop return value of kvm_cpu_exec Jan Kiszka
2010-12-29 19:09 ` [Qemu-devel] [PATCH 3/6] kvm: x86: Align kvm_arch_put_registers code with comment Jan Kiszka
2010-12-29 19:09 ` [Qemu-devel] [PATCH 4/6] kvm: Stop on all fatal exit reasons Jan Kiszka
2010-12-29 19:09 ` [Qemu-devel] [PATCH 5/6] kvm: Improve reporting of fatal errors Jan Kiszka
2010-12-29 19:09 ` Jan Kiszka [this message]

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=eb021a1e3b5d723aab32c4810c5e2284fb05a0c8.1293649792.git.jan.kiszka@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).