From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: [PATCH] qemu-kvm: Eliminate _kvm_arch_init_vcpu
Date: Fri, 09 Mar 2012 23:17:01 +0100 [thread overview]
Message-ID: <4F5A815D.9060905@web.de> (raw)
In-Reply-To: <4F5A779F.7020201@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
There is no need for an explicit kvm_arch_reset_vcpu on arch cpu init
anymore, kvm_init_vcpu does it already. Call the remaining
kvm_update_ioport_access directly from kvm_arch_init_vcpu.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
This depends on the TPR switch-over patch.
qemu-kvm-x86.c | 7 -------
target-i386/kvm.c | 4 +---
2 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 159779c..7de51dc 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -77,13 +77,6 @@ int kvm_set_pit2(KVMState *s, struct kvm_pit_state2 *ps2)
return kvm_vm_ioctl(s, KVM_SET_PIT2, ps2);
}
-static int _kvm_arch_init_vcpu(CPUState *env)
-{
- kvm_arch_reset_vcpu(env);
-
- return kvm_update_ioport_access(env);
-}
-
#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
int kvm_arch_set_ioport_access(unsigned long start, unsigned long size,
bool enable)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 461734d..91110c1 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -345,8 +345,6 @@ static void cpu_update_state(void *opaque, int running, RunState state)
}
}
-static int _kvm_arch_init_vcpu(CPUState *env);
-
int kvm_arch_init_vcpu(CPUState *env)
{
struct {
@@ -360,7 +358,7 @@ int kvm_arch_init_vcpu(CPUState *env)
uint32_t signature[3];
int r;
- r = _kvm_arch_init_vcpu(env);
+ r = kvm_update_ioport_access(env);
if (r < 0) {
return r;
}
next prev parent reply other threads:[~2012-03-09 22:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 21:35 [PATCH] qemu-kvm: Switch to upstream TPR optimization Jan Kiszka
2012-03-09 22:17 ` Jan Kiszka [this message]
2012-04-23 8:42 ` [PATCH] qemu-kvm: Eliminate _kvm_arch_init_vcpu Jan Kiszka
2012-04-27 15:00 ` Marcelo Tosatti
2012-03-09 23:50 ` [PATCH] qemu-kvm: Switch to upstream TPR optimization 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=4F5A815D.9060905@web.de \
--to=jan.kiszka@web.de \
--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