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 CEE38C64EC4 for ; Fri, 3 Mar 2023 20:36:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231752AbjCCUgV (ORCPT ); Fri, 3 Mar 2023 15:36:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231659AbjCCUgR (ORCPT ); Fri, 3 Mar 2023 15:36:17 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72EC46151F for ; Fri, 3 Mar 2023 12:36:16 -0800 (PST) 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 Cc: Chia-I Wu , Ryan Neph , Daniel Vetter , Rob Clark , Javier Martinez Canillas , David Airlie , Gurchetan Singh , "open list:VIRTIO GPU DRIVER" , open list 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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