linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Fix lapic.c debug prints
@ 2014-06-29  9:28 Nadav Amit
  2014-06-30  0:48 ` Bandan Das
  0 siblings, 1 reply; 7+ messages in thread
From: Nadav Amit @ 2014-06-29  9:28 UTC (permalink / raw)
  To: pbonzini; +Cc: gleb, tglx, mingo, x86, kvm, linux-kernel, Nadav Amit

In two cases lapic.c does not use the apic_debug macro correctly. This patch
fixes them.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
---
 arch/x86/kvm/lapic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 0069118..3855103 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1451,7 +1451,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu)
 	vcpu->arch.apic_arb_prio = 0;
 	vcpu->arch.apic_attention = 0;
 
-	apic_debug(KERN_INFO "%s: vcpu=%p, id=%d, base_msr="
+	apic_debug("%s: vcpu=%p, id=%d, base_msr="
 		   "0x%016" PRIx64 ", base_address=0x%0lx.\n", __func__,
 		   vcpu, kvm_apic_id(apic),
 		   vcpu->arch.apic_base, apic->base_address);
@@ -1895,7 +1895,7 @@ void kvm_apic_accept_events(struct kvm_vcpu *vcpu)
 		/* evaluate pending_events before reading the vector */
 		smp_rmb();
 		sipi_vector = apic->sipi_vector;
-		pr_debug("vcpu %d received sipi with vector # %x\n",
+		apic_debug("vcpu %d received sipi with vector # %x\n",
 			 vcpu->vcpu_id, sipi_vector);
 		kvm_vcpu_deliver_sipi_vector(vcpu, sipi_vector);
 		vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
-- 
1.9.1


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

* Re: [PATCH] KVM: x86: Fix lapic.c debug prints
  2014-06-29  9:28 [PATCH] KVM: x86: Fix lapic.c debug prints Nadav Amit
@ 2014-06-30  0:48 ` Bandan Das
  2014-06-30  1:03   ` Nadav Amit
  0 siblings, 1 reply; 7+ messages in thread
From: Bandan Das @ 2014-06-30  0:48 UTC (permalink / raw)
  To: Nadav Amit; +Cc: pbonzini, gleb, tglx, mingo, x86, kvm, linux-kernel

Nadav Amit <namit@cs.technion.ac.il> writes:

> In two cases lapic.c does not use the apic_debug macro correctly. This patch
> fixes them.
>
> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
> ---
>  arch/x86/kvm/lapic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 0069118..3855103 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1451,7 +1451,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu)
>  	vcpu->arch.apic_arb_prio = 0;
>  	vcpu->arch.apic_attention = 0;
>  
> -	apic_debug(KERN_INFO "%s: vcpu=%p, id=%d, base_msr="
> +	apic_debug("%s: vcpu=%p, id=%d, base_msr="
>  		   "0x%016" PRIx64 ", base_address=0x%0lx.\n", __func__,
>  		   vcpu, kvm_apic_id(apic),
>  		   vcpu->arch.apic_base, apic->base_address);
> @@ -1895,7 +1895,7 @@ void kvm_apic_accept_events(struct kvm_vcpu *vcpu)
>  		/* evaluate pending_events before reading the vector */
>  		smp_rmb();
>  		sipi_vector = apic->sipi_vector;
> -		pr_debug("vcpu %d received sipi with vector # %x\n",
> +		apic_debug("vcpu %d received sipi with vector # %x\n",

Why don't we just use pr_debug all throughout ?

>  			 vcpu->vcpu_id, sipi_vector);
>  		kvm_vcpu_deliver_sipi_vector(vcpu, sipi_vector);
>  		vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;

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

* Re: [PATCH] KVM: x86: Fix lapic.c debug prints
  2014-06-30  0:48 ` Bandan Das
