* [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field
[not found] <20260307150042.78030-1-philmd@linaro.org>
@ 2026-03-07 15:00 ` Philippe Mathieu-Daudé
2026-03-08 11:38 ` Thomas Huth
2026-03-09 14:03 ` Zhao Liu
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-07 15:00 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Paolo Bonzini, Zhao Liu,
Philippe Mathieu-Daudé, Thomas Huth, Marcelo Tosatti, kvm
The X86CPU::hyperv_synic_kvm_only boolean (see commit 9b4cf107b09
"hyperv: only add SynIC in compatible configurations") was only set
in the pc_compat_3_0[] array, via the 'x-hv-synic-kvm-only=on'
property. We removed all machines using that array, lets remove that
property and all the code around it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/cpu.h | 1 -
target/i386/cpu.c | 2 --
target/i386/kvm/kvm.c | 15 ++++-----------
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index f2679cc5b72..2b70d56e9b0 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2335,7 +2335,6 @@ struct ArchCPU {
uint32_t hyperv_spinlock_attempts;
char *hyperv_vendor;
- bool hyperv_synic_kvm_only;
uint64_t hyperv_features;
bool hyperv_passthrough;
OnOffAuto hyperv_no_nonarch_cs;
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 01b64940b17..c77addd2c25 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -10589,8 +10589,6 @@ static const Property x86_cpu_properties[] = {
* to the specific Windows version being used."
*/
DEFINE_PROP_INT32("x-hv-max-vps", X86CPU, hv_max_vps, -1),
- DEFINE_PROP_BOOL("x-hv-synic-kvm-only", X86CPU, hyperv_synic_kvm_only,
- false),
DEFINE_PROP_BOOL("x-intel-pt-auto-level", X86CPU, intel_pt_auto_level,
true),
DEFINE_PROP_BOOL("x-l1-cache-per-thread", X86CPU, l1_cache_per_core, true),
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 27b1b848d6a..a29f757c168 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -1278,10 +1278,7 @@ static struct kvm_cpuid2 *get_supported_hv_cpuid_legacy(CPUState *cs)
}
if (has_msr_hv_synic) {
- unsigned int cap = cpu->hyperv_synic_kvm_only ?
- KVM_CAP_HYPERV_SYNIC : KVM_CAP_HYPERV_SYNIC2;
-
- if (kvm_check_extension(cs->kvm_state, cap) > 0) {
+ if (kvm_check_extension(cs->kvm_state, KVM_CAP_HYPERV_SYNIC2) > 0) {
entry_feat->eax |= HV_SYNIC_AVAILABLE;
}
}
@@ -1543,7 +1540,6 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp)
/* Additional dependencies not covered by kvm_hyperv_properties[] */
if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC) &&
- !cpu->hyperv_synic_kvm_only &&
!hyperv_feat_enabled(cpu, HYPERV_FEAT_VPINDEX)) {
error_setg(errp, "Hyper-V %s requires Hyper-V %s",
kvm_hyperv_properties[HYPERV_FEAT_SYNIC].desc,
@@ -1608,8 +1604,7 @@ static int hyperv_fill_cpuids(CPUState *cs,
c->eax |= HV_HYPERCALL_AVAILABLE;
/* SynIC and Vmbus devices require messages/signals hypercalls */
- if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC) &&
- !cpu->hyperv_synic_kvm_only) {
+ if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) {
c->ebx |= HV_POST_MESSAGES | HV_SIGNAL_EVENTS;
}
@@ -1752,16 +1747,14 @@ static int hyperv_init_vcpu(X86CPU *cpu)
}
if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) {
- uint32_t synic_cap = cpu->hyperv_synic_kvm_only ?
- KVM_CAP_HYPERV_SYNIC : KVM_CAP_HYPERV_SYNIC2;
- ret = kvm_vcpu_enable_cap(cs, synic_cap, 0);
+ ret = kvm_vcpu_enable_cap(cs, KVM_CAP_HYPERV_SYNIC2, 0);
if (ret < 0) {
error_report("failed to turn on HyperV SynIC in KVM: %s",
strerror(-ret));
return ret;
}
- if (!cpu->hyperv_synic_kvm_only && !hyperv_is_synic_enabled()) {
+ if (!hyperv_is_synic_enabled()) {
ret = hyperv_x86_synic_add(cpu);
if (ret < 0) {
error_report("failed to create HyperV SynIC: %s",
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field
2026-03-07 15:00 ` [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field Philippe Mathieu-Daudé
@ 2026-03-08 11:38 ` Thomas Huth
2026-03-09 14:03 ` Zhao Liu
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2026-03-08 11:38 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Michael S. Tsirkin, Paolo Bonzini, Zhao Liu, Marcelo Tosatti, kvm
On 07/03/2026 16.00, Philippe Mathieu-Daudé wrote:
> The X86CPU::hyperv_synic_kvm_only boolean (see commit 9b4cf107b09
> "hyperv: only add SynIC in compatible configurations") was only set
> in the pc_compat_3_0[] array, via the 'x-hv-synic-kvm-only=on'
> property. We removed all machines using that array, lets remove that
> property and all the code around it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/i386/cpu.h | 1 -
> target/i386/cpu.c | 2 --
> target/i386/kvm/kvm.c | 15 ++++-----------
> 3 files changed, 4 insertions(+), 14 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field
2026-03-07 15:00 ` [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field Philippe Mathieu-Daudé
2026-03-08 11:38 ` Thomas Huth
@ 2026-03-09 14:03 ` Zhao Liu
1 sibling, 0 replies; 3+ messages in thread
From: Zhao Liu @ 2026-03-09 14:03 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Michael S. Tsirkin, Paolo Bonzini, Thomas Huth,
Marcelo Tosatti, kvm
On Sat, Mar 07, 2026 at 04:00:41PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Sat, 7 Mar 2026 16:00:41 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only
> field
> X-Mailer: git-send-email 2.52.0
>
> The X86CPU::hyperv_synic_kvm_only boolean (see commit 9b4cf107b09
> "hyperv: only add SynIC in compatible configurations") was only set
> in the pc_compat_3_0[] array, via the 'x-hv-synic-kvm-only=on'
> property. We removed all machines using that array, lets remove that
> property and all the code around it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/i386/cpu.h | 1 -
> target/i386/cpu.c | 2 --
> target/i386/kvm/kvm.c | 15 ++++-----------
> 3 files changed, 4 insertions(+), 14 deletions(-)
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-09 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260307150042.78030-1-philmd@linaro.org>
2026-03-07 15:00 ` [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field Philippe Mathieu-Daudé
2026-03-08 11:38 ` Thomas Huth
2026-03-09 14:03 ` Zhao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox