public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>
Subject: Re: [PATCH RFC 2/2] KVM: s390: introduce and use KVM_REQ_VSIE_RESTART
Date: Wed, 8 Aug 2018 14:53:38 +0200	[thread overview]
Message-ID: <f5d7528d-66f5-af47-a1e8-880eef9f4081@redhat.com> (raw)
In-Reply-To: <20180808144733.507ba955.cohuck@redhat.com>

On 08.08.2018 14:47, Cornelia Huck wrote:
> On Tue,  7 Aug 2018 14:51:31 +0200
> David Hildenbrand <david@redhat.com> wrote:
> 
>> When we change the crycb (or execution controls), we also have to make sure
>> that the vSIE shadow datastructures properly consider the changed
>> values before rerunning the vSIE. We can achieve that by simply using a
>> VCPU request now.
> 
> Is this actually a concrete problem right now, or does this only become
> a real concern with vfio-ap?

The use case I implemented is not a real problem right now, at least not
in practice.

In QEMU, s390_crypto_reset() triggers this code, but it is only called
when all VCPUs are stopped (== no one in vSIE).

So this change is the right thing to do ("who knows what user space
does"), but not critical (we're only dealing with wrapping masks right
now). It is a problem once we allow to access adapters (vfio-ap).

> 
>>
>> This has to be a synchronous request (== handled before entering the
>> (v)SIE again).
>>
>> The request will make sure that the vSIE handler is left, and that the
>> request will be processed (NOP), therefore forcing a reload of all
>> vSIE data (including rebuilding the crycb) when re-entering the vSIE
>> interception handler the next time.
>>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>> ---
>>  arch/s390/include/asm/kvm_host.h | 1 +
>>  arch/s390/kvm/kvm-s390.c         | 7 ++++++-
>>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> 


-- 

Thanks,

David / dhildenb

  reply	other threads:[~2018-08-08 12:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 12:51 [PATCH RFC 0/2] KVM: s390: vsie: support VCPU requests David Hildenbrand
2018-08-07 12:51 ` [PATCH RFC 1/2] KVM: s390: vsie: simulate VCPU SIE entry/exit David Hildenbrand
2018-08-07 17:06   ` Pierre Morel
2018-08-08 12:44   ` Cornelia Huck
2018-08-09  5:38   ` Janosch Frank
2018-08-09  7:20   ` David Hildenbrand
2018-08-07 12:51 ` [PATCH RFC 2/2] KVM: s390: introduce and use KVM_REQ_VSIE_RESTART David Hildenbrand
2018-08-07 17:06   ` Pierre Morel
2018-08-08 12:47   ` Cornelia Huck
2018-08-08 12:53     ` David Hildenbrand [this message]
2018-08-09  5:39   ` Janosch Frank
2018-08-07 17:15 ` [PATCH RFC 0/2] KVM: s390: vsie: support VCPU requests Pierre Morel
2018-08-07 17:35   ` David Hildenbrand

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=f5d7528d-66f5-af47-a1e8-880eef9f4081@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pmorel@linux.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    /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