From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerone Young Subject: [PATCH] Remove unoptimal code from qemu dcr handles for powerpc Date: Mon, 28 Jan 2008 23:38:14 -0600 Message-ID: <34d726145a8ee9d58a45.1201585094@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org # HG changeset patch # User Jerone Young # 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 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/