[libvirt] [PATCH 0/8] Memory locking fixes

Andrea Bolognani posted 8 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1490293007-27030-1-git-send-email-abologna@redhat.com
There is a newer version of this series
docs/formatdomain.html.in                          |  36 +++--
src/libvirt_private.syms                           |   1 +
src/qemu/qemu_command.c                            |   4 +-
src/qemu/qemu_domain.c                             |  75 ++++-----
src/qemu/qemu_domain.h                             |   1 -
src/util/vircommand.c                              |   9 ++
src/util/vircommand.h                              |   2 +
src/util/virprocess.c                              |  20 ++-
tests/Makefile.am                                  |   9 ++
.../qemumemlock-pc-hardlimit+hostdev.xml           |  20 +++
.../qemumemlock-pc-hardlimit+locked+hostdev.xml    |  23 +++
.../qemumemlock-pc-hardlimit+locked.xml            |  17 ++
tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml |  14 ++
tests/qemumemlockdata/qemumemlock-pc-hostdev.xml   |  17 ++
tests/qemumemlockdata/qemumemlock-pc-kvm.xml       |  11 ++
.../qemumemlock-pc-locked+hostdev.xml              |  20 +++
tests/qemumemlockdata/qemumemlock-pc-locked.xml    |  14 ++
tests/qemumemlockdata/qemumemlock-pc-tcg.xml       |  11 ++
.../qemumemlock-pseries-hardlimit+hostdev.xml      |  20 +++
...emumemlock-pseries-hardlimit+locked+hostdev.xml |  23 +++
.../qemumemlock-pseries-hardlimit+locked.xml       |  17 ++
.../qemumemlock-pseries-hardlimit.xml              |  14 ++
.../qemumemlock-pseries-hostdev.xml                |  17 ++
tests/qemumemlockdata/qemumemlock-pseries-kvm.xml  |  11 ++
.../qemumemlock-pseries-locked+hostdev.xml         |  20 +++
.../qemumemlockdata/qemumemlock-pseries-locked.xml |  14 ++
tests/qemumemlockdata/qemumemlock-pseries-tcg.xml  |  11 ++
tests/qemumemlocktest.c                            | 172 +++++++++++++++++++++
tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml   |   3 -
tests/testutils.c                                  |  27 ++++
tests/testutils.h                                  |   2 +
31 files changed, 583 insertions(+), 72 deletions(-)
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked+hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-kvm.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-locked+hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-locked.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pc-tcg.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+locked+hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+locked.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-kvm.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-locked+hostdev.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-locked.xml
create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-tcg.xml
create mode 100644 tests/qemumemlocktest.c
[libvirt] [PATCH 0/8] Memory locking fixes
Posted by Andrea Bolognani 7 years ago
A problem reported recently to the mailing list[1] uncovered
some flaws in the way we deal with setting the memory locking
limit for QEMU guests.

This series solves those issues and adds test suite coverage
to hopefully prevent more bugs from popping up in the future.


[1] https://www.redhat.com/archives/libvir-list/2017-March/msg00534.html

Andrea Bolognani (8):
  Revert "qemu: Forbid <memoryBacking><locked> without
    <memtune><hard_limit>"
  qemu: Remove qemuDomainRequiresMemLock()
  qemu: Fix memory locking limit calculation
  process: Translate "unlimited" correctly
  command: Introduce virCommandGetMaxMemLock()
  tests: Introduce virTestCompareToULL()
  tests: Introduce QEMU memory locking limit tests
  docs: Improve documentation related to memory locking

 docs/formatdomain.html.in                          |  36 +++--
 src/libvirt_private.syms                           |   1 +
 src/qemu/qemu_command.c                            |   4 +-
 src/qemu/qemu_domain.c                             |  75 ++++-----
 src/qemu/qemu_domain.h                             |   1 -
 src/util/vircommand.c                              |   9 ++
 src/util/vircommand.h                              |   2 +
 src/util/virprocess.c                              |  20 ++-
 tests/Makefile.am                                  |   9 ++
 .../qemumemlock-pc-hardlimit+hostdev.xml           |  20 +++
 .../qemumemlock-pc-hardlimit+locked+hostdev.xml    |  23 +++
 .../qemumemlock-pc-hardlimit+locked.xml            |  17 ++
 tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml |  14 ++
 tests/qemumemlockdata/qemumemlock-pc-hostdev.xml   |  17 ++
 tests/qemumemlockdata/qemumemlock-pc-kvm.xml       |  11 ++
 .../qemumemlock-pc-locked+hostdev.xml              |  20 +++
 tests/qemumemlockdata/qemumemlock-pc-locked.xml    |  14 ++
 tests/qemumemlockdata/qemumemlock-pc-tcg.xml       |  11 ++
 .../qemumemlock-pseries-hardlimit+hostdev.xml      |  20 +++
 ...emumemlock-pseries-hardlimit+locked+hostdev.xml |  23 +++
 .../qemumemlock-pseries-hardlimit+locked.xml       |  17 ++
 .../qemumemlock-pseries-hardlimit.xml              |  14 ++
 .../qemumemlock-pseries-hostdev.xml                |  17 ++
 tests/qemumemlockdata/qemumemlock-pseries-kvm.xml  |  11 ++
 .../qemumemlock-pseries-locked+hostdev.xml         |  20 +++
 .../qemumemlockdata/qemumemlock-pseries-locked.xml |  14 ++
 tests/qemumemlockdata/qemumemlock-pseries-tcg.xml  |  11 ++
 tests/qemumemlocktest.c                            | 172 +++++++++++++++++++++
 tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml   |   3 -
 tests/testutils.c                                  |  27 ++++
 tests/testutils.h                                  |   2 +
 31 files changed, 583 insertions(+), 72 deletions(-)
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked+hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-kvm.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-locked+hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-locked.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pc-tcg.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+locked+hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+locked.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-kvm.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-locked+hostdev.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-locked.xml
 create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-tcg.xml
 create mode 100644 tests/qemumemlocktest.c

