From mboxrd@z Thu Jan 1 00:00:00 1970 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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 AB85EC433F5 for ; Mon, 13 Sep 2021 20:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8716B610E6 for ; Mon, 13 Sep 2021 20:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243782AbhIMUcY (ORCPT ); Mon, 13 Sep 2021 16:32:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:34064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbhIMUcX (ORCPT ); Mon, 13 Sep 2021 16:32:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9048C6108B; Mon, 13 Sep 2021 20:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631565067; bh=I1luLBrQT2QS6nSSKLDDdX9lKRGVXUWe967myVRKHq8=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=NkMwMKqzji1BQ9efEE20R8HGJLZmk2XracuUWD04u26bu5/zQYoT51EuIpnj8a98Y XBMpos47u9CxnpLg4uCQ1HZ1GdVhmR/KIqMQQhR6m/MhF5B6JxbD5eKcm9DRBW7Iht jxPJOcjcvS4UU3Saa6uy6ggSVWWJxZxuUplqTAyMol9C0a1Zkx5dlBJwdYYs09wp/x Ax6gcedHW/T+qr+IViyy00YeVYY1+za2CK6cRf6KI+9CHS+FoPkhMM58+fDGeNGNPm Pui7DgrkZnxXiaK6qWwnHK4FtowGTMImhm8nMMhb2AfgMe5+6ZtgegMOrY2Rvx8xuZ 9n+jW82xbiLwA== Date: Mon, 13 Sep 2021 13:31:06 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Jan Beulich cc: Stefano Stabellini , Juergen Gross , Boris Ostrovsky , lkml , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests In-Reply-To: Message-ID: References: <588b3e6d-2682-160c-468e-44ca4867a570@suse.com> <397bf325-f81e-e104-6142-e8c9c4955475@suse.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Sep 2021, Jan Beulich wrote: > On 11.09.2021 01:14, Stefano Stabellini wrote: > > On Tue, 7 Sep 2021, Jan Beulich wrote: > >> While the hypervisor hasn't been enforcing this, we would still better > >> avoid issuing requests with GFNs not aligned to the requested order. > >> > >> Signed-off-by: Jan Beulich > >> --- > >> I wonder how useful it is to include the alignment in the panic() > >> message. > > > > Not very useful given that it is static. I don't mind either way but you > > can go ahead and remove it if you prefer (and it would make the line > > shorter.) > > > > > >> I further wonder how useful it is to wrap "bytes" in > >> PAGE_ALIGN(), when it is a multiple of a segment's size anyway (or at > >> least was supposed to be, prior to "swiotlb-xen: maintain slab count > >> properly"). > > > > This one I would keep, to make sure to print out the same amount passed > > to memblock_alloc. > > Oh - if I was to drop it from the printk(), I would have been meaning to > also drop it there. If it's useless, then it's useless everywhere. That's fine too From mboxrd@z Thu Jan 1 00:00:00 1970 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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 2BF81C433EF for ; Mon, 13 Sep 2021 20:31: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 E951C6108B for ; Mon, 13 Sep 2021 20:31:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E951C6108B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.185915.334667 (Exim 4.92) (envelope-from ) id 1mPsbe-0006ia-N3; Mon, 13 Sep 2021 20:31:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 185915.334667; Mon, 13 Sep 2021 20:31:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mPsbe-0006iT-JK; Mon, 13 Sep 2021 20:31:10 +0000 Received: by outflank-mailman (input) for mailman id 185915; Mon, 13 Sep 2021 20:31:09 +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 1mPsbd-0006iN-5E for xen-devel@lists.xenproject.org; Mon, 13 Sep 2021 20:31:09 +0000 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 869cc9da-14d1-11ec-b3cb-12813bfff9fa; Mon, 13 Sep 2021 20:31:08 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9048C6108B; Mon, 13 Sep 2021 20:31:07 +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: 869cc9da-14d1-11ec-b3cb-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631565067; bh=I1luLBrQT2QS6nSSKLDDdX9lKRGVXUWe967myVRKHq8=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=NkMwMKqzji1BQ9efEE20R8HGJLZmk2XracuUWD04u26bu5/zQYoT51EuIpnj8a98Y XBMpos47u9CxnpLg4uCQ1HZ1GdVhmR/KIqMQQhR6m/MhF5B6JxbD5eKcm9DRBW7Iht jxPJOcjcvS4UU3Saa6uy6ggSVWWJxZxuUplqTAyMol9C0a1Zkx5dlBJwdYYs09wp/x Ax6gcedHW/T+qr+IViyy00YeVYY1+za2CK6cRf6KI+9CHS+FoPkhMM58+fDGeNGNPm Pui7DgrkZnxXiaK6qWwnHK4FtowGTMImhm8nMMhb2AfgMe5+6ZtgegMOrY2Rvx8xuZ 9n+jW82xbiLwA== Date: Mon, 13 Sep 2021 13:31:06 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Jan Beulich cc: Stefano Stabellini , Juergen Gross , Boris Ostrovsky , lkml , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests In-Reply-To: Message-ID: References: <588b3e6d-2682-160c-468e-44ca4867a570@suse.com> <397bf325-f81e-e104-6142-e8c9c4955475@suse.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Mon, 13 Sep 2021, Jan Beulich wrote: > On 11.09.2021 01:14, Stefano Stabellini wrote: > > On Tue, 7 Sep 2021, Jan Beulich wrote: > >> While the hypervisor hasn't been enforcing this, we would still better > >> avoid issuing requests with GFNs not aligned to the requested order. > >> > >> Signed-off-by: Jan Beulich > >> --- > >> I wonder how useful it is to include the alignment in the panic() > >> message. > > > > Not very useful given that it is static. I don't mind either way but you > > can go ahead and remove it if you prefer (and it would make the line > > shorter.) > > > > > >> I further wonder how useful it is to wrap "bytes" in > >> PAGE_ALIGN(), when it is a multiple of a segment's size anyway (or at > >> least was supposed to be, prior to "swiotlb-xen: maintain slab count > >> properly"). > > > > This one I would keep, to make sure to print out the same amount passed > > to memblock_alloc. > > Oh - if I was to drop it from the printk(), I would have been meaning to > also drop it there. If it's useless, then it's useless everywhere. That's fine too