Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3819306rdb; Thu, 28 Dec 2023 00:30:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGB5uQudzH0fz+1DFMBPe0uA1RkUqApbd+PUlh6M/yQx+mCqxeahztTU82Dtk3tQwrScSCW X-Received: by 2002:a05:6358:919b:b0:174:b771:e282 with SMTP id j27-20020a056358919b00b00174b771e282mr7459269rwa.20.1703752211919; Thu, 28 Dec 2023 00:30:11 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ka37-20020a056a0093a500b006d9ada3dc74si7920168pfb.263.2023.12.28.00.30.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 00:30:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12512-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lt5HCGcU; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-12512-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12512-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 87F3A2823A4 for ; Thu, 28 Dec 2023 08:30:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB99763B6; Thu, 28 Dec 2023 08:30:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Lt5HCGcU" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) (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 3505F6131; Thu, 28 Dec 2023 08:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703752198; x=1735288198; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=kBgaPZ1tgnlkrLSqzw1kHlsGJlIBADY1vEMv9fnmv5k=; b=Lt5HCGcUeXsAiiI2wgKqjrL1RZa4PytVrNDT4M2mwAG1EoXGxle/uYHv NSCkKQdvR/q8tolnIix6+E1CFcUDqVI1DEI7eWBuPqav3epOfbyky16Im +xALMVbHPCwRRn13DxtWakGn266k9LOWqQl/hv+Uvwo3nmUbw/HbKYjg2 6rUnoXW86xXPy2cDWr3uIHtm3ztDqCSaWdsfpHXe0PNIgGYT+DUJHdY99 CWsN13AJSG0+HhFXLEFQJu+OAu9miN60cuasILPyQ6nmj2/25vKVXoT4R JMBXZLK9gGWq+np7jvxxRa/674v2FcRUAIs1T7+42hWXUvAQ6ysyKWiCP w==; X-IronPort-AV: E=McAfee;i="6600,9927,10936"; a="376013455" X-IronPort-AV: E=Sophos;i="6.04,311,1695711600"; d="scan'208";a="376013455" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2023 00:29:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10936"; a="754683882" X-IronPort-AV: E=Sophos;i="6.04,311,1695711600"; d="scan'208";a="754683882" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Dec 2023 00:29:55 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 28 Dec 2023 00:29:55 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 28 Dec 2023 00:29:55 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 28 Dec 2023 00:29:55 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 28 Dec 2023 00:29:54 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ncyBveM9UUHRMMfHMBTYwu7gW0KNvTfkglM3LP4rzTMnCsjt9sdLhNAaXmQikFSRNTM4zkXditmz41GjkLqyPgPL0fMJSdMMd14+RR+59TZLa4FCuYg8q294GN8nsFDPE3TMe0xewGzq+CRd8sUJz+rjIOZKjuV1b+dPQQun9Bm2edhIjUrwuJMMJeuinTTlZerr3MhlvKOltO32sZRoYN7PPQJjrwF7s+q5tf7mWsRmDYfYuUsG45P91O0rP1zvTg/PkabNRsrtM/LRzy4csGzDY6TKw2DMQ1hyILrrceWU31a9RNEBL+ep+/yuf3d+OiOCVuxnSEO3DvIDz4ZCfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ci3urkIsnH1HNwpzRF7A2wS8Fai6U23QojeO5HKU7y8=; b=ITaGMXZg5R3Xa8gpCNe4b3fwaO3q1S8pNpl2xyxPMoeF0n7LqzDI41j302qQg4kK0KPRJQjxwH9EpuKMiR3HUT1cQQnkM4zEoeaYWA1JNfpWK3ek2UfTqFgGETjTvurN9Qzbi+dQZxQatOYEh0AX2dsO9JmmWz9NzpTIYCCtr9cEF3UdsrWUYHvYcU5H2rT94Dsr0Q1CE3mp3LcTmPnq5filLxOcresVkRGiZ+M18yIE45cvj6/iR6aRhdloyY0thpDlxMJ7mj15u5DqC9IKTGS79k07DWh4xogoai5Auux9m+oc0Vzf3GAe3A7Ju5F5mWTYFNq/8shOccl1TQoq+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) by MW4PR11MB7163.namprd11.prod.outlook.com (2603:10b6:303:212::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.29; Thu, 28 Dec 2023 08:29:52 +0000 Received: from DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::e4ae:3948:1f55:547d]) by DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::e4ae:3948:1f55:547d%5]) with mapi id 15.20.7113.027; Thu, 28 Dec 2023 08:29:52 +0000 Message-ID: Date: Thu, 28 Dec 2023 16:32:40 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 06/10] iommufd/selftest: Add coverage for IOMMU_HWPT_INVALIDATE ioctl Content-Language: en-US To: "Tian, Kevin" , "joro@8bytes.org" , "alex.williamson@redhat.com" , "jgg@nvidia.com" , "robin.murphy@arm.com" , "baolu.lu@linux.intel.com" CC: "cohuck@redhat.com" , "eric.auger@redhat.com" , "nicolinc@nvidia.com" , "kvm@vger.kernel.org" , "mjrosato@linux.ibm.com" , "chao.p.peng@linux.intel.com" , "yi.y.sun@linux.intel.com" , "peterx@redhat.com" , "jasowang@redhat.com" , "shameerali.kolothum.thodi@huawei.com" , "lulu@redhat.com" , "suravee.suthikulpanit@amd.com" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "Duan, Zhenzhong" , "joao.m.martins@oracle.com" , "Zeng, Xin" , "Zhao, Yan Y" , "j.granados@samsung.com" References: <20231227161354.67701-1-yi.l.liu@intel.com> <20231227161354.67701-7-yi.l.liu@intel.com> From: Yi Liu In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR01CA0030.apcprd01.prod.exchangelabs.com (2603:1096:4:192::15) To DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7529:EE_|MW4PR11MB7163:EE_ X-MS-Office365-Filtering-Correlation-Id: 012e1db5-678c-4776-d360-08dc077f29b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4KxAHUQqf296Fy5YopiAsJAC0d+ElQvQNpHZPkAOVTzEEj7fz/GR2mmiJJV5+EFwIFtfq+6tK1SjCGiPZ8n1/fFHGViHx2iVhExuuxvVUTr6fiKF/6rgbMrx9NOHT8m/NocenDWsJkzcVqbsSD3UFJsDnBaYibF6wddNstOFmWIY2mUc2qARRe8K81P7PnN+K5RTcTJBIOHKmUt2B9SW7zV0EQxXcqDtxk1DZxxdnXpS+nK3WI7P4qlabmBMGMGTHVxYXvjBpr9hv5jQYTz4OHq42M3fqYsDy1efNPKLemDDaxLas+Rd7kh1WPdi/nvekcr0ikK7u9etxO1mVEpheJBkez5qWUOc2iTaEV1e76/33bBAOH7NqjyM9B3fzKYqg764hIN5CY+Hu4I5qeTogGPqsx4id2SBPW4ZOHNQKuRTerDNtJpKFFHjLLQv/PTs18azscDzRIYsLoqqkDymP71PNBrCJvKxPxJ2MhvLOqYfX08EFTljauFwVclBV3yYXyUrrMhDatTGtwrQhxfV43XAb1uC0Ihl1EB8PKYaaZKR/rS013TQv2c+NHYjdQm7XD+3D9umoRv7waAbUJf5O6CDDmVgrQ8Yet0ft/iqT9lo94DpsQSnYyVmYYbUO5O4BZTTsmqbqWG+2jC/bQsRQQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB7529.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(366004)(396003)(39860400002)(376002)(346002)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(6512007)(2616005)(26005)(8676002)(4326008)(110136005)(31686004)(66556008)(54906003)(316002)(66946007)(66476007)(82960400001)(83380400001)(6666004)(31696002)(6506007)(53546011)(38100700002)(8936002)(6486002)(86362001)(478600001)(5660300002)(7416002)(4744005)(2906002)(36756003)(41300700001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c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oWlNFM1EyQVNwT1Vz?= =?utf-8?B?Y0Vldm5lcitCL2Q4SDhKcG5aV1dJTmNtMjUxd1dVVFRzSGJJN01iOE9YZ3pN?= =?utf-8?B?SGdmNkVPR2FCaFpqazR6M0dHNytTNTcySHRxUmJPZUN2VXJTN2lUWitnRmlI?= =?utf-8?B?RzkySEhTRVZ4aUFVM3Q0SDBHSlM3NHVvejBXUFlVMlNwQWlCaFp5cTQ5UHF2?= =?utf-8?B?OHlVb1V3ZHFuK2VvNHJlVlRFNG41dW1RSTNoNzNNZ2FBRVlTT1A0L1o5QVF3?= =?utf-8?B?b3Y3clA4NzIwUTZOSXJUWVdqeFBsSU8xeWI2a0JXbGluYkt3N0dQeVcwN043?= =?utf-8?Q?0fdNShfpH6N6Rgm360jDr5MHb?= X-MS-Exchange-CrossTenant-Network-Message-Id: 012e1db5-678c-4776-d360-08dc077f29b7 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7529.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 08:29:52.6748 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MGeZE4H+sg9fk6HLd+u3PnxabrZsVARzaXAPZfuyjxum5uCUzfaTgI4GVXV80SHkOOvY4+Zwt6wetiQFvM+snA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB7163 X-OriginatorOrg: intel.com On 2023/12/28 14:14, Tian, Kevin wrote: >> From: Liu, Yi L >> Sent: Thursday, December 28, 2023 12:14 AM >> >> + /* Negative test: trigger error */ >> + num_inv = 1; >> + inv_reqs[0].flags = >> IOMMU_TEST_INVALIDATE_FLAG_TRIGGER_ERROR; >> + inv_reqs[0].iotlb_id = 0; >> + test_cmd_hwpt_invalidate(nested_hwpt_id[0], inv_reqs, >> + >> IOMMU_HWPT_INVALIDATE_DATA_SELFTEST, >> + sizeof(*inv_reqs), &num_inv); >> + assert(num_inv == 1); >> + assert(inv_reqs[0].hw_error == >> IOMMU_TEST_INVALIDATE_FAKE_ERROR); >> + > > instead of removing TRIGGER_ERROR|ALL err check, it makes more > sense to keep it but making it a similar case as above. yeah, but the config of TRIGGER_ERROR|ALL would be valid. is it? Your point is to add another test case to see if "error" is generated even if there is other flags set. is it? -- Regards, Yi Liu