On 09/07/20 11:55, Mohammed Gamal wrote:
> Ideally we would simply outlaw (3), but it's hard for
backward
> compatibility reasons. Second best solution is a flag somewhere
> (msr, cpuid, ...) telling the guest firmware "you can use
> GUEST_MAXPHYADDR, we guarantee it is <= HOST_MAXPHYADDR".
Problem is GUEST_MAXPHYADDR > HOST_MAXPHYADDR is actually a supported
configuration on some setups. Namely when memory encryption is enabled
on AMD CPUs[1].
It's not that bad since there's two MAXPHYADDRs, the one in CPUID and
the one computed internally by the kernel. GUEST_MAXPHYADDR greater
than the host CPUID maxphyaddr is never supported.
Paolo