Skip to content

Unify mshv and whp partition features #1685

Open

Description

@ludfjig

Currently when creating a partition we depend a lot on default partition features for both whp and mshv, which can result in different features being exposed in the guest (linux and windows apis are different and enables/disables different things). We should:

  1. Make sure we only enable want we need, disable the rest, and probably not rely on default features
  2. Make sure mshv and whp do the same thing

======

Examples:

LMCE is unconditionally disabled on whp, but is enabled on mshv (if enabled in firmware), unsure if this can expose MCG_EXT_CTL

Activity

  1. ludfjig commented on Jul 24, 2026

    @ludfjig
    ContributorAuthor

    Fixing the example above might look something like this, but should double check

    let mut pr: mshv_create_partition_v2 = Default::default();
    
    // ... existing pt_flags (LAPIC under hw-interrupts) ...
    
    pr.pt_flags |= 1 << 3;           // MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES
    pr.pt_num_cpu_fbanks = 2;        // MSHV_NUM_CPU_FEATURES_BANKS
    pr.pt_cpu_fbanks[1] |= 1 << 37;  // disable LocalMachineCheckSupport 
  2. added
    lifecycle/confirmedBug is verified or proposal seems reasonable
    and removed on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/confirmedBug is verified or proposal seems reasonable

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions