*/I still feel this is confusing. SME is a host/bare-metal technology, so
- if (sme_active())
+ if (protected_guest_has(VM_HOST_MEM_ENCRYPT))
swiotlb = 1;
calling protected_guest_has() seems odd and using VM_HOST_MEM_ENCRYPT,
where I assume VM is short for virtual machine, also seems odd.
How about just protected_os_has()? Then you could have
- HOST_MEM_ENCRYPT for host memory encryption
- GUEST_MEM_ENCRYPT for guest memory encryption
- MEM_ENCRYPT for either host or guest memory encryption.
The first is analogous to sme_active(), the second to sev_active() and the
third to mem_encrypt_active(). Just my opinion, though...