Skip to content

Commit 2aa378c

Browse files
committed
firmware/guest: Always set guest policy 17th bit
Signed-off-by: Tyler Fanelli <[email protected]>
1 parent 9f8545c commit 2aa378c

File tree

1 file changed

+4
-1
lines changed
  • src/firmware/guest/types

1 file changed

+4
-1
lines changed

src/firmware/guest/types/snp.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,10 @@ impl Display for GuestPolicy {
466466

467467
impl From<GuestPolicy> for u64 {
468468
fn from(value: GuestPolicy) -> Self {
469-
value.0
469+
// Bit 17 of the guest policy is reserved and must always be set to 1.
470+
let reserved: u64 = 1 << 17;
471+
472+
value.0 | reserved
470473
}
471474
}
472475

0 commit comments

Comments
 (0)