diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-08-28 16:07:23 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-28 16:07:23 +0100 |
| commit | 38a01e55d268aeba68c84eea425252e7f810feaf (patch) | |
| tree | 6a19c9a35558f6e9d64e2c1a5fc21432f683c830 /kvm-all.c | |
| parent | 795c050e379ab21b75fc2bbb30699fe8752be157 (diff) | |
| parent | 172dbc52b39c86d7569af5251cca78cb2c74c912 (diff) | |
| download | focaccia-qemu-38a01e55d268aeba68c84eea425252e7f810feaf.tar.gz focaccia-qemu-38a01e55d268aeba68c84eea425252e7f810feaf.zip | |
Merge remote-tracking branch 'remotes/kvm/tags/for-upstream' into staging
Mostly bugfixes + Alexey's interface-based implementation of the NMI monitor command. # gpg: Signature made Thu 28 Aug 2014 15:07:22 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/kvm/tags/for-upstream: mc146818rtc: reinitialize irq_reinject_on_ack_count on reset target-i386: Add "tsc_adjust" CPU feature name target-i386: Add "mpx" CPU feature name vl: process -object after other backend options checkpatch.pl: adjust typedef definition to QEMU coding style x86: Clear MTRRs on vCPU reset x86: kvm: Add MTRR support for kvm_get|put_msrs() x86: Use common variable range MTRR counts target-i386: Don't forbid NX bit on PAE PDEs and PTEs spapr: Add support for new NMI interface s390x: Migrate to new NMI interface s390x: Convert QEMUMachine to MachineClass cpus: Define callback for QEMU "nmi" command kvm: run cpu state synchronization on target vcpu thread Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'kvm-all.c')
| -rw-r--r-- | kvm-all.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/kvm-all.c b/kvm-all.c index 1402f4f429..b240bf87a9 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1669,18 +1669,32 @@ void kvm_cpu_synchronize_state(CPUState *cpu) } } -void kvm_cpu_synchronize_post_reset(CPUState *cpu) +static void do_kvm_cpu_synchronize_post_reset(void *arg) { + CPUState *cpu = arg; + kvm_arch_put_registers(cpu, KVM_PUT_RESET_STATE); cpu->kvm_vcpu_dirty = false; } -void kvm_cpu_synchronize_post_init(CPUState *cpu) +void kvm_cpu_synchronize_post_reset(CPUState *cpu) +{ + run_on_cpu(cpu, do_kvm_cpu_synchronize_post_reset, cpu); +} + +static void do_kvm_cpu_synchronize_post_init(void *arg) { + CPUState *cpu = arg; + kvm_arch_put_registers(cpu, KVM_PUT_FULL_STATE); cpu->kvm_vcpu_dirty = false; } +void kvm_cpu_synchronize_post_init(CPUState *cpu) +{ + run_on_cpu(cpu, do_kvm_cpu_synchronize_post_init, cpu); +} + int kvm_cpu_exec(CPUState *cpu) { struct kvm_run *run = cpu->kvm_run; |