All of lore.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-kselftest@vger.kernel.org,
	frankja@linux.ibm.com, david@redhat.com, thuth@redhat.com,
	borntraeger@de.ibm.com, pbonzini@redhat.com,
	imbrenda@linux.ibm.com
Subject: Re: [PATCH v4] self_tests/kvm: sync_regs test for diag318
Date: Mon, 7 Dec 2020 17:55:57 +0100	[thread overview]
Message-ID: <20201207175557.674236b3.cohuck@redhat.com> (raw)
In-Reply-To: <20201207154125.10322-1-walling@linux.ibm.com>

On Mon,  7 Dec 2020 10:41:25 -0500
Collin Walling <walling@linux.ibm.com> wrote:

> The DIAGNOSE 0x0318 instruction, unique to s390x, is a privileged call
> that must be intercepted via SIE, handled in userspace, and the
> information set by the instruction is communicated back to KVM.
> 
> To test the instruction interception, an ad-hoc handler is defined which
> simply has a VM execute the instruction and then userspace will extract
> the necessary info. The handler is defined such that the instruction
> invocation occurs only once. It is up to the caller to determine how the
> info returned by this handler should be used.
> 
> The diag318 info is communicated from userspace to KVM via a sync_regs
> call. This is tested During a sync_regs test, where the diag318 info is

s/During/during/

> requested via the handler, then the info is stored in the appropriate
> register in KVM via a sync registers call.
> 
> If KVM does not support diag318, then the tests will print a message
> stating that diag318 was skipped, and the asserts will simply test
> against a value of 0.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  tools/testing/selftests/kvm/Makefile          |  2 +-
>  .../kvm/include/s390x/diag318_test_handler.h  | 13 +++
>  .../kvm/lib/s390x/diag318_test_handler.c      | 82 +++++++++++++++++++
>  .../selftests/kvm/s390x/sync_regs_test.c      | 16 +++-
>  4 files changed, 111 insertions(+), 2 deletions(-)
>  create mode 100644 tools/testing/selftests/kvm/include/s390x/diag318_test_handler.h
>  create mode 100644 tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c

Looks reasonable to me.

Acked-by: Cornelia Huck <cohuck@redhat.com>


  parent reply	other threads:[~2020-12-07 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 15:41 [PATCH v4] self_tests/kvm: sync_regs test for diag318 Collin Walling
2020-12-07 15:43 ` Collin Walling
2020-12-07 16:55 ` Cornelia Huck [this message]
2020-12-07 19:09   ` Collin Walling
2020-12-07 19:12 ` Collin Walling
2020-12-07 19:14   ` Christian Borntraeger
2020-12-07 19:32 ` Christian Borntraeger
2020-12-07 20:06   ` Collin Walling
2020-12-07 20:09     ` Christian Borntraeger
2020-12-07 20:13       ` Collin Walling
2020-12-07 20:16         ` Christian Borntraeger
2020-12-07 20:59           ` Collin Walling
2020-12-08 10:09             ` Janosch Frank

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=20201207175557.674236b3.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kselftest@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.