[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/17] s390/cpu: Make setcc() function available to o
From: |
Christian Borntraeger |
Subject: |
[Qemu-devel] [PULL 05/17] s390/cpu: Make setcc() function available to other files |
Date: |
Tue, 24 Sep 2013 09:27:39 +0200 |
From: Thomas Huth <address@hidden>
Moved the setcc() function to cpu.h so that it can be used by other
files, too. It now also does not modify the kvm state anymore since
this gets updated during kvm_arch_put_registers() anyway.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
---
target-s390x/cpu.h | 11 +++++++++--
target-s390x/kvm.c | 12 ------------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 8be5648..a2c077b 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -148,6 +148,7 @@ typedef struct CPUS390XState {
} CPUS390XState;
#include "cpu-qom.h"
+#include <sysemu/kvm.h>
/* distinguish between 24 bit and 31 bit addressing */
#define HIGH_ORDER_BIT 0x80000000
@@ -692,6 +693,14 @@ static inline const char *cc_name(int cc_op)
return cc_names[cc_op];
}
+static inline void setcc(S390CPU *cpu, uint64_t cc)
+{
+ CPUS390XState *env = &cpu->env;
+
+ env->psw.mask &= ~(3ull << 44);
+ env->psw.mask |= (cc & 3) << 44;
+}
+
typedef struct LowCore
{
/* prefix area: defined by architecture */
@@ -1058,8 +1067,6 @@ void program_interrupt(CPUS390XState *env, uint32_t code,
int ilen);
void QEMU_NORETURN runtime_exception(CPUS390XState *env, int excp,
uintptr_t retaddr);
-#include <sysemu/kvm.h>
-
#ifdef CONFIG_KVM
void kvm_s390_io_interrupt(S390CPU *cpu, uint16_t subchannel_id,
uint16_t subchannel_nr, uint32_t io_int_parm,
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 0bc317e..a5d5584 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -418,18 +418,6 @@ static void enter_pgmcheck(S390CPU *cpu, uint16_t code)
kvm_s390_interrupt(cpu, KVM_S390_PROGRAM_INT, code);
}
-static inline void setcc(S390CPU *cpu, uint64_t cc)
-{
- CPUS390XState *env = &cpu->env;
- CPUState *cs = CPU(cpu);
-
- cs->kvm_run->psw_mask &= ~(3ull << 44);
- cs->kvm_run->psw_mask |= (cc & 3) << 44;
-
- env->psw.mask &= ~(3ul << 44);
- env->psw.mask |= (cc & 3) << 44;
-}
-
static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run,
uint16_t ipbh0)
{
--
1.8.3.1
- [Qemu-devel] [PULL 00/17] s390 patches, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 09/17] s390/sclpconsole: Add code to support live migration for sclpconsole, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 17/17] s390/sclplmconsole: Add support for SCLP line-mode console, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 10/17] s390/sclpquiesce: Add code to support live migration, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 11/17] s390/sclp: add reset() functions, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 12/17] s390/eventfacility: fix multiple Read Event Data sources, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 13/17] s390/eventfacility: Fix receive/send masks, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 16/17] s390/ebcdic: Move conversion tables to header file, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 14/17] s390/eventfacility: remove unused event_type variable, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 05/17] s390/cpu: Make setcc() function available to other files,
Christian Borntraeger <=
- [Qemu-devel] [PULL 03/17] s390/ipl: Fix waiting for virtio processing, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 15/17] s390/eventfacility: allow childs to handle more than 1 event type, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 08/17] s390/sclpconsole: modify definition of input buffer, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 02/17] s390/dump: zero out padding bytes in notes sections, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 01/17] s390/kvm: Add check for priviledged SCLP handler, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 07/17] s390/kexec: Implement diag308 subcode 0, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 04/17] s390/ipl: Update the s390-ccw.img rom, Christian Borntraeger, 2013/09/24
- [Qemu-devel] [PULL 06/17] s390/ioinst: Moved the CC setting to the IO instruction handlers, Christian Borntraeger, 2013/09/24
- Re: [Qemu-devel] [PULL 00/17] s390 patches, Alexander Graf, 2013/09/25