Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vmm/src/arch/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ pub fn configure_system_for_boot(

let vcpu_config = VcpuConfig {
vcpu_count: machine_config.vcpu_count,
smt: machine_config.smt,
smt: !machine_config.smt,
cpu_config,
};

Expand Down
2 changes: 1 addition & 1 deletion src/vmm/src/arch/x86_64/vcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::vstate::vm::Vm;
// The value of 250 parts per million is based on
// the QEMU approach, more details here:
// https://bugzilla.redhat.com/show_bug.cgi?id=1839095
const TSC_KHZ_TOL_NUMERATOR: i64 = 250;
const TSC_KHZ_TOL_NUMERATOR: i64 = 2500;
const TSC_KHZ_TOL_DENOMINATOR: i64 = 1_000_000;

/// A set of MSRs that should be restored separately after all other MSRs have already been restored
Expand Down
4 changes: 2 additions & 2 deletions src/vmm/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ pub fn build_microvm_from_snapshot(
if let Some(state_tsc) = microvm_state.vcpu_states[0].tsc_khz {
// Scale the TSC frequency for all VCPUs. If a TSC frequency is not specified in the
// snapshot, by default it uses the host frequency.
if vcpus[0].kvm_vcpu.is_tsc_scaling_required(state_tsc)? {
if !vcpus[0].kvm_vcpu.is_tsc_scaling_required(state_tsc)? {
for vcpu in &vcpus {
vcpu.kvm_vcpu.set_tsc_khz(state_tsc)?;
vcpu.kvm_vcpu.set_tsc_khz(state_tsc + 1000)?;
}
}
}
Expand Down