From nobody Sat Jul 4 21:10:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1782972717; cv=none; d=zohomail.com; s=zohoarc; b=Hy3I1qVcakECOyeLBeU38NZZ8HJsgHCpU0L0MmM9pfwSs3B5UZ5uPK9JPkiZ9h7LUahw4UaFRyYHGIVXdgM9WYML+JKqz0PsJLLd0iXRQUBii+6UNMwoMO2LJTvFhijYEol/XT8gJpnu5fXs0gso4zvYwEqcZPJonL4eHFmZyXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1782972717; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=e0Vj9mvIyK/vkRH+VB0ecw51YmCBg+xpoBt6a2CHhJM=; b=kUDjs5RvZZjOe5CvT5Y2k5qKs9IPdrn8rPTnEOEyeR9uxEZJ2obNwbVkrGWJMSZj0/u3FyoE3O5qOQVqryz28wSoYi2WxIf+QQBOADT8SNvCJxH+1To+7ifGChtZaXNvcusK5R7Y8ZBsaomQ+ZsM7fy9/CfOOR6aNQ5wiZIR0sc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1782972717079393.0092959814457; Wed, 1 Jul 2026 23:11:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1351208.1608438 (Exim 4.92) (envelope-from ) id 1wfAdz-0004sK-LV; Thu, 02 Jul 2026 06:11:27 +0000 Received: by outflank-mailman (output) from mailman id 1351208.1608438; Thu, 02 Jul 2026 06:11:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wfAdz-0004sD-Ip; Thu, 02 Jul 2026 06:11:27 +0000 Received: by outflank-mailman (input) for mailman id 1351208; Thu, 02 Jul 2026 06:11:26 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wfAdx-0004s7-UT for xen-devel@lists.xenproject.org; Thu, 02 Jul 2026 06:11:26 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wfAdw-005TDF-5M for xen-devel@lists.xenproject.org; Thu, 02 Jul 2026 08:11:24 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a460101-5cb7-0a2a0a5109dd-0a2a4504e734-44 for ; Thu, 02 Jul 2026 08:11:23 +0200 Received: from [209.85.128.48] (helo=mail-wm1-f48.google.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a46010b-a01d-0a2a45040019-d1558030d0b7-3 for ; Thu, 02 Jul 2026 08:11:23 +0200 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-493bf73ec2aso7873345e9.2 for ; Wed, 01 Jul 2026 23:11:23 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493c63648d7sm20787575e9.7.2026.07.01.23.11.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2026 23:11:23 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=suse.com header.i="@suse.com" header.h="Content-Transfer-Encoding:Autocrypt:Content-Language:Cc:To:Subject:From:User-Agent:MIME-Version:Date:Message-ID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1782972683; x=1783577483; darn=lists.xenproject.org; h=content-transfer-encoding:autocrypt:content-language:cc:to:subject :from:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=e0Vj9mvIyK/vkRH+VB0ecw51YmCBg+xpoBt6a2CHhJM=; b=cL5Onyrj8fE74Ytwvjsb0nDQI33i/TwFPnu1TTYw1B60jNxLejOcKnnCOM2czSSYfx tgl+y1MTJcQJZYn00FMCFzDExQMZLhtH52dIluwGlwd8FOGjwjSn7xUpueTkdV92gcP8 GsASZU953x4kCUUFcJ5yFQ3NJ5jMCkCGnMQayVEWB24/ltGRg3usq1y8oAhE6MOSJMia dRwHBWnoHOdRYvA8MyUZNY2a+zDz0KdrhL0d7+todCQf3VYVj0vbJup00rhTAQ495bkI +Tfb8OW5lFmpNHGD9nOPbfI4U4llsUSkai9nAWHcaZ5FelFZcpReqGfKmc+ccfMBAE1S 9k7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782972683; x=1783577483; h=content-transfer-encoding:autocrypt:content-language:cc:to:subject :from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e0Vj9mvIyK/vkRH+VB0ecw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06:b0:493:c548:87fb with SMTP id 5b1f17b1804b1-493c5488ce2mr21468245e9.36.1782972683334; Wed, 01 Jul 2026 23:11:23 -0700 (PDT) Message-ID: <7e0c8795-cc60-4b78-8601-6a999739467a@suse.com> Date: Thu, 2 Jul 2026 08:11:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Jan Beulich Subject: [PATCH v2] x86/Xen: correct commentary and parameter naming of xen_exchange_memory() To: "xen-devel@lists.xenproject.org" Cc: Juergen Gross , Boris Ostrovsky Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-ebf023/1782972683-AF9221CC-ED16DE08/0/0 X-purgate-type: clean X-purgate-size: 1985 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1782972719330158500 Content-Type: text/plain; charset="utf-8" As documented in comments in struct xen_memory_exchange, the input to the hypercall is a set of MFNs which are to be removed from the domain, plus a set of PFNs where the newly allocated MFNs are to appear. Present comment and parameter naming don't correctly reflect that. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross --- v2: "fns_out" =3D> "fns_inout". Mention parameter names in comment. --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -2291,18 +2291,19 @@ static void xen_remap_exchanged_ptes(uns } =20 /* - * Perform the hypercall to exchange a region of our pfns to point to - * memory with the required contiguous alignment. Takes the pfns as - * input, and populates mfns as output. + * Perform the hypercall to exchange a region of our pages to point to mem= ory + * with the required contiguous alignment. Takes as input the mfns to tra= de + * in (mfns_in) and the pfns where the new pages are to appear (fns_inout), + * and populates mfns as output (fns_inout). * * Returns a success code indicating whether the hypervisor was able to * satisfy the request or not. */ static int xen_exchange_memory(unsigned long extents_in, unsigned int orde= r_in, - unsigned long *pfns_in, + unsigned long *mfns_in, unsigned long extents_out, unsigned int order_out, - unsigned long *mfns_out, + unsigned long *fns_inout, unsigned int address_bits) { long rc; @@ -2312,13 +2313,13 @@ static int xen_exchange_memory(unsigned .in =3D { .nr_extents =3D extents_in, .extent_order =3D order_in, - .extent_start =3D pfns_in, + .extent_start =3D mfns_in, .domid =3D DOMID_SELF }, .out =3D { .nr_extents =3D extents_out, .extent_order =3D order_out, - .extent_start =3D mfns_out, + .extent_start =3D fns_inout, .address_bits =3D address_bits, .domid =3D DOMID_SELF }