mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-13 23:22:07 +00:00
hyperv: Fix CPU hotadd
The following is from the Hyper-V specification v6.0b. Cpuid leaf 0x40000003 EDX: Bit 3: Support for physical CPU dynamic partitioning events is available. When Windows determines to be running under a hypervisor, it will require this cpuid bit to be set to support dynamic CPU operations. Cpuid leaf 0x40000004 EAX: Bit 5: Recommend using relaxed timing for this partition. If used, the VM should disable any watchdog timeouts that rely on the timely delivery of external interrupts. This bit has been figured out as required after seeing guest BSOD when CPU hotplug bit is enabled. Race conditions seem to arise after a hotplug operation, when a system watchdog has expired. Closes #1799. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com> (cherry picked from commit 5b168f54a69260137cf05a5fde229334c85c4af7) Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
84b3992146
commit
498939c297
@ -742,10 +742,18 @@ impl CpuManager {
|
||||
| 1 << 2 // AccessSynicRegs
|
||||
| 1 << 3 // AccessSyntheticTimerRegs
|
||||
| 1 << 9, // AccessPartitionReferenceTsc
|
||||
edx: 1 << 3, // CPU dynamic partitioning
|
||||
..Default::default()
|
||||
})
|
||||
.map_err(Error::CpuidKvmHyperV)?;
|
||||
for i in 0x4000_0004..=0x4000_000a {
|
||||
cpuid
|
||||
.push(CpuIdEntry {
|
||||
function: 0x4000_0004,
|
||||
eax: 1 << 5, // Recommend relaxed timing
|
||||
..Default::default()
|
||||
})
|
||||
.map_err(Error::CpuidKvmHyperV)?;
|
||||
for i in 0x4000_0005..=0x4000_000a {
|
||||
cpuid
|
||||
.push(CpuIdEntry {
|
||||
function: i,
|
||||
|
Loading…
x
Reference in New Issue
Block a user