All of lore.kernel.org
 help / color / mirror / Atom feed
From: Collin Walling <walling@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: frankja@linux.ibm.com, mst@redhat.com, david@redhat.com,
	qemu-devel@nongnu.org, pasic@linux.ibm.com,
	borntraeger@de.ibm.com, qemu-s390x@nongnu.org,
	svens@linux.ibm.com, pbonzini@redhat.com, mihajlov@linux.ibm.com,
	rth@twiddle.net
Subject: Re: [PATCH v1 7/8] s390/kvm: header sync for diag318
Date: Wed, 13 May 2020 18:44:56 -0400	[thread overview]
Message-ID: <65c903c6-b076-94e0-badc-472e25e248a9@linux.ibm.com> (raw)
In-Reply-To: <20200513090508.79b7fc54.cohuck@redhat.com>

On 5/13/20 3:05 AM, Cornelia Huck wrote:
> On Fri,  8 May 2020 19:08:22 -0400
> Collin Walling <walling@linux.ibm.com> wrote:
> 
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
>> ---
>>  linux-headers/asm-s390/kvm.h | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h
>> index 0138ccb0d8..b661feafdc 100644
>> --- a/linux-headers/asm-s390/kvm.h
>> +++ b/linux-headers/asm-s390/kvm.h
>> @@ -74,6 +74,7 @@ struct kvm_s390_io_adapter_req {
>>  #define KVM_S390_VM_CRYPTO		2
>>  #define KVM_S390_VM_CPU_MODEL		3
>>  #define KVM_S390_VM_MIGRATION		4
>> +#define KVM_S390_VM_MISC		5
>>  
>>  /* kvm attributes for mem_ctrl */
>>  #define KVM_S390_VM_MEM_ENABLE_CMMA	0
>> @@ -171,6 +172,10 @@ struct kvm_s390_vm_cpu_subfunc {
>>  #define KVM_S390_VM_MIGRATION_START	1
>>  #define KVM_S390_VM_MIGRATION_STATUS	2
>>  
>> +/* kvm attributes for KVM_S390_VM_MISC */
>> +#define KVM_S390_VM_MISC_ENABLE_DIAG318		0
>> +#define KVM_S390_VM_MISC_DIAG318			1
>> +
>>  /* for KVM_GET_REGS and KVM_SET_REGS */
>>  struct kvm_regs {
>>  	/* general purpose regs for s390 */
> 
> Hm... remind me what the state of the kernel part is?
> 

Kernel code to execute the instruction is in place today. A kernel
running on real hardware (or at least LPAR) can successfully execute the
instruction if the hardware supports it.

The Linux commit is: 4ad78b8651aacf26b3ab6d1e784952eb70469c43

The KVM code is still under review, since most of it needs to align with
the QEMU changes as well. Guest kernels executing the instruction rely
on both QEMU and KVM support. KVM handles the execution and interception
of the instruction, while QEMU handles enabling the instruction (by
negotiating with KVM to allow it and then setting the appropriate SCLP
bit) and migration of the data.

The latest changes to the KVM code is a new IOCTL that allows QEMU to
negotiate with KVM to actually enable the diag318 feature. By default,
KVM treats the feature as "disabled" unless userspace explicitly asks
for it.

The KVM discussion is: https://www.spinics.net/lists/kvm/msg215758.html

-- 
--
Regards,
Collin

Stay safe and stay healthy


  reply	other threads:[~2020-05-13 22:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 23:08 [PATCH v1 0/8] s390: Extended-Length SCCB & DIAGNOSE 0x318 Collin Walling
2020-05-08 23:08 ` [PATCH v1 1/8] s390/sclp: remove SCLPDevice param from prepare_cpu_entries Collin Walling
2020-05-11 14:37   ` Janosch Frank
2020-05-12  7:17   ` David Hildenbrand
2020-05-08 23:08 ` [PATCH v1 2/8] s390/sclp: check sccb len before filling in data Collin Walling
2020-05-11 14:36   ` Janosch Frank
2020-05-11 14:44     ` David Hildenbrand
2020-05-11 14:47       ` Collin Walling
2020-05-11 14:50       ` Janosch Frank
2020-05-11 15:02         ` David Hildenbrand
2020-05-12 16:01           ` Cornelia Huck
2020-05-12 16:16             ` Collin Walling
2020-05-12 16:24               ` Cornelia Huck
2020-05-12 16:25                 ` Collin Walling
2020-05-13  7:43             ` Janosch Frank
2020-05-13  8:16               ` Cornelia Huck
2020-05-14 17:22                 ` Collin Walling
2020-05-18 11:43   ` David Hildenbrand
2020-05-08 23:08 ` [PATCH v1 3/8] s390/sclp: rework sclp boundary and length checks Collin Walling
2020-05-12  7:21   ` David Hildenbrand
2020-05-12 14:55     ` Collin Walling
2020-05-13  7:00       ` Cornelia Huck
2020-05-14 17:23         ` Collin Walling
2020-05-08 23:08 ` [PATCH v1 4/8] s390/sclp: read sccb from mem based on sccb length Collin Walling
2020-05-12  7:26   ` David Hildenbrand
2020-05-12 14:46     ` Collin Walling
2020-05-08 23:08 ` [PATCH v1 5/8] s390/sclp: use cpu offset to locate cpu entries Collin Walling
2020-05-08 23:08 ` [PATCH v1 6/8] s390/sclp: add extended-length sccb support for kvm guest Collin Walling
2020-05-08 23:08 ` [PATCH v1 7/8] s390/kvm: header sync for diag318 Collin Walling
2020-05-13  7:05   ` Cornelia Huck
2020-05-13 22:44     ` Collin Walling [this message]
2020-05-08 23:08 ` [PATCH v1 8/8] s390: diagnose 318 info reset and migration support Collin Walling
2020-05-09  8:07 ` [PATCH v1 0/8] s390: Extended-Length SCCB & DIAGNOSE 0x318 no-reply
2020-05-12 16:08 ` Cornelia Huck
2020-05-12 16:20   ` 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=65c903c6-b076-94e0-badc-472e25e248a9@linux.ibm.com \
    --to=walling@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=mihajlov@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=svens@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.