[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/altp2m: p2m_altp2m_get_or_propagate() should honor ap2m->default_access


  • To: Petr Beneš <w1benny@xxxxxxxxx>
  • From: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • Date: Tue, 6 Feb 2024 08:19:16 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=tklengyel.com; spf=pass smtp.mailfrom=tamas@xxxxxxxxxxxxx; dmarc=pass header.from=<tamas@xxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707225594; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=AcLOC/B+zC/6qFNeSnAd6vo5Xv4mxXGkXuFcuaV4UJw=; b=EuO1DaqpziDI1J5oFH9eQS0H5svK+ZpPe6O6AJwupGm+2AKAyRBcuiViXvS5DxaOXop/GlI5UUqe9et09DWW78xapJ5c0hIk567My+yNIAId8mYSYDXIr1Oi3VfbBKAfoSumDa7o8cVs7j8a2dnnjzW66XQ+sy0thRGTkHYtHyo=
  • Arc-seal: i=1; a=rsa-sha256; t=1707225594; cv=none; d=zohomail.com; s=zohoarc; b=cL02Ku0IQtKMqV/NTJie9lYsLUetZX4DOhwQnft6FXOD7upXALl7MzJbO4h0OX+R6GnkfO2W9iGE03xMyfxlcFFYQ3HVAAOFR/sFTuWuKH3hSYZ49Ds7AH2flXtuMOk5B0zTyGWExAoKsB035IS0ip3y/g4r/df1hu0N9EauY/U=
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 06 Feb 2024 13:20:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Feb 6, 2024 at 5:08 AM Petr Beneš <w1benny@xxxxxxxxx> wrote:
>
> From: Petr Beneš <w1benny@xxxxxxxxx>
>
> This patch addresses a behavior discrepancy in the handling of altp2m views,
> where upon the creation and subsequent EPT violation, the page access
> permissions were incorrectly inherited from the hostp2m instead of respecting
> the altp2m default_access.
>
> Previously, when a new altp2m view was established with restrictive
> default_access permissions and activated via xc_altp2m_switch_to_view(),
> it failed to trigger an event on the first access violation.  This behavior
> diverged from the intended mechanism, where the altp2m's default_access
> should dictate the initial permissions, ensuring proper event triggering on
> access violations.
>
> The correction involves modifying the handling mechanism to respect the
> altp2m view's default_access upon its activation, eliminating the need for
> setting memory access permissions for the entire altp2m range (e.g. within
> xen-access.c).  This change not only aligns the behavior with the expected
> access control logic but also results in a significant performance improvement
> by reducing the overhead associated with setting memory access permissions
> across the altp2m range.
>
> Signed-off-by: Petr Beneš <w1benny@xxxxxxxxx>

Acked-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.