From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751281AbdLIFoK (ORCPT ); Sat, 9 Dec 2017 00:44:10 -0500 Received: from mga04.intel.com ([192.55.52.120]:20055 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbdLIFoG (ORCPT ); Sat, 9 Dec 2017 00:44:06 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,381,1508828400"; d="scan'208";a="1174970" Subject: Re: Re: WARNING in x86_emulate_insn To: Wanpeng Li , Tianyu Lan Cc: Jim Mattson , Dmitry Vyukov , syzbot , "H. Peter Anvin" , kvm , "linux-kernel@vger.kernel.org" , Ingo Molnar , Paolo Bonzini , Radim Krcmar , syzkaller-bugs@googlegroups.com, Thomas Gleixner , the arch/x86 maintainers References: <001a1143d526c5b1aa055f9d604c@google.com> From: "Lan, Tianyu" Message-ID: <919b87e5-502d-7445-454a-85243b450f1c@intel.com> Date: Sat, 9 Dec 2017 13:44:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/8/2017 5:27 PM, Wanpeng Li wrote: > 2017-12-08 16:28 GMT+08:00 Tianyu Lan : >> Hi Jim&Wanpeng: >> Thanks for your help. >> >> 2017-12-08 5:25 GMT+08:00 Jim Mattson : >>> Try disabling the module parameter, "unrestricted_guest." Make sure >>> that the module parameter, "emulate_invalid_guest_state" is enabled. >>> This combination allows userspace to feed invalid guest state into the >>> in-kernel emulator. >> >> Yes, you are right. I need to disable unrestricted_guest to reproduce the issue. > > I can observe ctxt->exception.vector == 0xff which triggers Dmitry's > report. Do you figure out the reason? > Yes, this is caused by that emulation callback returns error code while not emulate exception and not set exception vector. ctxt->exception.vector is default to be 0xff in emulate instruction code path.