qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 17/22] kvm: Move irqchip event processing out of


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH 17/22] kvm: Move irqchip event processing out of inner loop
Date: Mon, 31 Jan 2011 12:08:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7

On 01/27/2011 03:10 PM, Jan Kiszka wrote:
Align with qemu-kvm and prepare for IO exit fix: There is no need to run
kvm_arch_process_irqchip_events in the inner VCPU loop. Any state change
this service processes will first cause an exit from kvm_cpu_exec
anyway. And we will have to reenter the kernel on IO exits
unconditionally, something that the current logic prevents.

Signed-off-by: Jan Kiszka<address@hidden>
---
  kvm-all.c |   11 ++++++-----
  1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 5bfa8c0..46ecc1c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -892,6 +892,12 @@ int kvm_cpu_exec(CPUState *env)

      DPRINTF("kvm_cpu_exec()\n");

+    if (kvm_arch_process_irqchip_events(env)) {
+        env->exit_request = 0;
+        env->exception_index = EXCP_HLT;
+        return 0;
+    }
+
      do {
  #ifndef CONFIG_IOTHREAD
          if (env->exit_request) {
@@ -901,11 +907,6 @@ int kvm_cpu_exec(CPUState *env)
          }

We check for ->exit_request here

  #endif

-        if (kvm_arch_process_irqchip_events(env)) {
-            ret = 0;
-            break;
-        }
-

But this checks for ->interrupt_request. What ensures that we exit when ->interrupt_request is set?

          if (env->kvm_vcpu_dirty) {
              kvm_arch_put_registers(env, KVM_PUT_RUNTIME_STATE);
              env->kvm_vcpu_dirty = 0;


--
error compiling committee.c: too many arguments to function




reply via email to

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