Skip to content

Commit

Permalink
firmware/guest: Always set guest policy 17th bit
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Fanelli <[email protected]>
  • Loading branch information
tylerfanelli committed Jul 3, 2024
1 parent 3ef6d14 commit 642b772
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/firmware/guest/types/snp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,10 @@ impl Display for GuestPolicy {

impl From<GuestPolicy> for u64 {
fn from(value: GuestPolicy) -> Self {
value.0
// Bit 17 of the guest policy is reserved and must always be set to 1.
let reserved: u64 = 1 << 17;

value.0 | reserved
}
}

Expand Down

0 comments on commit 642b772

Please sign in to comment.