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 BBE84C678D4 for ; Fri, 3 Mar 2023 07:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229764AbjCCH2A (ORCPT ); Fri, 3 Mar 2023 02:28:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjCCH16 (ORCPT ); Fri, 3 Mar 2023 02:27:58 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02EF12FCD8 for ; Thu, 2 Mar 2023 23:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677828433; 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=Au2NkNrNK1UjGjHlvSvRzl5tANm09oMF2vYOqqREeHg=; b=DgM1aw8yGPzS90DNWjH/N4UU8iUO7vZIZJMdgEZW7AtRB95QuxYhPaLc/qqzbMsxvTbR5F JUZf14JcIRrkE7n0zQei6CNg7kP4iIzxZWU9XyNqOPw8L9k8hsAYqKPeuAegd66dll0Mux aEoggsLzxNKXSt8GydDTXcVd+tBsWow= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-61-lliOLg0vNIuyRkidgYjJqw-1; Fri, 03 Mar 2023 02:27:08 -0500 X-MC-Unique: lliOLg0vNIuyRkidgYjJqw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CEC503C02536; Fri, 3 Mar 2023 07:27:07 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69F632166B26; Fri, 3 Mar 2023 07:27:07 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AC9B2180061F; Fri, 3 Mar 2023 08:27:05 +0100 (CET) Date: Fri, 3 Mar 2023 08:27:05 +0100 From: Gerd Hoffmann To: Rob Clark Cc: dri-devel@lists.freedesktop.org, Chia-I Wu , Ryan Neph , Dmitry Osipenko , Daniel Vetter , Rob Clark , Javier Martinez Canillas , David Airlie , Gurchetan Singh , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH v6] drm/virtio: Add option to disable KMS support Message-ID: <20230303072705.55fbvt4c4uu4i2i7@sirius.home.kraxel.org> References: <20230302233506.3146290-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230302233506.3146290-1-robdclark@gmail.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 02, 2023 at 03:35:06PM -0800, Rob Clark wrote: > From: Rob Clark > > Add a build option to disable modesetting support. This is useful in > cases where the guest only needs to use the GPU in a headless mode, or > (such as in the CrOS usage) window surfaces are proxied to a host > compositor. > > As the modesetting ioctls are a big surface area for potential security > bugs to be found (it's happened in the past, we should assume it will > again in the future), it makes sense to have a build option to disable > those ioctls in cases where they serve no legitimate purpose. > > v2: Use more if (IS_ENABLED(...)) > v3: Also permit the host to advertise no scanouts > v4: Spiff out commit msg > v5: Make num_scanouts==0 and DRM_VIRTIO_GPU_KMS=n behave the same > v6: Drop conditionally building virtgpu_display.c and early-out of > it's init/fini fxns instead Reviewed-by: Gerd Hoffmann