diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-09 03:02:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-09 03:02:35 -0400 |
commit | 1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch) | |
tree | 47da3feee8e263e8c9352c85cf518e624be3c211 /arch/x86/kvm/emulate.c | |
parent | 750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff) | |
parent | 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff) |
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 16bf6655aa85..d90cdc77e077 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -425,8 +425,10 @@ static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)); | |||
425 | #op " %al \n\t" \ | 425 | #op " %al \n\t" \ |
426 | FOP_RET | 426 | FOP_RET |
427 | 427 | ||
428 | asm(".global kvm_fastop_exception \n" | 428 | asm(".pushsection .fixup, \"ax\"\n" |
429 | "kvm_fastop_exception: xor %esi, %esi; ret"); | 429 | ".global kvm_fastop_exception \n" |
430 | "kvm_fastop_exception: xor %esi, %esi; ret\n" | ||
431 | ".popsection"); | ||
430 | 432 | ||
431 | FOP_START(setcc) | 433 | FOP_START(setcc) |
432 | FOP_SETCC(seto) | 434 | FOP_SETCC(seto) |
@@ -4102,10 +4104,12 @@ static int check_cr_write(struct x86_emulate_ctxt *ctxt) | |||
4102 | ctxt->ops->get_msr(ctxt, MSR_EFER, &efer); | 4104 | ctxt->ops->get_msr(ctxt, MSR_EFER, &efer); |
4103 | if (efer & EFER_LMA) { | 4105 | if (efer & EFER_LMA) { |
4104 | u64 maxphyaddr; | 4106 | u64 maxphyaddr; |
4105 | u32 eax = 0x80000008; | 4107 | u32 eax, ebx, ecx, edx; |
4106 | 4108 | ||
4107 | if (ctxt->ops->get_cpuid(ctxt, &eax, NULL, NULL, | 4109 | eax = 0x80000008; |
4108 | NULL, false)) | 4110 | ecx = 0; |
4111 | if (ctxt->ops->get_cpuid(ctxt, &eax, &ebx, &ecx, | ||
4112 | &edx, false)) | ||
4109 | maxphyaddr = eax & 0xff; | 4113 | maxphyaddr = eax & 0xff; |
4110 | else | 4114 | else |
4111 | maxphyaddr = 36; | 4115 | maxphyaddr = 36; |
@@ -5296,7 +5300,6 @@ static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt, | |||
5296 | 5300 | ||
5297 | static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)) | 5301 | static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)) |
5298 | { | 5302 | { |
5299 | register void *__sp asm(_ASM_SP); | ||
5300 | ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF; | 5303 | ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF; |
5301 | 5304 | ||
5302 | if (!(ctxt->d & ByteOp)) | 5305 | if (!(ctxt->d & ByteOp)) |
@@ -5304,7 +5307,7 @@ static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)) | |||
5304 | 5307 | ||
5305 | asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n" | 5308 | asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n" |
5306 | : "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags), | 5309 | : "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags), |
5307 | [fastop]"+S"(fop), "+r"(__sp) | 5310 | [fastop]"+S"(fop), ASM_CALL_CONSTRAINT |
5308 | : "c"(ctxt->src2.val)); | 5311 | : "c"(ctxt->src2.val)); |
5309 | 5312 | ||
5310 | ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK); | 5313 | ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK); |