Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp53685pxb; Tue, 14 Sep 2021 18:27:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYoxTXX96f7HZLlUn6MfT7WtZQdhOLCB0DGRpcxkIWoFQzdTb6xQnkt3MMhMgm1FM1JJ6y X-Received: by 2002:a05:6512:931:: with SMTP id f17mr16118906lft.234.1631669220528; Tue, 14 Sep 2021 18:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631669220; cv=none; d=google.com; s=arc-20160816; b=m0FKhEfqy+LfY8x1wxkrAPlQb0imnH7LIhS6oLhO+9OwQMThC0Lm5FMsCmol3TLWvY ev4Ijro8mB80Q74MoInnvk21gjZLh5RLmwFv4DQ+96OyILz+5OCBLgFmNX24pvRc2A4I bx/KjQaOiDUmTJDG8dctQozOzsjmdXU/Ce8xT2Dx5Y2rNxiDEXbQc4Ob22Ur/GZNCPiA Be5fBkTmhgebW67CxJZ7LZAWUkcWcs2XTNOb9ltICG7+xIYzHGzoFDUf+skPMjPmOrbU y+YV4IGVY33NJNSyD5k0vXfmG2yNIit5HtDYp6ufVYVFMnnhg8oEArAALPa9LFtcWHd9 uWAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=a4+70ve1asmJmKOYSMe1bfND5zAGqyK5Aj7FvxXVAIE=; b=L3/Un8Fj+KOQeaUHUQXLAdwnYxxRBL5mnlHwRvnmHYaRcTtj7MUH2aUSNHm7H606Gb L5KmuA85l50c2I/QFlN2N4cfMNpj1lnCeJmi0IoO1tB1RSkgMN/s0IAXUT/aDKXoy6Iy 82OIH2eN+CnqliksyDIzXElmA2vVQNijqZXZ8Ztc6op/l6vf2FYo0p9b/NgYfEHBhtGU OQCMIQ/TmnrcenysDgJWYTbgPaaQOC+3x3RGJhTvFuYn71BseNrZ1KvJ2uVE/WS2Yb1C pqSbNBAM4teIUeEb0SBw7Hlu5kLzOn47Xwqn/s6hh/UzUCnm+Z0bYskkzn0hMadpXUb5 hByw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iog5jdpm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 2si13656275lft.457.2021.09.14.18.26.32; Tue, 14 Sep 2021 18:27:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iog5jdpm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbhIOBYD (ORCPT + 99 others); Tue, 14 Sep 2021 21:24:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:57702 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhIOBYD (ORCPT ); Tue, 14 Sep 2021 21:24:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A5C561164; Wed, 15 Sep 2021 01:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631668965; bh=34pMuOrExtoHtRZ9Gf9/zwAtQwy7VI+WAiaN+pkvJA4=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=iog5jdpmbLkNrJwTUHixTrBW8dJcX7Nn22lx0XXX9dTsxliTHJZPCqfbCu+mcTt/C 96OHH/AYMexmxb6Exzr8I0Ep5SzNufmbFz3AMA+yVe1H6wTSqDDl52/q2mV2KCymsL a3oVie8VcPZmw3Lsmtf02bzSJgIUhuhf1oetKtaKh8QKbzcTn58UUbhJLMpZazA3cS iDbXkndq5gAgXYLe4R/fvTiiEW2k14BcNsmOE4/40XNE0dTexSnbGAv8RxFCYrxt5p h1iNmHzbfD4O0TQu9l9utoq4hPIOEIRaFjiPf95dZgCeTNNdN+y/zl2Uor8w7kmsTY gInqIPxhlCiHQ== Date: Tue, 14 Sep 2021 18:22:43 -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: <9819a6e9-93d5-e62a-7b4a-ffc2ecd996dc@suse.com> Message-ID: References: <588b3e6d-2682-160c-468e-44ca4867a570@suse.com> <397bf325-f81e-e104-6142-e8c9c4955475@suse.com> <9819a6e9-93d5-e62a-7b4a-ffc2ecd996dc@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 Tue, 14 Sep 2021, Jan Beulich wrote: > On 13.09.2021 22:31, Stefano Stabellini wrote: > > 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 > > Thanks, I'll see about dropping that then. > > Another Arm-related question has occurred to me: Do you actually > mind the higher-than-necessary alignment there? If so, a per-arch > definition of the needed alignment would need introducing. Maybe > that could default to PAGE_SIZE, allowing Arm and alike to get away > without explicitly specifying a value ... Certainly a patch like that could be good. Given that it is only one allocation I was assuming that the higher-than-necessary alignment wouldn't be a problem worth addressing (and I cannot completely rule out that one day we might have to use XENMEM_exchange on ARM too).