From nobody Sat Apr 11 23:03:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=anthony.perard@vates.tech; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1773052370; cv=none; d=zohomail.com; s=zohoarc; b=FpJSawR3Pt9lpO4nNpNe4V4fqw857PS3d+IRSQ/oG3s6ilJMQo5KLbFxMp0hJFRYdvrJd1ZQHIhk2SB9QaZcQ0toXx3nQYi/L3u9OZHRcwcCDOcDDnTtZzn2eUIW5Y5At5UR72iDpXOPyJKyoSZJTlO8bkxRegl0r6S4n3dbfho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773052370; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WT0SylEBpMCEz50mi1VO5bCYNnAqM2EjVLiN1Dm+TEQ=; b=h8VUSdTpRB6PpIq7YMrXJai+X7k9Tfs+zja6WKlSYDkMOxe32Q0cWnJvA1zY4lP8QYPYE/0TLDLae37DLYgEceO663XNSLPhupz+EYzCkkS+f20ZZT/xNYn4NECA6trNaxUDEEci6GSzYXcnbLfrcoy2ky7MvLLWc6ep/JEVEvc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=anthony.perard@vates.tech; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773052370135408.1143119042621; Mon, 9 Mar 2026 03:32:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vzXuV-00067H-V0; Mon, 09 Mar 2026 06:32:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzXuR-00064X-7T for qemu-devel@nongnu.org; Mon, 09 Mar 2026 06:32:25 -0400 Received: from mail132-19.atl131.mandrillapp.com ([198.2.132.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzXuO-0006Z1-8P for qemu-devel@nongnu.org; Mon, 09 Mar 2026 06:32:22 -0400 Received: from pmta09.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail132-19.atl131.mandrillapp.com (Mailchimp) with ESMTP id 4fTtF40dYzz1y4 for ; Mon, 9 Mar 2026 10:15:36 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id a1a9f8af29314422bd95843cc0b24db1; Mon, 09 Mar 2026 10:15:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1773051336; x=1773321336; bh=WT0SylEBpMCEz50mi1VO5bCYNnAqM2EjVLiN1Dm+TEQ=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=aZX++omEOKKqpVdTcO/RRlUI1KpMdaauorNzlyiGnrRWs4XEoJkA7Gh27BR5/KvJY q9DRdgYQcneSz+d5nJteTAILr5jiXZ/NvZOlO+4gVuT3dfOwtNDfjpZNDDmngpXpb2 yyZNRSuX/biH0vb6/JrNXJmN0J4Dp67MOImk37ZNLnXM/N/9Yx8JdeiWh/16a7De2C OLasNPhnzR0qkUMMrtjoaY32dqeelFugcOCWjookFcwY/IJkUIYgoB6IlHw+pymAKN lFw+fmwFYzHtAYi1O1Ivb6RBiCLYewWxgBPDIAPp0Sfsd5sP4tddItmFyvf3dl5z6o f+xYZALpO0PGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1773051336; x=1773311836; i=anthony.perard@vates.tech; bh=WT0SylEBpMCEz50mi1VO5bCYNnAqM2EjVLiN1Dm+TEQ=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=qOPwUBg7MWmvmqRLB7QSMXRSsmMDbt/YmSenijqsRW048REtvsPQRECzmxw9QP8jD 32qiMWwIwfm6AATo497UigHQjMl5H2pxUWjjzO61BR/ClJZxBnbyRFe5umpG/emhiY 3U1XiT7KVTZDN59QNq69OzuYorBd0znFXHRVHHH4m0mfhLYU2FGGuj4w424DYQDV/P Fxka+89jXc9//ziCvNjwhMuXTqHLcMvDWz78y4fO00amAZzmM+jYFuLIcPwg7ajwDi dOpNenHzjDqZJFKRD7HnpUh+gISKauRJEqLLVAwS4wRjgombi7wjCdgxACojcR32Vn RGqSGh5tMfZCA== From: "Anthony PERARD" Subject: =?utf-8?Q?[PULL=202/3]=20xen-hvm:=20Handle=20framebuffer=20relocation?= X-Mailer: git-send-email 2.47.3 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1773051335462 To: qemu-devel@nongnu.org Cc: "Anthony PERARD" Message-Id: <20260309101529.25695-7-anthony.perard@vates.tech> In-Reply-To: <20260309101529.25695-5-anthony.perard@vates.tech> References: <20260309101529.25695-5-anthony.perard@vates.tech> X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message, =20including=20all=20headers, =20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.a1a9f8af29314422bd95843cc0b24db1?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260309:md Date: Mon, 09 Mar 2026 10:15:35 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=198.2.132.19; envelope-from=bounce-md_30504962.69ae9dc7.v1-a1a9f8af29314422bd95843cc0b24db1@bounce.vates.tech; helo=mail132-19.atl131.mandrillapp.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @mandrillapp.com) (identity anthony.perard@vates.tech) X-ZM-MESSAGEID: 1773052372455158500 Content-Type: text/plain; charset="utf-8" From: Ross Lagerwall It is possible for a guest to relocate the linear framebuffer by writing to the VGA device's BAR. This causes QEMU to report an error and if the VM is migrated, the destination QEMU hits an assertion. The problem is that updating the BAR causes the PCI core code to call the del region callback followed by the add region callback but the xen-hvm code ignores the del region call and therefore the subsequent call to xen_relocate_memory() during the add region callback fails because the source address is not correct. Fix it by calling in to xen_remove_from_physmap() in response to a del region callback for the linear framebuffer so that the subsequent add region callback succeeds. Signed-off-by: Ross Lagerwall Reviewed-by: Anthony PERARD Message-ID: <20260108132514.1862552-1-ross.lagerwall@citrix.com> Signed-off-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index a6e1683885..fd7ef56bdb 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -720,7 +720,8 @@ void arch_xen_set_memory(XenIOState *state, MemoryRegio= nSection *section, return; } =20 - if (log_dirty !=3D add) { + if (log_dirty !=3D add && + !(section->mr =3D=3D framebuffer && start_addr > 0xbffff)) { return; } =20 -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech