[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 15/16] HACK: coco: Leak ASID for coco guests



In order to reuse a ASID in a SEV guest, we need to perform a
WBINVD on all pCPUs that ran the guest, then a DF_FLUSH on the PSP.

Just leak the ASID for now.

Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d3060329fb..ced58ccf4b 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -795,7 +795,10 @@ void hvm_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-    hvm_asid_free(&d->arch.hvm.asid);
+    if ( !is_coco_domain(d) )
+        hvm_asid_free(&d->arch.hvm.asid);
+    else
+        printk("coco: Leaking ASID %x: TODO (DF_FLUSH handling)\n", 
d->arch.hvm.asid.asid);
     destroy_vpci_mmcfg(d);
 
 }
-- 
2.49.0



Teddy Astie | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.