mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-09 23:33:53 +03:00
Compare commits
9 Commits
v10.7.0-rc
...
v1.3.4-mai
Author | SHA1 | Date | |
---|---|---|---|
|
ab728b5658 | ||
|
a8ae178438 | ||
|
303047146e | ||
|
4ccc2ec4f9 | ||
|
19ca7bbf10 | ||
|
2d02be4cf1 | ||
|
c2960353ba | ||
|
e4d0b3d5c0 | ||
|
040c033292 |
2
cfg.mk
2
cfg.mk
@@ -1259,7 +1259,7 @@ exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
|
|||||||
^(tools/|examples/|include/libvirt/(virterror|libvirt(-(admin|qemu|lxc))?)\.h$$)
|
^(tools/|examples/|include/libvirt/(virterror|libvirt(-(admin|qemu|lxc))?)\.h$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_int_ijk = \
|
exclude_file_name_regexp--sc_prohibit_int_ijk = \
|
||||||
^(src/remote_protocol-structs|src/remote/remote_protocol.x|cfg.mk|include/|src/admin_protocol-structs|src/admin/admin_protocol.x)$
|
^(src/remote_protocol-structs|src/remote/remote_protocol\.x|cfg\.mk|include/libvirt/libvirt.+|src/admin_protocol-structs|src/admin/admin_protocol\.x)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_getenv = \
|
exclude_file_name_regexp--sc_prohibit_getenv = \
|
||||||
^tests/.*\.[ch]$$
|
^tests/.*\.[ch]$$
|
||||||
|
@@ -926,6 +926,9 @@ Requires: gzip
|
|||||||
Requires: bzip2
|
Requires: bzip2
|
||||||
Requires: lzop
|
Requires: lzop
|
||||||
Requires: xz
|
Requires: xz
|
||||||
|
%if 0%{?fedora} >= 24
|
||||||
|
Requires: systemd-container
|
||||||
|
%endif
|
||||||
|
|
||||||
%description daemon-driver-qemu
|
%description daemon-driver-qemu
|
||||||
The qemu driver plugin for the libvirtd daemon, providing
|
The qemu driver plugin for the libvirtd daemon, providing
|
||||||
@@ -941,6 +944,9 @@ Group: Development/Libraries
|
|||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
# There really is a hard cross-driver dependency here
|
# There really is a hard cross-driver dependency here
|
||||||
Requires: libvirt-daemon-driver-network = %{version}-%{release}
|
Requires: libvirt-daemon-driver-network = %{version}-%{release}
|
||||||
|
%if 0%{?fedora} >= 24
|
||||||
|
Requires: systemd-container
|
||||||
|
%endif
|
||||||
|
|
||||||
%description daemon-driver-lxc
|
%description daemon-driver-lxc
|
||||||
The LXC driver plugin for the libvirtd daemon, providing
|
The LXC driver plugin for the libvirtd daemon, providing
|
||||||
|
@@ -1077,9 +1077,7 @@ virDomainRestoreFlags(virConnectPtr conn, const char *from, const char *dxml,
|
|||||||
* previously by virDomainSave() or virDomainSaveFlags().
|
* previously by virDomainSave() or virDomainSaveFlags().
|
||||||
*
|
*
|
||||||
* No security-sensitive data will be included unless @flags contains
|
* No security-sensitive data will be included unless @flags contains
|
||||||
* VIR_DOMAIN_XML_SECURE; this flag is rejected on read-only
|
* VIR_DOMAIN_XML_SECURE.
|
||||||
* connections. For this API, @flags should not contain either
|
|
||||||
* VIR_DOMAIN_XML_INACTIVE or VIR_DOMAIN_XML_UPDATE_CPU.
|
|
||||||
*
|
*
|
||||||
* Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of
|
* Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of
|
||||||
* error. The caller must free() the returned value.
|
* error. The caller must free() the returned value.
|
||||||
@@ -1095,12 +1093,7 @@ virDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *file,
|
|||||||
|
|
||||||
virCheckConnectReturn(conn, NULL);
|
virCheckConnectReturn(conn, NULL);
|
||||||
virCheckNonNullArgGoto(file, error);
|
virCheckNonNullArgGoto(file, error);
|
||||||
|
virCheckReadOnlyGoto(conn->flags, error);
|
||||||
if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_XML_SECURE)) {
|
|
||||||
virReportError(VIR_ERR_OPERATION_DENIED, "%s",
|
|
||||||
_("virDomainSaveImageGetXMLDesc with secure flag"));
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conn->driver->domainSaveImageGetXMLDesc) {
|
if (conn->driver->domainSaveImageGetXMLDesc) {
|
||||||
char *ret;
|
char *ret;
|
||||||
@@ -11316,6 +11309,7 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
|
|||||||
virResetLastError();
|
virResetLastError();
|
||||||
|
|
||||||
virCheckConnectReturn(conn, NULL);
|
virCheckConnectReturn(conn, NULL);
|
||||||
|
virCheckReadOnlyGoto(conn->flags, error);
|
||||||
|
|
||||||
if (conn->driver->connectGetDomainCapabilities) {
|
if (conn->driver->connectGetDomainCapabilities) {
|
||||||
char *ret;
|
char *ret;
|
||||||
|
@@ -4197,7 +4197,7 @@ lxcDomainAttachDeviceNetLive(virConnectPtr conn,
|
|||||||
if (!priv->initpid) {
|
if (!priv->initpid) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("Cannot attach disk until init PID is known"));
|
_("Cannot attach disk until init PID is known"));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* preallocate new slot for device */
|
/* preallocate new slot for device */
|
||||||
|
@@ -1570,7 +1570,7 @@ iptablesCreateRuleInstanceStateCtrl(virFirewallPtr fw,
|
|||||||
const char *ifname,
|
const char *ifname,
|
||||||
virNWFilterVarCombIterPtr vars)
|
virNWFilterVarCombIterPtr vars)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc = 0;
|
||||||
bool directionIn = false;
|
bool directionIn = false;
|
||||||
char chainPrefix[2];
|
char chainPrefix[2];
|
||||||
bool maySkipICMP, inout = false;
|
bool maySkipICMP, inout = false;
|
||||||
|
@@ -2783,6 +2783,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
virJSONValuePtr props = NULL;
|
virJSONValuePtr props = NULL;
|
||||||
bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, guestNode);
|
bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, guestNode);
|
||||||
|
bool needHugepage = !!pagesize;
|
||||||
|
|
||||||
*backendProps = NULL;
|
*backendProps = NULL;
|
||||||
*backendType = NULL;
|
*backendType = NULL;
|
||||||
@@ -2805,10 +2806,10 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||||||
mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT;
|
mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT;
|
||||||
|
|
||||||
if (pagesize == 0) {
|
if (pagesize == 0) {
|
||||||
|
bool thisHugepage = false;
|
||||||
|
|
||||||
/* Find the huge page size we want to use */
|
/* Find the huge page size we want to use */
|
||||||
for (i = 0; i < def->mem.nhugepages; i++) {
|
for (i = 0; i < def->mem.nhugepages; i++) {
|
||||||
bool thisHugepage = false;
|
|
||||||
|
|
||||||
hugepage = &def->mem.hugepages[i];
|
hugepage = &def->mem.hugepages[i];
|
||||||
|
|
||||||
if (!hugepage->nodemask) {
|
if (!hugepage->nodemask) {
|
||||||
@@ -2830,6 +2831,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||||||
|
|
||||||
if (thisHugepage) {
|
if (thisHugepage) {
|
||||||
/* Hooray, we've found the page size */
|
/* Hooray, we've found the page size */
|
||||||
|
needHugepage = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2936,7 +2938,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If none of the following is requested... */
|
/* If none of the following is requested... */
|
||||||
if (!pagesize && !userNodeset && !memAccess && !nodeSpecified && !force) {
|
if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified && !force) {
|
||||||
/* report back that using the new backend is not necessary
|
/* report back that using the new backend is not necessary
|
||||||
* to achieve the desired configuration */
|
* to achieve the desired configuration */
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
@@ -6688,7 +6688,7 @@ qemuDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *path,
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainSaveImageGetXMLDescEnsureACL(conn, def, flags) < 0)
|
if (virDomainSaveImageGetXMLDescEnsureACL(conn, def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = qemuDomainDefFormatXML(driver, def, flags);
|
ret = qemuDomainDefFormatXML(driver, def, flags);
|
||||||
|
@@ -4029,6 +4029,7 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
|||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
char expire_time [64];
|
char expire_time [64];
|
||||||
const char *connected = NULL;
|
const char *connected = NULL;
|
||||||
|
const char *password;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
|
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
|
||||||
|
|
||||||
@@ -4036,16 +4037,14 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
password = auth->passwd ? auth->passwd : defaultPasswd;
|
||||||
|
|
||||||
if (auth->connected)
|
if (auth->connected)
|
||||||
connected = virDomainGraphicsAuthConnectedTypeToString(auth->connected);
|
connected = virDomainGraphicsAuthConnectedTypeToString(auth->connected);
|
||||||
|
|
||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = qemuMonitorSetPassword(priv->mon,
|
ret = qemuMonitorSetPassword(priv->mon, type, password, connected);
|
||||||
type,
|
|
||||||
auth->passwd ? auth->passwd : defaultPasswd,
|
|
||||||
connected);
|
|
||||||
|
|
||||||
if (ret == -2) {
|
if (ret == -2) {
|
||||||
if (type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
|
if (type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
|
||||||
@@ -4053,14 +4052,15 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
|||||||
_("Graphics password only supported for VNC"));
|
_("Graphics password only supported for VNC"));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
ret = qemuMonitorSetVNCPassword(priv->mon,
|
ret = qemuMonitorSetVNCPassword(priv->mon, password);
|
||||||
auth->passwd ? auth->passwd : defaultPasswd);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
goto end_job;
|
goto end_job;
|
||||||
|
|
||||||
if (auth->expires) {
|
if (password[0] == '\0') {
|
||||||
|
snprintf(expire_time, sizeof(expire_time), "now");
|
||||||
|
} else if (auth->expires) {
|
||||||
time_t lifetime = auth->validTo - now;
|
time_t lifetime = auth->validTo - now;
|
||||||
if (lifetime <= 0)
|
if (lifetime <= 0)
|
||||||
snprintf(expire_time, sizeof(expire_time), "now");
|
snprintf(expire_time, sizeof(expire_time), "now");
|
||||||
|
@@ -4934,8 +4934,7 @@ enum remote_procedure {
|
|||||||
/**
|
/**
|
||||||
* @generate: both
|
* @generate: both
|
||||||
* @priority: high
|
* @priority: high
|
||||||
* @acl: domain:read
|
* @acl: domain:write
|
||||||
* @acl: domain:read_secure:VIR_DOMAIN_XML_SECURE
|
|
||||||
*/
|
*/
|
||||||
REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC = 235,
|
REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC = 235,
|
||||||
|
|
||||||
|
@@ -819,6 +819,10 @@ virBitmapLastSetBit(virBitmapPtr bitmap)
|
|||||||
ssize_t sz;
|
ssize_t sz;
|
||||||
unsigned long bits;
|
unsigned long bits;
|
||||||
|
|
||||||
|
/* If bitmap is empty then there is no set bit */
|
||||||
|
if (bitmap->map_len == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
unusedBits = bitmap->map_len * VIR_BITMAP_BITS_PER_UNIT - bitmap->max_bit;
|
unusedBits = bitmap->map_len * VIR_BITMAP_BITS_PER_UNIT - bitmap->max_bit;
|
||||||
|
|
||||||
sz = bitmap->map_len - 1;
|
sz = bitmap->map_len - 1;
|
||||||
@@ -836,8 +840,8 @@ virBitmapLastSetBit(virBitmapPtr bitmap)
|
|||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bits == 0)
|
/* Only reached if no set bit was found */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
found:
|
found:
|
||||||
for (i = VIR_BITMAP_BITS_PER_UNIT - 1; i >= 0; i--) {
|
for (i = VIR_BITMAP_BITS_PER_UNIT - 1; i >= 0; i--) {
|
||||||
|
@@ -10,12 +10,10 @@ QEMU_AUDIO_DRV=none \
|
|||||||
-M pc \
|
-M pc \
|
||||||
-m 1024 \
|
-m 1024 \
|
||||||
-smp 2 \
|
-smp 2 \
|
||||||
-object memory-backend-file,id=ram-node0,prealloc=yes,\
|
-mem-prealloc \
|
||||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=268435456 \
|
-mem-path /dev/hugepages2M/libvirt/qemu \
|
||||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
-numa node,nodeid=0,cpus=0,mem=256 \
|
||||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
-numa node,nodeid=1,cpus=1,mem=768 \
|
||||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=805306368 \
|
|
||||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
|
||||||
-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \
|
-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \
|
||||||
-nographic \
|
-nographic \
|
||||||
-nodefaults \
|
-nodefaults \
|
||||||
|
Reference in New Issue
Block a user