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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9AF3C64EC4 for ; Fri, 3 Mar 2023 20:36:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C263895EE; Fri, 3 Mar 2023 20:36:18 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by gabe.freedesktop.org (Postfix) with ESMTPS id B55B3895EE for ; Fri, 3 Mar 2023 20:36:15 +0000 (UTC) Received: from [192.168.2.210] (109-252-117-89.nat.spd-mgts.ru [109.252.117.89]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 62BBE6602FB0; Fri, 3 Mar 2023 20:36:13 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677875774; bh=15/tXolhdND9XIfdhz6183l53lBlVVuHaxxsdm2MQ1Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZJNsEKRtAaKv3nwz3IfZe8MPnXYQwjDk8WvFbPrHiXcJRO0NYitdoTxxfbe36uRR2 MCzru9LspKSJDjvSvP6+h04MGvlk9dGEENK6WIxHrxI4NiZXo3tKdFnE48Qj/rob+F MdJDWo47wvA48oW7Jso0bjeHeFZ9Sy2Z5LHBnsF/QZtHFnjuJB2oZhfDIj/TuwNMfO gYB3vS4hNEjBaVPbeAI0+9hXmp4JnVOIiRSEqaHITTWfGxuZ7vc2JtwYoVhy+PtJtX j//qbQncKnJxjvKQQtA6iTDMhE/7LZZP/4n0wdbfe35Tz8AYyES3piDyn/ABgHinWy VOztUL9w1NpQA== Message-ID: <8bb4cf0f-dbb5-095d-edc6-47e1ff9dd6c8@collabora.com> Date: Fri, 3 Mar 2023 23:36:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v6] drm/virtio: Add option to disable KMS support To: Rob Clark , dri-devel@lists.freedesktop.org, Gerd Hoffmann References: <20230302233506.3146290-1-robdclark@gmail.com> Content-Language: en-US From: Dmitry Osipenko In-Reply-To: <20230302233506.3146290-1-robdclark@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Ryan Neph , open list , Javier Martinez Canillas , Gurchetan Singh , David Airlie , "open list:VIRTIO GPU DRIVER" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 3/3/23 02:35, 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 > > Signed-off-by: Rob Clark > Reviewed-by: Dmitry Osipenko > Reviewed-by: Javier Martinez Canillas > --- Applied to misc-next -- Best regards, Dmitry