You need to sign in or sign up before continuing.
  • L
    qemu: set qemu process' RLIMIT_MEMLOCK when VFIO is used · 93958945
    Laine Stump 提交于
    VFIO requires all of the guest's memory and IO space to be lockable in
    RAM. The domain's max_balloon is the maximum amount of memory the
    domain can have (in KiB). We add a generous 1GiB to that for IO space
    (still much better than KVM device assignment, where the KVM module
    actually *ignores* the process limits and locks everything anyway),
    and convert from KiB to bytes.
    
    In the case of hotplug, we are changing the limit for the already
    existing qemu process (prlimit() is used under the hood), and for
    regular commandline additions of vfio devices, we schedule a call to
    setrlimit() that will happen after the qemu process is forked.
    93958945
qemu_command.c 356.7 KB