From nobody Fri Oct 31 16:00:24 2025 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1747922668; cv=none; d=zohomail.com; s=zohoarc; b=Z04wM2l05JjET2VdHhKEtt9FHc0ImaudhUDvRTAkdygVTS0jjsg6LBHA6SAqitRQ5dbhZkHJNpAogXyUvMIZP5cfpZHUTQRKg5N/8LN34Pnz0ZT0bB1ICjTGEuUGpXWPnbRvGzeaqrNe2I2L77daeAK4oS3AU218+5bcfyB0LkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747922668; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0FktwtEW0Fmw4rJHIOF3iKnfB159BdV//CCT1areduY=; b=BHIZsHqi8dSibaXuONwADVAoSdD3WFMKl7CT5KiudIaio2OyPvqlq7/TIkE0s/lYPFuGQxpuqaHaOB1Xdi5+APLoV6iExZE+wn4zWl7cRPxadnawrln/1xVoWRs57rxhUs8hmffAJVTqX7mB397lGBiA16r28aGMQZou04UWlVE= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 174792266821154.52508526992165; Thu, 22 May 2025 07:04:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.994037.1377071 (Exim 4.92) (envelope-from ) id 1uI6Wr-0005In-8a; Thu, 22 May 2025 14:04:13 +0000 Received: by outflank-mailman (output) from mailman id 994037.1377071; Thu, 22 May 2025 14:04:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uI6Wr-0005HZ-4q; Thu, 22 May 2025 14:04:13 +0000 Received: by outflank-mailman (input) for mailman id 994037; Thu, 22 May 2025 14:04:12 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uI6Wq-0005FK-CZ for xen-devel@lists.xenproject.org; Thu, 22 May 2025 14:04:12 +0000 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [2a00:1450:4864:20::32e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a2e4d617-3715-11f0-a2fb-13f23c93f187; Thu, 22 May 2025 16:04:11 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-44b1f5b917fso991515e9.3 for ; Thu, 22 May 2025 07:04:11 -0700 (PDT) Received: from localhost (112.pool92-178-7.dynamic.orange.es. [92.178.7.112]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a35ca8896dsm23041682f8f.73.2025.05.22.07.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 May 2025 07:04:10 -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" X-Inumbo-ID: a2e4d617-3715-11f0-a2fb-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1747922651; x=1748527451; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0FktwtEW0Fmw4rJHIOF3iKnfB159BdV//CCT1areduY=; b=WxjEoPvaVWa9gq9LLUDmBhAb6Ac5EeJZmyWg0oYGMmI4kiS62SbS1mYKbRHpKNnIsD 5+XcBlP9+I9IyNhkhSpvgKcf8x0BzXVPvS/n6C9QUNSKg1UHiTkEdQ6mUBLNnvrwgvZT 0m5KabIv8xYGCA4m2fsljgzF0w52aqSSyYQEA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747922651; x=1748527451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0FktwtEW0Fmw4rJHIOF3iKnfB159BdV//CCT1areduY=; b=Awc95+IA4P729VYQnkXibMzrjFLRtTdbh5Tif9Ik6Tyexr1Ce3+GSNkZKVQWmK9cZc fN/DCODlHVQws9/VBpZDSuT3l9Z/p5H55Ht0JpQhTZ9RXHoWcr1Kdij3TolM/tt1sPhr YOPW0Rp+pcCN9Y8GixJ7KfFyZTnKJZhmb2rnqacIp98vuC4B8cb05xNZAvdX/z013Ull Bo/BbKgq5shVtAfGYnckl7wQ2LttCLTgU+8baUB0Hel2Z0ThmM6pFd0Vw54WUryKfqNR y3F34BS+wrhZrdfVNyy164fx4qbzN4+PaUh4ndkZx8Z2+LIEbKAyqu6hpv3hoojHdr2s z+zg== X-Gm-Message-State: AOJu0YzWYNl5xYdBYPY1ajAz8R53MI35P5wWEWMjPIh6pTVn4g5bKz0u tHLW1V7kJwe7qlaBQo1w8hV3jzzZDZAir9tNVXhfjGV9e8W2hzsplpsB+YdtXq5I/xQIaRXDAHf he2K/ X-Gm-Gg: ASbGnct2qUFM5d9afsOEeTYVJrKlFTNiJonONJkikLqZRKlaCX/TGAkZrzoQMXwYug8 vlU0DdyNKZkmy23suxwGGZMc4NNLqX6iS8ZuuAqy2yLadBmVJVmZIJs+dgqXJeAim/DkswphMuz xj06fidk8Ona8pAofbUg2SkWeC4sxyX6BZKKiwN73PG3H8lYXH3chWc1K44xS6NP6BxQVwNxUBQ 80xMt8/YeIVmRC1uWx8KRyxbPF3+Fq8iucKxCjdB0X4PugT0Yn7pvwPLbihStosaMVReFWXQhPC zZ36L+vOTuTVO9AarVNtUjgKaBCiSnx1p1feX/zxkh5p5jXo/hxyislZiEShJZWlwT58HL6OfCF N4asxwbhbpt4MfC6eyMLyKpSXCd/mbA== X-Google-Smtp-Source: AGHT+IF3POTYR7vwEVPnwq1opDQsoIMzXDAVykkFgf+t7uK8/81M9xz8IcuajOR1zLPq+mVUT9YB8A== X-Received: by 2002:a05:6000:4212:b0:3a3:7ba5:960e with SMTP id ffacd0b85a97d-3a37ba598e7mr10049647f8f.59.1747922650637; Thu, 22 May 2025 07:04:10 -0700 (PDT) From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Jan Beulich , Andrew Cooper Subject: [PATCH 1/2] x86/vpci: fix off-by-one Date: Thu, 22 May 2025 16:03:55 +0200 Message-ID: <20250522140356.5653-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250522140356.5653-1-roger.pau@citrix.com> References: <20250522140356.5653-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1747922670130116600 rangeset_remove_range() uses inclusive ranges, and hence the end of the range should be calculated using PFN_DOWN(), not PFN_UP(). Fixes: 4acab25a9300 ('x86/vpci: fix handling of BAR overlaps with non-hole = regions') Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Andrew Cooper --- xen/arch/x86/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c index afaf9fe1c053..26bb7f6a3c3a 100644 --- a/xen/arch/x86/pci.c +++ b/xen/arch/x86/pci.c @@ -131,7 +131,7 @@ int pci_sanitize_bar_memory(struct rangeset *r) continue; =20 rc =3D rangeset_remove_range(r, PFN_DOWN(entry->addr), - PFN_UP(entry->addr + entry->size - 1)); + PFN_DOWN(entry->addr + entry->size - 1)= ); if ( rc ) return rc; } --=20 2.49.0