# HG changeset patch
# User Jerone Young <[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.

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>

diff --git a/qemu/qemu-kvm-powerpc.c b/qemu/qemu-kvm-powerpc.c
--- a/qemu/qemu-kvm-powerpc.c
+++ b/qemu/qemu-kvm-powerpc.c
@@ -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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to