Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1726719 > unrolled thread

[PATCH 4/4] paravirt,xen: correct xen_nopvspin case

Started byJuergen Gross <jgross@suse.com>
First post2017-09-05 15:30 +0200
Last post2017-09-05 15:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/4] paravirt,xen: correct xen_nopvspin case Juergen Gross <jgross@suse.com> - 2017-09-05 15:30 +0200

#1726719 — [PATCH 4/4] paravirt,xen: correct xen_nopvspin case

FromJuergen Gross <jgross@suse.com>
Date2017-09-05 15:30 +0200
Subject[PATCH 4/4] paravirt,xen: correct xen_nopvspin case
Message-ID<umm5s-38R-19@gated-at.bofh.it>
With the boot parameter "xen_nopvspin" specified a Xen guest should not
make use of paravirt spinlocks, but behave as if running on bare
metal. This is not true, however, as the qspinlock code will fall back
to a test-and-set scheme when it is detecting a hypervisor.

In order to avoid this set the virt_spin_lock pvops function to
_paravirt_false() in case xen_nopvspin has been specified.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 arch/x86/xen/spinlock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 25a7c4302ce7..c01cedfa745d 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -129,6 +129,8 @@ void __init xen_init_spinlocks(void)
 
 	if (!xen_pvspin) {
 		printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
+		pv_lock_ops.virt_spin_lock =
+			__PV_IS_CALLEE_SAVE(_paravirt_false);
 		return;
 	}
 	printk(KERN_DEBUG "xen: PV spinlocks enabled\n");
-- 
2.12.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web