-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/8] Memory locking fixes
Posted by Luiz Capitulino 7 years ago
On Thu, 23 Mar 2017 19:16:39 +0100
Andrea Bolognani <abologna@redhat.com> wrote:

> A problem reported recently to the mailing list[1] uncovered
> some flaws in the way we deal with setting the memory locking
> limit for QEMU guests.
> 
> This series solves those issues and adds test suite coverage
> to hopefully prevent more bugs from popping up in the future.

Tested-by: Luiz Capitulino <lcapitulino@redhat.com>

> 
> 
> [1] https://www.redhat.com/archives/libvir-list/2017-March/msg00534.html
> 
> Andrea Bolognani (8):
>   Revert "qemu: Forbid <memoryBacking><locked> without
>     <memtune><hard_limit>"
>   qemu: Remove qemuDomainRequiresMemLock()
>   qemu: Fix memory locking limit calculation
>   process: Translate "unlimited" correctly
>   command: Introduce virCommandGetMaxMemLock()
>   tests: Introduce virTestCompareToULL()
>   tests: Introduce QEMU memory locking limit tests
>   docs: Improve documentation related to memory locking
> 
>  docs/formatdomain.html.in                          |  36 +++--
>  src/libvirt_private.syms                           |   1 +
>  src/qemu/qemu_command.c                            |   4 +-
>  src/qemu/qemu_domain.c                             |  75 ++++-----
>  src/qemu/qemu_domain.h                             |   1 -
>  src/util/vircommand.c                              |   9 ++
>  src/util/vircommand.h                              |   2 +
>  src/util/virprocess.c                              |  20 ++-
>  tests/Makefile.am                                  |   9 ++
>  .../qemumemlock-pc-hardlimit+hostdev.xml           |  20 +++
>  .../qemumemlock-pc-hardlimit+locked+hostdev.xml    |  23 +++
>  .../qemumemlock-pc-hardlimit+locked.xml            |  17 ++
>  tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml |  14 ++
>  tests/qemumemlockdata/qemumemlock-pc-hostdev.xml   |  17 ++
>  tests/qemumemlockdata/qemumemlock-pc-kvm.xml       |  11 ++
>  .../qemumemlock-pc-locked+hostdev.xml              |  20 +++
>  tests/qemumemlockdata/qemumemlock-pc-locked.xml    |  14 ++
>  tests/qemumemlockdata/qemumemlock-pc-tcg.xml       |  11 ++
>  .../qemumemlock-pseries-hardlimit+hostdev.xml      |  20 +++
>  ...emumemlock-pseries-hardlimit+locked+hostdev.xml |  23 +++
>  .../qemumemlock-pseries-hardlimit+locked.xml       |  17 ++
>  .../qemumemlock-pseries-hardlimit.xml              |  14 ++
>  .../qemumemlock-pseries-hostdev.xml                |  17 ++
>  tests/qemumemlockdata/qemumemlock-pseries-kvm.xml  |  11 ++
>  .../qemumemlock-pseries-locked+hostdev.xml         |  20 +++
>  .../qemumemlockdata/qemumemlock-pseries-locked.xml |  14 ++
>  tests/qemumemlockdata/qemumemlock-pseries-tcg.xml  |  11 ++
>  tests/qemumemlocktest.c                            | 172 +++++++++++++++++++++
>  tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml   |   3 -
>  tests/testutils.c                                  |  27 ++++
>  tests/testutils.h                                  |   2 +
>  31 files changed, 583 insertions(+), 72 deletions(-)
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked+hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-kvm.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-locked+hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-locked.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pc-tcg.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+locked+hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit+locked.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hardlimit.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-kvm.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-locked+hostdev.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-locked.xml
>  create mode 100644 tests/qemumemlockdata/qemumemlock-pseries-tcg.xml
>  create mode 100644 tests/qemumemlocktest.c
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/8] Memory locking fixes
Posted by Martin Kletzander 7 years ago
On Fri, Mar 24, 2017 at 02:01:34PM -0400, Luiz Capitulino wrote:
>On Thu, 23 Mar 2017 19:16:39 +0100
>Andrea Bolognani <abologna@redhat.com> wrote:
>
>> A problem reported recently to the mailing list[1] uncovered
>> some flaws in the way we deal with setting the memory locking
>> limit for QEMU guests.
>>
>> This series solves those issues and adds test suite coverage
>> to hopefully prevent more bugs from popping up in the future.
>
>Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
>
>>
>>
>> [1] https://www.redhat.com/archives/libvir-list/2017-March/msg00534.html
>>
>> Andrea Bolognani (8):
>>   Revert "qemu: Forbid <memoryBacking><locked> without
>>     <memtune><hard_limit>"
>>   qemu: Remove qemuDomainRequiresMemLock()
>>   qemu: Fix memory locking limit calculation
>>   process: Translate "unlimited" correctly
>>   command: Introduce virCommandGetMaxMemLock()
>>   tests: Introduce virTestCompareToULL()

ACK to these first 6.  I have to at least mention that I don't like the
fact that we need the sixth one, but we do and that's how the compare
functions work =)

>>   tests: Introduce QEMU memory locking limit tests
>>   docs: Improve documentation related to memory locking
>>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list