From patchwork Mon Feb 14 12:43:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 542522 Delivered-To: patch@linaro.org Received: by 2002:adf:df0e:0:0:0:0:0 with SMTP id y14csp653126wrl; Mon, 14 Feb 2022 05:52:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkSqKlGaQak7DsKnMOOpn5UjMYZncjaYNHrjBgz7k0z8AU1aIz+zRP21dIHNvixRViZPSU X-Received: by 2002:a81:ed01:: with SMTP id k1mr14233358ywm.25.1644846764786; Mon, 14 Feb 2022 05:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644846764; cv=none; d=google.com; s=arc-20160816; b=PJGH0vBg/gDbJkcMKGuW34TPBjl+PvUKWlmZ+xb3NndsaTnTK43pc5JAA9xC/MRnu9 EFCmpDATn+se/aPyfXpKMSXbkrJL/ZlauBy/kz5PgbBahNAx0wru19bt4ZIrULdOiwaN jom+OcfhtovJ4hwnMFVHK24irPin14dLwbRuUNpPCEmQmQNXn+vqm7hVCwNPU7sxklIn BuSd890Ik2PA+uSFLEFB5NR9Mtj7TPvkbu5mTzBlUdTy3lKtSK7VYAU38jhx9u1L+vdt n5PIZDcDezRPeIwLx1wITsKf54Dh+kP+LaeaXIftDAzyEU2KSMIREBk9x2T6VcDDfa0q AOhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=4brhjN3/9PYkC5fIn6cy6NSoFzEeYleDxTc63BTv37E=; b=qOxMsjVj7LunYeN48EQJZSfdGekhcMQw0/RUgeJTlaQuzwDW4Z14SH2aqgzefj8kx0 FVc8+zR0L0rlmBPB9GvA0BcxqVIqKqfWZYQvcr5Zf1QOe4f9VGedcsvCsFhrPOkDXO9V T4sj764nS6DVPCInGvmHU8Amc2LA9jFnqVYJnUUVxTs9eUcgUJftX3G/+DmnOwtQd1G3 dBVEvYW+cbFch3iom52bEvNSLUMECggACYwRyg9WV+t1FU3DY+VR9Ay3NoLvubRkXiQL kP13eB5iXoPTcaiZFDkLZq5QbVf/rnSeOxCRSqTPYA8MMQR4ePmrF2w48ZrVpOxqOWCw a74A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fFVA8Efw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f3si22434030ybn.395.2022.02.14.05.52.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Feb 2022 05:52:44 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fFVA8Efw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJbmW-0002r4-6Q for patch@linaro.org; Mon, 14 Feb 2022 08:52:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJarb-0001rf-BO for qemu-devel@nongnu.org; Mon, 14 Feb 2022 07:53:55 -0500 Received: from [2a00:1450:4864:20::531] (port=33355 helo=mail-ed1-x531.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJarZ-0006sa-9W for qemu-devel@nongnu.org; Mon, 14 Feb 2022 07:53:54 -0500 Received: by mail-ed1-x531.google.com with SMTP id b13so26994692edn.0 for ; Mon, 14 Feb 2022 04:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4brhjN3/9PYkC5fIn6cy6NSoFzEeYleDxTc63BTv37E=; b=fFVA8EfwE1BSTPs8uLwrX0VpTgzex3BeVZEEankjky8KTSjrUgjLfvnqfQEfNfGbRb 2vGbP5PDVu4hCkA9XEBQj4YCctLdGo2JqLuccBa6r09tNwevIrEErEjg+5sVBczIawWM lBoiRmc8tam/JJkK0SijO/ts361+yDAeBLQm99BIbtV+2twjvaxYY18og5DW/mCxplEh 7cPRbp05nE5PkpZeFbfB8QTCVBx9WKiPNAb6CjNz3wkTbySzIzBcET50lofFoooEh4Zn h9x9KyWSk927yfagYAXoNgjuuve6r8NsKZdstd+yw8TIfMsqj4XfcaCcan00NCgjTCpU AwZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4brhjN3/9PYkC5fIn6cy6NSoFzEeYleDxTc63BTv37E=; b=PjImeBa5R/ni/v/BSNZzERYZGmZF1Xpha8ub8fvPg7aA+j8Xqe0WL2hzGqwn7l5XhG 24AIqL2f0575Ojk3ZVvykSgX4C2ZbBb51nLxz9U3ydrKsItSDjvQYTaxSc+UkgpCiX2J t9At/jyccqeQe+tcvxRlIQCIh2Q1qajfwwFNxqCafQ174p5GRzwkrR3XbHFoyCJMVUqU trvyt5vhkewO1aKozBcp4WaQt0JriTHvS9G1AI1WDX9pmWo0KtlQw6QvzTjWmisxUVKJ ypesdz/cy3QS/n5Z2Efjk7pRGq3Sc7M4ZiogI188ecjnib+LpctVL4kzPX/7imLYPjPp s04A== X-Gm-Message-State: AOAM5315FyUO6OCTALt/WDunVH4pk7zYVtWOmySwbr4NR7ps6E2NUPt+ rUvtX2AHgyEe4dpyq7DaWP9o9bcbcFoH5g== X-Received: by 2002:a17:906:729d:: with SMTP id b29mr8371392ejl.471.1644842858748; Mon, 14 Feb 2022 04:47:38 -0800 (PST) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id kq17sm1475422ejb.205.2022.02.14.04.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 04:47:38 -0800 (PST) From: Jean-Philippe Brucker To: eric.auger@redhat.com Subject: [PATCH v3 4/4] tests/qtest/virtio-iommu-test: Check bypass config Date: Mon, 14 Feb 2022 12:43:56 +0000 Message-Id: <20220214124356.872985-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214124356.872985-1-jean-philippe@linaro.org> References: <20220214124356.872985-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::531 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x531.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.635, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, Jean-Philippe Brucker , thuth@redhat.com, mst@redhat.com, cohuck@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, pasic@linux.ibm.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The bypass config field should be initialized to 1 by default. Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Acked-by: Thomas Huth --- tests/qtest/virtio-iommu-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/virtio-iommu-test.c b/tests/qtest/virtio-iommu-test.c index 47e68388a0..068e7a9e6c 100644 --- a/tests/qtest/virtio-iommu-test.c +++ b/tests/qtest/virtio-iommu-test.c @@ -31,11 +31,13 @@ static void pci_config(void *obj, void *data, QGuestAllocator *t_alloc) uint64_t input_range_end = qvirtio_config_readq(dev, 16); uint32_t domain_range_start = qvirtio_config_readl(dev, 24); uint32_t domain_range_end = qvirtio_config_readl(dev, 28); + uint8_t bypass = qvirtio_config_readb(dev, 36); g_assert_cmpint(input_range_start, ==, 0); g_assert_cmphex(input_range_end, ==, UINT64_MAX); g_assert_cmpint(domain_range_start, ==, 0); g_assert_cmpint(domain_range_end, ==, UINT32_MAX); + g_assert_cmpint(bypass, ==, 1); } static int read_tail_status(struct virtio_iommu_req_tail *buffer)