diff options
Diffstat (limited to 'util')
| -rw-r--r-- | util/base64.c | 2 | ||||
| -rw-r--r-- | util/buffer.c | 2 | ||||
| -rw-r--r-- | util/filemonitor-inotify.c | 2 | ||||
| -rw-r--r-- | util/filemonitor-stub.c | 2 | ||||
| -rw-r--r-- | util/log.c | 2 | ||||
| -rw-r--r-- | util/oslib-win32.c | 2 | ||||
| -rw-r--r-- | util/vfio-helpers.c | 14 |
7 files changed, 20 insertions, 6 deletions
diff --git a/util/base64.c b/util/base64.c index 9d3c46cbcc..811111ac4f 100644 --- a/util/base64.c +++ b/util/base64.c @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/util/buffer.c b/util/buffer.c index d8bb874534..743eaa930d 100644 --- a/util/buffer.c +++ b/util/buffer.c @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/util/filemonitor-inotify.c b/util/filemonitor-inotify.c index b5f4b93f3f..2c45f7f176 100644 --- a/util/filemonitor-inotify.c +++ b/util/filemonitor-inotify.c @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/util/filemonitor-stub.c b/util/filemonitor-stub.c index 2c0e97edd8..93fef65345 100644 --- a/util/filemonitor-stub.c +++ b/util/filemonitor-stub.c @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/util/log.c b/util/log.c index 4b423062aa..2ee1500bee 100644 --- a/util/log.c +++ b/util/log.c @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/util/oslib-win32.c b/util/oslib-win32.c index e99debfb8d..23a7c7320b 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -373,7 +373,7 @@ const char *qemu_get_exec_dir(void) * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index c469beb061..2bec48e163 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -16,6 +16,7 @@ #include "qapi/error.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" +#include "exec/memory.h" #include "trace.h" #include "qemu/error-report.h" #include "standard-headers/linux/pci_regs.h" @@ -494,8 +495,20 @@ QEMUVFIOState *qemu_vfio_open_pci(const char *device, Error **errp) int r; QEMUVFIOState *s = g_new0(QEMUVFIOState, 1); + /* + * VFIO may pin all memory inside mappings, resulting it in pinning + * all memory inside RAM blocks unconditionally. + */ + r = ram_block_discard_disable(true); + if (r) { + error_setg_errno(errp, -r, "Cannot set discarding of RAM broken"); + g_free(s); + return NULL; + } + r = qemu_vfio_init_pci(s, device, errp); if (r) { + ram_block_discard_disable(false); g_free(s); return NULL; } @@ -837,4 +850,5 @@ void qemu_vfio_close(QEMUVFIOState *s) close(s->device); close(s->group); close(s->container); + ram_block_discard_disable(false); } |