[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/35] Break up user and system cpu_interrupt implem
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 21/35] Break up user and system cpu_interrupt implementations |
Date: |
Tue, 15 Mar 2011 18:50:35 -0300 |
From: Jan Kiszka <address@hidden>
Both have only two lines in common, and we will convert the system
service into a callback which is of no use for user mode operation.
Signed-off-by: Jan Kiszka <address@hidden>
CC: Riku Voipio <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
---
exec.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index c5358c3..12ea582 100644
--- a/exec.c
+++ b/exec.c
@@ -1627,6 +1627,7 @@ static void cpu_unlink_tb(CPUState *env)
spin_unlock(&interrupt_lock);
}
+#ifndef CONFIG_USER_ONLY
/* mask must never be zero, except for A20 change call */
void cpu_interrupt(CPUState *env, int mask)
{
@@ -1635,7 +1636,6 @@ void cpu_interrupt(CPUState *env, int mask)
old_mask = env->interrupt_request;
env->interrupt_request |= mask;
-#ifndef CONFIG_USER_ONLY
/*
* If called from iothread context, wake the target cpu in
* case its halted.
@@ -1644,21 +1644,27 @@ void cpu_interrupt(CPUState *env, int mask)
qemu_cpu_kick(env);
return;
}
-#endif
if (use_icount) {
env->icount_decr.u16.high = 0xffff;
-#ifndef CONFIG_USER_ONLY
if (!can_do_io(env)
&& (mask & ~old_mask) != 0) {
cpu_abort(env, "Raised interrupt while not in I/O function");
}
-#endif
} else {
cpu_unlink_tb(env);
}
}
+#else /* CONFIG_USER_ONLY */
+
+void cpu_interrupt(CPUState *env, int mask)
+{
+ env->interrupt_request |= mask;
+ cpu_unlink_tb(env);
+}
+#endif /* CONFIG_USER_ONLY */
+
void cpu_reset_interrupt(CPUState *env, int mask)
{
env->interrupt_request &= ~mask;
--
1.7.4
- [Qemu-devel] [PATCH 06/35] x86: Refine error reporting of MCE injection services, (continued)
- [Qemu-devel] [PATCH 06/35] x86: Refine error reporting of MCE injection services, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 24/35] kvm: Mark VCPU state dirty on creation, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 16/35] Add qemu_ram_remap, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 15/35] kvm: x86: Fail kvm_arch_init_vcpu if MCE initialization fails, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 01/35] kvm: ppc: Fix breakage of kvm_arch_pre_run/process_irqchip_events, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 10/35] kvm: Rename kvm_arch_process_irqchip_events to async_events, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 19/35] x86: Unbreak TCG support for hardware breakpoints, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 17/35] KVM, MCE, unpoison memory address across reboot, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 25/35] x86: Properly reset PAT MSR, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 09/35] kvm: x86: Move MCE functions together, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 21/35] Break up user and system cpu_interrupt implementations,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 11/35] kvm: x86: Inject pending MCE events on state writeback, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 05/35] x86: Small cleanups of MCE helpers, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 13/35] kvm: x86: Consolidate TCG and KVM MCE injection code, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 26/35] x86: Save/restore PAT MSR, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 35/35] Expose thread_id in info cpus, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 34/35] kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 27/35] kvm: x86: Synchronize PAT MSR with the kernel, Marcelo Tosatti, 2011/03/15
- [Qemu-devel] [PATCH 32/35] kvm: Align kvm_arch_handle_exit to kvm_cpu_exec changes, Marcelo Tosatti, 2011/03/15