From patchwork Thu Jan 27 14:29:41 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: 12726873 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 669A3C433F5 for ; Thu, 27 Jan 2022 14:42:57 +0000 (UTC) Received: from localhost ([::1]:56128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nD5zE-0007fD-Et for qemu-devel@archiver.kernel.org; Thu, 27 Jan 2022 09:42:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD5se-0005Iq-TB for qemu-devel@nongnu.org; Thu, 27 Jan 2022 09:36:08 -0500 Received: from [2a00:1450:4864:20::332] (port=55817 helo=mail-wm1-x332.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nD5sZ-0005bk-F6 for qemu-devel@nongnu.org; Thu, 27 Jan 2022 09:36:08 -0500 Received: by mail-wm1-x332.google.com with SMTP id r7so2077523wmq.5 for ; Thu, 27 Jan 2022 06:36:00 -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=2zSKrSp6a5EAi6fIn7FE1Se7TLsdnk4XPoD/ijRomuk=; b=Zbh8abxC9MXMq9rlUIQu1YoRSG0l+W93JnGNGfW+FyQDbU+Jy+s9uiqjmDE4JY1ajj dSMTgwAjkdSvpKcY2o+LqMf3okZM8IwU270YWBZn+ajASrO5FLtaWKx8Itb9r0tHHXLm i6wtNRrQCSMAiFZEHV7Mr/Hcn/4UWaL4SfwELMbmQFIQtSuKNACndiH28MBDUk5PvO2g Pof87unTvShk3OOzxys4EDFN/CacKalaPUmK89l853lzzHK1MEfuKzQ2sg7BPXHTsu3U u4mMT63MEvvNSZ6aORjFysbOujXaIBj02bZR2CWutHi4csA6d7v/HBaFBbpChrIvOccJ ZpVQ== 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=2zSKrSp6a5EAi6fIn7FE1Se7TLsdnk4XPoD/ijRomuk=; b=VCrisc4iqd5HVh1OQ6VY5HzFKPB/+RKl7Q2T0/bcjdEaWvRuJpNukMTlgsGQQcrcgP MRLefoLBFEcVB3HSHJU3L7De+f5FUpsS6N6VPj/VjYuGR8OKxMktIeD8fEL3e15QDIWh eDcQ7HKiFDUeIlvKjNmkXlaOet7hakTxsHAXPDtkxBZAprzRD7N7vMQedPxNVJlpS6wD 3UPynU12M+XKs6N4ldeOlW/mnh6Wwbt3415tmrw8zhlA2MG4oXvDd51lD5Oe+aV2/xAQ K/UfKhwrklkn9Vc1nN2S+TDC3pHYtD/50aXmXeB12blpZ9w03myn67wEFjHaOhJcA6eP VKFg== X-Gm-Message-State: AOAM5313/04xLFZ9bJsaMSYh+s1ep0DuETbMnNIL8v+V1RD1h+nPLV/j jPeSf5UnpzX8jfd4tSb/aT433A== X-Google-Smtp-Source: ABdhPJwNtof78MrIiMOhDyzpatOuY6ObKAqIfhUHzXdN9tYBAman3hSADHLM3nRuI2BaLWT5D4At0w== X-Received: by 2002:a05:600c:3848:: with SMTP id s8mr3515240wmr.151.1643294159895; Thu, 27 Jan 2022 06:35:59 -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 i3sm2285894wru.33.2022.01.27.06.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 06:35:59 -0800 (PST) From: Jean-Philippe Brucker To: eric.auger@redhat.com Subject: [PATCH v2 4/4] tests/qtest/virtio-iommu-test: Check bypass config Date: Thu, 27 Jan 2022 14:29:41 +0000 Message-Id: <20220127142940.671333-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220127142940.671333-1-jean-philippe@linaro.org> References: <20220127142940.671333-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::332 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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, pasic@linux.ibm.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The bypass config field should be initialized to 1 by default. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger --- 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)