From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD4ABC19F2D for ; Sat, 6 Aug 2022 11:08:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbiHFLIN (ORCPT ); Sat, 6 Aug 2022 07:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229695AbiHFLIN (ORCPT ); Sat, 6 Aug 2022 07:08:13 -0400 Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [IPv6:2a0c:5a00:149::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAAD6EE38; Sat, 6 Aug 2022 04:08:10 -0700 (PDT) Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1oKHf4-005H9H-N1; Sat, 06 Aug 2022 13:08:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Message-Id:In-Reply-To:Date:Subject:CC:To:From:MIME-Version: Content-Transfer-Encoding:Content-Type; bh=4k4hrKfuKMWTUDyGqGN1lIamEwVduqLB33bUAdj0r8c=; b=XZFxd3Pb8OTvVOLg3kWw+3fg3u bA0o1gNWlSN+gfLPr41aKhdIsZHFJBCMeyU5Il5W/DJJ34LXaL9oGZIHNqtYcJBZe7JJ5V+N4sLXa i10ukM1uGEp/YitBsQ0m6PyHAXPX8aJsYcdkLgqSJpHkpGefo4oBjFfnOSzS+D/cIDDR5TZWc1hfP vcSvtGGInAGONkfIPp2V1a9ag+rvRJ14PU2auLNMrFRwdLPJmh+zBvMAQ+56MNcYaKMZebIFUlACU 35Xfb0QLLZaOMLf4xSXn/jgiREdhoBFVLEVA9uGubJIdigBjq6CmUxgqUBDXNCBMEZI+7dcZFsAAG dHrHGSzA==; Received: from [10.9.9.127] (helo=rmmprod05.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1oKHf4-0003Vw-8K; Sat, 06 Aug 2022 13:08:06 +0200 Received: from mail by rmmprod05.runbox with local (Exim 4.86_2) (envelope-from ) id 1oKHf4-0001d6-6W; Sat, 06 Aug 2022 13:08:06 +0200 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received: from [Authenticated alias (604044)] by runbox.com with http (RMM6); Sat, 06 Aug 2022 11:08:06 GMT From: "Michal Luczaj" To: "Nadav Amit" CC: "Paolo Bonzini" , "kvm" , "shuah" , "linux-kselftest" , "Sean Christopherson" Subject: Re: [kvm-unit-tests PATCH 2/4] x86: emulator.c cleanup: Use ASM_TRY for the UD_VECTOR cases Date: Sat, 06 Aug 2022 13:08:06 +0200 (CEST) X-RMM-Aliasid: 604044 X-Mailer: RMM6 In-Reply-To: Message-Id: Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Fri, 5 Aug 2022 19:00:12 -0700, Nadav Amit wrote: > On Aug 5, 2022, at 12:59 PM, Sean Christopherson wrot= e: > > On Fri, Aug 05, 2022, Michal Luczaj wrote: > >> On Fri, 5 Aug 2022 13:42:40 +0200, Paolo Bonzini = wrote: > >>> The original reason was to test Linux using MOVBE even on non-Atom=20 > >>> machines, when MOVBE was only on Atoms. :) > >>=20 > >> So the emulator's logic for MOVBE is meant to be tested only when the > >> guest supports MOVBE while the host does not? > >=20 > > Ah, I see what you're asking. No, it's perfectly legal to test MOVBE e= mulation > > on hosts that support MOVBE, i.e. using FEP is allowed. But because KV= M emulates > > MOVBE on #UD and the KUT testcase is guaranteed to generate a #UD (barr= ing a > > hardware bug), there's no need to use FEP. And not using FEP is advant= ageous > > because it avoids depending on an opt-in non-production module param. >=20 > If history is discussed, the test was created long before FEP. Without FE= P, > the way to force the emulator to emulate an instruction was to set the > instruction in memory that is not mapped to the guest. But, as Sean state= d, > this test always triggers #UD, so it was not necessary. >=20 > The purpose of this test was to check a KVM fix for a bug that was found > during fuzzing: >=20 > https://lore.kernel.org/all/5475DC42.6000201@redhat.com/T/#m3a0da02d7c750= c28816b08c43cf2ca03252b8bad OK, I think I finally get it. Thank you, guys, for all the details. Michal