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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC849C433EF for ; Mon, 25 Jul 2022 21:26:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 43D1684605; Mon, 25 Jul 2022 23:24:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="HpQ5QaLF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 32D2F8460C; Mon, 25 Jul 2022 23:24:03 +0200 (CEST) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A302F8460A for ; Mon, 25 Jul 2022 23:24:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x836.google.com with SMTP id b21so9210843qte.12 for ; Mon, 25 Jul 2022 14:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AWzM4oVv31zgB1st8hoHgnCxRbCNXQ7BPsMD0RMFmq8=; b=HpQ5QaLF2WQfXKq0mv6j+8FpspYTeeQHEfKnVpKFdvhZVh0b8ZsH+/7/bTQ010D/Rl L4GqER+P8lMLXUnzf4Cbj/AvRHioGa4LufRpIVvLenmmsnlH+3sv0FBcj117CUvIFDLx NopwYNUl0DLYOEpx6bXp2RfZsg4y4F4F+KNqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AWzM4oVv31zgB1st8hoHgnCxRbCNXQ7BPsMD0RMFmq8=; b=lQUMABWootn34O2SHVcgIqCW8Eb8W6AhLovYbwDBH007ldnMU8F409FGoiUlR8kZYw BLdvh/RLDMmBaAMWTat9MOGlFc8U3oIEcbuRCt7fQsohpV9Q2etCz0N2KO76qF2MX7V7 aLejHEKWtY0ZJKG/kV88eT3RvZwiKBtpsXyGryFiRtIzd8vHuHotInXDsFz8U2+7coo0 d71lH/lnTpzgaxoT7FqcCFDPIJ3W+nIO247s8OyOqaxgn2nNLKL2HEQlhjkKii0/4KiV 7/P8G1U3CtiUe7q5J6eQnV3otHb1eSFMO4oYbuvBfZr0OjTqMeafJFhkulw0+hSJCiC5 H8nA== X-Gm-Message-State: AJIora/AGodCokhBQoIfAtLl4EYCiZIakb97EAA6fMpdrRBuDeK4aoq+ /4lM+mSlX2XRb6+u9r/RpuXHGMEdr40NWg== X-Google-Smtp-Source: AGRyM1u+ABIGxjV8t1uEned57t6bZnU3yK+GPTwpF6WprTwBqURTmONcwzbEb5GjGWblvomLEma4sA== X-Received: by 2002:ac8:4e8f:0:b0:31f:407e:d42f with SMTP id 15-20020ac84e8f000000b0031f407ed42fmr422351qtp.545.1658784239464; Mon, 25 Jul 2022 14:23:59 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id l15-20020a05620a28cf00b006b5988b2ca8sm10229150qkp.40.2022.07.25.14.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 14:23:58 -0700 (PDT) Date: Mon, 25 Jul 2022 17:23:56 -0400 From: Tom Rini To: Dmytro Firsov Cc: "u-boot@lists.denx.de" , "olekstysh@gmail.com" , "vicooodin@gmail.com" , "julien@xen.org" Subject: Re: [PATCH v2] drivers: xen: unmap Enlighten page before jumping to Linux Message-ID: <20220725212356.GF1146598@bill-the-cat> References: <20220719145519.1795950-1-dmytro_firsov@epam.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="izQ+FE5BNT+1nR/7" Content-Disposition: inline In-Reply-To: <20220719145519.1795950-1-dmytro_firsov@epam.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --izQ+FE5BNT+1nR/7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 19, 2022 at 02:55:28PM +0000, Dmytro Firsov wrote: > This commit fixes issue with usage of Xen hypervisor shared info page. > Previously U-boot did not unmap it at the end of OS boot process. Xen > did not prevent guest from this. So, it worked, but caused wierd > issues - one memory page, that was returned by memalign in U-boot > for Enlighten mapping was not unmaped by Xen (shared_info values was > not removed from there) and returned to allocator. During the Linux > boot, it uses shared_info page as regular RAM page, which leads to > hypervisor shared info corruption. >=20 > So, to fix this issue, as discussed on the xen-devel mailing list, the > code should: > 1) Unmap the page > 2) Populate the area with memory using XENMEM_populate_physmap >=20 > This patch adds page unmapping via XENMEM_remove_from_physmap, fills > hole in address space where page was mapped via XENMEM_populate_physmap > and return this address to memory allocator for freeing. >=20 > Signed-off-by: Dmytro Firsov > Reviewed-by: Anastasiia Lukianenko Applied to u-boot/master, thanks! --=20 Tom --izQ+FE5BNT+1nR/7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLfCewACgkQFHw5/5Y0 tyzSOQv/drB0O+acjXF55aJSBFqwCScl2V3Cwv8OHbnsJxBCZr22ALyK4xSdXWjU 55qCjwg/Q/BHhZ+ADgfmC0dGjPVfIEn89JVyIxmgx0NCr+N0T4jV6e3wwMc7eg75 l9tJ/wxp/LPmvOShbgZTlqgaJiVvujWF5lWWC9hqYa6lOkEKbsgpUQLN5mR4M+mi pLi5uvhUrSQ9dA4IsOkR0PujXES5/i8fTsodshFeVGBaUQj6PB9Az0lsmG2pGWGr Xf6nLmQAWRskMek8EQlsyJcBRAL2EKVlNhvklx1p82H3rNVMRo+Z/mamEn6Eaqs0 XLBg130EDhmfG0DDJ5bPEcyET2BOqZu3U8msdSww67/Q40IyGtGba/QPEuB2Z8zn QhROpY0ytmjFArS/ucbmze38CSoRd9pZMmaymj6e0Jnt0oiQPpB6QtjGQPdlp9dt wKQ9IHbuoA6euN2MCrrbpJ9xVEZ5S5ebdb0Cnm8W2/kdRGkSqZ2vMl+OBkiiEDn/ 95RJ2G6x =B/qz -----END PGP SIGNATURE----- --izQ+FE5BNT+1nR/7--