diff mbox series

[1/2] docs: kvm: add documentation for KVM_CAP_S390_DIAG318

Message ID 20200624202200.28209-2-walling@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390: Add API Docs for DIAGNOSE 0x318 and fix rst | expand

Commit Message

Collin Walling June 24, 2020, 8:21 p.m. UTC
Documentation for the s390 DIAGNOSE 0x318 instruction handling.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
---
 Documentation/virt/kvm/api.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Cornelia Huck June 25, 2020, 6:31 a.m. UTC | #1
On Wed, 24 Jun 2020 16:21:59 -0400
Collin Walling <walling@linux.ibm.com> wrote:

> Documentation for the s390 DIAGNOSE 0x318 instruction handling.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  Documentation/virt/kvm/api.rst | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 426f94582b7a..056608e8f243 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -6150,3 +6150,22 @@ KVM can therefore start protected VMs.
>  This capability governs the KVM_S390_PV_COMMAND ioctl and the
>  KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected
>  guests when the state change is invalid.
> +
> +8.24 KVM_CAP_S390_DIAG318
> +-------------------------
> +
> +:Architecture: s390
> +
> +This capability allows for information regarding the control program that may

Maybe s/allows for/covers/ ?

> +be observed via system/firmware service events. The availability of this
> +capability indicates that KVM handling of the register synchronization, reset,
> +and VSIE shadowing of the DIAGNOSE 0x318 related information is present.
> +
> +The information associated with the instruction is an 8-byte value consisting
> +of a one-byte Control Program Name Code (CPNC), and a 7-byte Control Program
> +Version Code (CPVC). The CPNC determines what environment the control program
> +is running in (e.g. Linux, z/VM...), and the CPVC is used for extraneous
> +information specific to OS (e.g. Linux version, Linux distribution...)
> +
> +If this capability is available, then the CPNC and CPVC can be synchronized
> +between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).

Anyway,

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
David Hildenbrand June 25, 2020, 7:10 a.m. UTC | #2
On 24.06.20 22:21, Collin Walling wrote:
> Documentation for the s390 DIAGNOSE 0x318 instruction handling.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  Documentation/virt/kvm/api.rst | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 426f94582b7a..056608e8f243 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -6150,3 +6150,22 @@ KVM can therefore start protected VMs.
>  This capability governs the KVM_S390_PV_COMMAND ioctl and the
>  KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected
>  guests when the state change is invalid.
> +
> +8.24 KVM_CAP_S390_DIAG318
> +-------------------------
> +
> +:Architecture: s390
> +
> +This capability allows for information regarding the control program that may
> +be observed via system/firmware service events. The availability of this
> +capability indicates that KVM handling of the register synchronization, reset,
> +and VSIE shadowing of the DIAGNOSE 0x318 related information is present.
> +
> +The information associated with the instruction is an 8-byte value consisting
> +of a one-byte Control Program Name Code (CPNC), and a 7-byte Control Program
> +Version Code (CPVC). The CPNC determines what environment the control program
> +is running in (e.g. Linux, z/VM...), and the CPVC is used for extraneous
> +information specific to OS (e.g. Linux version, Linux distribution...)
> +
> +If this capability is available, then the CPNC and CPVC can be synchronized
> +between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
Janosch Frank June 25, 2020, 7:16 a.m. UTC | #3
On 6/24/20 10:21 PM, Collin Walling wrote:
> Documentation for the s390 DIAGNOSE 0x318 instruction handling.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  Documentation/virt/kvm/api.rst | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 426f94582b7a..056608e8f243 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -6150,3 +6150,22 @@ KVM can therefore start protected VMs.
>  This capability governs the KVM_S390_PV_COMMAND ioctl and the
>  KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected
>  guests when the state change is invalid.
> +
> +8.24 KVM_CAP_S390_DIAG318
> +-------------------------
> +
> +:Architecture: s390
> +
> +This capability allows for information regarding the control program that may
> +be observed via system/firmware service events. The availability of this

