public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: [PATCH] qemu-kvm: Mark VCPU state dirty on creation
Date: Mon, 21 Feb 2011 12:28:07 +0100	[thread overview]
Message-ID: <4D624C47.3010106@siemens.com> (raw)

This avoids that early cpu_synchronize_state calls try to retrieve an
uninitialized state from the kernel, which even causes a deadlock.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Corresponding upstream patch will come with next uq/master series.

 qemu-kvm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 15e552a..106f148 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -259,6 +259,7 @@ static void kvm_create_vcpu(CPUState *env, int id)
 
     env->kvm_fd = r;
     env->kvm_state = kvm_state;
+    env->kvm_vcpu_dirty = 1;
 
     mmap_size = kvm_ioctl(kvm_state, KVM_GET_VCPU_MMAP_SIZE, 0);
     if (mmap_size < 0) {
-- 
1.7.1

             reply	other threads:[~2011-02-21 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 11:28 Jan Kiszka [this message]
2011-02-28  9:20 ` [PATCH] qemu-kvm: Mark VCPU state dirty on creation Avi Kivity
2011-02-28 10:15   ` Jan Kiszka

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=4D624C47.3010106@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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