Skip to contentSkip to conversation

Add powerpc dcr callbacks to kvm callback structrure

PATCH In review Jerone Young 3 participants 4 messages Jan 2, 2008 – Jan 3, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add powerpc dcr callbacks to kvm callback structrure

# HG changeset patch
# User Jerone Young <jyoung5-r/[email protected]> # Date 1199305658 21600
# Node ID bf828ac70dde1dfa4f67e4774a884669306423e6
# Parent 8161d444f7c37be9bdbfaac338d58301b00f2961
Add powerpc dcr callbacks to kvm callback structrure

This patch adds dcr call back function to the kvm callback structure for powerpc.

This patch accidently was not submitted with the last patch.

libkvm/libkvm.h +4 -0
@@ -65,6 +65,10 @@ struct kvm_callbacks {
     void (*post_kvm_run)(void *opaque, int vcpu);
     int (*pre_kvm_run)(void *opaque, int vcpu);
     int (*tpr_access)(void *opaque, int vcpu, uint64_t rip, int is_write);
+#if defined(__powerpc__)
+    int (*powerpc_dcr_read)(kvm_context_t kvm, uint32_t dcrn, uint32_t *data);
+    int (*powerpc_dcr_write)(kvm_context_t kvm, uint32_t dcrn, uint32_t data);
+#endif
 };
 
 /*!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#1 lore raw

What is the plan here, to ifdef the arch-specific callbacks? If so, 'tpr_access' is an obvious candidate...

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
Quoted 30 lines · Jerone Young

# HG changeset patch
# User Jerone Young <jyoung5-r/[email protected]> # Date 1199305658 21600
# Node ID bf828ac70dde1dfa4f67e4774a884669306423e6
# Parent 8161d444f7c37be9bdbfaac338d58301b00f2961
Add powerpc dcr callbacks to kvm callback structrure

This patch adds dcr call back function to the kvm callback structure for powerpc.

This patch accidently was not submitted with the last patch.

libkvm/libkvm.h +4 -1
@@ -65,6 +65,10 @@ struct kvm_callbacks {
     void (*post_kvm_run)(void *opaque, int vcpu);
     int (*pre_kvm_run)(void *opaque, int vcpu);
     int (*tpr_access)(void *opaque, int vcpu, uint64_t rip, int is_write);
+#if defined(__powerpc__)
+    int (*powerpc_dcr_read)(kvm_context_t kvm, uint32_t dcrn, uint32_t *data);
+    int (*powerpc_dcr_write)(kvm_context_t kvm, uint32_t dcrn, uint32_t data);
+#endif
 };
 
 /*!
 
-------------------------------------------------------------------------
Quoted 7 lines

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#2 lore raw

That would be my sketchy idea. Though I was going to wait and see what the feedback would be doing this :-) It can go either way. Since it's just callbacks it really doesn't matter. But it does affect the structure size never the less.

So what are everyone thoughs about arch specific callbacks ?

Quoted 3 lines · Hollis Blanchard

What is the plan here, to ifdef the arch-specific callbacks? If so, 'tpr_access' is an obvious candidate...

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#3 lore raw
Quoted 7 lines · Jerone Young

That would be my sketchy idea. Though I was going to wait and see what the feedback would be doing this :-) It can go either way. Since it's just callbacks it really doesn't matter. But it does affect the structure size never the less.

So what are everyone thoughs about arch specific callbacks ?

#ifdefs are fine, if only for documenting which tla belongs to which arch. Actual runtime savings are probably negligible.

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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/