aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-11 13:11:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-11 13:11:44 -0400
commitd32917eedc3b8a21f40206c8dd655beae5be8795 (patch)
tree86459c0380724624b28cfd12121ce6696751dd9a
parentc5114626f33b62fa7595e57d87f33d9d1f8298a2 (diff)
parent44ca941a677323b28366835428ec289a55f764d8 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini: "Two small x86 patches, improving "make kvmconfig" and fixing an objtool warning for CONFIG_PROFILE_ALL_BRANCHES" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvmconfig: add more virtio drivers x86/kvm: Add stack frame dependency to fastop() inline asm
-rw-r--r--arch/x86/configs/kvm_guest.config3
-rw-r--r--arch/x86/kvm/emulate.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/configs/kvm_guest.config b/arch/x86/configs/kvm_guest.config
index f9affcc3b9f1..9906505c998a 100644
--- a/arch/x86/configs/kvm_guest.config
+++ b/arch/x86/configs/kvm_guest.config
@@ -26,3 +26,6 @@ CONFIG_VIRTIO_NET=y
26CONFIG_9P_FS=y 26CONFIG_9P_FS=y
27CONFIG_NET_9P=y 27CONFIG_NET_9P=y
28CONFIG_NET_9P_VIRTIO=y 28CONFIG_NET_9P_VIRTIO=y
29CONFIG_SCSI_LOWLEVEL=y
30CONFIG_SCSI_VIRTIO=y
31CONFIG_VIRTIO_INPUT=y
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 0f6294376fbd..a2f24af3c999 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -5110,13 +5110,17 @@ static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt,
5110 5110
5111static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)) 5111static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *))
5112{ 5112{
5113 register void *__sp asm(_ASM_SP);
5113 ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF; 5114 ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF;
5115
5114 if (!(ctxt->d & ByteOp)) 5116 if (!(ctxt->d & ByteOp))
5115 fop += __ffs(ctxt->dst.bytes) * FASTOP_SIZE; 5117 fop += __ffs(ctxt->dst.bytes) * FASTOP_SIZE;
5118
5116 asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n" 5119 asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n"
5117 : "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags), 5120 : "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags),
5118 [fastop]"+S"(fop) 5121 [fastop]"+S"(fop), "+r"(__sp)
5119 : "c"(ctxt->src2.val)); 5122 : "c"(ctxt->src2.val));
5123
5120 ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK); 5124 ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK);
5121 if (!fop) /* exception is returned in fop variable */ 5125 if (!fop) /* exception is returned in fop variable */
5122 return emulate_de(ctxt); 5126 return emulate_de(ctxt);