From: Sukrit Bhatnagar <skrtbhtngr@gmail.com> To: qemu-devel@nongnu.org Cc: Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH RESEND v2 2/2] cpus: move hvf_cpu_synchronize* calls to cpu_synchronize* functions Date: Sun, 7 Apr 2019 17:28:39 +0530 [thread overview] Message-ID: <20190407115839.25054-3-skrtbhtngr@gmail.com> (raw) In-Reply-To: <20190407115839.25054-1-skrtbhtngr@gmail.com> Keep the calls made to synchronize cpu by all hypervisors in one place inside cpu_synchronize_* functions in include/sysemu/hw_accel.h Cc: Richard Henderson <rth@twiddle.net> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com> --- cpus.c | 12 ------------ include/sysemu/hw_accel.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cpus.c b/cpus.c index e83f72b48b..026df0dc5f 100644 --- a/cpus.c +++ b/cpus.c @@ -1021,10 +1021,6 @@ void cpu_synchronize_all_states(void) CPU_FOREACH(cpu) { cpu_synchronize_state(cpu); - /* TODO: move to cpu_synchronize_state() */ - if (hvf_enabled()) { - hvf_cpu_synchronize_state(cpu); - } } } @@ -1034,10 +1030,6 @@ void cpu_synchronize_all_post_reset(void) CPU_FOREACH(cpu) { cpu_synchronize_post_reset(cpu); - /* TODO: move to cpu_synchronize_post_reset() */ - if (hvf_enabled()) { - hvf_cpu_synchronize_post_reset(cpu); - } } } @@ -1047,10 +1039,6 @@ void cpu_synchronize_all_post_init(void) CPU_FOREACH(cpu) { cpu_synchronize_post_init(cpu); - /* TODO: move to cpu_synchronize_post_init() */ - if (hvf_enabled()) { - hvf_cpu_synchronize_post_init(cpu); - } } } diff --git a/include/sysemu/hw_accel.h b/include/sysemu/hw_accel.h index d2ddfb5ad0..bf081b4026 100644 --- a/include/sysemu/hw_accel.h +++ b/include/sysemu/hw_accel.h @@ -15,6 +15,7 @@ #include "sysemu/hax.h" #include "sysemu/kvm.h" #include "sysemu/whpx.h" +#include "sysemu/hvf.h" static inline void cpu_synchronize_state(CPUState *cpu) { @@ -27,6 +28,9 @@ static inline void cpu_synchronize_state(CPUState *cpu) if (whpx_enabled()) { whpx_cpu_synchronize_state(cpu); } + if (hvf_enabled()) { + hvf_cpu_synchronize_state(cpu); + } } static inline void cpu_synchronize_post_reset(CPUState *cpu) @@ -40,6 +44,9 @@ static inline void cpu_synchronize_post_reset(CPUState *cpu) if (whpx_enabled()) { whpx_cpu_synchronize_post_reset(cpu); } + if (hvf_enabled()) { + hvf_cpu_synchronize_post_reset(cpu); + } } static inline void cpu_synchronize_post_init(CPUState *cpu) @@ -53,6 +60,9 @@ static inline void cpu_synchronize_post_init(CPUState *cpu) if (whpx_enabled()) { whpx_cpu_synchronize_post_init(cpu); } + if (hvf_enabled()) { + hvf_cpu_synchronize_post_init(cpu); + } } static inline void cpu_synchronize_pre_loadvm(CPUState *cpu) -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Sukrit Bhatnagar <skrtbhtngr@gmail.com> To: qemu-devel@nongnu.org Cc: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net> Subject: [Qemu-devel] [PATCH RESEND v2 2/2] cpus: move hvf_cpu_synchronize* calls to cpu_synchronize* functions Date: Sun, 7 Apr 2019 17:28:39 +0530 [thread overview] Message-ID: <20190407115839.25054-3-skrtbhtngr@gmail.com> (raw) Message-ID: <20190407115839.CF1-TLRavnXnlhE-ma8SOP5F5uwWk-9xAMbhsScbhq8@z> (raw) In-Reply-To: <20190407115839.25054-1-skrtbhtngr@gmail.com> Keep the calls made to synchronize cpu by all hypervisors in one place inside cpu_synchronize_* functions in include/sysemu/hw_accel.h Cc: Richard Henderson <rth@twiddle.net> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com> --- cpus.c | 12 ------------ include/sysemu/hw_accel.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cpus.c b/cpus.c index e83f72b48b..026df0dc5f 100644 --- a/cpus.c +++ b/cpus.c @@ -1021,10 +1021,6 @@ void cpu_synchronize_all_states(void) CPU_FOREACH(cpu) { cpu_synchronize_state(cpu); - /* TODO: move to cpu_synchronize_state() */ - if (hvf_enabled()) { - hvf_cpu_synchronize_state(cpu); - } } } @@ -1034,10 +1030,6 @@ void cpu_synchronize_all_post_reset(void) CPU_FOREACH(cpu) { cpu_synchronize_post_reset(cpu); - /* TODO: move to cpu_synchronize_post_reset() */ - if (hvf_enabled()) { - hvf_cpu_synchronize_post_reset(cpu); - } } } @@ -1047,10 +1039,6 @@ void cpu_synchronize_all_post_init(void) CPU_FOREACH(cpu) { cpu_synchronize_post_init(cpu); - /* TODO: move to cpu_synchronize_post_init() */ - if (hvf_enabled()) { - hvf_cpu_synchronize_post_init(cpu); - } } } diff --git a/include/sysemu/hw_accel.h b/include/sysemu/hw_accel.h index d2ddfb5ad0..bf081b4026 100644 --- a/include/sysemu/hw_accel.h +++ b/include/sysemu/hw_accel.h @@ -15,6 +15,7 @@ #include "sysemu/hax.h" #include "sysemu/kvm.h" #include "sysemu/whpx.h" +#include "sysemu/hvf.h" static inline void cpu_synchronize_state(CPUState *cpu) { @@ -27,6 +28,9 @@ static inline void cpu_synchronize_state(CPUState *cpu) if (whpx_enabled()) { whpx_cpu_synchronize_state(cpu); } + if (hvf_enabled()) { + hvf_cpu_synchronize_state(cpu); + } } static inline void cpu_synchronize_post_reset(CPUState *cpu) @@ -40,6 +44,9 @@ static inline void cpu_synchronize_post_reset(CPUState *cpu) if (whpx_enabled()) { whpx_cpu_synchronize_post_reset(cpu); } + if (hvf_enabled()) { + hvf_cpu_synchronize_post_reset(cpu); + } } static inline void cpu_synchronize_post_init(CPUState *cpu) @@ -53,6 +60,9 @@ static inline void cpu_synchronize_post_init(CPUState *cpu) if (whpx_enabled()) { whpx_cpu_synchronize_post_init(cpu); } + if (hvf_enabled()) { + hvf_cpu_synchronize_post_init(cpu); + } } static inline void cpu_synchronize_pre_loadvm(CPUState *cpu) -- 2.20.1
next prev parent reply other threads:[~2019-04-07 11:59 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-07 11:58 [Qemu-devel] [PATCH RESEND v2 0/2] Move hvf_cpu_synchronize* calls to cpu_synchronize* functions Sukrit Bhatnagar 2019-04-07 11:58 ` Sukrit Bhatnagar 2019-04-07 11:58 ` [Qemu-devel] [PATCH RESEND v2 1/2] hvf: declare hvf_handle_io if NEED_CPU_H is defined Sukrit Bhatnagar 2019-04-07 11:58 ` Sukrit Bhatnagar 2019-04-10 11:40 ` Roman Bolshakov 2019-04-10 11:40 ` Roman Bolshakov 2019-04-07 11:58 ` Sukrit Bhatnagar [this message] 2019-04-07 11:58 ` [Qemu-devel] [PATCH RESEND v2 2/2] cpus: move hvf_cpu_synchronize* calls to cpu_synchronize* functions Sukrit Bhatnagar 2019-04-10 11:50 ` Roman Bolshakov 2019-04-10 11:50 ` Roman Bolshakov 2019-04-10 12:05 ` Sukrit Bhatnagar 2019-04-10 12:05 ` Sukrit Bhatnagar 2019-04-10 14:02 ` Roman Bolshakov 2019-04-10 14:02 ` Roman Bolshakov 2019-04-10 17:10 ` Paolo Bonzini 2019-04-10 17:10 ` Paolo Bonzini 2019-04-07 12:05 ` [Qemu-devel] [PATCH RESEND v2 0/2] Move " Sukrit Bhatnagar 2019-04-07 12:05 ` Sukrit Bhatnagar 2019-04-09 8:28 ` Marcel Apfelbaum 2019-04-09 8:28 ` Marcel Apfelbaum
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=20190407115839.25054-3-skrtbhtngr@gmail.com \ --to=skrtbhtngr@gmail.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).