Skip to contentSkip to conversation

KVM: PPC: E500 compile fix

PATCH Applied Alexander Graf 7 participants 10 messages Jan 10, 2010 – Mar 26, 2010 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: E500 compile fix

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

---
 arch/powerpc/kvm/e500_tlb.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/powerpc/kvm/e500_tlb.c +3 -0
index 6a7fc01..99a830b 100644
@@ -225,8 +225,11 @@ static void kvmppc_e500_stlbe_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
 
 	kvmppc_e500_shadow_release(vcpu_e500, tlbsel, esel);
 	stlbe->mas1 = 0;
+	/* XXX doesn't compile */
+#if 0
 	trace_kvm_stlb_inval(index_of(tlbsel, esel), stlbe->mas1, stlbe->mas2,
 			     stlbe->mas3, stlbe->mas7);
+#endif
 }
 
 static void kvmppc_e500_tlb1_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
Signature · 1 line
1.6.0.2
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Alexander Graf [mailto:[email protected]]
Sent: Monday, January 11, 2010 1:02 AM
To: [email protected]
Cc: kvm-ppc; Liu Yu-B13201
Subject: [PATCH] KVM: PPC: E500 compile fix

While trying to compile an E500 vmlinux, I stumbled across a compilation bug
that was obviously there before I touched any of the code. A trace point
doesn't get the correct arguments.

Quoted 8 lines

Since that shouldn't be any critical to the functionality of the code, my quick
workaround is to #if 0 it out. I would very much appreciate someone fixing it
properly though.

Liu, it would be nice if you could be the one doing that.

Hrr...
I sent it before, but the whole series is blocked.
http://marc.info/?l=kvm-ppc&m4929800623835&w=2

Anyway the series needs to be resent, since there's a lot changes.

Thanks for doing this for me!

#3 lore raw
In reply to a message not in the archive
Quoted 21 lines · On 11.01.2010, at 08:05, Liu Yu-B13201 wrote:
Quoted 21 lines

-----Original Message-----
From: Alexander Graf [mailto:[email protected]]
Sent: Monday, January 11, 2010 1:02 AM
To: [email protected]
Cc: kvm-ppc; Liu Yu-B13201
Subject: [PATCH] KVM: PPC: E500 compile fix

While trying to compile an E500 vmlinux, I stumbled across a compilation bug
that was obviously there before I touched any of the code. A trace point
doesn't get the correct arguments.

Since that shouldn't be any critical to the functionality of the code, my quick
workaround is to #if 0 it out. I would very much appreciate someone fixing it
properly though.

Quoted 8 lines
Quoted 2 lines

Liu, it would be nice if you could be the one doing that.

Hrr...
I sent it before, but the whole series is blocked.
http://marc.info/?l=kvm-ppc&m=124929800623835&w=2

Anyway the series needs to be resent, since there's a lot changes.

What did it block on? Please rebase and resend - the more working targets we have on KVM the better :).

Alex

Applied
#4 lore raw
In reply to Alexander Graf
Quoted 10 lines · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function
#5 lore raw
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Quoted 8 lines
Quoted 6 lines

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

Applied, thanks.

Hi Avi,

Seems the problem still exists in the mainline kernel. Are you guys miss something in the past few months? Does it means even if I passed compile phase with the '#if 0' workaround, it's functions are not completed yet. So its impossible to try kvm on ppc e500 target?

Thanks,
-bm

Quoted 8 lines
Signature · 7 lines
-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw
Quoted 13 lines · Bruce Majia
Quoted 12 lines · Avi Kivity
Quoted 10 lines · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

Quoted 8 lines
Quoted 1 line

Applied, thanks.

Hi Avi,

Seems the problem still exists in the mainline kernel. Are you guys miss something in the past few months? Does it means even if I passed compile phase with the '#if 0' workaround, it's functions are not completed yet. So its impossible to try kvm on ppc e500 target?

If #if 0 only affects you if you want to trace that specific function. It's probably safe to say you don't care, so just #if 0 it out and be good :-).

Alex

#8 lore raw
In reply to a message not in the archive
Quoted 36 lines

-----Original Message-----
From: Alexander Graf [mailto:[email protected]]
Sent: Friday, March 26, 2010 5:10 PM
To: Bruce Majia
Cc: Avi Kivity; [email protected]; kvm-ppc; Liu Yu-B13201
Subject: Re: [PATCH] KVM: PPC: E500 compile fix

Quoted 3 lines · Bruce Majia
Quoted 2 lines · Avi Kivity
Quoted 1 line · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled

across a compilation bug

Quoted 1 line
Quoted 1 line
Quoted 1 line

that was obviously there before I touched any of the

code. A trace point

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

doesn't get the correct arguments.

Since that shouldn't be any critical to the functionality

of the code, my quick

Quoted 1 line
Quoted 1 line
Quoted 1 line

workaround is to #if 0 it out. I would very much

appreciate someone fixing it

Quoted 10 lines
Quoted 6 lines
Quoted 4 lines

properly though.

Liu, it would be nice if you could be the one doing that.

Applied, thanks.

Hi Avi,

