KVM regsync: Rename KVM_PUT_ constants to KVM_REGSYNC_
PATCH v2 1/7 KVM regsync: Rename KVM_PUT_ constants to KVM_REGSYNC_
From: "Jason J. Herne" <[email protected]>
It makes sense to rename these to KVM_REGSYNC in order to use them for specifying a register level parameter for both kvm_arch_put_registers and kvm_arch_get_registers.
Signed-off-by Jason J. Herne <[email protected]>
Reviewed-by Christian Borntraeger <[email protected]>
--- include/sysemu/kvm.h | 6 +++--- kvm-all.c | 6 +++--- target-i386/kvm.c | 8 ++++---- target-ppc/kvm.c | 4 ++-- target-s390x/kvm.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-)
include/sysemu/kvm.h +3 -3
@@ -168,11 +168,11 @@ int kvm_arch_process_async_events(CPUState *cpu);int kvm_arch_get_registers (CPUState *cpu);/* state subset only touched by the VCPU itself during runtime */ -#define KVM_PUT_RUNTIME_STATE 1 +#define KVM_REGSYNC_RUNTIME_STATE 1/* state subset modified during VCPU reset */ -#define KVM_PUT_RESET_STATE 2 +#define KVM_REGSYNC_RESET_STATE 2/* full state set, modified during initialization or on vmload */ -#define KVM_PUT_FULL_STATE 3 +#define KVM_REGSYNC_FULL_STATE 3int kvm_arch_put_registers (CPUState *cpu,int level);
kvm-all.c +3 -3
@@ -1512,7 +1512,7 @@ void kvm_cpu_synchronize_post_reset(CPUArchState *env) {CPUState *cpu =ENV_GET_CPU (env); -kvm_arch_put_registers (cpu,KVM_PUT_RESET_STATE ); +kvm_arch_put_registers (cpu,KVM_REGSYNC_RESET_STATE ); cpu->kvm_vcpu_dirty = false; }
@@ -1520,7 +1520,7 @@ void kvm_cpu_synchronize_post_init(CPUArchState *env) {CPUState *cpu =ENV_GET_CPU (env); -kvm_arch_put_registers (cpu,KVM_PUT_FULL_STATE ); +kvm_arch_put_registers (cpu,KVM_REGSYNC_FULL_STATE ); cpu->kvm_vcpu_dirty = false; }
@@ -1539,7 +1539,7 @@ int kvm_cpu_exec(CPUArchState *env) do { if (cpu->kvm_vcpu_dirty) { - kvm_arch_put_registers(cpu, KVM_PUT_RUNTIME_STATE); + kvm_arch_put_registers(cpu, KVM_REGSYNC_RUNTIME_STATE); cpu->kvm_vcpu_dirty = false; }
target-i386/kvm.c +4 -4
@@ -1049,7 +1049,7 @@ static int kvm_put_msrs(X86CPU *cpu, int level) kvm_msr_entry_set(&msrs[n++], MSR_LSTAR, env->lstar); }#endif -if (level ==KVM_PUT_FULL_STATE ) { +if (level ==KVM_REGSYNC_FULL_STATE ) {/* * KVM is yet unable to synchronize TSC values of multiple VCPUs on * writeback. Until this is fixed, we only write the offset to SMP
@@ -1065,7 +1065,7 @@ static int kvm_put_msrs(X86CPU *cpu, int level)* too heavy for normal writeback. Limit them to reset or full state * updates. */ -if (level >=KVM_PUT_RESET_STATE ) { +if (level >=KVM_REGSYNC_RESET_STATE ) {kvm_msr_entry_set (&msrs[n++],MSR_KVM_SYSTEM_TIME , env->system_time_msr);kvm_msr_entry_set (&msrs[n++],MSR_KVM_WALL_CLOCK , env->wall_clock_msr);
@@ -1504,7 +1504,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector; events.flags =0 ; -if (level >=KVM_PUT_RESET_STATE ) { +if (level >=KVM_REGSYNC_RESET_STATE ) { events.flags |=KVM_VCPUEVENT_VALID_NMI_PENDING |KVM_VCPUEVENT_VALID_SIPI_VECTOR ; }
@@ -1653,7 +1653,7 @@ int kvm_arch_put_registers(CPUState *cpu, int level)if (ret <0 ) {return ret; } -if (level >=KVM_PUT_RESET_STATE ) { +if (level >=KVM_REGSYNC_RESET_STATE ) { ret =kvm_put_mp_state (x86_cpu);if (ret <0 ) {return ret;
target-ppc/kvm.c +2 -2
@@ -489,7 +489,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) env->tlb_dirty = false; } -if (cap_segstate && (level >=KVM_PUT_RESET_STATE )) { +if (cap_segstate && (level >=KVM_REGSYNC_RESET_STATE )) {struct kvm_sregs sregs; sregs.pvr = env->spr[SPR_PVR ];
@@ -524,7 +524,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) } } -if (cap_hior && (level >=KVM_PUT_RESET_STATE )) { +if (cap_hior && (level >=KVM_REGSYNC_RESET_STATE )) {uint64_t hior = env->spr[SPR_HIOR ];struct kvm_one_reg reg = { .id =KVM_REG_PPC_HIOR ,
target-s390x/kvm.c +1 -1
@@ -117,7 +117,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) }/* Do we need to save more than that? */ -if (level ==KVM_PUT_RUNTIME_STATE ) { +if (level ==KVM_REGSYNC_RUNTIME_STATE ) {return 0 ; }
Signature · 1 line
1.7.9.5
Jason Herne <[email protected]> writes:
Please use git-send-email when sending patches. You're breaking threading.
Regards,
Anthony Liguori
Quoted 143 lines
From: "Jason J. Herne" <[email protected]>
It makes sense to rename these to
KVM_REGSYNCin order to use them for specifying a register level parameter for bothkvm_arch_put_registersandkvm_arch_get_registers.Signed-off-by Jason J. Herne <[email protected]>Reviewed-by Christian Borntraeger <[email protected]>--- include/sysemu/kvm.h | 6 +++--- kvm-all.c | 6 +++--- target-i386/kvm.c | 8 ++++---- target-ppc/kvm.c | 4 ++-- target-s390x/kvm.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-)include/sysemu/kvm.h +3
-3@@ -168,11 +168,11 @@ int kvm_arch_process_async_events(CPUState *cpu);int kvm_arch_get_registers (CPUState *cpu);/* state subset only touched by the VCPU itself during runtime */ -#define KVM_PUT_RUNTIME_STATE 1 +#define KVM_REGSYNC_RUNTIME_STATE 1/* state subset modified during VCPU reset */ -#define KVM_PUT_RESET_STATE 2 +#define KVM_REGSYNC_RESET_STATE 2/* full state set, modified during initialization or on vmload */ -#define KVM_PUT_FULL_STATE 3 +#define KVM_REGSYNC_FULL_STATE 3int kvm_arch_put_registers (CPUState *cpu,int level);kvm-all.c +3
-3@@ -1512,7 +1512,7 @@ void kvm_cpu_synchronize_post_reset(CPUArchState *env) {CPUState *cpu =ENV_GET_CPU (env); -kvm_arch_put_registers (cpu,KVM_PUT_RESET_STATE ); +kvm_arch_put_registers (cpu,KVM_REGSYNC_RESET_STATE ); cpu->kvm_vcpu_dirty = false; }@@ -1520,7 +1520,7 @@ void kvm_cpu_synchronize_post_init(CPUArchState *env) {CPUState *cpu =ENV_GET_CPU (env); -kvm_arch_put_registers (cpu,KVM_PUT_FULL_STATE ); +kvm_arch_put_registers (cpu,KVM_REGSYNC_FULL_STATE ); cpu->kvm_vcpu_dirty = false; }@@ -1539,7 +1539,7 @@ int kvm_cpu_exec(CPUArchState *env) do { if (cpu->kvm_vcpu_dirty) { - kvm_arch_put_registers(cpu, KVM_PUT_RUNTIME_STATE); + kvm_arch_put_registers(cpu, KVM_REGSYNC_RUNTIME_STATE); cpu->kvm_vcpu_dirty = false; }target-i386/kvm.c +4
-4@@ -1049,7 +1049,7 @@ static int kvm_put_msrs(X86CPU *cpu, int level) kvm_msr_entry_set(&msrs[n++], MSR_LSTAR, env->lstar); }#endif -if (level ==KVM_PUT_FULL_STATE ) { +if (level ==KVM_REGSYNC_FULL_STATE ) {/* * KVM is yet unable to synchronize TSC values of multiple VCPUs on * writeback. Until this is fixed, we only write the offset to SMP @@ -1065,7 +1065,7 @@ static int kvm_put_msrs(X86CPU *cpu, int level)* too heavy for normal writeback. Limit them to reset or full state * updates. */ -if (level >=KVM_PUT_RESET_STATE ) { +if (level >=KVM_REGSYNC_RESET_STATE ) {kvm_msr_entry_set (&msrs[n++],MSR_KVM_SYSTEM_TIME , env->system_time_msr);kvm_msr_entry_set (&msrs[n++],MSR_KVM_WALL_CLOCK , env->wall_clock_msr);@@ -1504,7 +1504,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector; events.flags =0 ; -if (level >=KVM_PUT_RESET_STATE ) { +if (level >=KVM_REGSYNC_RESET_STATE ) { events.flags |=KVM_VCPUEVENT_VALID_NMI_PENDING |KVM_VCPUEVENT_VALID_SIPI_VECTOR ; }@@ -1653,7 +1653,7 @@ int kvm_arch_put_registers(CPUState *cpu, int level)if (ret <0 ) {return ret; } -if (level >=KVM_PUT_RESET_STATE ) { +if (level >=KVM_REGSYNC_RESET_STATE ) { ret =kvm_put_mp_state (x86_cpu);if (ret <0 ) {return ret;target-ppc/kvm.c +2
-2@@ -489,7 +489,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) env->tlb_dirty = false; } -if (cap_segstate && (level >=KVM_PUT_RESET_STATE )) { +if (cap_segstate && (level >=KVM_REGSYNC_RESET_STATE )) {struct kvm_sregs sregs; sregs.pvr = env->spr[SPR_PVR ];@@ -524,7 +524,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) } } -if (cap_hior && (level >=KVM_PUT_RESET_STATE )) { +if (cap_hior && (level >=KVM_REGSYNC_RESET_STATE )) {uint64_t hior = env->spr[SPR_HIOR ];struct kvm_one_reg reg = { .id =KVM_REG_PPC_HIOR ,target-s390x/kvm.c +1
-1@@ -117,7 +117,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) }/* Do we need to save more than that? */ -if (level ==KVM_PUT_RUNTIME_STATE ) { +if (level ==KVM_REGSYNC_RUNTIME_STATE ) {return 0 ; }Signature · 1 line
1.7.9.5