Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Jun 10, 2024
1 parent 14a1643 commit d57760a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/arch/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ mod tests {
PageTableFlags::from_bits_truncate(entry)
.difference(
PageTableFlags::PRESENT
| PageTableFlags::WRITABLE | PageTableFlags::HUGE_PAGE
| PageTableFlags::WRITABLE
| PageTableFlags::HUGE_PAGE
)
.is_empty(),
"Pagetable bits at {addr:#x} are incorrect"
Expand Down
23 changes: 12 additions & 11 deletions src/macos/x86_64/vcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,18 @@ lazy_static! {
let cap: u64 = { read_vmx_cap(&xhypervisor::VMXCap::PINBASED).unwrap() };
cap2ctrl(cap, PIN_BASED_INTR | PIN_BASED_NMI | PIN_BASED_VIRTUAL_NMI)
};
static ref CAP_PROCBASED: u64 =
{
let cap: u64 = { read_vmx_cap(&xhypervisor::VMXCap::PROCBASED).unwrap() };
cap2ctrl(
cap,
CPU_BASED_SECONDARY_CTLS
| CPU_BASED_MWAIT | CPU_BASED_MSR_BITMAPS
| CPU_BASED_MONITOR | CPU_BASED_TSC_OFFSET
| CPU_BASED_TPR_SHADOW,
)
};
static ref CAP_PROCBASED: u64 = {
let cap: u64 = { read_vmx_cap(&xhypervisor::VMXCap::PROCBASED).unwrap() };
cap2ctrl(
cap,
CPU_BASED_SECONDARY_CTLS
| CPU_BASED_MWAIT
| CPU_BASED_MSR_BITMAPS
| CPU_BASED_MONITOR
| CPU_BASED_TSC_OFFSET
| CPU_BASED_TPR_SHADOW,
)
};
static ref CAP_PROCBASED2: u64 = {
let cap: u64 = { read_vmx_cap(&xhypervisor::VMXCap::PROCBASED2).unwrap() };
cap2ctrl(cap, CPU_BASED2_RDTSCP | CPU_BASED2_APIC_REG_VIRT)
Expand Down

0 comments on commit d57760a

Please sign in to comment.