Skip to content

Commit

Permalink
mshv-ioctls/system: Generally enable X2APIC for all the guests
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislav Kinsburskii <[email protected]>
  • Loading branch information
Stanislav Kinsburskii committed Mar 18, 2024
1 parent d634dc5 commit b819c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mshv-ioctls/src/ioctls/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ impl Mshv {
pub fn create_vm_with_type(&self, vm_type: VmType) -> Result<VmFd> {
let mut mshv_builder = MshvPartitionBuilder::new()
.set_partition_creation_flag(HV_PARTITION_CREATION_FLAG_LAPIC_ENABLED as u64)
.set_partition_creation_flag(HV_PARTITION_CREATION_FLAG_X2APIC_CAPABLE as u64)
.set_synthetic_processor_feature(SyntheticProcessorFeature::HypervisorPresent)
.set_synthetic_processor_feature(SyntheticProcessorFeature::Hv1)
.set_synthetic_processor_feature(
Expand All @@ -285,7 +286,6 @@ impl Mshv {

if vm_type == VmType::Snp {
mshv_builder = mshv_builder
.set_partition_creation_flag(HV_PARTITION_CREATION_FLAG_X2APIC_CAPABLE as u64)
.set_isolation_type(HV_PARTITION_ISOLATION_TYPE_SNP as u64)
.set_shared_gpa_boundary_page_number(0_u64);
}
Expand Down

0 comments on commit b819c76

Please sign in to comment.