mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
virt: vmgenid: remap memory as decrypted
It was found that AWS SEV-SNP enabled instances are not able to boot with commit81256a50aa("x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default") applied and the reason seems to be the vmgenid device which requires unencrypted writeable memory. A similar problem was previously fixed in DRM with commit7dfede7d7e("drm/vmwgfx: Fix guests running with TDX/SEV"). Note, trusting vmgenid device in a Confidential VM is questionable: the malicious host may intentionally avoid notifying the guest when a copy is created. Fixes:81256a50aa("x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default") Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: stable@vger.kernel.org # 6.15+ Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
3f9f025213
commit
bb9ff576fd
@@ -75,7 +75,8 @@ static int vmgenid_add_acpi(struct device *dev, struct vmgenid_state *state)
|
||||
phys_addr = (obj->package.elements[0].integer.value << 0) |
|
||||
(obj->package.elements[1].integer.value << 32);
|
||||
|
||||
virt_addr = devm_memremap(&device->dev, phys_addr, VMGENID_SIZE, MEMREMAP_WB);
|
||||
virt_addr = devm_memremap(&device->dev, phys_addr, VMGENID_SIZE,
|
||||
MEMREMAP_WB | MEMREMAP_DEC);
|
||||
if (IS_ERR(virt_addr)) {
|
||||
ret = PTR_ERR(virt_addr);
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user