aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-12-27 05:27:13 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-12-27 05:27:12 -0500
commitddd6f9537dee9b713b87ecdc9ac920cd1935fdef (patch)
treeeb5e1ce346620b33052fca64f4e51a2497d3fe6d /arch/s390
parent4baeb964d96d38dff461af5b9d578f0a9ba67617 (diff)
[S390] kvm: move cmf host id constant out of lowcore
There is no reason for the cpu-measurement-facility host id constant to reside in the lowcore where space is precious. Use an entry in the literal pool in HANDLE_SIE_INTERCEPT and a stack slot in sie64a. While we are at it replace the id -1 with 0 to indicate host execution. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/lowcore.h2
-rw-r--r--arch/s390/kernel/asm-offsets.c1
-rw-r--r--arch/s390/kernel/entry64.S7
-rw-r--r--arch/s390/kernel/setup.c1
4 files changed, 6 insertions, 5 deletions
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
index 9e13c7d56cc..3b97964e0e9 100644
--- a/arch/s390/include/asm/lowcore.h
+++ b/arch/s390/include/asm/lowcore.h
@@ -271,7 +271,7 @@ struct _lowcore {
271 __u64 machine_flags; /* 0x0360 */ 271 __u64 machine_flags; /* 0x0360 */
272 __u64 ftrace_func; /* 0x0368 */ 272 __u64 ftrace_func; /* 0x0368 */
273 __u64 gmap; /* 0x0370 */ 273 __u64 gmap; /* 0x0370 */
274 __u64 cmf_hpp; /* 0x0378 */ 274 __u8 pad_0x0378[0x0380-0x0378]; /* 0x0378 */
275 275
276 /* Interrupt response block. */ 276 /* Interrupt response block. */
277 __u8 irb[64]; /* 0x0380 */ 277 __u8 irb[64]; /* 0x0380 */
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index 751318765e2..0717363033e 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -150,7 +150,6 @@ int main(void)
150 DEFINE(__LC_LAST_BREAK, offsetof(struct _lowcore, breaking_event_addr)); 150 DEFINE(__LC_LAST_BREAK, offsetof(struct _lowcore, breaking_event_addr));
151 DEFINE(__LC_VDSO_PER_CPU, offsetof(struct _lowcore, vdso_per_cpu_data)); 151 DEFINE(__LC_VDSO_PER_CPU, offsetof(struct _lowcore, vdso_per_cpu_data));
152 DEFINE(__LC_GMAP, offsetof(struct _lowcore, gmap)); 152 DEFINE(__LC_GMAP, offsetof(struct _lowcore, gmap));
153 DEFINE(__LC_CMF_HPP, offsetof(struct _lowcore, cmf_hpp));
154 DEFINE(__GMAP_ASCE, offsetof(struct gmap, asce)); 153 DEFINE(__GMAP_ASCE, offsetof(struct gmap, asce));
155#endif /* CONFIG_32BIT */ 154#endif /* CONFIG_32BIT */
156 return 0; 155 return 0;
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 83a93747e2f..130fb02305c 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -71,7 +71,7 @@ _TIF_EXIT_SIE = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING)
71#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) 71#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE)
72 tm __TI_flags+6(%r12),_TIF_SIE>>8 72 tm __TI_flags+6(%r12),_TIF_SIE>>8
73 jz 0f 73 jz 0f
74 SPP __LC_CMF_HPP # set host id 74 SPP BASED(.Lhost_id) # set host id
75 clc SP_PSW+8(8,%r15),BASED(.Lsie_loop) 75 clc SP_PSW+8(8,%r15),BASED(.Lsie_loop)
76 jl 0f 76 jl 0f
77 clc SP_PSW+8(8,%r15),BASED(.Lsie_done) 77 clc SP_PSW+8(8,%r15),BASED(.Lsie_done)
@@ -1054,6 +1054,7 @@ ENTRY(sie64a)
1054 stmg %r6,%r14,__SF_GPRS(%r15) # save kernel registers 1054 stmg %r6,%r14,__SF_GPRS(%r15) # save kernel registers
1055 stg %r2,__SF_EMPTY(%r15) # save control block pointer 1055 stg %r2,__SF_EMPTY(%r15) # save control block pointer
1056 stg %r3,__SF_EMPTY+8(%r15) # save guest register save area 1056 stg %r3,__SF_EMPTY+8(%r15) # save guest register save area
1057 xc __SF_EMPTY+16(8,%r15),__SF_EMPTY+16(%r15) # host id == 0
1057 lmg %r0,%r13,0(%r3) # load guest gprs 0-13 1058 lmg %r0,%r13,0(%r3) # load guest gprs 0-13
1058 lg %r14,__LC_THREAD_INFO # pointer thread_info struct 1059 lg %r14,__LC_THREAD_INFO # pointer thread_info struct
1059 oi __TI_flags+6(%r14),_TIF_SIE>>8 1060 oi __TI_flags+6(%r14),_TIF_SIE>>8
@@ -1070,7 +1071,7 @@ sie_gmap:
1070 SPP __SF_EMPTY(%r15) # set guest id 1071 SPP __SF_EMPTY(%r15) # set guest id
1071 sie 0(%r14) 1072 sie 0(%r14)
1072sie_done: 1073sie_done:
1073 SPP __LC_CMF_HPP # set host id 1074 SPP __SF_EMPTY+16(%r15) # set host id
1074 lg %r14,__LC_THREAD_INFO # pointer thread_info struct 1075 lg %r14,__LC_THREAD_INFO # pointer thread_info struct
1075sie_exit: 1076sie_exit:
1076 lctlg %c1,%c1,__LC_USER_ASCE # load primary asce 1077 lctlg %c1,%c1,__LC_USER_ASCE # load primary asce
@@ -1095,6 +1096,8 @@ sie_fault:
1095 .quad sie_loop 1096 .quad sie_loop
1096.Lsie_done: 1097.Lsie_done:
1097 .quad sie_done 1098 .quad sie_done
1099.Lhost_id:
1100 .quad 0
1098 1101
1099 .section __ex_table,"a" 1102 .section __ex_table,"a"
1100 .quad sie_loop,sie_fault 1103 .quad sie_loop,sie_fault
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 66903eed36e..fc83f1f1513 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -400,7 +400,6 @@ setup_lowcore(void)
400 __ctl_set_bit(14, 29); 400 __ctl_set_bit(14, 29);
401 } 401 }
402#else 402#else
403 lc->cmf_hpp = -1ULL;
404 lc->vdso_per_cpu_data = (unsigned long) &lc->paste[0]; 403 lc->vdso_per_cpu_data = (unsigned long) &lc->paste[0];
405#endif 404#endif
406 lc->sync_enter_timer = S390_lowcore.sync_enter_timer; 405 lc->sync_enter_timer = S390_lowcore.sync_enter_timer;