I'm not sure if control program is understood universally, it's a rather
old term to say guest kernel.

How about:

This capability allows a guest to set information about its control
program (i.e. guest kernel type and version). The information is helpful
on system/firmware service events, providing additional data about what
environments are running on the machine.


> +capability indicates that KVM handling of the register synchronization, reset,
> +and VSIE shadowing of the DIAGNOSE 0x318 related information is present.
> +
> +The information associated with the instruction is an 8-byte value consisting
> +of a one-byte Control Program Name Code (CPNC), and a 7-byte Control Program
> +Version Code (CPVC). The CPNC determines what environment the control program
> +is running in (e.g. Linux, z/VM...), and the CPVC is used for extraneous
> +information specific to OS (e.g. Linux version, Linux distribution...)
> +
> +If this capability is available, then the CPNC and CPVC can be synchronized
> +between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).
>
Collin Walling June 25, 2020, 2:42 p.m. UTC | #4
On 6/25/20 3:16 AM, Janosch Frank wrote:
> On 6/24/20 10:21 PM, Collin Walling wrote:
>> Documentation for the s390 DIAGNOSE 0x318 instruction handling.
>>
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
>> ---
>>  Documentation/virt/kvm/api.rst | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
>> index 426f94582b7a..056608e8f243 100644
>> --- a/Documentation/virt/kvm/api.rst
>> +++ b/Documentation/virt/kvm/api.rst
>> @@ -6150,3 +6150,22 @@ KVM can therefore start protected VMs.
>>  This capability governs the KVM_S390_PV_COMMAND ioctl and the
>>  KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected
>>  guests when the state change is invalid.
>> +
>> +8.24 KVM_CAP_S390_DIAG318
>> +-------------------------
>> +
>> +:Architecture: s390
>> +
>> +This capability allows for information regarding the control program that may
>> +be observed via system/firmware service events. The availability of this
> 
> I'm not sure if control program is understood universally, it's a rather
> old term to say guest kernel.
> 
> How about:
> 
> This capability allows a guest to set information about its control
> program (i.e. guest kernel type and version). The information is helpful
> on system/firmware service events, providing additional data about what
> environments are running on the machine.
> 
> 

Fair point. I'll add some clarity to this.

>> +capability indicates that KVM handling of the register synchronization, reset,
>> +and VSIE shadowing of the DIAGNOSE 0x318 related information is present.
>> +
>> +The information associated with the instruction is an 8-byte value consisting
>> +of a one-byte Control Program Name Code (CPNC), and a 7-byte Control Program
>> +Version Code (CPVC). The CPNC determines what environment the control program
>> +is running in (e.g. Linux, z/VM...), and the CPVC is used for extraneous
>> +information specific to OS (e.g. Linux version, Linux distribution...)
>> +
>> +If this capability is available, then the CPNC and CPVC can be synchronized
>> +between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).
>>
> 
>
diff mbox series

Patch

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 426f94582b7a..056608e8f243 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -6150,3 +6150,22 @@  KVM can therefore start protected VMs.
 This capability governs the KVM_S390_PV_COMMAND ioctl and the
 KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected
 guests when the state change is invalid.
+
+8.24 KVM_CAP_S390_DIAG318
+-------------------------
+
+:Architecture: s390
+
+This capability allows for information regarding the control program that may
+be observed via system/firmware service events. The availability of this
+capability indicates that KVM handling of the register synchronization, reset,
+and VSIE shadowing of the DIAGNOSE 0x318 related information is present.
+
+The information associated with the instruction is an 8-byte value consisting
+of a one-byte Control Program Name Code (CPNC), and a 7-byte Control Program
+Version Code (CPVC). The CPNC determines what environment the control program
+is running in (e.g. Linux, z/VM...), and the CPVC is used for extraneous
+information specific to OS (e.g. Linux version, Linux distribution...)
+
+If this capability is available, then the CPNC and CPVC can be synchronized
+between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).