Skip to content

Commit

Permalink
Merge pull request #209 from msft-jlange/validate
Browse files Browse the repository at this point in the history
Fix PVALIDATE
  • Loading branch information
joergroedel authored Jan 11, 2024
2 parents 6994dc5 + ac6f804 commit 7cbc6dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sev/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ pub fn pvalidate(vaddr: VirtAddr, size: PageSize, valid: PvalidateOp) -> Result<
let cf: u64;

unsafe {
asm!(".byte 0xf2, 0x0f, 0x01, 0xff",
"xorq %rcx, %rcx",
asm!("xorq %r8, %r8",
".byte 0xf2, 0x0f, 0x01, 0xff",
"jnc 1f",
"incq %rcx",
"incq %r8",
"1:",
in("rax") rax,
in("rcx") rcx,
in("rdx") rdx,
lateout("rax") ret,
lateout("rcx") cf,
lateout("r8") cf,
options(att_syntax));
}

Expand Down

0 comments on commit 7cbc6dd

Please sign in to comment.