mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-09-29 13:44:45 +03:00
Compare commits
3 Commits
v3.3.0-rc2
...
v2.1-maint
Author | SHA1 | Date | |
---|---|---|---|
|
e322b6f73d | ||
|
dea40b4218 | ||
|
f398d4b423 |
@@ -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;
|
||||||
@@ -11321,6 +11314,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;
|
||||||
|
@@ -3102,6 +3102,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;
|
||||||
@@ -3124,10 +3125,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) {
|
||||||
@@ -3149,6 +3150,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3255,7 +3257,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;
|
||||||
|
@@ -6628,7 +6628,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);
|
||||||
|
@@ -4984,8 +4984,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,
|
||||||
|
|
||||||
|
@@ -10,12 +10,10 @@ QEMU_AUDIO_DRV=none \
|
|||||||
-M pc \
|
-M pc \
|
||||||
-m 1024 \
|
-m 1024 \
|
||||||
-smp 2,sockets=2,cores=1,threads=1 \
|
-smp 2,sockets=2,cores=1,threads=1 \
|
||||||
-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