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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B811DC3A5A5 for ; Thu, 5 Sep 2019 09:15:58 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 62A4921848 for ; Thu, 5 Sep 2019 09:15:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62A4921848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D1E554A4E8; Thu, 5 Sep 2019 05:15:57 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IWCeeDmF-YoA; Thu, 5 Sep 2019 05:15:56 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AA1BF4A533; Thu, 5 Sep 2019 05:15:56 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1B5554A4E8 for ; Thu, 5 Sep 2019 05:15:55 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tySEaEXy+m4X for ; Thu, 5 Sep 2019 05:15:53 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E22C74A417 for ; Thu, 5 Sep 2019 05:15:53 -0400 (EDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 89DE9360; Thu, 5 Sep 2019 02:15:53 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [10.1.27.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1612E3F67D; Thu, 5 Sep 2019 02:15:50 -0700 (PDT) Date: Thu, 05 Sep 2019 10:15:49 +0100 Message-ID: <86k1anrtmi.wl-maz@kernel.org> From: Marc Zyngier To: Peter Maydell Subject: Re: [PATCH 1/1] KVM: inject data abort if instruction cannot be decoded In-Reply-To: References: <20190904180736.29009-1-xypron.glpk@gmx.de> <86r24vrwyh.wl-maz@kernel.org> <86mufjrup7.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: =?UTF-8?B?IkRhbmllbCBQIC4gQmVycmFuZ8OpIg==?= , Heinrich Schuchardt , lkml - Kernel Mailing List , Stefan Hajnoczi , kvmarm@lists.cs.columbia.edu, arm-mail-list X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, 05 Sep 2019 09:56:44 +0100, Peter Maydell wrote: > > On Thu, 5 Sep 2019 at 09:52, Marc Zyngier wrote: > > > > On Thu, 05 Sep 2019 09:16:54 +0100, > > Peter Maydell wrote: > > > This is true, but the problem is that barfing out to userspace > > > makes it harder to debug the guest because it means that > > > the VM is immediately destroyed, whereas AIUI if we > > > inject some kind of exception then (assuming you're set up > > > to do kernel-debug via gdbstub) you can actually examine > > > the offending guest code with a debugger because at least > > > your VM is still around to inspect... > > > > To Christoffer's point, I find the benefit a bit dubious. Yes, you get > > an exception, but the instruction that caused it may be completely > > legal (store with post-increment, for example), leading to an even > > more puzzled developer (that exception should never have been > > delivered the first place). > > Right, but the combination of "host kernel prints a message > about an unsupported load/store insn" and "within-guest debug > dump/stack trace/etc" is much more useful than just having > "host kernel prints message" and "QEMU exits"; and it requires > about 3 lines of code change... Which is wrong, and creates a new behaviour that isn't specified anywhere. > > > I'm far more in favour of dumping the state of the access in the run > > structure (much like we do for a MMIO access) and let userspace do > > something about it (such as dumping information on the console or > > breaking). It could even inject an exception *if* the user has asked > > for it. > > ...whereas this requires agreement on a kernel-userspace API, > larger changes in the kernel, somebody to implement the userspace > side of things, and the user to update both the kernel and QEMU. > It's hard for me to see that the benefit here over the 3-line > approach really outweighs the extra effort needed. 3 lines that already require the host kernel to be updated, and create a legacy that we'll never be able to get rid of. > In practice saying "we should do this" is saying "we're going to do > nothing", based on the historical record. Thanks for the vote of confidence... M. -- Jazz is not dead, it just smells funny. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm