lkml.org 
[lkml]   [2024]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 31/43] arm64: rme: Prevent Device mappings for Realms
    Date
    Physical device assignment is not yet supported by the RMM, so it
    doesn't make much sense to allow device mappings within the realm.
    Prevent them when the guest is a realm.

    Signed-off-by: Steven Price <steven.price@arm.com>
    ---
    arch/arm64/kvm/mmu.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
    index d891fc3c1a10..48c957e21c83 100644
    --- a/arch/arm64/kvm/mmu.c
    +++ b/arch/arm64/kvm/mmu.c
    @@ -1101,6 +1101,10 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
    if (is_protected_kvm_enabled())
    return -EPERM;

    + /* We don't support mapping special pages into a Realm */
    + if (kvm_is_realm(kvm))
    + return -EINVAL;
    +
    size += offset_in_page(guest_ipa);
    guest_ipa &= PAGE_MASK;

    --
    2.34.1

    \
     
     \ /
      Last update: 2024-04-12 10:57    [W:4.110 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site