aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-02-01 22:15:51 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-02-14 12:39:45 -0200
commita1b87fe046bbb5a332e51906053c7e0307f26d89 (patch)
treeb43f5e1dd84595afcaae357a6e52f422368dee66 /cpus.c
parent84b4915dd2c0eaa86c970ffc42a68ea8ba9e48b5 (diff)
downloadqemu-a1b87fe046bbb5a332e51906053c7e0307f26d89.zip
qemu-a1b87fe046bbb5a332e51906053c7e0307f26d89.tar.gz
qemu-a1b87fe046bbb5a332e51906053c7e0307f26d89.tar.bz2
kvm: Provide sigbus services arch-independently
Provide arch-independent kvm_on_sigbus* stubs to remove the #ifdef'ery from cpus.c. This patch also fixes --disable-kvm build by providing the missing kvm_on_sigbus_vcpu kvm-stub. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/cpus.c b/cpus.c
index 3a72d06..4975317 100644
--- a/cpus.c
+++ b/cpus.c
@@ -539,10 +539,9 @@ static void sigbus_reraise(void)
static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo,
void *ctx)
{
-#if defined(TARGET_I386)
- if (kvm_on_sigbus(siginfo->ssi_code, (void *)(intptr_t)siginfo->ssi_addr))
-#endif
+ if (kvm_on_sigbus(siginfo->ssi_code, (void *)(intptr_t)siginfo->ssi_addr)) {
sigbus_reraise();
+ }
}
static void qemu_kvm_eat_signal(CPUState *env, int timeout)
@@ -575,10 +574,9 @@ static void qemu_kvm_eat_signal(CPUState *env, int timeout)
switch (r) {
case SIGBUS:
-#ifdef TARGET_I386
- if (kvm_on_sigbus_vcpu(env, siginfo.si_code, siginfo.si_addr))
-#endif
+ if (kvm_on_sigbus_vcpu(env, siginfo.si_code, siginfo.si_addr)) {
sigbus_reraise();
+ }
break;
default:
break;