lkml.org 
[lkml]   [2008]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 29/39] KVM: Allocate guest memory as MAP_PRIVATE, not MAP_SHARED
    Date
    From: Avi Kivity <avi@qumranet.com>

    There is no reason to share internal memory slots with fork()ed instances.

    Signed-off-by: Avi Kivity <avi@qumranet.com>
    ---
    arch/x86/kvm/x86.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
    index bfc7c33..675d010 100644
    --- a/arch/x86/kvm/x86.c
    +++ b/arch/x86/kvm/x86.c
    @@ -4296,7 +4296,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
    userspace_addr = do_mmap(NULL, 0,
    npages * PAGE_SIZE,
    PROT_READ | PROT_WRITE,
    - MAP_SHARED | MAP_ANONYMOUS,
    + MAP_PRIVATE | MAP_ANONYMOUS,
    0);
    up_write(&current->mm->mmap_sem);

    --
    1.6.0.1


    \
     
     \ /
      Last update: 2008-09-25 14:07    [W:0.021 / U:0.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site