From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, pbonzini@redhat.com
Subject: [Qemu-devel] [PULL 12/16] target-i386: Update BNDSTATUS for exceptions raised by BOUND
Date: Mon, 15 Feb 2016 22:23:24 +1100 [thread overview]
Message-ID: <1455535408-26566-13-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1455535408-26566-1-git-send-email-rth@twiddle.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
target-i386/mem_helper.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target-i386/mem_helper.c b/target-i386/mem_helper.c
index 7de7752..85e7516 100644
--- a/target-i386/mem_helper.c
+++ b/target-i386/mem_helper.c
@@ -112,6 +112,9 @@ void helper_boundw(CPUX86State *env, target_ulong a0, int v)
high = cpu_ldsw_data_ra(env, a0 + 2, GETPC());
v = (int16_t)v;
if (v < low || v > high) {
+ if (env->hflags & HF_MPX_EN_MASK) {
+ env->bndcs_regs.sts = 0;
+ }
raise_exception_ra(env, EXCP05_BOUND, GETPC());
}
}
@@ -123,6 +126,9 @@ void helper_boundl(CPUX86State *env, target_ulong a0, int v)
low = cpu_ldl_data_ra(env, a0, GETPC());
high = cpu_ldl_data_ra(env, a0 + 4, GETPC());
if (v < low || v > high) {
+ if (env->hflags & HF_MPX_EN_MASK) {
+ env->bndcs_regs.sts = 0;
+ }
raise_exception_ra(env, EXCP05_BOUND, GETPC());
}
}
--
2.5.0
next prev parent reply other threads:[~2016-02-15 11:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 11:23 [Qemu-devel] [PULL 00/16] target-i386: xsave, mpx, fsgsbase extensions Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 01/16] target-i386: Split fxsave/fxrstor implementation Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 02/16] target-i386: Rearrange processing of 0F 01 Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 03/16] target-i386: Rearrange processing of 0F AE Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 04/16] target-i386: Add XSAVE extension Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 05/16] target-i386: Implement XSAVEOPT Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 06/16] target-i386: Enable control registers for MPX Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 07/16] target-i386: Perform set/reset_inhibit_irq inline Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 08/16] target-i386: Split up gen_lea_modrm Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 09/16] target-i386: Implement BNDMK Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 10/16] target-i386: Implement BNDMOV Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 11/16] target-i386: Implement BNDCL, BNDCU, BNDCN Richard Henderson
2016-02-15 11:23 ` Richard Henderson [this message]
2016-02-15 11:23 ` [Qemu-devel] [PULL 13/16] target-i386: Implement BNDLDX, BNDSTX Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 14/16] target-i386: Clear bndregs during legacy near jumps Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 15/16] target-i386: Enable CR4/XCR0 features for user-mode Richard Henderson
2016-02-15 11:23 ` [Qemu-devel] [PULL 16/16] target-i386: Implement FSGSBASE Richard Henderson
2016-02-15 12:16 ` [Qemu-devel] [PULL 00/16] target-i386: xsave, mpx, fsgsbase extensions Peter Maydell
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=1455535408-26566-13-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).