Commit b073c875 authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Cornelia Huck
Browse files

s390x/kvm: Handle bpb feature



We need to handle the bpb control on reset and migration. Normally
stfle.82 is transparent (and the normal guest part works without
hypervisor activity). To prevent any issues we require full
host kernel support for this feature.

Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20180118085628.40798-3-borntraeger@de.ibm.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
[CH: 'Branch Prediction Blocking' -> 'Branch prediction blocking']
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 9cbb6362
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ static void s390_cpu_reset(CPUState *s)
    CPUS390XState *env = &cpu->env;

    env->pfault_token = -1UL;
    env->bpbc = false;
    scc->parent_reset(s);
    cpu->env.sigp_order = 0;
    s390_cpu_set_state(CPU_STATE_STOPPED, cpu);
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ struct CPUS390XState {

    uint32_t fpc;          /* floating-point control register */
    uint32_t cc_op;
    bool bpbc;             /* branch prediction blocking */

    float_status fpu_status; /* passed to softfloat lib */

+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ static const S390FeatDef s390_features[] = {
    FEAT_INIT("msa4-base", S390_FEAT_TYPE_STFL, 77, "Message-security-assist-extension-4 facility (excluding subfunctions)"),
    FEAT_INIT("edat2", S390_FEAT_TYPE_STFL, 78, "Enhanced-DAT facility 2"),
    FEAT_INIT("dfppc", S390_FEAT_TYPE_STFL, 80, "Decimal-floating-point packed-conversion facility"),
    FEAT_INIT("bpb", S390_FEAT_TYPE_STFL, 82, "Branch prediction blocking"),
    FEAT_INIT("vx", S390_FEAT_TYPE_STFL, 129, "Vector facility"),
    FEAT_INIT("iep", S390_FEAT_TYPE_STFL, 130, "Instruction-execution-protection facility"),
    FEAT_INIT("sea_esop2", S390_FEAT_TYPE_STFL, 131, "Side-effect-access facility and Enhanced-suppression-on-protection facility 2"),
+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ typedef enum {
    S390_FEAT_MSA_EXT_4,
    S390_FEAT_EDAT_2,
    S390_FEAT_DFP_PACKED_CONVERSION,
    S390_FEAT_BPB,
    S390_FEAT_VECTOR,
    S390_FEAT_INSTRUCTION_EXEC_PROT,
    S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
+1 −0
Original line number Diff line number Diff line
@@ -352,6 +352,7 @@ static uint16_t base_GEN14_GA1[] = {
 * support these features yet.
 */
static uint16_t full_GEN7_GA1[] = {
    S390_FEAT_BPB,
    S390_FEAT_SIE_F2,
    S390_FEAT_SIE_SKEY,
    S390_FEAT_SIE_GPERE,
Loading