From patchwork Tue Nov 14 16:31:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13455585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5609C4332F for ; Tue, 14 Nov 2023 16:31:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.632934.987442 (Exim 4.92) (envelope-from ) id 1r2wK9-0002is-O7; Tue, 14 Nov 2023 16:31:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 632934.987442; Tue, 14 Nov 2023 16:31:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2wK9-0002il-JS; Tue, 14 Nov 2023 16:31:37 +0000 Received: by outflank-mailman (input) for mailman id 632934; Tue, 14 Nov 2023 16:31:35 +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 1r2wK7-0002h9-Q8 for xen-devel@lists.xenproject.org; Tue, 14 Nov 2023 16:31:35 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 46155b1f-830b-11ee-9b0e-b553b5be7939; Tue, 14 Nov 2023 17:31:34 +0100 (CET) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9c53e8b7cf4so855639266b.1 for ; Tue, 14 Nov 2023 08:31:34 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id dt10-20020a170906b78a00b009a5f1d15644sm5694182ejb.119.2023.11.14.08.31.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 08:31:33 -0800 (PST) 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: 46155b1f-830b-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699979493; x=1700584293; 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=X6R5SODDqvfe3Gp9I1X7nXyO5kwGwphXiKxDLZtl7/E=; b=wva71bQqkzgC4iTeUR4DPuogn0twh9Lq8kki33rYFo5rOfZerJnotHI3O8Wu9nMh7R VeeEnl+s+zGmJrrsVZLZsLaxfhUBX6WJ3sLGiesQ5u1CF4KWMavfLWek1cWcvlyK2xzm 7bJRpkWh7116PwykZqPjsu2Gq1e8UCjyC8QsOTxYTTKiYeOMqQtiOVSFEYMtfeJ1//rL Wlt1a8FsOuc7KgKQ7W5iuqGRBy42SW/WImV9f9ZHk3VmabS/Dn55bFqsvh6LWFEAsydO 4Ndeh0cy6sVraRxN9zZ4dXXl73dKhDu7KoP7tjKws3F+0rNnWvi5mkBKSk4CYIJmxych nR0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699979493; x=1700584293; 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=X6R5SODDqvfe3Gp9I1X7nXyO5kwGwphXiKxDLZtl7/E=; b=lgDUgMxIKFE1rta4B5mMXG1Y0Aa3Gs7WwgidnuX3oxKEGICwFixmK4KKVD69tGAzDU 3aLHovLvtb3QyNTzQ1TYpG5Y5TlxHsLWw7mRAGgljpQP2Optkmg4wurNuzON05Li4x4m bt3i8OZZfgAnlFzkmceGCSDBsPw0YY0QgU75rXnpy/vgdM8GNzqXtwlBgiBpk5updPnT ofh6JH+Ac8AF0ksIxE8hHiBpyVaA/SJxd4b92yi8+VTasFBFmDr623z8Ky20a0+Z2pZX /2Wussyf3UTkTTFePueBEUdAtb1IadP8kRVAMAy3szdkx5xoMRkUHY+KxaYadOJwEMgr wHCg== X-Gm-Message-State: AOJu0YwIKmwuYBk/O/l5tgi4RbEJax8GuDzHWm3iKYDukBySoA4ZaJbD I4H/RkDB8NeFsNozrrS4VNPpOQ== X-Google-Smtp-Source: AGHT+IGutQxHrTQ0PDT/rm4Hi1BwUJSaiBc/cWKJ03y/patFhv44C9aSztIA1kKfAa9MrKB6HwgJAQ== X-Received: by 2002:a17:907:1c9b:b0:9e7:c9e3:d63d with SMTP id nb27-20020a1709071c9b00b009e7c9e3d63dmr8902204ejc.7.1699979493603; Tue, 14 Nov 2023 08:31:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , Paul Durrant , David Woodhouse , Thomas Huth , qemu-arm@nongnu.org, Stefano Stabellini , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , xen-devel@lists.xenproject.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH-for-9.0 1/9] hw/xen/hvm: Inline TARGET_PAGE_ALIGN() macro Date: Tue, 14 Nov 2023 17:31:15 +0100 Message-ID: <20231114163123.74888-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114163123.74888-1-philmd@linaro.org> References: <20231114163123.74888-1-philmd@linaro.org> MIME-Version: 1.0 Use TARGET_PAGE_SIZE to calculate TARGET_PAGE_ALIGN. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis --- hw/i386/xen/xen-hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index f1c30d1384..8aa6a1ec3b 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -678,7 +678,7 @@ void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, trace_xen_client_set_memory(start_addr, size, log_dirty); start_addr &= TARGET_PAGE_MASK; - size = TARGET_PAGE_ALIGN(size); + size = ROUND_UP(size, TARGET_PAGE_SIZE); if (add) { if (!memory_region_is_rom(section->mr)) {