lkml.org 
[lkml]   [2008]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 12/40] KVM: Limit vcpu mmap size to one page on non-x86
    Date
    The second page is only needed on archs that support pio.

    Noted by Carsten Otte.

    Signed-off-by: Avi Kivity <avi@qumranet.com>
    ---
    virt/kvm/kvm_main.c | 5 ++++-
    1 files changed, 4 insertions(+), 1 deletions(-)

    diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
    index 121e65c..7972e3a 100644
    --- a/virt/kvm/kvm_main.c
    +++ b/virt/kvm/kvm_main.c
    @@ -1061,7 +1061,10 @@ static long kvm_dev_ioctl(struct file *filp,
    r = -EINVAL;
    if (arg)
    goto out;
    - r = 2 * PAGE_SIZE;
    + r = PAGE_SIZE; /* struct kvm_run */
    +#ifdef CONFIG_X86
    + r += PAGE_SIZE; /* pio data page */
    +#endif
    break;
    default:
    return kvm_arch_dev_ioctl(filp, ioctl, arg);
    --
    1.5.4.5


    \
     
     \ /
      Last update: 2008-03-31 16:43    [W:0.024 / U:59.516 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site