From patchwork Wed Mar 29 14:24:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Liu X-Patchwork-Id: 668114 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp393952wrt; Wed, 29 Mar 2023 07:25:47 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFe+WxhzV7qk0RJVN+QvHHNRw4YQQSICRJct17nmKntBvEk+SV0hGjneAQ6l7xgM2L7MCF X-Received: by 2002:a17:902:e88a:b0:1a1:db10:7ba5 with SMTP id w10-20020a170902e88a00b001a1db107ba5mr22246708plg.41.1680099947492; Wed, 29 Mar 2023 07:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680099947; cv=none; d=google.com; s=arc-20160816; b=AbQXl1RcL7woI8+51Osyy3TQ+1GzF5zwj+cGX/5qIhKaOd6ZnWzzwF1K16pGXYeW4W 6Zhu5stczQMYhyKjhZ4Ap7vLXdpY5SoJUNWKH9cx87A8L538H3Vm4/iJdSvx6IzNTtBQ YqvB7/St7CLj1B33UWoT8bSA5mf3QtZswI63QDiB4TiSCD79D/JqjYGtfAv5j09exvwL +VMemCQkckcYa1Hlpy+IoIic/NpTPX0kaUtKFyV/F7KxwT6MJ+K+pv3jvXBjsSH9rL9B 7SmlXb8JooRxU8gW9857/2HHMF15mNL72GntiPp7WCbsfb7VKbVKFiSiLxZXGAgjb4tb Qmyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vVWfuFTi6CGOvULV2NyogvxEpPwylC83/+tW9ePSOKM=; b=dSs2vHMLsDIdkHKlti9ngEEdWRstvlsFUGNeSKTagxbDhzvA+HA0mH21rR9MxVaakB WSYjPIW24m/mA6ngtFUuKKGEZl5dl03qyk4uhrtZI+er9/dIZtWntXpiYeU2rwEv6CSB 1NHtweUq7yzAJ8Fp8OJFQYWaVxwF6Fu17WDtmG3mSPHyuj8j7CT/Ed62M1LgxWpITdPZ IZT9JgeyA1Ro5yUYBKRtSY6vIzKsiiMvDGk7omRVWAXDJDFo8lWaD3Hg3xIcYcIC2TKr qvklsiI3z0RDLzGv2ta3rPGTnP+1BYpCSsZtAWLJvkk6kU508tX/ADZiGoEFnHZJ8opT 4c/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gaezu2se; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id z36-20020a630a64000000b0050bf56c35c3si31107723pgk.81.2023.03.29.07.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 07:25:47 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gaezu2se; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 77FB085D74; Wed, 29 Mar 2023 16:25:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gaezu2se"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A379B85D4E; Wed, 29 Mar 2023 16:25:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0A64E85D34 for ; Wed, 29 Mar 2023 16:25:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=paul.liu@linaro.org Received: by mail-pj1-x1032.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso3898345pjc.1 for ; Wed, 29 Mar 2023 07:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680099907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vVWfuFTi6CGOvULV2NyogvxEpPwylC83/+tW9ePSOKM=; b=gaezu2se2oFAVMqBfHlm3vzE6YUrLa/gPb+M8+OjR0qCW9K0Fdmis9UAzPc8F83pRN l6DN2BWU485/KUG7uk1OUqyi2QrqtVgBDCZhnYVYjZD9fHgpTh9WPcF2j+BW3AgFAn3S GNnR1koqA5HIhzxkkAlRzZpv/WuSCcpJw+7kcikz9MzKjjFjtIiL8zScrqBsCBAu8+fg RLoAn+PRx3gmWlXQdXI5jx22FCNyVySQOOcKvmEAgUROTFVvIaMlqxB48BB0odAvgFMF wI7t7g1PW/kPomeRvzchX/2VcJRwBaK9JQXKRycOxqQYoIWhGJp97TWqLrOSoTeUHEPX urCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680099907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vVWfuFTi6CGOvULV2NyogvxEpPwylC83/+tW9ePSOKM=; b=Ygx3A897ffpO2Pjx533u53IG/6IWgkvew9L+s+LzUCtr5bGYgXR0pshh11jRl4X6pz UDo1GuG4cVCBgeWaxdohAC62/Sp/tiKhSC0YCW9NmavICvHUe0f05RC5soIdsrCwwN4b IhgY2ELsJ4Tjy2maKpyLdbMRwPc0dYi0DWhTYbjV8viBXIIQsyrvHl7DKQzB45aBAu3A Vne9OSVG7mEEnKJqA3lSkA+OH2b9LsmcCCafQMbwgDOPj9w32fBWWjnodzEgvwdj/lMJ 1L349qAnFjZiweTR1rk7GA0pU/xRcvN5s2tTzd0tvjvV+4wzfh0EYBAVDHL0yJpMeEor Obeg== X-Gm-Message-State: AAQBX9fp8uLZwkpe0nweojm+GTcMk1xIu3iajsmGmKVIL8GEluS5Gv1D Vxdg8nslDT6VM9cmud3hjpP5vVH6CpX5H3DTDfE= X-Received: by 2002:a05:6a20:7883:b0:df:81de:93dd with SMTP id d3-20020a056a20788300b000df81de93ddmr11816810pzg.44.1680099907187; Wed, 29 Mar 2023 07:25:07 -0700 (PDT) Received: from localhost ([111.184.129.17]) by smtp.gmail.com with ESMTPSA id d17-20020aa78e51000000b00627fea66a4asm18353637pfr.39.2023.03.29.07.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 07:25:06 -0700 (PDT) From: "Ying-Chun Liu (PaulLiu)" To: u-boot@lists.denx.de Cc: Will Deacon , Ying-Chun Liu , Bin Meng Subject: [PATCH 1/6] virtio: Expose VIRTIO_F_IOMMU_PLATFORM in device features Date: Wed, 29 Mar 2023 22:24:55 +0800 Message-Id: <20230329142500.682922-2-paul.liu@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329142500.682922-1-paul.liu@linaro.org> References: <20230329142500.682922-1-paul.liu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Will Deacon If we detect the VIRTIO_F_IOMMU_PLATFORM transport feature for a device, then expose it in the device features. Signed-off-by: Will Deacon [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Bin Meng Link: https://android.googlesource.com/platform/external/u-boot/+/9693bd26bfcfe77d6a1295a561420e08c5daf019 Reviewed-by: Simon Glass --- drivers/virtio/virtio-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index de9bc90359..b3fb3dbfad 100644 --- a/drivers/virtio/virtio-uclass.c +++ b/drivers/virtio/virtio-uclass.c @@ -336,7 +336,7 @@ static int virtio_uclass_child_pre_probe(struct udevice *vdev) /* Transport features always preserved to pass to finalize_features */ for (i = VIRTIO_TRANSPORT_F_START; i < VIRTIO_TRANSPORT_F_END; i++) if ((device_features & (1ULL << i)) && - (i == VIRTIO_F_VERSION_1)) + (i == VIRTIO_F_VERSION_1 || i == VIRTIO_F_IOMMU_PLATFORM)) __virtio_set_bit(vdev->parent, i); debug("(%s) final negotiated features supported %016llx\n",