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=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 5CDC8C12002 for ; Wed, 14 Jul 2021 23:28:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28DB5613CC for ; Wed, 14 Jul 2021 23:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28DB5613CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=msvUoEwKveAgBkzr5SRLS1/sRX1pIEpUvS3bdhYLv/o=; b=3eSNDhSb9Z0SFd EYPCQ3M1QOyK231YS/BS7aQxQvbT7hevdPBsDt7+Pagxg2zrvrBJQtyuG5WEKZAZuX8EWGc7BM4Nk sTt7a1C47c7WhacZvlW/LKa/xQx0rfwEH0ZeSnovTohQDQGKlJnlomDyGeE+gYWF5iFV/gj9Bm7Z/ +biBI1LdkzIf6qaXculAgVQL4UXdCALcCl/5rKmNs2OAaQqYX0G9QWqAPnFrqwqiOsQYGA5r8jUwq 3TkbDy+GB2JHwAf9+QG09CgA89kt89xYpLP/NV7beHQesLrrph/WR0Kr6JLK7Ag8dJ+4MwkzG9Gtv A6Wh5I/3Gq71GvqVTU9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3oGQ-00GGdP-NS; Wed, 14 Jul 2021 23:26:03 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3l4s-00EnsA-PB for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 20:01:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626292913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sQM1t+sm3YURTxJOPDtOEB2n2+vo2zYAMj6B34VXxkw=; b=AyArrd0hoYixa8BNGuVxyinQ9DwUV3DbMp2IBq4B1A5tSMtXTLuKRDSHqmM8jqYmanmDwN /sBfw3W5XcKdILmM52gZpzHBFgScIngdXhhVCXjdWbdKSR2SwkoVTZtngSz0RT3c8tfg20 2e/Vi23yHsaKpUBjCm61YOLFHZYh+9U= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-384-B6nE5O0JPNuEjGBq8a-5lw-1; Wed, 14 Jul 2021 16:01:52 -0400 X-MC-Unique: B6nE5O0JPNuEjGBq8a-5lw-1 Received: by mail-qv1-f72.google.com with SMTP id gf3-20020a0562142503b02902b1b968a608so2470632qvb.16 for ; Wed, 14 Jul 2021 13:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sQM1t+sm3YURTxJOPDtOEB2n2+vo2zYAMj6B34VXxkw=; b=r0EFc0FH9cLl2m7jK+o67Us8Ej2slMY/OT33TBxiDkVaM3qqOqbICb+BYCR7sxFg/l qq50P9F5AtPmzt2OzAadr+Aefh15C2p1IjFvXa9UdeuzhqXhCVFhTs+fNr7XJkDtXTzg KvUsNc9Z5DOrBXGgN3husP+Dz4ZAxOq1Cd5/Vw7GXtI6rOUGCAWEPyb2Fba7NHIJLpC+ vPJh0VCXj7YcdFQrRZwp7T3Y0yV8GAXmqSImFueFvWj4eWvlb6Ny6TfaIb5W6pLBRHOe vdvQaymLB/4EmMm9jITE00R94OSnFspEa1BWuGiMOJFlsQz4FuAOg+DrrwjQRzMe8Sus Qqgg== X-Gm-Message-State: AOAM532i3KfD2AMR9QwfhHU28SnaVXjG7JbD2Ehi8U3EUSjLCWda3r37 eOM1/Pbe8csAZJvgdqHU0XIM7eVbca7UT34y9fkSVlLlDOwRMZRj2G6xlZRIUFVtSMdGbbRCG6r fsLQphQT188c9QMpKN7llkMvRD8/nt/wiBHA= X-Received: by 2002:a05:620a:24c7:: with SMTP id m7mr11467466qkn.143.1626292912008; Wed, 14 Jul 2021 13:01:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk3zeWWq9kFBADIM8pqrA3Tmt8g/FfXldlWPscDEzBqvEiYx2I+tAs3oIgkN/bg/94hw4gdg== X-Received: by 2002:a05:620a:24c7:: with SMTP id m7mr11467440qkn.143.1626292911820; Wed, 14 Jul 2021 13:01:51 -0700 (PDT) Received: from gator ([140.82.166.162]) by smtp.gmail.com with ESMTPSA id p187sm1505865qkd.101.2021.07.14.13.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 13:01:51 -0700 (PDT) Date: Wed, 14 Jul 2021 22:01:48 +0200 From: Andrew Jones To: Will Deacon Cc: Fuad Tabba , kvmarm@lists.cs.columbia.edu, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, pbonzini@redhat.com, qperret@google.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com Subject: Re: [PATCH v2 09/13] KVM: arm64: Add trap handlers for protected VMs Message-ID: <20210714200148.vjujrwsn2qsfd6kd@gator> References: <20210615133950.693489-1-tabba@google.com> <20210615133950.693489-10-tabba@google.com> <20210701140821.GI9757@willie-the-truck> MIME-Version: 1.0 In-Reply-To: <20210701140821.GI9757@willie-the-truck> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=drjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210714_130154_980128_9F66463E X-CRM114-Status: GOOD ( 18.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 01, 2021 at 03:08:22PM +0100, Will Deacon wrote: > On Tue, Jun 15, 2021 at 02:39:46PM +0100, Fuad Tabba wrote: > > Add trap handlers for protected VMs. These are mainly for Sys64 > > and debug traps. > > I think one big thing missing from this patch is some rationale around > which features are advertised and which are not. Further, when traps > are enabled later on, there doesn't seem to be one place which drives the > logic, so it's quite hard to reason about. > > So I think we need both some documentation to describe the architectural > environment provided to protected VMs, but also a way to couple the logic > which says "We hide this feature from the ID registers because of foo" > with the logic that says "And here is the control bit to trap this feature". I think it would be better to have documentation that says "We expose this feature because foo". If the feature doesn't have any rationale to be exposed, then it's just not. It may also make sense to document features that should never be exposed, if there are features like that, in order to ensure nobody comes along and exposes them later. Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel