Re: [PATCH V6 2/5] x86/hyper-v: Add hyperv Isolation VM check in the cc_platform_has()

From
Borislav Petkov <bp@alien8.de>
Date
2021-12-07 09:47:08
Also in
linux-arch, linux-hyperv, linux-iommu, linux-scsi, lkml
Reply to
Tianyu Lan, 2021-12-07
On Tue, Dec 07, 2021 at 02:55:58AM -0500, Tianyu Lan wrote:
From: Tianyu Lan <redacted>

Hyper-V provides Isolation VM which has memory encrypt support. Add
hyperv_cc_platform_has() and return true for check of GUEST_MEM_ENCRYPT
attribute.
You need to refresh on how to write commit messages - never say what the
patch is doing - that's visible in the diff itself. Rather, you should
talk about *why* it is doing what it is doing.
quoted hunk ↗ jump to hunk
 bool cc_platform_has(enum cc_attr attr)
 {
+	if (hv_is_isolation_supported())
+		return hyperv_cc_platform_has(attr);
Is there any reason for the hv_is_.. check to come before...
quoted hunk ↗ jump to hunk
+
 	if (sme_me_mask)
 		return amd_cc_platform_has(attr);
... the sme_me_mask check?

What's in sme_me_mask on hyperv?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Thread (19 messages) 19 messages, 5 authors, last reply 2021-12-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help