Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp230311lqo; Wed, 27 Mar 2024 11:18:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBz7p6EbFThMfoFCTrfbxg0mR3vFjwrodfuboRec3XkD0DA/uQEi4GXiac0CXVKQmUfgXJ0AGxFuLtrchK9Tu5uI0oG6k443QiKgBI2w== X-Google-Smtp-Source: AGHT+IFrGbw0FGaNB2+JPuSlRQD3hNOElBJaJza0BNvZ6ayLK0+H/kzu/o5KFZCQjkOk0GBdFNOs X-Received: by 2002:a17:90a:12c5:b0:29b:b485:f4f8 with SMTP id b5-20020a17090a12c500b0029bb485f4f8mr488204pjg.20.1711563484914; Wed, 27 Mar 2024 11:18:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711563484; cv=pass; d=google.com; s=arc-20160816; b=Ikp/U0OlVHAVK3q2fMskFz4IzskyLxXZD5Las71Y/pMLnJoMRlr90zQlYs5G0ljhWs XT1Prg9S2XwbLvBtLcF/YlxhlAs2MUycgHTqYxtecrFtn4iNIVaE5MDDAYak2RYUbUJn Z0kew673fAmqGL8b1HXuwQVqplO+go+9mqnDFqpNuBwwCjs8r/i3eAreZ8j2OtfxAl1c U7aw2Hyozfavqm3SYQdOM3BsTT0KwPuWELmF/1FfuwjoxJgKhOzQwvOVZZ6VV2AueEh/ TjqLu5FJaEXSpIu13x817HxoiZN66w+vI+lTIaDUOesqI1GflOtGGBh348CGhdFNaK7V M72g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=xwzIPiQWsB9PCbbkFLUkHKM/VLU2rPKnfzMy6LJBTMo=; fh=ux1CmJbHnwZ4d/iut7ukpNZu0Si4zPJsDJil0WTDlIw=; b=fcJQ+oavRnskuFyLXdeQG6MFoKUcg/lF+FP8deQ0xNZYj0eochF2nweRiaECNUacmm oNOGxi1J0mKSHjevAqREjpglRlY7NavLICYj+6xQxAxui6cbbxF2cgvsCppaoG1un5d7 2EObVtKPvb3gPO6GUj2JlKonT0+z7nXSiQwfU/ypSkI+8EAtRQ2/4/Qiek24vEf/5lMc VCHipTkcuLriBiAla5bm4reqokpNXMvpr/rqIsSLGrRNMjwE7EOwhSBivItkU4Ws2zN3 62AECGAJyW4vTMpD+NVYDmxamEgogDu/OPA9sqRKyOmPHqVBvhvnnVjl6MLGx1cG9vfg NNcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QUrx88yE; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-121814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g1-20020a63fa41000000b005e840aef2dbsi12744765pgk.570.2024.03.27.11.18.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:18:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QUrx88yE; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-121814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9361029BFC8 for ; Wed, 27 Mar 2024 18:18:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FD9A15098F; Wed, 27 Mar 2024 18:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="QUrx88yE" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC34214F112; Wed, 27 Mar 2024 18:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711563457; cv=none; b=Ks2w1pArU1/cV+SI2S2RxWgiA+QrSP2huqMWbI+SCBd6Eg55SF5J9d7ATcq3ebA1IeVkThqnivqEedv7dg+xFQMj9JRl/9vA/o+ZWSJXeywi0nYPnVIbOMMZm6uRSdfI/gs1JKUREwab3n1fc2UwxSxIdQIDrMuQCqV8RTHLyYs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711563457; c=relaxed/simple; bh=1xI/k4F3DwHGNvZeAI5LuANOPogXIptxcRHXwYg+HR8=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=SWEw0NvXaX5Z0g34JmnfVbYhu5Xq5J3zstw47vr9YDAucdrndM9YR+qJ4nMa0SDdDA0k2Dc7/vk0S2HeiQzrbilCs0D6TOqdxryjlwhdnFA5l8XcC3vnlm9YwZlL4HD1HK6JZqgilMlnRGK4/y76Qtytcxd8p7zxM23yCa+JfgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=QUrx88yE; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1711563454; bh=1xI/k4F3DwHGNvZeAI5LuANOPogXIptxcRHXwYg+HR8=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=QUrx88yE6OlfbSxvc+hdbHwtishdRDuUOjdDlUklHw2zOZCtOQi91Pe85Y0xW27c+ kJyHyJQMpwLpdryXlYFYoePwhtoljcEgrl5//OfUK0l+l5eTJSCiWFwFWyxif4qTPC ndVaREuKWsvMEEzOzGn/wHPqgEpw1mAqlNDkFLw7N4yDRlBz2AK2Uew6wAabuw7Jby mSp/rAQLjZx46UBZg0TrZ6HecEnhBWDwqbZnzl7mH+9k7jsNHqI3O0zU3Z6u4abd6f sZ9Q8bUSW7Ikzn6RpFaEy1LWFxcRcQfHNTgs2xgdngtv2uWHl3BAOWPjmL/goqcMao Y+2b5lmivO86Q== Received: from [100.113.15.66] (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (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: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 71AC637820A3; Wed, 27 Mar 2024 18:17:29 +0000 (UTC) Message-ID: Date: Wed, 27 Mar 2024 23:17:58 +0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , kernel@collabora.com, iommu@lists.linux.dev, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Tian , Shuah Khan Subject: Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth Content-Language: en-US To: Joao Martins , Jason Gunthorpe , Nicolin Chen References: <20240325090048.1423908-1-usama.anjum@collabora.com> <31fcc276-acd6-4277-bd6c-4a871c7fb28a@collabora.com> <20240326150340.GE8419@ziepe.ca> <56cc8b9e-c1cf-4520-ba45-b1237e8b7b64@collabora.com> <20240327114958.GG8419@ziepe.ca> <51f493a9-08e7-44d8-ae4a-58b2994ea276@oracle.com> From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/27/24 11:09 PM, Joao Martins wrote: > On 27/03/2024 17:49, Muhammad Usama Anjum wrote: >> On 3/27/24 7:59 PM, Joao Martins wrote: >>> On 27/03/2024 11:49, Jason Gunthorpe wrote: >>>> On Wed, Mar 27, 2024 at 03:14:25PM +0500, Muhammad Usama Anjum wrote: >>>>> On 3/26/24 8:03 PM, Jason Gunthorpe wrote: >>>>>> On Tue, Mar 26, 2024 at 06:09:34PM +0500, Muhammad Usama Anjum wrote: >>>>>>> Even after applying this config patch and following snippet (which doesn't >>>>>>> terminate the program if mmap doesn't allocate exactly as the hint), I'm >>>>>>> finding failed tests. >>>>>>> >>>>>>> @@ -1746,7 +1748,7 @@ FIXTURE_SETUP(iommufd_dirty_tracking) >>>>>>> assert((uintptr_t)self->buffer % HUGEPAGE_SIZE == 0); >>>>>>> vrc = mmap(self->buffer, variant->buffer_size, PROT_READ | PROT_WRITE, >>>>>>> mmap_flags, -1, 0); >>>>>>> - assert(vrc == self->buffer); >>>>>>> + assert(vrc == self->buffer);// ??? >>>>>>> >>>>>>> On x86: >>>>>>> # Totals: pass:176 fail:4 xfail:0 xpass:0 skip:0 error:0 >>>>>>> On ARM64: >>>>>>> # Totals: pass:166 fail:14 xfail:0 xpass:0 skip:0 error:0 >>>>>>> >>>>>>> The log files are attached. >>>>>> >>>>>> You probably don't have enough transparent huge pages available to the process >>>>>> >>>>>> echo 1024 > /proc/sys/vm/nr_hugepages >>>>> After making huge pages available, the iommufd test always passed on x86. >>>>> But there are still failures on arm64. I'm looking into the failures. >>>> >>>> Oh that is really strange. Joao? Nicolin? >>>> >>> Definitely strange, I'll have a look. >>> >>> So it set the expected number of dirty bits as that assert doesn't fail, but it >>> is failing when we check that even bits are set but not odd ones. Like it's >>> hasn't set those bits. >>> >>> For mock tests there should be no difference between x86 and ARM assuming the >>> typical 4K page-size. Maybe this is 64k base pages in ARM? That's the only thing >>> that I can think of that affected mock domain. >> The config is attached. The defaults are being used i.e., 4k page. > > Looks like CONFIG_IOMMUFD_DRIVER is not defined :( I'll retest with this config and update the patch to include it in the config fragment needed for this test. Once we add all required config options in config fragment, the test should never fail. Somehow this gets included in the x86, but not on ARM. > > Thus no bits are being set. > -- BR, Muhammad Usama Anjum