From nobody Mon Feb 9 13:38:58 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=1655621609; cv=none; d=zohomail.com; s=zohoarc; b=NRkqf/6h05RZPmMjPRkqHqtRoRUsVBwtOOVk0ORyjSyyjVcTsuORVb4xvuPJOpp0YZspeq5wV6n8tyVeV6DlIIYLIxeM2mQw+th2yDf1qunYL+K3pNtxozqX/zDzDbec2EHCXuwGmQVaFrTDwJcBc6rMy0zFj5qw7hCiZE1FaPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655621609; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xmLVZAezCgzTgOsivEiAdLkZ5h3o4dxtcy7J5SE1ulo=; b=BDu5VWAUBWxnYkLtUd9RMhyNSdBqgoH1nGweNH4USU5q6EOIGcKwyOxHExiYZT+0i12chImSoeRduizN9Y+NeED1HfijNaYvdPyAFXuDFs94YxcslwaGUNH5aIm5HyiWePVKZHsYNdZm4qvBlakhEapZNFO/+og/JPPQQpKjt6k= 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 1655621609560848.275888495893; Sat, 18 Jun 2022 23:53:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.352044.578779 (Exim 4.92) (envelope-from ) id 1o2ont-0004mn-Ai; Sun, 19 Jun 2022 06:53:01 +0000 Received: by outflank-mailman (output) from mailman id 352044.578779; Sun, 19 Jun 2022 06:53:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o2ont-0004ma-5a; Sun, 19 Jun 2022 06:53:01 +0000 Received: by outflank-mailman (input) for mailman id 352044; Sun, 19 Jun 2022 06:52:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o2onr-0004F8-Np for xen-devel@lists.xenproject.org; Sun, 19 Jun 2022 06:52:59 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 72c3744e-ef9c-11ec-b725-ed86ccbb4733; Sun, 19 Jun 2022 08:52:56 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 089FE1FD96; Sun, 19 Jun 2022 06:52:56 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BBB2F13427; Sun, 19 Jun 2022 06:52:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UCh0LMfHrmJzXgAAMHmgww (envelope-from ); Sun, 19 Jun 2022 06:52:55 +0000 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: 72c3744e-ef9c-11ec-b725-ed86ccbb4733 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1655621576; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xmLVZAezCgzTgOsivEiAdLkZ5h3o4dxtcy7J5SE1ulo=; b=Nki0XgCrhrAtcSGlsxAi7Igkh5HutNGZ1se7+Qjw1BBYbqM1ZY0J1CSIw1nMGG1OpYVOiY +m6BU7OVZtvEUC25lBZiXcEUIOPKtCqF4yYh9bgSp+xdmgOgyw9/zMQeHmMmN65rC/rJj9 FhKCY+x9DOhzuOKuHa//gpUF4UEX9Mw= From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Cc: samuel.thibault@ens-lyon.org, wl@xen.org, Juergen Gross Subject: [PATCH v2 4/4] mini-os: fix bug in ballooning on PVH Date: Sun, 19 Jun 2022 08:52:53 +0200 Message-Id: <20220619065253.19503-5-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220619065253.19503-1-jgross@suse.com> References: <20220619065253.19503-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1655621610738100002 Content-Type: text/plain; charset="utf-8" There is a subtle bug in ballooning code for PVH: in case ballooning extends above a non-RAM area of the memory map, wrong pages will be used. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- V2: - new patch --- balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balloon.c b/balloon.c index 6ad07644..55be8141 100644 --- a/balloon.c +++ b/balloon.c @@ -124,7 +124,7 @@ int balloon_up(unsigned long n_pages) for ( pfn =3D 0; pfn < rc; pfn++ ) { arch_pfn_add(start_pfn + pfn, balloon_frames[pfn]); - free_page(pfn_to_virt(nr_mem_pages + pfn)); + free_page(pfn_to_virt(start_pfn + pfn)); } =20 nr_mem_pages +=3D rc; --=20 2.35.3