Re: [PATCH RFC] KVM: SVM: reduce guest MAXPHYADDR by one in case C-bit is a physical bit
From: Paolo Bonzini
Date:  Mon Oct 18 2021 - 07:44:38 EST
On 17/10/21 09:54, Maxim Levitsky wrote:
I'll say, a hack to reduce it by 1 bit is still better that failing 
tests, at least until AMD explains to us, about what is going on.
What's going on is documented in the thread at
https://yhbt.net/lore/all/4f46f3ab-60e4-3118-1438-10a1e17cd900@xxxxxxxx/:
That doesn't really follow what Andrew gave us, namely:
1) On parts with <40 bits, its fully hidden from software
2) Before Fam17h, it was always 12G just below 1T, even if there was
more RAM above this location
3) On Fam17h and later, it is variable based on SME, and is either
just below 2^48 (no encryption) or 2^43 (encryption)
If you can use this information to implement the fix, that'd be very 
nice.  I didn't apply the hackish fix because I wanted to test it on a 
SME-enabled box.
Paolo