[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ee70d2db97c4f719fd23d68741069db@intel.com>
Date: Wed, 8 Sep 2021 00:59:10 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: Jarkko Sakkinen <jarkko@...nel.org>,
Sean Christopherson <seanjc@...gle.com>,
"Hansen, Dave" <dave.hansen@...el.com>
CC: "Zhang, Cathy" <cathy.zhang@...el.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 5/6] x86/sgx: Hook sgx_memory_failure() into mainline
code
> I'm going to explore Dave's suggestion of changing the names to something less sgx specific.
So now I have the two functions renamed to
arch_memory_failure() and arch_is_platform_page()
in arch/x86/kernel/cpu/sgx/main.c
In arch/x86/include/asm/processor.h
+#ifdef CONFIG_X86_SGX
+int arch_memory_failure(unsigned long pfn, int flags);
+#define arch_memory_failure arch_memory_failure
+
+bool arch_is_platform_page(u64 paddr);
+#define arch_is_platform_page arch_is_platform_page
+#endif
and in include/linux/mm.h
+#ifndef arch_memory_failure
+static inline int arch_memory_failure(unsigned long pfn, int flags)
+{
+ return -ENXIO;
+}
+#endif
+#ifndef arch_is_platform_page
+static inline bool arch_is_platform_page(u64 paddr)
+{
+ return false;
+}
+#endif
Dave: Is that what you wanted? If so I can fold these bits back into the
appropriate bits of the series. Address other comments. and post v5.
Sean: If you have stuff that needs attention in v4 please holler soon.
-Tony
Powered by blists - more mailing lists