lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 03/10] KVM: arm64: switch HCRX_EL2 between host and guest
    On Thu, 16 Feb 2023 16:00:05 +0000,
    Kristina Martsenko <kristina.martsenko@arm.com> wrote:
    >
    > Switch the HCRX_EL2 register between host and guest configurations, in
    > order to enable different features in the host and guest.
    >
    > Note that the guest flags are only set if all CPUs have HCRX_EL2.
    > Asymmetric systems where only some CPUs have HCRX_EL2 are not supported
    > and will result in guests running with the host flags set (and a "SANITY
    > CHECK" warning printed for the host).
    >
    > After this change, SMPME is no longer set for guests, which should have
    > no effect as SME is currently disabled for guests.

    Why not preserve the behaviour by propagating the flag into the guest
    setup?

    >
    > Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
    > ---
    >
    > I wasn't sure what to do about asymmetric systems. It seems a bit
    > fragile, maybe someone has a better idea?

    I would simply prevent these CPUs from booting if they come after a
    primary CPU that has the feature. These hypothetical asymmetric setups
    put a huge complexity on the kernel, and I'm worried that we're just
    giving implementers too much freedom.

    If someone comes up with that sort of stuff, they can write the
    patches themselves... Or do you know of any braindead setup involving
    an asymmetric FEAT_HCX implementation?

    Thanks,

    M.

    --
    Without deviation from the norm, progress is not possible.

    \
     
     \ /
      Last update: 2023-03-27 00:26    [W:4.591 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site