All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mem_sharing: gate enabling on cpu_has_vmx
@ 2020-05-25 14:46 Tamas K Lengyel
  2020-05-25 18:47 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Tamas K Lengyel @ 2020-05-25 14:46 UTC (permalink / raw)
  To: xen-devel
  Cc: Tamas K Lengyel, Wei Liu, Andrew Cooper, George Dunlap,
	Jan Beulich, Roger Pau Monné

From: Tamas K Lengyel <tamas@tklengyel.com>

It is unclear whether mem_sharing was ever made to work on other architectures
but at this time the only verified platform for it is vmx. No plans to support
or maintain it on other architectures. Make this explicit by checking during
initialization.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
---
 xen/arch/x86/mm/mem_sharing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 7271e5c90b..19922ab5d1 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1444,7 +1444,7 @@ static inline int mem_sharing_control(struct domain *d, bool enable,
 {
     if ( enable )
     {
-        if ( unlikely(!is_hvm_domain(d)) )
+        if ( unlikely(!is_hvm_domain(d) || !cpu_has_vmx) )
             return -EOPNOTSUPP;
 
         if ( unlikely(!hap_enabled(d)) )
-- 
2.26.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/mem_sharing: gate enabling on cpu_has_vmx
  2020-05-25 14:46 [PATCH] x86/mem_sharing: gate enabling on cpu_has_vmx Tamas K Lengyel
@ 2020-05-25 18:47 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2020-05-25 18:47 UTC (permalink / raw)
  To: Tamas K Lengyel
  Cc: Tamas K Lengyel, Wei Liu, Andrew Cooper, George Dunlap,
	Jan Beulich, xen-devel, Roger Pau Monné

On Mon, May 25, 2020 at 08:46:06AM -0600, Tamas K Lengyel wrote:
> From: Tamas K Lengyel <tamas@tklengyel.com>
> 
> It is unclear whether mem_sharing was ever made to work on other architectures
> but at this time the only verified platform for it is vmx. No plans to support
> or maintain it on other architectures. Make this explicit by checking during
> initialization.
> 
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>

Reviewed-by: Wei Liu <wl@xen.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-26  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 14:46 [PATCH] x86/mem_sharing: gate enabling on cpu_has_vmx Tamas K Lengyel
2020-05-25 18:47 ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.