[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 10/13] softmmu/cpu: Skip mirror vcpu's for pause, resume and
From: |
Ashish Kalra |
Subject: |
[RFC PATCH 10/13] softmmu/cpu: Skip mirror vcpu's for pause, resume and synchronization. |
Date: |
Mon, 16 Aug 2021 13:30:36 +0000 |
From: Ashish Kalra <ashish.kalra@amd.com>
Skip mirror vcpus's for vcpu pause, resume and synchronization
operations.
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
---
softmmu/cpus.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index 071085f840..caed382669 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -101,6 +101,9 @@ bool all_cpu_threads_idle(void)
CPUState *cpu;
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
if (!cpu_thread_is_idle(cpu)) {
return false;
}
@@ -136,6 +139,9 @@ void cpu_synchronize_all_states(void)
CPUState *cpu;
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
cpu_synchronize_state(cpu);
}
}
@@ -145,6 +151,9 @@ void cpu_synchronize_all_post_reset(void)
CPUState *cpu;
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
cpu_synchronize_post_reset(cpu);
}
}
@@ -154,6 +163,9 @@ void cpu_synchronize_all_post_init(void)
CPUState *cpu;
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
cpu_synchronize_post_init(cpu);
}
}
@@ -163,6 +175,9 @@ void cpu_synchronize_all_pre_loadvm(void)
CPUState *cpu;
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
cpu_synchronize_pre_loadvm(cpu);
}
}
@@ -531,6 +546,9 @@ static bool all_vcpus_paused(void)
CPUState *cpu;
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
if (!cpu->stopped) {
return false;
}
@@ -545,6 +563,9 @@ void pause_all_vcpus(void)
qemu_clock_enable(QEMU_CLOCK_VIRTUAL, false);
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
if (qemu_cpu_is_self(cpu)) {
qemu_cpu_stop(cpu, true);
} else {
@@ -561,6 +582,9 @@ void pause_all_vcpus(void)
while (!all_vcpus_paused()) {
qemu_cond_wait(&qemu_pause_cond, &qemu_global_mutex);
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
qemu_cpu_kick(cpu);
}
}
@@ -587,6 +611,9 @@ void resume_all_vcpus(void)
qemu_clock_enable(QEMU_CLOCK_VIRTUAL, true);
CPU_FOREACH(cpu) {
+ if (cpu->mirror_vcpu) {
+ continue;
+ }
cpu_resume(cpu);
}
}
--
2.17.1
- [RFC PATCH 00/13] Add support for Mirror VM., Ashish Kalra, 2021/08/16
- [RFC PATCH 01/13] machine: Add mirrorvcpus=N suboption to -smp, Ashish Kalra, 2021/08/16
- [RFC PATCH 02/13] hw/boards: Add mirror_vcpu flag to CPUArchId, Ashish Kalra, 2021/08/16
- [RFC PATCH 03/13] hw/i386: Mark mirror vcpus in possible_cpus, Ashish Kalra, 2021/08/16
- [RFC PATCH 04/13] hw/acpi: Don't include mirror vcpus in ACPI tables, Ashish Kalra, 2021/08/16
- [RFC PATCH 05/13] cpu: Add boolean mirror_vcpu field to CPUState, Ashish Kalra, 2021/08/16
- [RFC PATCH 06/13] hw/i386: Set CPUState.mirror_vcpu=true for mirror vcpus, Ashish Kalra, 2021/08/16
- [RFC PATCH 07/13] kvm: Add Mirror VM ioctl and enable cap interfaces., Ashish Kalra, 2021/08/16
- [RFC PATCH 08/13] kvm: Add Mirror VM support., Ashish Kalra, 2021/08/16
- [RFC PATCH 09/13] kvm: create Mirror VM and share primary VM's encryption context., Ashish Kalra, 2021/08/16
- [RFC PATCH 10/13] softmmu/cpu: Skip mirror vcpu's for pause, resume and synchronization.,
Ashish Kalra <=
- [RFC PATCH 11/13] kvm/apic: Disable in-kernel APIC support for mirror vcpu's., Ashish Kalra, 2021/08/16
- [RFC PATCH 12/13] hw/acpi: disable modern CPU hotplug interface for mirror vcpu's, Ashish Kalra, 2021/08/16
- [RFC PATCH 13/13] hw/i386/pc: reduce fw_cfg boot cpu count taking into account mirror vcpu's., Ashish Kalra, 2021/08/16
- Re: [RFC PATCH 00/13] Add support for Mirror VM., Claudio Fontana, 2021/08/16
- Re: [RFC PATCH 00/13] Add support for Mirror VM., Paolo Bonzini, 2021/08/16
- Re: [RFC PATCH 00/13] Add support for Mirror VM., Ashish Kalra, 2021/08/16