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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 1B0C9C433DB for ; Tue, 5 Jan 2021 13:38:25 +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 CC70F22B43 for ; Tue, 5 Jan 2021 13:38:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC70F22B43 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.61996.109449 (Exim 4.92) (envelope-from ) id 1kwmXR-0004GA-C5; Tue, 05 Jan 2021 13:38:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 61996.109449; Tue, 05 Jan 2021 13:38:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwmXR-0004G2-8Z; Tue, 05 Jan 2021 13:38:17 +0000 Received: by outflank-mailman (input) for mailman id 61996; Tue, 05 Jan 2021 13:38:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwmXP-0004ES-7V for xen-devel@lists.xenproject.org; Tue, 05 Jan 2021 13:38:15 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bb5f14dc-a301-45d7-8ae4-b6452be22eb0; Tue, 05 Jan 2021 13:38:13 +0000 (UTC) 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: bb5f14dc-a301-45d7-8ae4-b6452be22eb0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1609853893; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=lCB77ODYrQ6Y/cLUQ8UgNkaYf0IvIlDHm8F951Ahp78=; b=dGvUfAJF+8s7Yj1P1tT0/JVaLYmmzTD5Q7/7XoJ62FB2BTZSuPq//wDx MBWHGhwSQ86jg6xLUitHSQFft3aaMIxoAIOXSVvB+/8B03gSF/LMPFMJF iiu8/MdiZSyE3uxJTMaclX2TszZ3wwzbqVmNo/jvbf0FmqKRvsSJrCkSN 8=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: W4N7xV1b5knAHtgDUSXka9xzSxuyaYdBrpFn5unP+BY8ubUWV1c1M2QyCYIjlP4gK9jRTQblOz JIZeMkj7Af6EcS2DyigCVyBrRT92nZW7gXKTU5noy56acap5FCTmZncPWLd596tadXOAAqD4X7 mKlieIERiHT3yYxkC3x6Fet5w97m8fqki70cH3CGePOcxtDzVtvxkxchJpcdt31Q/mxr0/jpgH p390Sx9w/ZqW2EXMF5eDc/hdOFkGEH60AC1WEYbZ9/pd8K7+Mm1RBRBtP9Hm3fXmC2VlO/OYqa f4Q= X-SBRS: 5.2 X-MesageID: 34779224 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.78,477,1599537600"; d="scan'208";a="34779224" Subject: Re: [PATCH 1/5] common: don't (kind of) open-code rcu_lock_domain_by_any_id() To: Jan Beulich , "xen-devel@lists.xenproject.org" CC: George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu References: <3f069a0e-39a9-f5c8-154e-ac41e8b2a1c8@suse.com> <12b46155-3b07-7ee2-3cda-160dda01e8fb@suse.com> From: Andrew Cooper Message-ID: <484a5c4d-5a46-f22a-7bd9-0ca597ebf52d@citrix.com> Date: Tue, 5 Jan 2021 13:38:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <12b46155-3b07-7ee2-3cda-160dda01e8fb@suse.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: FTLPEX02CAS02.citrite.net (10.13.99.123) To FTLPEX02CL03.citrite.net (10.13.108.165) On 05/01/2021 13:24, Jan Beulich wrote: > Even more so when using rcu_lock_domain_by_id() in place of the more > efficient rcu_lock_current_domain(). > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper > --- > Besides get_pg_owner(), gnttab_copy_lock_domain() has similar strange(?) > behavior: They accept DOMID_SELF, but not the resolved ID of the caller. I queried that behaviour years and years ago. According to Keir, it is part of the attempt to force guests to not know their own domid.  Xen itself does (or did) its very hardest to prevent a domU knowing its own domid, while at the same time the "domid" key in xenstore is mandatory for setting up PV rings. I'd personally think was a short sighted move. ~Andrew