kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
	david@redhat.com, thuth@redhat.com, seiden@linux.ibm.com,
	mhartmay@linux.ibm.com
Subject: [kvm-unit-tests PATCH 0/8] s390x: sie: Add PV snippet support
Date: Tue, 23 Nov 2021 10:39:48 +0000	[thread overview]
Message-ID: <20211123103956.2170-1-frankja@linux.ibm.com> (raw)

Adding PV virtualization support was only a matter of time so here it
is.

The biggest problem that needed solving was having the SE header as a
separate file. The genprotimg tool generates the header and adds a
short bit of code to the image which will put the guest into PV mode
via the diagnose 308 PV subcodes. We don't have and want an emulation
for the diagnose so we don't support this way of starting a PV guest.

Therefore we needed a new tool that generates the PV image separate
from the SE header so we can link both as binary blobs. Marc created
this tool by writing a library which lets users create a SE header and
has bindings to multiple languages. Unfortunately we didn't yet have
time to upstream this but we plan to publish it once we find some.

The first PV snippet test checks the "easy" diagnose calls 0x44, 0x9c,
0x288 and 0x500. We check register contents and responses to PGM
injects.

A huge thanks goes out to Steffen and Marc who helped me make this
possible.

Janosch Frank (8):
  lib: s390x: sie: Add sca allocation and freeing
  s390x: sie: Add PV fields to SIE control block
  s390x: sie: Add UV information into VM struct
  s390x: uv: Add more UV call functions
  s390x: lib: Extend UV library with PV guest management
  lib: s390: sie: Add PV guest register handling
  s390x: snippets: Add PV support
  s390x: sie: Add PV diag test

 .gitignore                                 |   2 +
 configure                                  |   8 +
 lib/s390x/asm/uv.h                         |  99 +++++++++
 lib/s390x/sie.c                            |  20 ++
 lib/s390x/sie.h                            |  54 ++++-
 lib/s390x/snippet.h                        |   7 +
 lib/s390x/uv.c                             | 128 +++++++++++
 lib/s390x/uv.h                             |   7 +
 s390x/Makefile                             |  74 ++++++-
 s390x/pv-diags.c                           | 240 +++++++++++++++++++++
 s390x/snippets/asm/snippet-pv-diag-288.S   |  25 +++
 s390x/snippets/asm/snippet-pv-diag-500.S   |  39 ++++
 s390x/snippets/asm/snippet-pv-diag-yield.S |   7 +
 13 files changed, 692 insertions(+), 18 deletions(-)
 create mode 100644 s390x/pv-diags.c
 create mode 100644 s390x/snippets/asm/snippet-pv-diag-288.S
 create mode 100644 s390x/snippets/asm/snippet-pv-diag-500.S
 create mode 100644 s390x/snippets/asm/snippet-pv-diag-yield.S

-- 
2.32.0


             reply	other threads:[~2021-11-23 10:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 10:39 Janosch Frank [this message]
2021-11-23 10:39 ` [kvm-unit-tests PATCH 1/8] lib: s390x: sie: Add sca allocation and freeing Janosch Frank
2021-11-23 10:51   ` Claudio Imbrenda
2021-11-23 10:39 ` [kvm-unit-tests PATCH 2/8] s390x: sie: Add PV fields to SIE control block Janosch Frank
2021-11-23 10:52   ` Claudio Imbrenda
2021-11-23 10:39 ` [kvm-unit-tests PATCH 3/8] s390x: sie: Add UV information into VM struct Janosch Frank
2021-11-23 10:54   ` Claudio Imbrenda
2021-11-23 12:49     ` Janosch Frank
2021-11-23 10:39 ` [kvm-unit-tests PATCH 4/8] s390x: uv: Add more UV call functions Janosch Frank
2021-11-23 10:56   ` Claudio Imbrenda
2021-11-23 10:39 ` [kvm-unit-tests PATCH 5/8] s390x: lib: Extend UV library with PV guest management Janosch Frank
2021-11-23 11:13   ` Claudio Imbrenda
2021-11-23 10:39 ` [kvm-unit-tests PATCH 6/8] lib: s390: sie: Add PV guest register handling Janosch Frank
2021-11-23 11:14   ` Claudio Imbrenda
2021-11-23 10:39 ` [kvm-unit-tests PATCH 7/8] s390x: snippets: Add PV support Janosch Frank
2021-11-23 11:22   ` Claudio Imbrenda
2021-11-26 13:28     ` Janosch Frank
2021-12-03  9:29       ` Janosch Frank
2022-01-13 13:10         ` Janosch Frank
2022-01-13 13:17           ` Claudio Imbrenda
2021-11-23 10:39 ` [kvm-unit-tests PATCH 8/8] s390x: sie: Add PV diag test Janosch Frank
2021-11-23 11:41   ` Claudio Imbrenda

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=20211123103956.2170-1-frankja@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhartmay@linux.ibm.com \
    --cc=seiden@linux.ibm.com \
    --cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).