From: Roman Bolshakov <r.bolshakov@yadro.com>
To: <qemu-devel@nongnu.org>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
Cameron Esfahani <dirty@apple.com>,
Roman Bolshakov <r.bolshakov@yadro.com>,
Claudio Fontana <cfontana@suse.de>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: [PATCH v2 3/9] i386: hvf: Add hvf_cpu_synchronize_pre_loadvm()
Date: Tue, 30 Jun 2020 13:28:18 +0300 [thread overview]
Message-ID: <20200630102824.77604-4-r.bolshakov@yadro.com> (raw)
In-Reply-To: <20200630102824.77604-1-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>
---
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.1
next prev parent reply other threads:[~2020-06-30 10:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 10:28 [PATCH v2 0/9] Improve synchronization between QEMU and HVF Roman Bolshakov
2020-06-30 10:28 ` [PATCH v2 1/9] i386: hvf: Set env->eip in macvm_set_rip() Roman Bolshakov
2020-06-30 12:35 ` Paolo Bonzini
2020-06-30 10:28 ` [PATCH v2 2/9] i386: hvf: Move synchronize functions to sysemu Roman Bolshakov
2020-06-30 10:28 ` Roman Bolshakov [this message]
2020-06-30 10:28 ` [PATCH v2 4/9] i386: hvf: Implement CPU kick Roman Bolshakov
2020-06-30 12:33 ` Paolo Bonzini
2020-06-30 15:50 ` Roman Bolshakov
2020-06-30 16:04 ` Paolo Bonzini
2020-07-01 18:36 ` Roman Bolshakov
2020-07-01 18:50 ` Paolo Bonzini
2020-06-30 10:28 ` [PATCH v2 5/9] i386: hvf: Make long mode enter and exit clearer Roman Bolshakov
2020-06-30 10:28 ` [PATCH v2 6/9] i386: hvf: Move Guest LMA reset to macvm_set_cr0() Roman Bolshakov
2020-06-30 10:28 ` [PATCH v2 7/9] i386: hvf: Don't duplicate register reset Roman Bolshakov
2020-06-30 10:28 ` [PATCH v2 8/9] i386: hvf: Clean up synchronize functions Roman Bolshakov
2020-06-30 10:28 ` [PATCH v2 9/9] MAINTAINERS: Add Cameron as HVF co-maintainer Roman Bolshakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200630102824.77604-4-r.bolshakov@yadro.com \
--to=r.bolshakov@yadro.com \
--cc=cfontana@suse.de \
--cc=dirty@apple.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.