Skip to contentSkip to conversation

Remove unoptimal code from qemu dcr handles for powerpc

PATCH In review Jerone Young 3 participants 3 messages Jan 29, 2008 – Feb 10, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unoptimal code from qemu dcr handles for powerpc

# HG changeset patch
# User Jerone Young <jyoung5-r/[email protected]> # Date 1201585078 21600
# Node ID 34d726145a8ee9d58a4573473e861db2ad695c37
# Parent a568d031723942e1baf77077031d2b77795cbd8a
Remove unoptimal code from qemu dcr handles for powerpc

A patch I submitted yesterday to use the call qemu_kvm_cpu_env() in the dcr handles is not needed since in kvm_arch_post_kvm_run variable cpu_single_env is set to env. So just use cpu_single_env to get env.

qemu/qemu-kvm-powerpc.c +2 -2
@@ -182,14 +182,14 @@ void kvm_arch_update_regs_for_sipi(CPUSt
 /* map dcr access to existing qemu dcr emulation */
 int handle_powerpc_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data)
 {
-    CPUState *env = qemu_kvm_cpu_env(vcpu);
+    CPUState *env = cpu_single_env;
     ppc_dcr_read(env->dcr_env, dcrn, data);
     return 0; /* XXX ignore failed DCR ops */
 }
 
 int handle_powerpc_dcr_write(int vcpu, uint32_t dcrn, uint32_t data)
 {
-    CPUState *env = qemu_kvm_cpu_env(vcpu);
+    CPUState *env = cpu_single_env;
     ppc_dcr_write(env->dcr_env, dcrn, data);
     return 0; /* XXX ignore failed DCR ops */
 }

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

#1 lore raw
Quoted 5 lines · Jerone Young

A patch I submitted yesterday to use the call qemu_kvm_cpu_env() in the dcr handles is not needed since in kvm_arch_post_kvm_run variable cpu_single_env is set to env. So just use cpu_single_env to get env.

Signature · 8 lines
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
#2 lore raw
Quoted 12 lines · Hollis Blanchard
Quoted 6 lines · Jerone Young

A patch I submitted yesterday to use the call qemu_kvm_cpu_env() in the dcr handles is not needed since in kvm_arch_post_kvm_run variable cpu_single_env is set to env. So just use cpu_single_env to get env.

Please use the DCO only when passing through (and possibly modifying) patches. Otherwise an Acked-by is more appropriate.

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 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/