Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755459AbcKOFdB (ORCPT ); Tue, 15 Nov 2016 00:33:01 -0500 Received: from mail-pg0-f42.google.com ([74.125.83.42]:34986 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752423AbcKOFc7 (ORCPT ); Tue, 15 Nov 2016 00:32:59 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: kvm: WARNING in em_jmp_far From: Nadav Amit In-Reply-To: Date: Mon, 14 Nov 2016 21:24:43 -0800 Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , KVM list , LKML , Steve Rutherford , syzkaller , Paolo Bonzini , =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= Message-Id: <45DE3A97-304D-4D1A-AADE-1B9D154BB7DF@gmail.com> References: To: Dmitry Vyukov X-Mailer: Apple Mail (2.3251) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAF5XE4M025279 Content-Length: 732 Lines: 21 > On Nov 14, 2016, at 9:06 PM, Dmitry Vyukov wrote: > > Hello, > > The following program triggers WARNING in em_jmp_far: > https://gist.githubusercontent.com/dvyukov/16bfd3d68fa7d5461101ef74e07796e4/raw/e6d663980681f2c5838ff6cd361cede7d3204838/gistfile1.txt > > > WARNING: CPU: 1 PID: 15748 at arch/x86/kvm/emulate.c:2128 em_jmp_far+0x4a7/0x530 I don’t know how to “read” the test, but it seems that this warning can be triggered if CS base/limit cause a #GP exception when EIP is loaded. I think it safe to remove this warning (which I introduced) as well as the redundant “return rc” that follows it. The code should handle the emulation correctly regardless of the warning. Regards, Nadav