public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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 v8 2/2] s390/kvm: diagnose 0x318 sync and reset
Date: Mon, 22 Jun 2020 12:24:56 +0200	[thread overview]
Message-ID: <20200622122456.781492a8.cohuck@redhat.com> (raw)
In-Reply-To: <20200618222222.23175-3-walling@linux.ibm.com>

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?

>  
>  #ifdef KVM_CAP_IRQ_ROUTING
>  


  parent reply	other threads:[~2020-06-22 10:25 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 [this message]
2020-06-22 14:50     ` Christian Borntraeger
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=20200622122456.781492a8.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