From: Paolo Bonzini Date: Mon, 22 Sep 2014 11:17:48 +0000 (+0200) Subject: x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only X-Git-Tag: fixes-for-v3.18-merge-window~23^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1118b3602c2329671ad5ec8bdf8e374323d6343;p=pandora-kernel.git x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only On x86_64, kernel text mappings are mapped read-only with CONFIG_DEBUG_RODATA. In that case, KVM will fail to patch VMCALL instructions to VMMCALL as required on AMD processors. The failure mode is currently a divide-by-zero exception, which obviously is a KVM bug that has to be fixed. However, picking the right instruction between VMCALL and VMMCALL will be faster and will help if you cannot upgrade the hypervisor. Reported-by: Chris Webb Tested-by: Chris Webb Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Acked-by: Borislav Petkov Signed-off-by: Paolo Bonzini --- Reading git-diff-tree failed