summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-09-22 17:51:51 +0300
committerAvi Kivity <avi@redhat.com>2009-09-23 11:59:39 +0300
commit798188cbc00808d5d6574b7eaf2978f369ce0df1 (patch)
tree6305bf86280affceaf234d4a79380795cbac4ad1 /qemu-kvm-x86.c
parenttest: Auto-tune vmexit test (diff)
downloadqemu-kvm-798188cbc00808d5d6574b7eaf2978f369ce0df1.tar.gz
qemu-kvm-798188cbc00808d5d6574b7eaf2978f369ce0df1.tar.bz2
qemu-kvm-798188cbc00808d5d6574b7eaf2978f369ce0df1.zip
Don't call kvm_cpu_synchronize_state() if there is no irqchip events to process
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r--qemu-kvm-x86.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 32561f0c9..acb1b919a 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1673,9 +1673,12 @@ uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function,
void kvm_arch_process_irqchip_events(CPUState *env)
{
- kvm_cpu_synchronize_state(env);
- if (env->interrupt_request & CPU_INTERRUPT_INIT)
+ if (env->interrupt_request & CPU_INTERRUPT_INIT) {
+ kvm_cpu_synchronize_state(env);
do_cpu_init(env);
- if (env->interrupt_request & CPU_INTERRUPT_SIPI)
+ }
+ if (env->interrupt_request & CPU_INTERRUPT_SIPI) {
+ kvm_cpu_synchronize_state(env);
do_cpu_sipi(env);
+ }
}