public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] Remove unoptimal code from qemu dcr handles for powerpc
Date: Mon, 28 Jan 2008 23:38:14 -0600	[thread overview]
Message-ID: <34d726145a8ee9d58a45.1201585094@thinkpad> (raw)

# HG changeset patch
# User Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
# 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 <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

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/

             reply	other threads:[~2008-01-29  5:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29  5:38 Jerone Young [this message]
2008-01-29 17:03 ` [PATCH] Remove unoptimal code from qemu dcr handles for powerpc Hollis Blanchard
2008-02-10 11:25   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34d726145a8ee9d58a45.1201585094@thinkpad \
    --to=jyoung5-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox