linux/arch/x86
Konrad Rzeszutek Wilk 26a7999527 xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM
Before this patch we would patch all of the pv_lock_ops sites
using alternative assembler. Then later in the bootup cycle
change the unlock_kick and lock_spinning to the Xen specific -
without re patching.

That meant that for the core of the kernel we would be running
with the baremetal version of unlock_kick and lock_spinning while
for modules we would have the proper Xen specific slowpaths.

As most of the module uses some API from the core kernel that ended
up with slowpath lockers waiting forever to be kicked (b/c they
would be using the Xen specific slowpath logic). And the
kick never came b/c the unlock path that was taken was the
baremetal one.

On PV we do not have the problem as we initialise before the
alternative code kicks in.

The fix is to make the updating of the pv_lock_ops function
be done before the alternative code starts patching.

Note that this patch fixes issues discovered by commit
f10cd522c5.
("xen: disable PV spinlocks on HVM") wherein it mentioned

   PV spinlocks cannot possibly work with the current code because they are
   enabled after pvops patching has already been done, and because PV
   spinlocks use a different data structure than native spinlocks so we
   cannot switch between them dynamically.

The first problem is solved by this patch.

The second problem has been solved by commit
816434ec4a
(Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)

P.S.
There is still the commit 70dd4998cb
(xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM) to
revert but that can be done later after all other bugs have been
fixed.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
2013-09-09 12:06:31 -04:00
..
boot x86, efi: correct call to free_pages 2013-07-26 15:22:32 +01:00
configs
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-07-24 11:05:18 -07:00
ia32 mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
include Linux 3.11-rc7 2013-09-09 12:05:37 -04:00
kernel Linux 3.11-rc7 2013-09-09 12:05:37 -04:00
kvm KVM: MMU: avoid fast page fault fixing mmio page fault 2013-07-18 12:26:57 +02:00
lguest Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-06 14:09:38 -07:00
lib
math-emu
mm x86 get_unmapped_area: Access mmap_legacy_base through mm_struct member 2013-08-22 10:19:35 -07:00
net
oprofile
pci x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
platform arch/x86/platform/ce4100/ce4100.c: include reboot.h 2013-07-31 14:41:02 -07:00
power
realmode
syscalls
tools
um um: remove dead code 2013-07-19 11:35:32 +02:00
vdso
video
xen xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM 2013-09-09 12:06:31 -04:00
.gitignore
Kbuild
Kconfig kvm guest: Add configuration support to enable debug information for KVM Guests 2013-08-09 07:54:18 -07:00
Kconfig.cpu
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile x86/platform: Add kvmconfig to the phony targets 2013-06-23 12:17:35 +02:00
Makefile.um
Makefile_32.cpu