sim-card
/
qemu
Archived
10
0
Fork 0

s390x: Enable s390x-softmmu target

This patch adds some code paths for running s390x guest OSs without the
need for KVM.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Alexander Graf 2011-04-15 17:32:48 +02:00 committed by Aurelien Jarno
parent bcec36eaa0
commit 3110e29254
3 changed files with 22 additions and 1 deletions

View File

@ -346,6 +346,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
@ -560,6 +562,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. */

View File

@ -31,7 +31,16 @@ register struct CPUS390XState *env asm(AREG0);
static inline int cpu_has_work(CPUState *env)
{
return env->interrupt_request & CPU_INTERRUPT_HARD; // guess
return ((env->interrupt_request & CPU_INTERRUPT_HARD) &&
(env->psw.mask & PSW_MASK_EXT));
}
static inline void regs_to_env(void)
{
}
static inline void env_to_regs(void)
{
}
static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock* tb)

View File

@ -82,3 +82,7 @@ int cpu_s390x_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
return 0;
}
#endif /* CONFIG_USER_ONLY */
void do_interrupt (CPUState *env)
{
}