[RFC PATCH 0/3] Use DIAG318 to set Control Program Name & Version Codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A new diagnose instruction, 318, allows the kernel to set an 8-byte "Control 
Program Code" (CPC) that is composed of:

    1-byte Control Program Name Code (CPNC)
    7-byte Control Program Version Code (CPVC) composed of:
        3-bytes for Linux Kernel version (determined at build-time)
        3-bytes for Distribution Identifier (referred to as distro_id; set by Kconfig option)
        1-byte trailing NULL

Note about distro_id:
[
The initial idea for the 3-byte distro_id is for each distribution to set 
three characters that correspond to their distribution name (for a theoretical 
distributor "ACME," they could set "ACM" as the distro_id). A registry file 
could be included in the s390 kernel documentation to avoid name collisions.
]

This instruction call is executed once-and-only-once during Kernel setup.
The availability of this instruction depends on Read SCP Info byte 134, bit 0.
Diagnose318's functionality is also emulated by KVM, which means we can 
enable this feature for a guest even if the host cannot support it.

Also introduced with this patchset is a Host Program Identifier (HPID), which
denotes the underlying host environment.

The CPC and HPID are used for problem diagnosis and allows IBM to identify 
control program information by answering the following questions:

    "What environment is this guest running in?" (CPNC)
    "What distribution is this guest running?" (CPVC)
    "What underlying host environment is this guest running on?" (HPID)

Please note: I will be returning to the office on Thursday (9/6).

Collin Walling (3):
  s390/setup: set control program code via diag 318
  s390/kvm: handle diagnose 318 instruction call
  s390/kvm: set host program identifier

 arch/s390/Kconfig                      |  8 +++
 arch/s390/include/asm/diag.h           | 12 +++++
 arch/s390/include/asm/kvm_host.h       | 12 ++++-
 arch/s390/include/asm/sclp.h           |  1 +
 arch/s390/include/uapi/asm/kvm.h       |  5 ++
 arch/s390/kernel/diag.c                |  1 +
 arch/s390/kernel/setup.c               | 23 +++++++++
 arch/s390/kvm/diag.c                   | 16 ++++++
 arch/s390/kvm/kvm-s390.c               | 92 ++++++++++++++++++++++++++++++++++
 arch/s390/kvm/kvm-s390.h               |  1 +
 arch/s390/kvm/vsie.c                   |  2 +
 drivers/s390/char/sclp_early.c         |  6 ++-
 tools/arch/s390/include/uapi/asm/kvm.h |  1 +
 13 files changed, 177 insertions(+), 3 deletions(-)

-- 
2.7.4




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux