From: Thomas Huth <thuth@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cohuck@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
qemu-s390x <qemu-s390x@nongnu.org>,
Alexander Graf <agraf@suse.de>,
David Hildenbrand <david@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Janosch Frank <frankja@linux.vnet.ibm.com>,
Halil Pasic <pasic@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/3] s390x/kvm: Handle bpb feature
Date: Thu, 18 Jan 2018 12:42:41 +0100 [thread overview]
Message-ID: <5b886bf4-df10-c686-bf46-066f5206de20@redhat.com> (raw)
In-Reply-To: <20180118085628.40798-3-borntraeger@de.ibm.com>
On 18.01.2018 09:56, Christian Borntraeger wrote:
> 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.
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> target/s390x/cpu.c | 1 +
> target/s390x/cpu.h | 1 +
> target/s390x/cpu_features.c | 1 +
> target/s390x/cpu_features_def.h | 1 +
> target/s390x/gen-features.c | 1 +
> target/s390x/kvm.c | 14 ++++++++++++++
> target/s390x/machine.c | 17 +++++++++++++++++
> 7 files changed, 36 insertions(+)
>
> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
> index ae3cee9..d2e6b9f 100644
> --- a/target/s390x/cpu.c
> +++ b/target/s390x/cpu.c
> @@ -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);
> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
> index 1a8b6b9..c0ef85d 100644
> --- a/target/s390x/cpu.h
> +++ b/target/s390x/cpu.h
> @@ -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 */
>
> diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
> index 31a4676..5d1c210 100644
> --- a/target/s390x/cpu_features.c
> +++ b/target/s390x/cpu_features.c
> @@ -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"),
I'm not an expert with all this CPU model stuff, but at least for me,
the patch looks fine now.
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2018-01-18 11:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 8:56 [Qemu-devel] [PATCH v3 0/3] s390x/kvm: implement new hardware/firmware features Christian Borntraeger
2018-01-18 8:56 ` [Qemu-devel] [PATCH v3 1/3] header sync Christian Borntraeger
2018-01-18 11:42 ` David Hildenbrand
2018-01-22 8:31 ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2018-01-22 8:47 ` Cornelia Huck
2018-01-18 8:56 ` [Qemu-devel] [PATCH v3 2/3] s390x/kvm: Handle bpb feature Christian Borntraeger
2018-01-18 11:42 ` Thomas Huth [this message]
2018-01-18 11:43 ` David Hildenbrand
2018-01-18 12:01 ` Halil Pasic
2018-01-18 12:09 ` Christian Borntraeger
2018-01-18 8:56 ` [Qemu-devel] [PATCH v3 3/3] s390x/kvm: provide stfle.81 Christian Borntraeger
2018-01-18 11:05 ` Halil Pasic
2018-01-18 11:43 ` David Hildenbrand
2018-01-18 11:43 ` Thomas Huth
2018-01-18 11:53 ` [Qemu-devel] [PATCH v3 0/3] s390x/kvm: implement new hardware/firmware features Cornelia Huck
2018-01-18 12:47 ` Christian Borntraeger
2018-01-18 13:15 ` Cornelia Huck
2018-01-18 13:31 ` Christian Ehrhardt
2018-01-18 14:48 ` Cornelia Huck
2018-01-22 10:20 ` Cornelia Huck
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=5b886bf4-df10-c686-bf46-066f5206de20@redhat.com \
--to=thuth@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).