Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2DBDC433F5 for ; Mon, 20 Sep 2021 14:12:36 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A716A60F0F for ; Mon, 20 Sep 2021 14:12:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A716A60F0F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.190939.340769 (Exim 4.92) (envelope-from ) id 1mSK1g-0002xM-7Z; Mon, 20 Sep 2021 14:12:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 190939.340769; Mon, 20 Sep 2021 14:12:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mSK1g-0002xF-4K; Mon, 20 Sep 2021 14:12:08 +0000 Received: by outflank-mailman (input) for mailman id 190939; Mon, 20 Sep 2021 14:12:06 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mSK1e-0002x9-MM for xen-devel@lists.xenproject.org; Mon, 20 Sep 2021 14:12:06 +0000 Received: from de-smtp-delivery-102.mimecast.com (unknown [194.104.109.102]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id bb12df1a-1a1c-11ec-b875-12813bfff9fa; Mon, 20 Sep 2021 14:12:04 +0000 (UTC) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2056.outbound.protection.outlook.com [104.47.13.56]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-1-WaL_l8gnOOaqUlZZoGgDjw-1; Mon, 20 Sep 2021 16:12:02 +0200 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB5599.eurprd04.prod.outlook.com (2603:10a6:803:de::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Mon, 20 Sep 2021 14:12:00 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4523.018; Mon, 20 Sep 2021 14:12:00 +0000 Received: from [10.156.60.236] (37.24.206.209) by PR0P264CA0195.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Mon, 20 Sep 2021 14:12:00 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bb12df1a-1a1c-11ec-b875-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1632147124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VuX2g+UX7ZSv6cPH9po0gV2was2+PnkUBViG0eX7vuw=; b=CVabM7AQQWLprEHp8SbUR17ZKcHKugYzkrO11sJPXx74XfYmLNbawQTGZN/xkMsPg0BMU9 51XU5xQBJ5/I2PY6S8mBRdtrcjnN9ESDJUYOZjIWHTmCpUgu1QFRtSiYmiNAzv2o4r4g7q IMCb9zq/scWJ9F2i4OTKkivWiOXUp3Y= X-MC-Unique: WaL_l8gnOOaqUlZZoGgDjw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWc1E5uVqWHepMl8WJYvacqXIuallh0fccQgk8oe5yxr3Hf3+Ahwe3HLEa3iBNaPwRLYhpKsnMthIlQ7gCoRXGgpSSPuojCIDo66ILslpMflT7Kc7pegKnnJl1GZp2mrG72CfysHnREf2veCd8a5uofYVa4O6NEwLpWmcbd75MqQVzkUcXFDtRcMn5kZ7K8vvzHwA1oW/L74EB7sYE1T8RhtFg8A1s2zZwCEvgibgnkDIhaTejkEetNyD69HnRrfIS7oNdsn/kNTZqH3h7H4GTiENgNcmrFNnKNqfShTLuXdTkXHXJVl+RcmsnlqQzAssKyf8PRG3v5j89gcKJegNQ== 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; bh=VuX2g+UX7ZSv6cPH9po0gV2was2+PnkUBViG0eX7vuw=; b=HDOoRo73McqsIszaWbFoaJw5fWG1lxuChQlQjVi1CK11nngsZVZWscA+Mul3mbreq9a/a7bmGs1i7v1mZVQw/6awXVRGqqE+2bYrb4aiptjnsKytVikRbeo6+NmFM323t51dhBxLYzv6Vx0TfnJCnaMAT2WEc1Xv2KMkKFxKVJVDOmrUKZPrDi4yY5jawRVbtvT4/dilr42gNK5nJI5Tq7bUtuLP/KqTYA0OsAco6Cvht46jGcPHF+YsT7ZO2EkugKpHAChtddOPDZttHT7WlkpDDgGkRijHsrnaoxmLLvjP/9+HXkeRAf4dQSJSkMEqi9YHX5nkGkHzCHokl2Og6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com; Cc: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "xen-devel@lists.xenproject.org" From: Jan Beulich Subject: Linux kernel's msi_domain_deactivate() operation To: jiang.liu@linux.intel.com, Thomas Gleixner Message-ID: <19fa9eaf-3c29-1ace-a16d-4ba3adf8a2e5@suse.com> Date: Mon, 20 Sep 2021 16:11:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PR0P264CA0195.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1f::15) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64042419-a9e4-4145-9bab-08d97c409d23 X-MS-TrafficTypeDiagnostic: VI1PR04MB5599: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UJ6FtyVTK2PVyXNmWn2YAoP4HmDg08SUhTPTvks6YT2dHJMZzM5lGBQELpmJMm/7/JwcBQNk3ya809jsI+K1aqcKyRw72K1SsYBLFFEwyPOcOtllJGk2UlNGBYnQcFXdiVE5PuuRtGBw+fZ0jFtEEhKQJ2nG3SH1UkkxlrwhzTXXJm++SqJr+zcrzT8FOjwdmDiZvqtZy6bLhWHYl5iEsvuieO4qXB13PPj8eijBe1j/Tcf96rrDfnYEtBwmBDiIBZBGThmSMuk/j0yD//Sw81BL8SEE76RJiauqBpmpREltcLnB6QiWjXg0QCxAb03DHrcEK99Hy7kL3DM8vO5CfHy/i82SEWGmTw02cU1mpoBZxJgOV4shjycupqlT+NOVyr6b8L84ops0GC4EurinYovwo8vfHub6iokR3F3jqgRaP94ZfAhqlZ5SUXZ9j+ko6HIlHEpcAZkMdwc/dRpl8VSVAQHQ3xQGFKuD7UUn1dFPR+H584yZYdiGEsaPvaDdcMURJQ4Dz2aTxtRW9q9YaBoBK2Z1+sM0fCBpRMGvFKGSpKaqFdf6c2pKwi+8Wb066kEtsuW0w85Dorgk6sEMl3S+MJzCdY4V0gGmnjUhAlTcBi2l6/qU4KfAGML0TXlLa3dsJA/ssBt75QpAs7bDpOwWRDgq/NK7qGv7NplPUiqzP7+VxliptCk+ag4GkTcAW0g54Hq5GWuY1QeGqdzFPOV1eH4InpoVetITbx02VX4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(54906003)(8676002)(66946007)(316002)(16576012)(83380400001)(508600001)(956004)(2616005)(6916009)(66556008)(186003)(8936002)(38100700002)(86362001)(31686004)(31696002)(2906002)(5660300002)(26005)(6486002)(36756003)(66476007)(4326008)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cThxbVcwUG8xNHdmNEc0NkN2THM3OVVKZ0RLakJwRWN3QlRqYXVJck5oSHN3?= =?utf-8?B?WTY1SVM0RHlEYXgrdlNXLzdLLzl4ZExQSGpn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ange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2021 14:12:00.6942 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GiXq6+skDJPSv1BCqk9KEHRYdruB91i2ALyMZRYJDcbnDdRJIIww/DVpNLrxNPAsr3QBFQawXnUNyaSH1NJQsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5599 Hello, I notice that from its introduction in 3.19 this function simply clears message address and data. I wonder in how far this is "deactivation": Aiui the device might still signal interrupts this way, by writing 32 bits of zeroes to address zero. (That's not going to result in an interrupt, of course.) Shouldn't deactivation rather mean masking (if the entry is maskable; looks like this is happening in an earlier step when possible) or disabling of MSI (which unfortunately would then also affect other interrupts, if multiple are in use) or some software means replacing masking? Background: For PVH Dom0 under Xen we check (in Xen) whether address fields written actually fall in the designated 0xFEEnnnnn range (as long as MSI / MSI-X is enabled at the time of writing of these fields), logging outliers. As it turns out the message appears quite a few times per session, primarily - but not only - during shutdown. We log these instances not because they're wrong (as said above, this is in principle a valid mode of operation), but because proper handling would require further code in Xen which we were hoping we would never have to write. (Thinking about this again, it shouldn't be all that much code.) In a small subset of the cases the operation actually occurs with the respective entry masked (in all other cases there's no maskbit support); we may want to consider suppressing the log message in such cases, yet then we may need to watch for this case the next time the mask bit gets cleared. Of course in the kernel you may have reassurance that the device driver has actually disabled the interrupt source at the device before this deactivation. We don't have such secondary knowledge in the hypervisor, i.e. we can't use that to suppress the log message. Any insight would be much appreciated, including the possible pointing out of us not having understood the underlying idea. Thanks, Jan