From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, aliguori@amazon.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] target-i386: Fix I/O bitmap checks for in/out
Date: Mon, 17 Feb 2014 11:14:56 +0100 [thread overview]
Message-ID: <20140217101456.GD3502@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <1390558762-6941-1-git-send-email-kwolf@redhat.com>
Am 24.01.2014 um 11:19 hat Kevin Wolf geschrieben:
> Commit 1b90d56e changed the implementation of in/out imm to not assign
> the accessed port number to cpu_T[0] as it appeared unnecessary.
> However, currently gen_check_io() makes use of cpu_T[0] to implement the
> I/O bitmap checks, so it's in fact still used and the change broke the
> check, leading to #GP in legitimate cases (and probably also allowing
> access to ports that shouldn't be allowed).
>
> This patch reintroduces the missing assignment for these cases.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Reviewed-by: Richard Henderson <rth@twiddle.net>
Ping?
/me considers sending a one-patch pull request for an area he's
absolutely not maintaining, but if this is the only way to get patches
applied to qemu...
Kevin
> ---
> target-i386/translate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target-i386/translate.c b/target-i386/translate.c
> index b0f2279..5dd2450 100644
> --- a/target-i386/translate.c
> +++ b/target-i386/translate.c
> @@ -6284,6 +6284,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
> case 0xe5:
> ot = mo_b_d32(b, dflag);
> val = cpu_ldub_code(env, s->pc++);
> + tcg_gen_movi_tl(cpu_T[0], val);
> gen_check_io(s, ot, pc_start - s->cs_base,
> SVM_IOIO_TYPE_MASK | svm_is_rep(prefixes));
> if (use_icount)
> @@ -6300,6 +6301,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
> case 0xe7:
> ot = mo_b_d32(b, dflag);
> val = cpu_ldub_code(env, s->pc++);
> + tcg_gen_movi_tl(cpu_T[0], val);
> gen_check_io(s, ot, pc_start - s->cs_base,
> svm_is_rep(prefixes));
> gen_op_mov_v_reg(ot, cpu_T[1], R_EAX);
> --
> 1.8.1.4
>
next prev parent reply other threads:[~2014-02-17 10:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 10:19 [Qemu-devel] [PATCH] target-i386: Fix I/O bitmap checks for in/out Kevin Wolf
2014-02-17 10:14 ` Kevin Wolf [this message]
2014-02-17 10:47 ` Peter Maydell
2014-02-17 11:15 ` Kevin Wolf
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=20140217101456.GD3502@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=aliguori@amazon.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).