From: Paolo Bonzini Subject: Re: [kvm-unit-tests PATCH 0/2] x86: Testcase for wrong TF handling in syscall/sysret Date: Thu, 27 Jul 2017 15:09:14 +0200 Message-ID: <2a9a7ccb-4d60-78dc-177b-c7953612b64c@redhat.com> References: <20170622152707.18399-1-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: kvm , P J P To: Wanpeng Li , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44888 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbdG0NJW (ORCPT ); Thu, 27 Jul 2017 09:09:22 -0400 In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 27/07/2017 14:05, Wanpeng Li wrote: > 2017-06-22 23:27 GMT+08:00 Radim Krčmář : >> Patch 1 creates a new testcase executable, and patch 2 tests the bug. >> >> Paolo Bonzini (2): >> x86: move syscall MSR testcase to separate test >> x86: add testcase for syscall/sysret TF handling > > ./x86-run x86/syscall.flat > qemu-system-i386 -nodefaults -device pc-testdev -device > isa-debug-exit,iobase=0xf4,iosize=0x4 --enable-kvm -vnc none -serial > stdio -device pci-testdev -machine accel=kvm -kernel x86/syscall.flat > enabling apic > PASS: MSR_*STAR eager loading > Unhandled exception 6 #UD at ip 000000000040036e > error_code=0000 rflags=00010046 cs=0000003b > rax=0000000000000146 rcx=0000000000400365 rdx=0000000000000001 > rbx=00000000c0000080 > rbp=000000000044df80 rsi=0000000000400372 rdi=0000000000000001 > r8=000000000040c70c r9=00000000000003f8 r10=0000000000000002 > r11=0000000000000046 > r12=00000000c0000081 r13=00000097cfdff1ab r14=00000097d130aad0 > r15=0000000000000002 > cr0=0000000080000011 cr2=0000000000000000 cr3=0000000000409000 > cr4=0000000000000020 > cr8=0000000000000000 > STACK: @40036e 4002a2 > > I can encounter this w/ -cpu host or w/o -cpu host for both > qemu-system-i386 and qemu-system-x86_64. Correct. From x86/unittests.cfg: [syscall] file = syscall.flat extra_params = -cpu Opteron_G1,vendor=AuthenticAMD Paolo