qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcg/i386: rdpmc: use the the condtions
@ 2021-02-25  5:47 Zheng Zhan Liang
  2021-02-25 10:07 ` Paolo Bonzini
  2021-02-25 15:47 ` no-reply
  0 siblings, 2 replies; 5+ messages in thread
From: Zheng Zhan Liang @ 2021-02-25  5:47 UTC (permalink / raw)
  Cc: open list:All patches CC here, Paolo Bonzini, Richard Henderson,
	Zheng Zhan Liang, Eduardo Habkost

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tcg/i386: rdpmc: use the the condtions
  2021-02-25  5:47 [PATCH] tcg/i386: rdpmc: use the the condtions Zheng Zhan Liang
@ 2021-02-25 10:07 ` Paolo Bonzini
  2021-02-25 10:13   ` Philippe Mathieu-Daudé
  2021-02-25 15:47 ` no-reply
  1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2021-02-25 10:07 UTC (permalink / raw)
  To: Zheng Zhan Liang
  Cc: Richard Henderson, Eduardo Habkost, open list:All patches CC here

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tcg/i386: rdpmc: use the the condtions
  2021-02-25 10:07 ` Paolo Bonzini
@ 2021-02-25 10:13   ` Philippe Mathieu-Daudé
  2021-02-25 12:15     ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-25 10:13 UTC (permalink / raw)
  To: Paolo Bonzini, Zheng Zhan Liang
  Cc: Richard Henderson, Eduardo Habkost, open list:All patches CC here

Hi Paolo,

On 2/25/21 11:07 AM, Paolo Bonzini wrote:
> 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.

Do you mind fixing the patch subject?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tcg/i386: rdpmc: use the the condtions
  2021-02-25 10:13   ` Philippe Mathieu-Daudé
@ 2021-02-25 12:15     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2021-02-25 12:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Zheng Zhan Liang
  Cc: Richard Henderson, Eduardo Habkost, open list:All patches CC here

On 25/02/21 11:13, Philippe Mathieu-Daudé wrote:
> Hi Paolo,
> 
> On 2/25/21 11:07 AM, Paolo Bonzini wrote:
>> 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.
> 
> Do you mind fixing the patch subject?

Yes, done already actually.  Thanks,

Paolo



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tcg/i386: rdpmc: use the the condtions
  2021-02-25  5:47 [PATCH] tcg/i386: rdpmc: use the the condtions Zheng Zhan Liang
  2021-02-25 10:07 ` Paolo Bonzini
@ 2021-02-25 15:47 ` no-reply
  1 sibling, 0 replies; 5+ messages in thread
From: no-reply @ 2021-02-25 15:47 UTC (permalink / raw)
  To: linuxmaker; +Cc: pbonzini, richard.henderson, qemu-devel, ehabkost, linuxmaker

Patchew URL: https://patchew.org/QEMU/20210225054756.35962-1-linuxmaker@163.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210225054756.35962-1-linuxmaker@163.com
Subject: [PATCH] tcg/i386: rdpmc: use the the condtions

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
895b8e7 tcg/i386: rdpmc: use the the condtions

=== OUTPUT BEGIN ===
ERROR: space prohibited before that close parenthesis ')'
#22: FILE: target/i386/tcg/misc_helper.c:225:
+    if (((env->cr[4] & CR4_PCE_MASK) == 0 ) &&

total: 1 errors, 0 warnings, 9 lines checked

Commit 895b8e71e307 (tcg/i386: rdpmc: use the the condtions) has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210225054756.35962-1-linuxmaker@163.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-25 15:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25  5:47 [PATCH] tcg/i386: rdpmc: use the the condtions Zheng Zhan Liang
2021-02-25 10:07 ` Paolo Bonzini
2021-02-25 10:13   ` Philippe Mathieu-Daudé
2021-02-25 12:15     ` Paolo Bonzini
2021-02-25 15:47 ` no-reply

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).