lkml.org 
[lkml]   [2023]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC v7 07/64] KVM: SEV: Handle KVM_HC_MAP_GPA_RANGE hypercall
    On Mon, Jan 16, 2023, Nikunj A. Dadhania wrote:
    > On 13/01/23 21:47, Sean Christopherson wrote:
    > > It's perfectly legal for userspace to create the private memslot in response
    > > to a guest request.
    >
    > Sean, did not understand this part, how could a memslot be created on a guest request?

    KVM_HC_MAP_GPA_RANGE gets routed to host userspace, at that point userspace can
    take any action it wants to satisfy the guest request. E.g. a userspace+guest
    setup could define memory as shared by default, and only create KVM_MEM_PRIVATE
    memslots for memory that the guest explicitly requests to be mapped private.

    I don't anticipate any real world use cases actually doing something like that,
    but I also don't see any value in going out of our way to disallow it. Normally
    I like to be conservative when it comes to KVM's uAPI, e.g. allow the minimum
    needed to support known use cases, but restricting KVM_HC_MAP_GPA_RANGE doesn't
    actually achieve anything and just makes things more complex for KVM. E.g. the
    behavior is non-deterministic from KVM's perspective if a userspace memslots update
    is in-progress.

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