qemu/target
Vitaly Kuznetsov bbf3810f2c target/i386: Fix conditional CONFIG_SYNDBG enablement
Putting HYPERV_FEAT_SYNDBG entry under "#ifdef CONFIG_SYNDBG" in
'kvm_hyperv_properties' array is wrong: as HYPERV_FEAT_SYNDBG is not
the highest feature number, the result is an empty (zeroed) entry in
the array (and not a skipped entry!). hyperv_feature_supported() is
designed to check that all CPUID bits are set but for a zeroed
feature in 'kvm_hyperv_properties' it returns 'true' so QEMU considers
HYPERV_FEAT_SYNDBG as always supported, regardless of whether KVM host
actually supports it.

To fix the issue, leave HYPERV_FEAT_SYNDBG's definition in
'kvm_hyperv_properties' array, there's nothing wrong in having it defined
even when 'CONFIG_SYNDBG' is not set. Instead, put "hv-syndbg" CPU property
under '#ifdef CONFIG_SYNDBG' to alter the existing behavior when the flag
is silently skipped in !CONFIG_SYNDBG builds.

Leave an 'assert' sentinel in hyperv_feature_supported() making sure there
are no 'holes' or improperly defined features in 'kvm_hyperv_properties'.

Fixes: d8701185f4 ("hw: hyperv: Initial commit for Synthetic Debugging device")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20240917160051.2637594-2-vkuznets@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-10-17 12:30:21 +02:00
..
alpha license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
arm target/arm: Fix alignment fault priority in get_phys_addr_lpae 2024-10-13 11:27:06 -07:00
avr target: Set TCGCPUOps::cpu_exec_halt to target's has_work implementation 2024-07-11 11:41:34 +01:00
hexagon target/hexagon: Rename macros.inc -> macros.h.inc 2024-09-20 10:07:04 +03:00
hppa target/hppa: Implement TCGCPUOps.tlb_fill_align 2024-10-13 11:27:05 -07:00
i386 target/i386: Fix conditional CONFIG_SYNDBG enablement 2024-10-17 12:30:21 +02:00
loongarch * pc: Add a description for the i8042 property 2024-10-04 19:28:37 +01:00
m68k target/m68k: Always return a temporary from gen_lea_mode 2024-10-08 06:40:31 -07:00
microblaze license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
mips tcg: remove singlestep_enabled from DisasContextBase 2024-10-13 10:04:29 -07:00
openrisc license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
ppc kvm: Allow kvm_arch_get/put_registers to accept Error** 2024-10-03 22:04:19 +02:00
riscv * pc: Add a description for the i8042 property 2024-10-04 19:28:37 +01:00
rx target/rx: Use target_ulong for address in LI 2024-07-28 14:13:05 +10:00
s390x target/s390x: Use explicit big-endian LD/ST API 2024-10-07 11:33:20 +02:00
sh4 license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
sparc license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
tricore target/tricore: Use unsigned types for bitops in helper_eq_b() 2024-07-29 16:57:27 +01:00
xtensa include/exec/memop: Rename get_alignment_bits 2024-10-13 11:27:03 -07:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00