[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/17] s390x: Enable s390x-softmmu target
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 08/17] s390x: Enable s390x-softmmu target |
Date: |
Thu, 24 Mar 2011 16:58:44 +0100 |
This patch adds some code paths for running s390x guest OSs without the
need for KVM.
Signed-off-by: Alexander Graf <address@hidden>
---
cpu-exec.c | 8 ++++++++
target-s390x/exec.h | 20 ++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index 34eaedc..b113f8b 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -316,6 +316,8 @@ int cpu_exec(CPUState *env1)
do_interrupt(env);
#elif defined(TARGET_M68K)
do_interrupt(0);
+#elif defined(TARGET_S390X)
+ do_interrupt(env);
#endif
env->exception_index = -1;
#endif
@@ -524,6 +526,12 @@ int cpu_exec(CPUState *env1)
do_interrupt(1);
next_tb = 0;
}
+#elif defined(TARGET_S390X) && !defined(CONFIG_USER_ONLY)
+ if ((interrupt_request & CPU_INTERRUPT_HARD) &&
+ (env->psw.mask & PSW_MASK_EXT)) {
+ do_interrupt(env);
+ next_tb = 0;
+ }
#endif
/* Don't use the cached interupt_request value,
do_interrupt may have updated the EXITTB flag. */
diff --git a/target-s390x/exec.h b/target-s390x/exec.h
index f7893f3..6fe64a6 100644
--- a/target-s390x/exec.h
+++ b/target-s390x/exec.h
@@ -34,6 +34,26 @@ static inline int cpu_has_work(CPUState *env)
return env->interrupt_request & CPU_INTERRUPT_HARD; // guess
}
+static inline void regs_to_env(void)
+{
+}
+
+static inline void env_to_regs(void)
+{
+}
+
+static inline int cpu_halted(CPUState *env)
+{
+ if (!env->halted) {
+ return 0;
+ }
+ if (cpu_has_work(env)) {
+ env->halted = 0;
+ return 0;
+ }
+ return EXCP_HALTED;
+}
+
static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock* tb)
{
env->psw.addr = tb->pc;
--
1.6.0.2
- [Qemu-devel] [PATCH 00/17] s390x emulation support, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 05/17] s390x: enable CPU_QuadU, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 09/17] s390x: Dispatch interrupts to KVM or the real CPU, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 08/17] s390x: Enable s390x-softmmu target,
Alexander Graf <=
- [Qemu-devel] [PATCH 04/17] s390x: Enable nptl for s390x, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 02/17] virtio: use generic name when possible, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 11/17] s390x: virtio machine storage keys, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 15/17] s390x: Adjust internal kvm code, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 01/17] Only build ivshmem when CONFIG_PCI && CONFIG_KVM, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 07/17] linux-user: define a couple of syscalls for non-uid16 targets, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 17/17] s390x: build s390x by default, Alexander Graf, 2011/03/24
- [Qemu-devel] [PATCH 10/17] s390x: Adjust GDB stub, Alexander Graf, 2011/03/24