public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 7/7] kvm-tpr-opt: rename env->update_vapic
Date: Mon, 08 Mar 2010 21:47:11 -0300	[thread overview]
Message-ID: <20100309004834.908684791@redhat.com> (raw)
In-Reply-To: 20100309004704.049355766@redhat.com

[-- Attachment #1: rename-update-vapic --]
[-- Type: text/plain, Size: 1934 bytes --]

And remove the confusingly named enable_vapic function.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-kvm-tpr/kvm-tpr-opt.c
===================================================================
--- qemu-kvm-tpr.orig/kvm-tpr-opt.c
+++ qemu-kvm-tpr/kvm-tpr-opt.c
@@ -226,17 +226,11 @@ int kvm_tpr_enable_vapic(CPUState *env)
 
     kvm_enable_vapic(env, vapic_phys + (pcr_cpu << 7));
     cpu_physical_memory_rw(vapic_phys + (pcr_cpu << 7) + 4, &one, 1, 1);
-    env->update_vapic = 0;
+    env->kvm_vcpu_update_vapic = 0;
     bios_enabled = 1;
     return 1;
 }
 
-static int enable_vapic(CPUState *env)
-{
-    env->update_vapic = 1;
-    return 1;
-}
-
 static void patch_call(CPUState *env, uint64_t rip, uint32_t target)
 {
     uint32_t offset;
@@ -334,7 +328,7 @@ static int tpr_load(QEMUFile *f, void *s
         CPUState *env = first_cpu->next_cpu;
 
         for (env = first_cpu; env != NULL; env = env->next_cpu)
-            enable_vapic(env);
+            env->kvm_vcpu_update_vapic = 1;
     }
 
     return 0;
Index: qemu-kvm-tpr/qemu-kvm-x86.c
===================================================================
--- qemu-kvm-tpr.orig/qemu-kvm-x86.c
+++ qemu-kvm-tpr/qemu-kvm-x86.c
@@ -971,7 +971,7 @@ void kvm_arch_load_regs(CPUState *env, i
         kvm_load_lapic(env);
     }
     if (level == KVM_PUT_FULL_STATE) {
-        if (env->update_vapic)
+        if (env->kvm_vcpu_update_vapic)
             kvm_tpr_enable_vapic(env);
     }
     if (kvm_irqchip_in_kernel()) {
Index: qemu-kvm-tpr/target-i386/cpu.h
===================================================================
--- qemu-kvm-tpr.orig/target-i386/cpu.h
+++ qemu-kvm-tpr/target-i386/cpu.h
@@ -735,7 +735,7 @@ typedef struct CPUX86State {
     uint16_t fptag_vmstate;
     uint16_t fpregs_format_vmstate;
 
-    int update_vapic;
+    int kvm_vcpu_update_vapic;
 } CPUX86State;
 
 CPUX86State *cpu_x86_init(const char *cpu_model);



  parent reply	other threads:[~2010-03-09  0:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  0:47 [patch 0/7] kvm-tpr-opt cleanups Marcelo Tosatti
2010-03-09  0:47 ` [patch 1/7] qemu-kvm: move vapic enablement to kvm_arch_load_regs Marcelo Tosatti
2010-03-09  0:47 ` [patch 2/7] kvm-tpr-opt: use device_init Marcelo Tosatti
2010-03-09  0:47 ` [patch 3/7] kvm-tpr-opt: qemu-kvm.h -> kvm.h Marcelo Tosatti
2010-03-09  0:47 ` [patch 4/7] kvm-tpr-opt: clean up usage of bios_enabled Marcelo Tosatti
2010-03-09  0:47 ` [patch 5/7] kvm-tpr-opt: remove dead code Marcelo Tosatti
2010-03-09  0:47 ` [patch 6/7] kvm-tpr-opt: replace kvm_get_{s,r}egs usage with cpu_synchronize_state Marcelo Tosatti
2010-03-09  0:47 ` Marcelo Tosatti [this message]
2010-03-09 13:18 ` [patch 0/7] kvm-tpr-opt cleanups 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=20100309004834.908684791@redhat.com \
    --to=mtosatti@redhat.com \
    --cc=kvm@vger.kernel.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