Skip to content

Commit d32917e

Browse files
committed
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
2 parents c511462 + 44ca941 commit d32917e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

arch/x86/configs/kvm_guest.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ CONFIG_VIRTIO_NET=y
2626
CONFIG_9P_FS=y
2727
CONFIG_NET_9P=y
2828
CONFIG_NET_9P_VIRTIO=y
29+
CONFIG_SCSI_LOWLEVEL=y
30+
CONFIG_SCSI_VIRTIO=y
31+
CONFIG_VIRTIO_INPUT=y

arch/x86/kvm/emulate.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5110,13 +5110,17 @@ static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt,
51105110

51115111
static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *))
51125112
{
5113+
register void *__sp asm(_ASM_SP);
51135114
ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF;
5115+
51145116
if (!(ctxt->d & ByteOp))
51155117
fop += __ffs(ctxt->dst.bytes) * FASTOP_SIZE;
5118+
51165119
asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n"
51175120
: "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags),
5118-
[fastop]"+S"(fop)
5121+
[fastop]"+S"(fop), "+r"(__sp)
51195122
: "c"(ctxt->src2.val));
5123+
51205124
ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK);
51215125
if (!fop) /* exception is returned in fop variable */
51225126
return emulate_de(ctxt);

0 commit comments

Comments
 (0)