From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>,
Collin Walling <walling@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
pbonzini@redhat.com, frankja@linux.ibm.com, david@redhat.com,
imbrenda@linux.ibm.com, heiko.carstens@de.ibm.com,
gor@linux.ibm.com, thuth@redhat.com
Subject: Re: [PATCH v8 2/2] s390/kvm: diagnose 0x318 sync and reset
Date: Mon, 22 Jun 2020 16:50:41 +0200 [thread overview]
Message-ID: <43967a50-a69c-face-805d-7cc935d3f230@de.ibm.com> (raw)
In-Reply-To: <20200622122456.781492a8.cohuck@redhat.com>
On 22.06.20 12:24, Cornelia Huck wrote:
> On Thu, 18 Jun 2020 18:22:22 -0400
> Collin Walling <walling@linux.ibm.com> wrote:
>
>> DIAGNOSE 0x318 (diag318) sets information regarding the environment
>> the VM is running in (Linux, z/VM, etc) and is observed via
>> firmware/service events.
>>
>> This is a privileged s390x instruction that must be intercepted by
>> SIE. Userspace handles the instruction as well as migration. Data
>> is communicated via VCPU register synchronization.
>>
>> The Control Program Name Code (CPNC) is stored in the SIE block. The
>> CPNC along with the Control Program Version Code (CPVC) are stored
>> in the kvm_vcpu_arch struct.
>>
>> The CPNC is shadowed/unshadowed in VSIE.
>>
>> This data is reset on load normal and clear resets.
>>
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
>> ---
>> arch/s390/include/asm/kvm_host.h | 4 +++-
>> arch/s390/include/uapi/asm/kvm.h | 5 ++++-
>> arch/s390/kvm/kvm-s390.c | 11 ++++++++++-
>> arch/s390/kvm/vsie.c | 3 +++
>> include/uapi/linux/kvm.h | 1 +
>> 5 files changed, 21 insertions(+), 3 deletions(-)
>>
>
> (...)
>
>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>> index 4fdf30316582..35cdb4307904 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -1031,6 +1031,7 @@ struct kvm_ppc_resize_hpt {
>> #define KVM_CAP_PPC_SECURE_GUEST 181
>> #define KVM_CAP_HALT_POLL 182
>> #define KVM_CAP_ASYNC_PF_INT 183
>> +#define KVM_CAP_S390_DIAG318 184
>
> Do we strictly need this new cap, or would checking against the sync
> regs capabilities be enough?
We could check the sync_regs valid field to decide about the sync. We do
that for ETOKEN as well and QEMU also uses it in handle_diag_318.
I think what this is used for is actually to tell the QEMU CPU model
if this is there. And for that the sync_reg validity seems wrong. So better
keep the CAP?
next prev parent reply other threads:[~2020-06-22 14:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 22:22 [PATCH v8 0/2] Use DIAG318 to set Control Program Name & Version Codes Collin Walling
2020-06-18 22:22 ` [PATCH v8 1/2] s390/setup: diag 318: refactor struct Collin Walling
2020-06-22 14:56 ` Christian Borntraeger
2020-06-22 15:37 ` Collin Walling
2020-06-18 22:22 ` [PATCH v8 2/2] s390/kvm: diagnose 0x318 sync and reset Collin Walling
2020-06-19 11:02 ` Janosch Frank
2020-06-19 14:45 ` Collin Walling
2020-06-19 14:52 ` David Hildenbrand
2020-06-19 15:47 ` Collin Walling
2020-06-19 17:17 ` David Hildenbrand
2020-06-19 17:55 ` Collin Walling
2020-06-19 18:13 ` David Hildenbrand
2020-06-19 18:46 ` Collin Walling
2020-06-22 10:24 ` Cornelia Huck
2020-06-22 14:50 ` Christian Borntraeger [this message]
2020-06-22 15:03 ` Cornelia Huck
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=43967a50-a69c-face-805d-7cc935d3f230@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=thuth@redhat.com \
--cc=walling@linux.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