From: Zheng Zhan Liang <linuxmaker@163.com>
Cc: "open list:All patches CC here" <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Zheng Zhan Liang <linuxmaker@163.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: [PATCH] tcg/i386: rdpmc: use the the condtions
Date: Thu, 25 Feb 2021 13:47:57 +0800 [thread overview]
Message-ID: <20210225054756.35962-1-linuxmaker@163.com> (raw)
Signed-off-by: Zheng Zhan Liang <linuxmaker@163.com>
---
target/i386/tcg/misc_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c
index f02e4fd400..90b87fdef0 100644
--- a/target/i386/tcg/misc_helper.c
+++ b/target/i386/tcg/misc_helper.c
@@ -222,7 +222,8 @@ void helper_rdtscp(CPUX86State *env)
void helper_rdpmc(CPUX86State *env)
{
- if ((env->cr[4] & CR4_PCE_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
+ if (((env->cr[4] & CR4_PCE_MASK) == 0 ) &&
+ ((env->hflags & HF_CPL_MASK) != 0)) {
raise_exception_ra(env, EXCP0D_GPF, GETPC());
}
cpu_svm_check_intercept_param(env, SVM_EXIT_RDPMC, 0, GETPC());
--
2.27.0
next reply other threads:[~2021-02-25 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 5:47 Zheng Zhan Liang [this message]
2021-02-25 10:07 ` [PATCH] tcg/i386: rdpmc: use the the condtions Paolo Bonzini
2021-02-25 10:13 ` Philippe Mathieu-Daudé
2021-02-25 12:15 ` Paolo Bonzini
2021-02-25 15:47 ` no-reply
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=20210225054756.35962-1-linuxmaker@163.com \
--to=linuxmaker@163.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).