aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-11-19 17:16:57 +0100
committerRichard Henderson <richard.henderson@linaro.org>2021-11-19 17:16:57 +0100
commit8627edfb3f1fca24a96a0954148885c3241c10f8 (patch)
treeba41aa3263969de04f1a95a0a307e78cfecb91c5 /target/i386
parentd434a47905641433e16ef65356d17090fd6fdcb1 (diff)
parentfdc6e168181d06391711171b7c409b34f2981ced (diff)
downloadqemu-8627edfb3f1fca24a96a0954148885c3241c10f8.zip
qemu-8627edfb3f1fca24a96a0954148885c3241c10f8.tar.gz
qemu-8627edfb3f1fca24a96a0954148885c3241c10f8.tar.bz2
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Bugfixes for 6.2. # gpg: Signature made Fri 19 Nov 2021 10:33:29 AM CET # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: chardev/wctable: don't free the instance in wctablet_chr_finalize meson.build: Support ncurses on MacOS and OpenBSD docs: Spell QEMU all caps qtest/am53c974-test: add test for reset before transfer esp: ensure that async_len is reset to 0 during esp_hard_reset() nvmm: Fix support for stable version meson: fix botched compile check conversions Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/nvmm/nvmm-all.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
index 14c996f..9af261e 100644
--- a/target/i386/nvmm/nvmm-all.c
+++ b/target/i386/nvmm/nvmm-all.c
@@ -750,7 +750,11 @@ nvmm_vcpu_loop(CPUState *cpu)
nvmm_vcpu_pre_run(cpu);
if (qatomic_read(&cpu->exit_request)) {
+#if NVMM_USER_VERSION >= 2
nvmm_vcpu_stop(vcpu);
+#else
+ qemu_cpu_kick_self();
+#endif
}
/* Read exit_request before the kernel reads the immediate exit flag */
@@ -767,6 +771,7 @@ nvmm_vcpu_loop(CPUState *cpu)
switch (exit->reason) {
case NVMM_VCPU_EXIT_NONE:
break;
+#if NVMM_USER_VERSION >= 2
case NVMM_VCPU_EXIT_STOPPED:
/*
* The kernel cleared the immediate exit flag; cpu->exit_request
@@ -775,6 +780,7 @@ nvmm_vcpu_loop(CPUState *cpu)
smp_wmb();
qcpu->stop = true;
break;
+#endif
case NVMM_VCPU_EXIT_MEMORY:
ret = nvmm_handle_mem(mach, vcpu);
break;
@@ -888,8 +894,12 @@ nvmm_ipi_signal(int sigcpu)
{
if (current_cpu) {
struct qemu_vcpu *qcpu = get_qemu_vcpu(current_cpu);
+#if NVMM_USER_VERSION >= 2
struct nvmm_vcpu *vcpu = &qcpu->vcpu;
nvmm_vcpu_stop(vcpu);
+#else
+ qcpu->stop = true;
+#endif
}
}