[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/6] KVM: Move and rename regs_modified
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 5/6] KVM: Move and rename regs_modified |
Date: |
Wed, 3 Feb 2010 21:55:50 -0200 |
From: Jan Kiszka <address@hidden>
Touching the user space representation of KVM's VCPU state is -
naturally - a per-VCPU thing. So move the dirty flag into KVM_CPU_COMMON
and rename it at this chance to reflect its true meaning.
Signed-off-by: Jan Kiszka <address@hidden>
---
cpu-defs.h | 3 ++-
kvm-all.c | 13 ++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/cpu-defs.h b/cpu-defs.h
index 95068b5..7fdbe97 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -197,6 +197,7 @@ typedef struct CPUWatchpoint {
const char *cpu_model_str; \
struct KVMState *kvm_state; \
struct kvm_run *kvm_run; \
- int kvm_fd;
+ int kvm_fd; \
+ int kvm_vcpu_dirty;
#endif
diff --git a/kvm-all.c b/kvm-all.c
index f8350c9..6c0fd37 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -57,7 +57,6 @@ struct KVMState
KVMSlot slots[32];
int fd;
int vmfd;
- int regs_modified;
int coalesced_mmio;
#ifdef KVM_CAP_COALESCED_MMIO
struct kvm_coalesced_mmio_ring *coalesced_mmio_ring;
@@ -574,9 +573,9 @@ void kvm_flush_coalesced_mmio_buffer(void)
void kvm_cpu_synchronize_state(CPUState *env)
{
- if (!env->kvm_state->regs_modified) {
+ if (!env->kvm_vcpu_dirty) {
kvm_arch_get_registers(env);
- env->kvm_state->regs_modified = 1;
+ env->kvm_vcpu_dirty = 1;
}
}
@@ -594,9 +593,9 @@ int kvm_cpu_exec(CPUState *env)
break;
}
- if (env->kvm_state->regs_modified) {
+ if (env->kvm_vcpu_dirty) {
kvm_arch_put_registers(env);
- env->kvm_state->regs_modified = 0;
+ env->kvm_vcpu_dirty = 0;
}
kvm_arch_pre_run(env, run);
@@ -946,9 +945,9 @@ static void kvm_invoke_set_guest_debug(void *data)
struct kvm_set_guest_debug_data *dbg_data = data;
CPUState *env = dbg_data->env;
- if (env->kvm_state->regs_modified) {
+ if (env->kvm_vcpu_dirty) {
kvm_arch_put_registers(env);
- env->kvm_state->regs_modified = 0;
+ env->kvm_vcpu_dirty = 0;
}
dbg_data->err = kvm_vcpu_ioctl(env, KVM_SET_GUEST_DEBUG, &dbg_data->dbg);
}
--
1.6.6
- [Qemu-devel] [PATCH 0/6] [GIT PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 2/6] KVM: Request setting of nmi_pending and sipi_vector, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 4/6] KVM: Make vmport KVM-compatible, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 5/6] KVM: Move and rename regs_modified,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 3/6] KVM: x86: Fix up misreported CPU features, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 6/6] Fix incoming migration with iothread, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 1/6] kvm: Flush coalesced MMIO buffer periodly, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] Re: [PATCH 0/6] [GIT PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/02/08