Dave Hansen dave.hansen@intel.com writes:
On 11/16/26 01:11, Aneesh Kumar K.V (Arm) wrote:
if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
r = set_memory_decrypted((unsigned long) hvclock_mem,
r = set_memory_decrypted((unsigned long)hvclock_mem, 1UL << order);NAK on this specific patch.
Good idea, but this needs to be broken out to do fewer things at once.
Are you suggesting that this be split into per-architecture patches?
The vga changes, for instance, are not explained anywhere.
modified arch/x86/include/asm/vga.h @@ -14,7 +14,7 @@ * On the PC, we can just recalculate addresses and then * access the videoram directly without any black magic. * To support memory encryption however, we need to access - * the videoram as decrypted memory. + * the videoram as decrypted memory without clearing its contents. */
#define VGA_MAP_MEM(x, s) \ @@ -22,7 +22,7 @@ unsigned long start = (unsigned long)phys_to_virt(x); \ \ if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT)) \ - set_memory_decrypted(start, (s) >> PAGE_SHIFT); \ + set_memory_decrypted_nozero(start, (s) >> PAGE_SHIFT); \ \ start; \ })
The VGA change is an API substitution intended to preserve the existing behavior: set_memory_decrypted_nozero() avoids the newly added memset(). I have not audited the VGA-specific memory encryption handling in detail.
I had intended the updated comment to explain this, but I can also split the patch and add that explanation.
-aneesh
linaro-mm-sig@lists.linaro.org