[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/53] i386: hvf: Add hvf_cpu_synchronize_pre_loadvm()
From: |
Paolo Bonzini |
Subject: |
[PULL 14/53] i386: hvf: Add hvf_cpu_synchronize_pre_loadvm() |
Date: |
Mon, 6 Jul 2020 12:41:16 -0400 |
From: Roman Bolshakov <r.bolshakov@yadro.com>
hvf lacks an implementation of cpu_synchronize_pre_loadvm().
Cc: Cameron Esfahani <dirty@apple.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200630102824.77604-4-r.bolshakov@yadro.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/sysemu/hvf.h | 1 +
include/sysemu/hw_accel.h | 3 +++
target/i386/hvf/hvf.c | 11 +++++++++++
3 files changed, 15 insertions(+)
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index 5214ed5202..1d40a8ec01 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -28,6 +28,7 @@ int hvf_vcpu_exec(CPUState *);
void hvf_cpu_synchronize_state(CPUState *);
void hvf_cpu_synchronize_post_reset(CPUState *);
void hvf_cpu_synchronize_post_init(CPUState *);
+void hvf_cpu_synchronize_pre_loadvm(CPUState *);
void hvf_vcpu_destroy(CPUState *);
void hvf_reset_vcpu(CPUState *);
diff --git a/include/sysemu/hw_accel.h b/include/sysemu/hw_accel.h
index 80bce75921..e128f8b06b 100644
--- a/include/sysemu/hw_accel.h
+++ b/include/sysemu/hw_accel.h
@@ -73,6 +73,9 @@ static inline void cpu_synchronize_pre_loadvm(CPUState *cpu)
if (hax_enabled()) {
hax_cpu_synchronize_pre_loadvm(cpu);
}
+ if (hvf_enabled()) {
+ hvf_cpu_synchronize_pre_loadvm(cpu);
+ }
if (whpx_enabled()) {
whpx_cpu_synchronize_pre_loadvm(cpu);
}
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index be016b951a..efe9802962 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -325,6 +325,17 @@ void hvf_cpu_synchronize_post_init(CPUState *cpu_state)
run_on_cpu(cpu_state, do_hvf_cpu_synchronize_post_init, RUN_ON_CPU_NULL);
}
+static void do_hvf_cpu_synchronize_pre_loadvm(CPUState *cpu,
+ run_on_cpu_data arg)
+{
+ cpu->vcpu_dirty = true;
+}
+
+void hvf_cpu_synchronize_pre_loadvm(CPUState *cpu)
+{
+ run_on_cpu(cpu, do_hvf_cpu_synchronize_pre_loadvm, RUN_ON_CPU_NULL);
+}
+
static bool ept_emulation_fault(hvf_slot *slot, uint64_t gpa, uint64_t
ept_qual)
{
int read, write;
--
2.26.2
- [PULL 00/53] Misc patches for QEMU 5.1 soft freeze, Paolo Bonzini, 2020/07/06
- [PULL 02/53] tests: Inject test name also when the test fails, Paolo Bonzini, 2020/07/06
- [PULL 04/53] qom: Introduce object_property_try_add_child(), Paolo Bonzini, 2020/07/06
- [PULL 05/53] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id, Paolo Bonzini, 2020/07/06
- [PULL 03/53] util/qemu-error: prepend guest name to error message to identify affected VM owner, Paolo Bonzini, 2020/07/06
- [PULL 06/53] tests/qmp-cmd-test: Add qmp/object-add-failure-modes, Paolo Bonzini, 2020/07/06
- [PULL 10/53] KVM: add support for AMD nested live migration, Paolo Bonzini, 2020/07/06
- [PULL 07/53] hw/core/null-machine: Do not initialize unused chardev backends, Paolo Bonzini, 2020/07/06
- [PULL 08/53] target/i386: set SSE FTZ in correct floating-point state, Paolo Bonzini, 2020/07/06
- [PULL 12/53] i386: hvf: Set env->eip in macvm_set_rip(), Paolo Bonzini, 2020/07/06
- [PULL 14/53] i386: hvf: Add hvf_cpu_synchronize_pre_loadvm(),
Paolo Bonzini <=
- [PULL 09/53] target/i386: fix IEEE SSE floating-point exception raising, Paolo Bonzini, 2020/07/06
- [PULL 17/53] i386: hvf: Don't duplicate register reset, Paolo Bonzini, 2020/07/06
- [PULL 18/53] i386: hvf: Clean up synchronize functions, Paolo Bonzini, 2020/07/06
- [PULL 21/53] MAINTAINERS: Add an 'overall' entry for accelerators, Paolo Bonzini, 2020/07/06
- [PULL 22/53] MAINTAINERS: Cover the HAX accelerator stub, Paolo Bonzini, 2020/07/06
- [PULL 23/53] Makefile: Remove dangerous EOL trailing backslash, Paolo Bonzini, 2020/07/06
- [PULL 24/53] Makefile: Write MINIKCONF variables as one entry per line, Paolo Bonzini, 2020/07/06
- [PULL 16/53] i386: hvf: Move Guest LMA reset to macvm_set_cr0(), Paolo Bonzini, 2020/07/06
- [PULL 25/53] accel/Kconfig: Extract accel selectors into their own config, Paolo Bonzini, 2020/07/06
- [PULL 01/53] tcg/svm: use host cr4 during NPT page table walk, Paolo Bonzini, 2020/07/06