Seems the problem still exists in the mainline kernel. Are

you guys miss

Quoted 1 line

something in the past few months? Does it means even if I

Quoted 9 lines

passed compile

Quoted 1 line

phase with the '#if 0' workaround, it's functions are not

completed yet.

Quoted 1 line

So its impossible to try kvm on ppc e500 target?

If #if 0 only affects you if you want to trace that specific function. It's probably safe to say you don't care, so just #if 0 it out and be good :-).

The trace info here is not that important.
And will be removed in future patches...

#9 lore raw
In reply to a message not in the archive
Quoted 20 lines · Alexander Graf
Quoted 17 lines · Bruce Majia
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Quoted 8 lines
Quoted 6 lines

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

Applied, thanks.

Hi Avi,

Quoted 8 lines
Quoted 4 lines

Seems the problem still exists in the mainline kernel. Are you guys miss something in the past few months? Does it means even if I passed compile phase with the '#if 0' workaround, it's functions are not completed yet. So its impossible to try kvm on ppc e500 target?

If #if 0 only affects you if you want to trace that specific function. It's probably safe to say you don't care, so just #if 0 it out and be good :-).

Alex

I'd like to say I am okay with #if 0 stuff. :) But fail to have the source code compiled is bad. Based on latest linus tree, I have to apply following stuff to make KVM + mpc85xx_defconfig pass build phase:

---
 arch/powerpc/kvm/booke.c    |    2 +-
 arch/powerpc/kvm/e500_tlb.c |    2 ++
 arch/powerpc/kvm/powerpc.c  |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kvm/booke.c +1 -1
