Skip to content

Commit d2a250f

Browse files
committed
fix Encryption Bit mask
1 parent ab054df commit d2a250f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kvm/sev/sev.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ func Features(cpu *amd64.CPU) (f SVMFeatures) {
6969
f.SEV.ES = bits.IsSet(&status, SEV_STATUS_SEV_ES)
7070
f.SEV.SNP = bits.IsSet(&status, SEV_STATUS_SEV_SNP)
7171

72-
_, ebx, _, _ := cpu.CPUID(amd64.CPUID_AMD_ENCM, 0) & 0b111111
73-
f.EncryptionBit = ebx 0b111111
72+
_, ebx, _, _ := cpu.CPUID(amd64.CPUID_AMD_ENCM, 0)
73+
f.EncryptionBit = ebx & 0b111111
7474

7575
return
7676
}

0 commit comments

Comments
 (0)