Repository navigation
Enable paravirt guest support, AMD CPUs, haltpoll and hardening in the x86_64 kernel config - #950
Merged
Merged
Conversation
…e x86_64 kernel config Paravirt guest support (HYPERVISOR_GUEST, PARAVIRT, PARAVIRT_SPINLOCKS, KVM_GUEST, PARAVIRT_CLOCK, PVH, X86_X2APIC). X86_X2APIC needs HYPERVISOR_GUEST (or IRQ_REMAP), so the config could not enable it. cloud-hypervisor describes vCPUs only with x2APIC MADT entries, so an x86_64 guest booted with 1 usable CPU, whatever the VM's vCPU count. KVM_GUEST adds kvm-clock, paravirt spinlocks and paravirt TLB flush. CPU_SUP_AMD. Without it, a guest on an AMD host logs "CPU: vendor_id 'AuthenticAMD' unknown, using generic init." and skips the AMD CPU init. That init detects the AMD speculation issues (for example SRSO and Retbleed) and selects their mitigations, so the guest reported them as "Not affected" without a check, and ran the Intel BHI sequences instead. Haltpoll cpuidle (ARCH_CPUIDLE_HALTPOLL, HALTPOLL_CPUIDLE, CPU_IDLE_GOV_HALTPOLL): the guest polls briefly before an idle vCPU halts. The driver loads only when the host sets the KVM realtime hint or the kernel command line has cpuidle_haltpoll.force=1, so the default does not change. Hardening: X86_UMIP, HARDENED_USERCOPY, BPF_UNPRIV_DEFAULT_OFF (the Kconfig default; the kernel.unprivileged_bpf_disabled sysctl can still change it) and X86_INTEL_MEMORY_PROTECTION_KEYS (the Kconfig default; pkey_* system calls for guest processes, on Intel and AMD). Edited in place, as for earlier config changes.
crosbymichael
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Paravirt guest support (
HYPERVISOR_GUEST,PARAVIRT,PARAVIRT_SPINLOCKS,KVM_GUEST,PARAVIRT_CLOCK,PVH,X86_X2APIC).X86_X2APICneedsHYPERVISOR_GUEST(orIRQ_REMAP), so the config could not enable it. cloud-hypervisor describes vCPUs only with x2APIC MADT entries, so an x86_64 guest booted with 1 usable CPU, whatever the VM's vCPU count.KVM_GUESTadds kvm-clock, paravirt spinlocks and paravirt TLB flush.CPU_SUP_AMD. Without it, a guest on an AMD host logsCPU: vendor_id 'AuthenticAMD' unknown, using generic init.and skips the AMD CPU init. That init detects the AMD speculation issues (for example SRSO and Retbleed) and selects their mitigations, so the guest reported them as "Not affected" without a check.Haltpoll cpuidle (
ARCH_CPUIDLE_HALTPOLL,HALTPOLL_CPUIDLE,CPU_IDLE_GOV_HALTPOLL): the guest polls briefly before an idle vCPU halts. The driver loads only when the host sets the KVM realtime hint or the kernel command line hascpuidle_haltpoll.force=1, so the default does not change.Hardening:
X86_UMIP,HARDENED_USERCOPY,BPF_UNPRIV_DEFAULT_OFF(the Kconfig default; thekernel.unprivileged_bpf_disabledsysctl can still change it) andX86_INTEL_MEMORY_PROTECTION_KEYS(the Kconfig default;pkey_*system calls for guest processes, on Intel and AMD).Edited in place, as for earlier config changes.
Tests
kernel/build.sh: every option above is set afterolddefconfig.