public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Christian Borntraeger <borntraeger@de•ibm.com>,
	Cornelia Huck <cornelia.huck@de•ibm.com>,
	Martin Schwidefsky <schwidefsky@de•ibm.com>,
	Heiko Carstens <heiko.carstens@de•ibm.com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Hendrik Brueckner <brueckner@linux•vnet.ibm.com>
Subject: linux-next: manual merge of the kvms390 tree with the s390 tree
Date: Wed, 22 Jul 2015 12:31:21 +1000	[thread overview]
Message-ID: <20150722123121.665531b5@canb.auug.org.au> (raw)

Hi all,

Today's linux-next merge of the kvms390 tree got a conflict in:

  arch/s390/kernel/entry.S

between commit:

  2a1a14484b97 ("s390/kernel: lazy restore fpu registers")
  3af40983a937 ("s390/kvm: fix interrupt race with HANDLE_SIE_INTERCEPT")
  0be8cda612d8 ("s390/kvm: integrate HANDLE_SIE_INTERCEPT into cleanup_critical")

from the s390 tree and commit:

  e983d24d6117 ("KVM: s390: use pid of cpu thread for sampling tagging")

from the kvms390 tree.

I fixed it up (maybe? see below) and can carry the fix as necessary
(no action is required - unless this fix is just wrong).

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc arch/s390/kernel/entry.S
index bde6275dd813,0dfa5f4ce755..000000000000
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@@ -169,70 -193,6 +169,70 @@@ ENTRY(__switch_to
  	br	%r14
  
  .L__critical_start:
 +
 +#if IS_ENABLED(CONFIG_KVM)
 +/*
 + * sie64a calling convention:
 + * %r2 pointer to sie control block
 + * %r3 guest register save area
 + */
 +ENTRY(sie64a)
 +	stmg	%r6,%r14,__SF_GPRS(%r15)	# save kernel registers
 +	stg	%r2,__SF_EMPTY(%r15)		# save control block pointer
 +	stg	%r3,__SF_EMPTY+8(%r15)		# save guest register save area
 +	xc	__SF_EMPTY+16(16,%r15),__SF_EMPTY+16(%r15) # host id & reason
 +	tm	__LC_CPU_FLAGS+7,_CIF_FPU	# load guest fp/vx registers ?
 +	jno	.Lsie_load_guest_gprs
 +	lg	%r12,__LC_THREAD_INFO		# load fp/vx regs save area
 +	brasl	%r14,load_fpu_regs		# load guest fp/vx regs
 +.Lsie_load_guest_gprs:
 +	lmg	%r0,%r13,0(%r3)			# load guest gprs 0-13
 +	lg	%r14,__LC_GMAP			# get gmap pointer
 +	ltgr	%r14,%r14
 +	jz	.Lsie_gmap
 +	lctlg	%c1,%c1,__GMAP_ASCE(%r14)	# load primary asce
 +.Lsie_gmap:
 +	lg	%r14,__SF_EMPTY(%r15)		# get control block pointer
 +	oi	__SIE_PROG0C+3(%r14),1		# we are going into SIE now
 +	tm	__SIE_PROG20+3(%r14),3		# last exit...
 +	jnz	.Lsie_skip
 +	tm	__LC_CPU_FLAGS+7,_CIF_FPU
 +	jo	.Lsie_skip			# exit if fp/vx regs changed
 +	tm	__LC_MACHINE_FLAGS+6,0x20	# MACHINE_FLAG_LPP
 +	jz	.Lsie_enter
- 	.insn	s,0xb2800000,__SF_EMPTY(%r15)	# set guest id
++	.insn	s,0xb2800000,__LC_CURRENT_PID	# use cpu thread pid
 +.Lsie_enter:
 +	sie	0(%r14)
 +	tm	__LC_MACHINE_FLAGS+6,0x20	# MACHINE_FLAG_LPP
 +	jz	.Lsie_skip
 +	.insn	s,0xb2800000,__SF_EMPTY+16(%r15)# set host id
 +.Lsie_skip:
 +	ni	__SIE_PROG0C+3(%r14),0xfe	# no longer in SIE
 +	lctlg	%c1,%c1,__LC_USER_ASCE		# load primary asce
 +.Lsie_done:
 +# some program checks are suppressing. C code (e.g. do_protection_exception)
 +# will rewind the PSW by the ILC, which is 4 bytes in case of SIE. Other
 +# instructions between sie64a and .Lsie_done should not cause program
 +# interrupts. So lets use a nop (47 00 00 00) as a landing pad.
 +# See also .Lcleanup_sie
 +.Lrewind_pad:
 +	nop	0
 +	.globl sie_exit
 +sie_exit:
 +	lg	%r14,__SF_EMPTY+8(%r15)		# load guest register save area
 +	stmg	%r0,%r13,0(%r14)		# save guest gprs 0-13
 +	lmg	%r6,%r14,__SF_GPRS(%r15)	# restore kernel registers
 +	lg	%r2,__SF_EMPTY+24(%r15)		# return exit reason code
 +	br	%r14
 +.Lsie_fault:
 +	lghi	%r14,-EFAULT
 +	stg	%r14,__SF_EMPTY+24(%r15)	# set exit reason code
 +	j	sie_exit
 +
 +	EX_TABLE(.Lrewind_pad,.Lsie_fault)
 +	EX_TABLE(sie_exit,.Lsie_fault)
 +#endif
 +
  /*
   * SVC interrupt handler routine. System calls are synchronous events and
   * are executed with interrupts enabled.

             reply	other threads:[~2015-07-22  2:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22  2:31 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-14  4:51 linux-next: manual merge of the kvms390 tree with the s390 tree Stephen Rothwell
2016-06-14  4:52 ` Heiko Carstens
2016-06-14  8:45 ` Christian Borntraeger
2016-11-23  3:45 Stephen Rothwell
2016-11-23  8:24 ` Christian Borntraeger
2016-11-23  9:17   ` Heiko Carstens
2017-04-27  3:29 Stephen Rothwell
2017-04-27  6:47 ` Christian Borntraeger
2017-06-22  2:59 Stephen Rothwell
2017-07-03  1:55 ` Stephen Rothwell
2022-11-08  2:41 Stephen Rothwell
2023-01-23  1:12 Stephen Rothwell
2023-01-23  7:07 ` Christian Borntraeger
2023-01-23 19:02 ` Anthony Krowiak
2023-01-24 11:19   ` Christian Borntraeger
2023-01-24 14:43     ` Anthony Krowiak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150722123121.665531b5@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=borntraeger@de$(echo .)ibm.com \
    --cc=brueckner@linux$(echo .)vnet.ibm.com \
    --cc=cornelia.huck@de$(echo .)ibm.com \
    --cc=heiko.carstens@de$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=schwidefsky@de$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox