[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v2 2/3] s390: cpu feature for diagnose 318 andli
From: |
Christian Borntraeger |
Subject: |
Re: [qemu-s390x] [PATCH v2 2/3] s390: cpu feature for diagnose 318 andlimit max VCPUs to 247 |
Date: |
Thu, 24 Jan 2019 09:11:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 06.12.2018 23:24, Collin Walling wrote:
> Diagnose 318 is a new z14.2 CPU feature. Since we are able to emulate
> it entirely via KVM, we can add guest support for earlier models. A
> new CPU feature for diagnose 318 (shortened to diag318) will be made
> available to guests starting with the zEC12-full CPU model.
>
> The z14.2 adds a new read SCP info byte (let's call it byte 134) to
> detect the availability of diag318. Because of this, we have room for
> one less VCPU and thus limit the max VPUs supported in a configuration
> to 247 (down from 248).
>
> Signed-off-by: Collin Walling <address@hidden>.
> ---
> hw/s390x/sclp.c | 2 ++
> include/hw/s390x/sclp.h | 2 ++
> target/s390x/cpu.h | 2 +-
> target/s390x/cpu_features.c | 3 +++
> target/s390x/cpu_features.h | 1 +
> target/s390x/cpu_features_def.h | 3 +++
> target/s390x/gen-features.c | 1 +
> target/s390x/kvm.c | 1 +
> 8 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
> index 4510a80..183c627 100644
> --- a/hw/s390x/sclp.c
> +++ b/hw/s390x/sclp.c
> @@ -73,6 +73,8 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
> read_info->conf_char);
> s390_get_feat_block(S390_FEAT_TYPE_SCLP_CONF_CHAR_EXT,
> read_info->conf_char_ext);
> + /* Read Info byte 134 */
> + s390_get_feat_block(S390_FEAT_TYPE_SCLP_BYTE_134, read_info->byte_134);
>
> read_info->facilities = cpu_to_be64(SCLP_HAS_CPU_INFO |
> SCLP_HAS_IOA_RECONFIG);
> diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h
> index f9db243..eb12ba2 100644
> --- a/include/hw/s390x/sclp.h
> +++ b/include/hw/s390x/sclp.h
> @@ -133,6 +133,8 @@ typedef struct ReadInfo {
> uint16_t highest_cpu;
> uint8_t _reserved5[124 - 122]; /* 122-123 */
> uint32_t hmfai;
> + uint8_t _reserved7[134 - 128]; /* 128-133 */
> + uint8_t byte_134[1];
> struct CPUEntry entries[0];
> } QEMU_PACKED ReadInfo;
The size must be a multiple of 16. Can you add a reserved field to fill up
until 144?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [qemu-s390x] [PATCH v2 2/3] s390: cpu feature for diagnose 318 andlimit max VCPUs to 247,
Christian Borntraeger <=