Hi Ashish,
For case with latest OVMF and older qemu that does not enable live migrations,
SetMemoryEncDecHypercall3() returns RETURN_UNSUPPORTED, which is correct.
But then its actually treated as an error and OVMF sees an assert. This is a valid usecase
and OVMF should move ahead without live migration and HC_MAP_GPA_RANGE.
....
> + //
> + // Notify Hypervisor on C-bit status
> + //
> + if (CBitChanged) {
Should we call the SetMemoryEncDecHypercall() only if migration is enabled like below?
if (CBitChanged && MemEncryptSevLiveMigrationIsEnabled () {
> + Status = SetMemoryEncDecHypercall3 (
> + OrigPhysicalAddress,
> + EFI_SIZE_TO_PAGES (OrigLength),
> + (Mode == SetCBit) ? TRUE : FALSE
> + );
> + }
> +
> ...
>
> return Status;
Regards
Nikunj