qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread
Date: Wed, 10 Feb 2010 13:28:56 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 02/04/2010 08:46 AM, Amit Shah wrote:
We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else
cases. Fix that.

Signed-off-by: Amit Shah<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori
---
  kvm-all.c |    9 +++------
  1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 15ec38e..a2bd78e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -901,14 +901,11 @@ void kvm_setup_guest_memory(void *start, size_t size)
  static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
  {
  #ifdef CONFIG_IOTHREAD
-    if (env == cpu_single_env) {
-        func(data);
-        return;
+    if (env != cpu_single_env) {
+        abort();
      }
-    abort();
-#else
-    func(data);
  #endif
+    func(data);
  }

  struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]