qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tcg/i386: rdpmc: use the the condtions


From: Paolo Bonzini
Subject: Re: [PATCH] tcg/i386: rdpmc: use the the condtions
Date: Thu, 25 Feb 2021 11:07:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 25/02/21 06:47, Zheng Zhan Liang wrote:
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());


Queued, thanks.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]