From: Cornelia Huck <cohuck@redhat.com>
To: Collin Walling <walling@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
pbonzini@redhat.com, borntraeger@de.ibm.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 v9 2/2] s390/kvm: diagnose 0x318 sync and reset
Date: Mon, 22 Jun 2020 18:04:59 +0200 [thread overview]
Message-ID: <20200622180459.4cf7cbf4.cohuck@redhat.com> (raw)
In-Reply-To: <20200622154636.5499-3-walling@linux.ibm.com>
On Mon, 22 Jun 2020 11:46:36 -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.
>
> This data is reset on load normal and clear resets.
Looks good to me AFAICS without access to the architecture.
Acked-by: Cornelia Huck <cohuck@redhat.com>
One small thing below.
>
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> Reviewed-by: Janosch Frank <frankja@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 | 1 +
> include/uapi/linux/kvm.h | 1 +
> 5 files changed, 19 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
Should we document this in Documentation/virt/kvm/api.rst?
(Documentation of KVM caps generally seems to be a bit of a
hit-and-miss, though. But we could at least document the s390 ones :)
I also noticed that the new entries for the vcpu resets and pv do not
seem to be in proper rst format. Maybe fix that and add the new doc in
an add-on series?
>
> #ifdef KVM_CAP_IRQ_ROUTING
>
next prev parent reply other threads:[~2020-06-22 16:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 15:46 [PATCH v9 0/2] Use DIAG318 to set Control Program Name & Version Codes Collin Walling
2020-06-22 15:46 ` [PATCH v9 1/2] s390/setup: diag 318: refactor struct Collin Walling
2020-06-22 15:46 ` [PATCH v9 2/2] s390/kvm: diagnose 0x318 sync and reset Collin Walling
2020-06-22 16:04 ` Cornelia Huck [this message]
2020-06-22 16:13 ` Collin Walling
2020-06-22 16:23 ` Collin Walling
2020-06-22 16:35 ` Cornelia Huck
2020-06-22 16:45 ` Collin Walling
2020-06-23 7:12 ` David Hildenbrand
2020-06-23 8:42 ` Thomas Huth
2020-06-23 8:45 ` Christian Borntraeger
2020-06-23 8:47 ` Christian Borntraeger
2020-06-23 8:58 ` Thomas Huth
2020-06-23 7:13 ` [PATCH v9 0/2] Use DIAG318 to set Control Program Name & Version Codes Christian Borntraeger
2020-06-23 14:38 ` 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=20200622180459.4cf7cbf4.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.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