index 4d686cc..0cde83b 100644
@@ -137,7 +137,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
                                         unsigned int priority)
 {
 	int allowed = 0;
-	ulong msr_mask;
+	ulong msr_mask = 0;
 	bool update_esr = false, update_dear = false;
 
 	switch (priority) {
arch/powerpc/kvm/e500_tlb.c +2 -0
index 0d772e6..c52e8c2 100644
@@ -225,8 +225,10 @@ static void kvmppc_e500_stlbe_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
 
 	kvmppc_e500_shadow_release(vcpu_e500, tlbsel, esel);
 	stlbe->mas1 = 0;
+#if 0
 	trace_kvm_stlb_inval(index_of(tlbsel, esel), stlbe->mas1, stlbe->mas2,
 			     stlbe->mas3, stlbe->mas7);
+#endif
 }
 
 static void kvmppc_e500_tlb1_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
arch/powerpc/kvm/powerpc.c +1 -1
index 51aedd7..372b678 100644
@@ -277,7 +277,7 @@ static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu,
 static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
                                       struct kvm_run *run)
 {
-	ulong gpr;
+	ulong gpr = 0;
 
 	if (run->mmio.len > sizeof(gpr)) {
 		printk(KERN_ERR "bad MMIO length: %d\n", run->mmio.len);
Signature · 4 lines
Do we need a *temporary* patch for the situation?

Regards,
-bm
#10 lore raw
Quoted 45 lines · Bruce Majia
Quoted 20 lines · Alexander Graf
Quoted 17 lines · Bruce Majia
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Quoted 8 lines
Quoted 6 lines

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

Applied, thanks.

Hi Avi,

Quoted 8 lines
Quoted 4 lines

Seems the problem still exists in the mainline kernel. Are you guys miss something in the past few months? Does it means even if I passed compile phase with the '#if 0' workaround, it's functions are not completed yet. So its impossible to try kvm on ppc e500 target?

If #if 0 only affects you if you want to trace that specific function. It's probably safe to say you don't care, so just #if 0 it out and be good :-).

Alex

I'd like to say I am okay with #if 0 stuff. :) But fail to have the source code compiled is bad. Based on latest linus tree, I have to apply following stuff to make KVM + mpc85xx_defconfig pass build phase:

---

arch/powerpc/kvm/booke.c    |    2 +-
arch/powerpc/kvm/e500_tlb.c |    2 ++
arch/powerpc/kvm/powerpc.c  |    2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kvm/booke.c +0 -0
index 4d686cc..0cde83b 100644

arch/powerpc/kvm/booke.c static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, · line 140

Quoted 5 lines
arch/powerpc/kvm/booke.c +1 -1
@@ -137,7 +137,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
                                        unsigned int priority)
 {
 	int allowed = 0;
-	ulong msr_mask;
+	ulong msr_mask = 0;

This is a real bug.

Quoted 8 lines
arch/powerpc/kvm/booke.c +0 -0
 	bool update_esr = false, update_dear = false;
 
 	switch (priority) {
arch/powerpc/kvm/e500_tlb.c +0 -0
index 0d772e6..c52e8c2 100644

arch/powerpc/kvm/e500_tlb.c static void kvmppc_e500_stlbe_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500, · line 231

Quoted 7 lines
arch/powerpc/kvm/e500_tlb.c +2 -0
@@ -225,8 +225,10 @@ static void kvmppc_e500_stlbe_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
 
 	kvmppc_e500_shadow_release(vcpu_e500, tlbsel, esel);
 	stlbe->mas1 = 0;
+#if 0
 	trace_kvm_stlb_inval(index_of(tlbsel, esel), stlbe->mas1, stlbe->mas2,
 			     stlbe->mas3, stlbe->mas7);
+#endif

Avi, please make sure e43f2f741a49483034bf968841275cfa553a4cb3 gets into 2.6.34.

arch/powerpc/kvm/powerpc.c static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu, · line 280

Quoted 13 lines
arch/powerpc/kvm/e500_tlb.c +0 -0
 }
 
 static void kvmppc_e500_tlb1_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
arch/powerpc/kvm/powerpc.c +1 -1
index 51aedd7..372b678 100644
@@ -277,7 +277,7 @@ static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu,
 static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
                                      struct kvm_run *run)
 {
-	ulong gpr;
+	ulong gpr = 0;

This is a bug, but should never hit anyone. Either way having warnings is bad.

Bruce, please put the two not initialized variables in a patch, put a proper Signed-off-by with patch description in and submit it to kvm-ppc@vger and kvm@vger. I'll ack it then, but would like to keep the credits to you :)

Alex--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
In reply to a message not in the archive
Quoted 65 lines · Alexander Graf
Quoted 45 lines · Bruce Majia
Quoted 20 lines · Alexander Graf
Quoted 17 lines · Bruce Majia
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Alexander Graf

While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code. A trace point doesn't get the correct arguments.

Quoted 8 lines
Quoted 6 lines

Since that shouldn't be any critical to the functionality of the code, my quick workaround is to #if 0 it out. I would very much appreciate someone fixing it properly though.

Liu, it would be nice if you could be the one doing that.

Applied, thanks.

Hi Avi,

Quoted 8 lines
Quoted 4 lines

Seems the problem still exists in the mainline kernel. Are you guys miss something in the past few months? Does it means even if I passed compile phase with the '#if 0' workaround, it's functions are not completed yet. So its impossible to try kvm on ppc e500 target?

If #if 0 only affects you if you want to trace that specific function. It's probably safe to say you don't care, so just #if 0 it out and be good :-).

Alex

I'd like to say I am okay with #if 0 stuff. :) But fail to have the source code compiled is bad. Based on latest linus tree, I have to apply following stuff to make KVM + mpc85xx_defconfig pass build phase:

---

arch/powerpc/kvm/booke.c    |    2 +-
arch/powerpc/kvm/e500_tlb.c |    2 ++
arch/powerpc/kvm/powerpc.c  |    2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kvm/booke.c +0 -0
index 4d686cc..0cde83b 100644

arch/powerpc/kvm/booke.c static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, · line 140

Quoted 5 lines
arch/powerpc/kvm/booke.c +1 -1
@@ -137,7 +137,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
                                        unsigned int priority)
 {
 	int allowed = 0;
-	ulong msr_mask;
+	ulong msr_mask = 0;

This is a real bug.

Quoted 9 lines
arch/powerpc/kvm/booke.c +0 -0
 	bool update_esr = false, update_dear = false;
 
 	switch (priority) {
arch/powerpc/kvm/e500_tlb.c +0 -0
index 0d772e6..c52e8c2 100644
@@ -225,8 +225,10 @@ static void kvmppc_e500_stlbe_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
 
Quoted 9 lines

arch/powerpc/kvm/e500_tlb.c static void kvmppc_e500_stlbe_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500, · line 231

Quoted 6 lines
arch/powerpc/kvm/e500_tlb.c +2 -0
 	kvmppc_e500_shadow_release(vcpu_e500, tlbsel, esel);
 	stlbe->mas1 = 0;
+#if 0
 	trace_kvm_stlb_inval(index_of(tlbsel, esel), stlbe->mas1, stlbe->mas2,
 			     stlbe->mas3, stlbe->mas7);
+#endif

Avi, please make sure e43f2f741a49483034bf968841275cfa553a4cb3 gets into 2.6.34.

Yeah, thanks very much. I got it:

$ git branch -a --contains=e43f2f741a49483034bf968841275cfa553a4cb3
remotes/kvm/master
remotes/kvm/msr-trace
remotes/kvm/next
Quoted 18 lines
Quoted 9 lines
arch/powerpc/kvm/e500_tlb.c +0 -0
 }
 
 static void kvmppc_e500_tlb1_invalidate(struct kvmppc_vcpu_e500 *vcpu_e500,
arch/powerpc/kvm/powerpc.c +0 -0
index 51aedd7..372b678 100644

arch/powerpc/kvm/powerpc.c static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu, · line 280

Quoted 5 lines
arch/powerpc/kvm/powerpc.c +1 -1
@@ -277,7 +277,7 @@ static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu,
 static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
                                      struct kvm_run *run)
 {
-	ulong gpr;
+	ulong gpr = 0;

This is a bug, but should never hit anyone. Either way having warnings is bad.

Quoted 1 line

Bruce, please put the two not initialized variables in a patch, put a proper Signed-off-by with patch description in and submit it to kvm-ppc@vger and kvm@vger. I'll ack it then, but would like to keep the credits to you :)

Got it, Will send it soon.

-bm

Quoted 3 lines

Alex