From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Marcelo Tosatti" <mtosatti@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"open list:Overall" <kvm@vger.kernel.org>,
"Avi Kivity" <avi@redhat.com>
Subject: [Qemu-devel] [PATCH qom-cpu 5/7] kvm: Pass CPUState to kvm_init_vcpu()
Date: Wed, 19 Dec 2012 16:31:09 +0100 [thread overview]
Message-ID: <1355931071-22100-6-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1355931071-22100-1-git-send-email-afaerber@suse.de>
CPUArchState is no longer needed, and it thereby no longer depends on
NEED_CPU_H.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
cpus.c | 2 +-
kvm-all.c | 3 +--
kvm-stub.c | 2 +-
kvm.h | 5 +++--
4 Dateien geändert, 6 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)
diff --git a/cpus.c b/cpus.c
index 7da40c8..c1ff310 100644
--- a/cpus.c
+++ b/cpus.c
@@ -742,7 +742,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
cpu->thread_id = qemu_get_thread_id();
cpu_single_env = env;
- r = kvm_init_vcpu(env);
+ r = kvm_init_vcpu(cpu);
if (r < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
exit(1);
diff --git a/kvm-all.c b/kvm-all.c
index 273197f..8d4e176 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -214,9 +214,8 @@ static void kvm_reset_vcpu(void *opaque)
kvm_arch_reset_vcpu(cpu);
}
-int kvm_init_vcpu(CPUArchState *env)
+int kvm_init_vcpu(CPUState *cpu)
{
- CPUState *cpu = ENV_GET_CPU(env);
KVMState *s = kvm_state;
long mmap_size;
int ret;
diff --git a/kvm-stub.c b/kvm-stub.c
index a3455e2..c9f5ac7 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -24,7 +24,7 @@ bool kvm_irqfds_allowed;
bool kvm_msi_via_irqfd_allowed;
bool kvm_gsi_routing_allowed;
-int kvm_init_vcpu(CPUArchState *env)
+int kvm_init_vcpu(CPUState *cpu)
{
return -ENOSYS;
}
diff --git a/kvm.h b/kvm.h
index 6ddcdc5..ed3c3aa 100644
--- a/kvm.h
+++ b/kvm.h
@@ -17,6 +17,7 @@
#include <errno.h>
#include "config-host.h"
#include "qemu-queue.h"
+#include "qemu/cpu.h"
#ifdef CONFIG_KVM
#include <linux/kvm.h>
@@ -120,9 +121,9 @@ int kvm_has_many_ioeventfds(void);
int kvm_has_gsi_routing(void);
int kvm_has_intx_set_mask(void);
-#ifdef NEED_CPU_H
-int kvm_init_vcpu(CPUArchState *env);
+int kvm_init_vcpu(CPUState *cpu);
+#ifdef NEED_CPU_H
int kvm_cpu_exec(CPUArchState *env);
#if !defined(CONFIG_USER_ONLY)
--
1.7.10.4
next prev parent reply other threads:[~2012-12-19 15:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 15:31 [Qemu-devel] [PATCH qom-cpu 0/7] QOM CPUState, part 7: CPU_COMMON for topology Andreas Färber
2012-12-19 15:31 ` [Qemu-devel] [PATCH qom-cpu 1/7] cpu: Move nr_{cores, threads} fields to CPUState Andreas Färber
2013-01-07 18:21 ` Igor Mammedov
2012-12-19 15:31 ` [Qemu-devel] [PATCH qom-cpu 2/7] target-mips: Clean up mips_cpu_map_tc() documentation Andreas Färber
2013-01-08 5:43 ` Eric Johnson
2012-12-19 15:31 ` [Qemu-devel] [PATCH qom-cpu 3/7] cpu: Move numa_node field to CPUState Andreas Färber
2012-12-19 15:31 ` [Qemu-devel] [PATCH qom-cpu 4/7] cpu: Move cpu_index " Andreas Färber
2012-12-19 15:31 ` Andreas Färber [this message]
2012-12-19 15:31 ` [Qemu-devel] [PATCH qom-cpu 6/7] xen: Simplify halting of first CPU Andreas Färber
2012-12-19 15:31 ` [Qemu-devel] [PATCH qom-cpu 7/7] exec: Return CPUState from qemu_get_cpu() Andreas Färber
2013-01-07 17:18 ` [Qemu-devel] [PATCH qom-cpu 0/7] QOM CPUState, part 7: CPU_COMMON for topology Andreas Färber
2013-01-08 21:25 ` Eduardo Habkost
2013-01-11 1:04 ` Andreas Färber
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=1355931071-22100-6-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=avi@redhat.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).