@ 2014-06-30  1:03   ` Nadav Amit
  2014-06-30 12:12     ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Nadav Amit @ 2014-06-30  1:03 UTC (permalink / raw)
  To: Bandan Das, Nadav Amit
  Cc: pbonzini, gleb, tglx, mingo, x86, kvm, linux-kernel

On 6/30/14, 3:48 AM, Bandan Das wrote:
> Nadav Amit <namit@cs.technion.ac.il> writes:
>
>> In two cases lapic.c does not use the apic_debug macro correctly. This patch
>> fixes them.
>>
>> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
>> ---
>>   arch/x86/kvm/lapic.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
>> index 0069118..3855103 100644
>> --- a/arch/x86/kvm/lapic.c
>> +++ b/arch/x86/kvm/lapic.c
>> @@ -1451,7 +1451,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu)
>>   	vcpu->arch.apic_arb_prio = 0;
>>   	vcpu->arch.apic_attention = 0;
>>
>> -	apic_debug(KERN_INFO "%s: vcpu=%p, id=%d, base_msr="
>> +	apic_debug("%s: vcpu=%p, id=%d, base_msr="
>>   		   "0x%016" PRIx64 ", base_address=0x%0lx.\n", __func__,
>>   		   vcpu, kvm_apic_id(apic),
>>   		   vcpu->arch.apic_base, apic->base_address);
>> @@ -1895,7 +1895,7 @@ void kvm_apic_accept_events(struct kvm_vcpu *vcpu)
>>   		/* evaluate pending_events before reading the vector */
>>   		smp_rmb();
>>   		sipi_vector = apic->sipi_vector;
>> -		pr_debug("vcpu %d received sipi with vector # %x\n",
>> +		apic_debug("vcpu %d received sipi with vector # %x\n",
>
> Why don't we just use pr_debug all throughout ?
>
I don't know. I just tried to make it consistent, since it really bugged 
me while I was debugging the local-apic.
If you prefer the other way around (which does seem to be better), I can 
do the search-and-replace.

Nadav

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

* Re: [PATCH] KVM: x86: Fix lapic.c debug prints
  2014-06-30  1:03   ` Nadav Amit
@ 2014-06-30 12:12     ` Paolo Bonzini
  2014-06-30 17:39       ` Bandan Das
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2014-06-30 12:12 UTC (permalink / raw)
  To: Nadav Amit, Bandan Das, Nadav Amit
  Cc: gleb, tglx, mingo, x86, kvm, linux-kernel

