linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 2/3] s390/kvm: handle diagnose 318 instruction call
Date: Wed, 19 Sep 2018 18:54:48 +0000	[thread overview]
Message-ID: <20180919205448.12e75f06.cohuck@redhat.com> (raw)
In-Reply-To: <1f2f77f2-0aac-0f8b-51ed-87fc6d21553d@linux.ibm.com>

On Wed, 19 Sep 2018 12:56:53 -0400
Collin Walling <walling@linux.ibm.com> wrote:

> On 09/19/2018 05:37 AM, Cornelia Huck wrote:
> > On Fri, 31 Aug 2018 12:51:18 -0400
> > Collin Walling <walling@linux.ibm.com> wrote:
> >   
> >> The diagnose 318 instruction is a privileged instruction that must be
> >> interpreted by SIE and handled via KVM.
> >>
> >> The control program name and version codes (CPNC and CPVC) set by this
> >> instruction are saved to the kvm->arch struct. The CPNC is also set in
> >> the SIE control block of all VCPUs. The new kvm_s390_set_misc interface
> >> is introduced for migration.
> >>
> >> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> >> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
> >> ---
> >>  arch/s390/include/asm/kvm_host.h       |  6 ++-
> >>  arch/s390/include/uapi/asm/kvm.h       |  5 ++
> >>  arch/s390/kvm/diag.c                   | 16 ++++++
> >>  arch/s390/kvm/kvm-s390.c               | 90 ++++++++++++++++++++++++++++++++++
> >>  arch/s390/kvm/kvm-s390.h               |  1 +
> >>  tools/arch/s390/include/uapi/asm/kvm.h |  1 +
> >>  6 files changed, 118 insertions(+), 1 deletion(-)
> >>  
> >   
> >> @@ -2568,6 +2655,9 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
> >>  	vcpu->arch.sie_block->epoch = vcpu->kvm->arch.epoch;
> >>  	vcpu->arch.sie_block->epdx = vcpu->kvm->arch.epdx;
> >>  	preempt_enable();
> >> +
> >> +	vcpu->arch.sie_block->cpnc = vcpu->kvm->arch.cpnc;  
> > 
> > Any reason why you set this _after_ the preempt_enable()?
> >   
> 
> I didn't consider setting this value as time-critical as the TOD-Clock values. I guess
> it doesn't hurt to throw the cpnc in there, too?

_postcreate is probably not time-critical at all... just keep setting
up all of the fields in one place?

> 
> >> +
> >>  	mutex_unlock(&vcpu->kvm->lock);
> >>  	if (!kvm_is_ucontrol(vcpu->kvm)) {
> >>  		vcpu->arch.gmap = vcpu->kvm->arch.gmap;  
> >   
> 
> 

       reply	other threads:[~2018-09-19 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1f2f77f2-0aac-0f8b-51ed-87fc6d21553d@linux.ibm.com>
2018-09-19 18:54 ` Cornelia Huck [this message]
2018-08-31 16:51 [PATCH 2/3] s390/kvm: handle diagnose 318 instruction call Collin Walling

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=20180919205448.12e75f06.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).