aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorSergio Andres Gomez Del Real <sergio.g.delreal@gmail.com>2017-06-18 14:11:01 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-04 14:30:03 +0200
commit99f318322e7bf11a95149aa66d1758568dd53f8a (patch)
tree9c4183f9a59c102b2b74ca3226168c14835bd78f /accel
parent0c7a8b9baa744ae4323bb46cb4fe942355beaa85 (diff)
downloadqemu-99f318322e7bf11a95149aa66d1758568dd53f8a.zip
qemu-99f318322e7bf11a95149aa66d1758568dd53f8a.tar.gz
qemu-99f318322e7bf11a95149aa66d1758568dd53f8a.tar.bz2
vcpu_dirty: share the same field in CPUState for all accelerators
This patch simply replaces the separate boolean field in CPUState that kvm, hax (and upcoming hvf) have for keeping track of vcpu dirtiness with a single shared field. Signed-off-by: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com> Message-Id: <20170618191101.3457-1-Sergio.G.DelReal@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel')
-rw-r--r--accel/kvm/kvm-all.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 75feffa..cd71e28 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -318,7 +318,7 @@ int kvm_init_vcpu(CPUState *cpu)
cpu->kvm_fd = ret;
cpu->kvm_state = s;
- cpu->kvm_vcpu_dirty = true;
+ cpu->vcpu_dirty = true;
mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE, 0);
if (mmap_size < 0) {
@@ -1864,15 +1864,15 @@ void kvm_flush_coalesced_mmio_buffer(void)
static void do_kvm_cpu_synchronize_state(CPUState *cpu, run_on_cpu_data arg)
{
- if (!cpu->kvm_vcpu_dirty) {
+ if (!cpu->vcpu_dirty) {
kvm_arch_get_registers(cpu);
- cpu->kvm_vcpu_dirty = true;
+ cpu->vcpu_dirty = true;
}
}
void kvm_cpu_synchronize_state(CPUState *cpu)
{
- if (!cpu->kvm_vcpu_dirty) {
+ if (!cpu->vcpu_dirty) {
run_on_cpu(cpu, do_kvm_cpu_synchronize_state, RUN_ON_CPU_NULL);
}
}
@@ -1880,7 +1880,7 @@ void kvm_cpu_synchronize_state(CPUState *cpu)
static void do_kvm_cpu_synchronize_post_reset(CPUState *cpu, run_on_cpu_data arg)
{
kvm_arch_put_registers(cpu, KVM_PUT_RESET_STATE);
- cpu->kvm_vcpu_dirty = false;
+ cpu->vcpu_dirty = false;
}
void kvm_cpu_synchronize_post_reset(CPUState *cpu)
@@ -1891,7 +1891,7 @@ void kvm_cpu_synchronize_post_reset(CPUState *cpu)
static void do_kvm_cpu_synchronize_post_init(CPUState *cpu, run_on_cpu_data arg)
{
kvm_arch_put_registers(cpu, KVM_PUT_FULL_STATE);
- cpu->kvm_vcpu_dirty = false;
+ cpu->vcpu_dirty = false;
}
void kvm_cpu_synchronize_post_init(CPUState *cpu)
@@ -1901,7 +1901,7 @@ void kvm_cpu_synchronize_post_init(CPUState *cpu)
static void do_kvm_cpu_synchronize_pre_loadvm(CPUState *cpu, run_on_cpu_data arg)
{
- cpu->kvm_vcpu_dirty = true;
+ cpu->vcpu_dirty = true;
}
void kvm_cpu_synchronize_pre_loadvm(CPUState *cpu)
@@ -1982,9 +1982,9 @@ int kvm_cpu_exec(CPUState *cpu)
do {
MemTxAttrs attrs;
- if (cpu->kvm_vcpu_dirty) {
+ if (cpu->vcpu_dirty) {
kvm_arch_put_registers(cpu, KVM_PUT_RUNTIME_STATE);
- cpu->kvm_vcpu_dirty = false;
+ cpu->vcpu_dirty = false;
}
kvm_arch_pre_run(cpu, run);