Il 30/06/2014 03:03, Nadav Amit ha scritto:
>>>
>>>           sipi_vector = apic->sipi_vector;
>>> -        pr_debug("vcpu %d received sipi with vector # %x\n",
>>> +        apic_debug("vcpu %d received sipi with vector # %x\n",
>>
>> Why don't we just use pr_debug all throughout ?
>>
> I don't know. I just tried to make it consistent, since it really bugged
> me while I was debugging the local-apic.
> If you prefer the other way around (which does seem to be better), I can
> do the search-and-replace.

vcpu number probably could be moved inside apic_debug, at which point 
apic_debug becomes preferrable.

Paolo

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

* Re: [PATCH] KVM: x86: Fix lapic.c debug prints
  2014-06-30 12:12     ` Paolo Bonzini
@ 2014-06-30 17:39       ` Bandan Das
  2014-06-30 18:02         ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Bandan Das @ 2014-06-30 17:39 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Nadav Amit, Nadav Amit, gleb, tglx, mingo, x86, kvm, linux-kernel

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 30/06/2014 03:03, Nadav Amit ha scritto:
>>>>
>>>>           sipi_vector = apic->sipi_vector;
>>>> -        pr_debug("vcpu %d received sipi with vector # %x\n",
>>>> +        apic_debug("vcpu %d received sipi with vector # %x\n",
>>>
>>> Why don't we just use pr_debug all throughout ?
>>>
>> I don't know. I just tried to make it consistent, since it really bugged
>> me while I was debugging the local-apic.
>> If you prefer the other way around (which does seem to be better), I can
>> do the search-and-replace.
>
> vcpu number probably could be moved inside apic_debug, at which point
> apic_debug becomes preferrable.

I am not sure, I think all that could be achieved with a file private 
debug define can be done with pr_debug which is generic.
Nadav didn't introduce apic_debug to this file, so I am
fine either way.

> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] KVM: x86: Fix lapic.c debug prints
  2014-06-30 17:39       ` Bandan Das
@ 2014-06-30 18:02         ` Paolo Bonzini
  2014-06-30 18:07           ` Bandan Das
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2014-06-30 18:02 UTC (permalink / raw)
  To: Bandan Das
  Cc: Nadav Amit, Nadav Amit, gleb, tglx, mingo, x86, kvm, linux-kernel

Il 30/06/2014 19:39, Bandan Das ha scritto:
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> Il 30/06/2014 03:03, Nadav Amit ha scritto:
>>>>>
>>>>>           sipi_vector = apic->sipi_vector;
>>>>> -        pr_debug("vcpu %d received sipi with vector # %x\n",
>>>>> +        apic_debug("vcpu %d received sipi with vector # %x\n",
>>>>
>>>> Why don't we just use pr_debug all throughout ?
>>>>
>>> I don't know. I just tried to make it consistent, since it really bugged
>>> me while I was debugging the local-apic.
>>> If you prefer the other way around (which does seem to be better), I can
>>> do the search-and-replace.
>>
>> vcpu number probably could be moved inside apic_debug, at which point
>> apic_debug becomes preferrable.
>
> I am not sure, I think all that could be achieved with a file private
> debug define can be done with pr_debug which is generic.
> Nadav didn't introduce apic_debug to this file, so I am
> fine either way.

I am applying the patch, anything else can be done on top.

Paolo

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

* Re: [PATCH] KVM: x86: Fix lapic.c debug prints
  2014-06-30 18:02         ` Paolo Bonzini
@ 2014-06-30 18:07           ` Bandan Das
  0 siblings, 0 replies; 7+ messages in thread
From: Bandan Das @ 2014-06-30 18:07 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Nadav Amit, Nadav Amit, gleb, tglx, mingo, x86, kvm, linux-kernel

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 30/06/2014 19:39, Bandan Das ha scritto:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>
>>> Il 30/06/2014 03:03, Nadav Amit ha scritto:
>>>>>>
>>>>>>           sipi_vector = apic->sipi_vector;
>>>>>> -        pr_debug("vcpu %d received sipi with vector # %x\n",
>>>>>> +        apic_debug("vcpu %d received sipi with vector # %x\n",
>>>>>
>>>>> Why don't we just use pr_debug all throughout ?
>>>>>
>>>> I don't know. I just tried to make it consistent, since it really bugged
>>>> me while I was debugging the local-apic.
>>>> If you prefer the other way around (which does seem to be better), I can
>>>> do the search-and-replace.
>>>
>>> vcpu number probably could be moved inside apic_debug, at which point
>>> apic_debug becomes preferrable.
>>
>> I am not sure, I think all that could be achieved with a file private
>> debug define can be done with pr_debug which is generic.
>> Nadav didn't introduce apic_debug to this file, so I am
>> fine either way.
>
> I am applying the patch, anything else can be done on top.

Sure, it can but it's sure gonna get forgotten since you are 
already applying it :)

> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-06-30 18:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-29  9:28 [PATCH] KVM: x86: Fix lapic.c debug prints Nadav Amit
2014-06-30  0:48 ` Bandan Das
2014-06-30  1:03   ` Nadav Amit
2014-06-30 12:12     ` Paolo Bonzini
2014-06-30 17:39       ` Bandan Das
2014-06-30 18:02         ` Paolo Bonzini
2014-06-30 18:07           ` Bandan Das

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