Machine queue, 2019-01-28
* Fix small leak on NUMA code * Improve memory backend error messages -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJcT1swAAoJECgHk2+YTcWm1doP/jTSghhACEzxwoEomBTV78Rh GuOSD5UvNwqh8WDGpOkffj5kyxHusX2z1Vr8txPxum0FlRlfU2/vS5nDjPX1qC9v Opi40Pv08lTZRs+LFUJhUnx+mJmCC6o3Qtq8IIEmodF6NVTEGz2JMOFdw0qSLRrG 7rTlx0I3+0T3J/d0Q0HbnOpShaxDFrVI0B/INbRswSNC0QjdqfJ0riWVNIxmQAI6 HdUbgOBlSgHp17LZmWQAoelwK2FMpQ0EajYGF+1XpFmSRtpxx4TcpY+C1utfh/CQ 7kkEL8gYgcR4ITvFKUCTSegNAKZwN+rse4LlHr+kXvWYXYwjNEYzu2spSWuEstm+ I209WbxPTj8dUbU/LJgqWV5P1xpH35sQt3jPdr5M7VCarXMsR+uwGURjZpzCobO+ sesfECMFI9PCoHqE6x63LJ73lRt8qS+6Sa2Z2RpBhnF0I8e8pz52hyY5zM0USqUu MRQTIUsmo54nvWQwEj64tqL/9EfBVqnxteVrwLeI6m1wxfU5oFC5iY/Obh1fw0yd DHJ72UO6r++xYy+CiHb1J1A2/b5iohY+KoLYMoDzW5K5spxG+8PKo+MAdaC1ErrI RcJHXFby3zb/MTGm1HKfe7MNtp01EtH7EG/muVjLWqSbqeFtXemt+mPHf2jzm6pE 6RFQWZs3KYz6WvgX4iig =tMiV -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging Machine queue, 2019-01-28 * Fix small leak on NUMA code * Improve memory backend error messages # gpg: Signature made Mon 28 Jan 2019 19:42:40 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-next-pull-request: hostmem: add more information in error messages numa: Fixed the memory leak of numa error message Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
006dce5f8f
|
@ -82,7 +82,8 @@ static void set_mem_path(Object *o, const char *str, Error **errp)
|
||||||
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
|
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
|
||||||
|
|
||||||
if (host_memory_backend_mr_inited(backend)) {
|
if (host_memory_backend_mr_inited(backend)) {
|
||||||
error_setg(errp, "cannot change property value");
|
error_setg(errp, "cannot change property 'mem-path' of %s",
|
||||||
|
object_get_typename(o));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g_free(fb->mem_path);
|
g_free(fb->mem_path);
|
||||||
|
@ -120,7 +121,8 @@ static void file_memory_backend_set_align(Object *o, Visitor *v,
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
|
||||||
if (host_memory_backend_mr_inited(backend)) {
|
if (host_memory_backend_mr_inited(backend)) {
|
||||||
error_setg(&local_err, "cannot change property value");
|
error_setg(&local_err, "cannot change property '%s' of %s",
|
||||||
|
name, object_get_typename(o));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,8 @@ host_memory_backend_set_size(Object *obj, Visitor *v, const char *name,
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
|
|
||||||
if (host_memory_backend_mr_inited(backend)) {
|
if (host_memory_backend_mr_inited(backend)) {
|
||||||
error_setg(&local_err, "cannot change property value");
|
error_setg(&local_err, "cannot change property %s of %s ",
|
||||||
|
name, object_get_typename(obj));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,8 +67,9 @@ host_memory_backend_set_size(Object *obj, Visitor *v, const char *name,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!value) {
|
if (!value) {
|
||||||
error_setg(&local_err, "Property '%s.%s' doesn't take value '%"
|
error_setg(&local_err,
|
||||||
PRIu64 "'", object_get_typename(obj), name, value);
|
"property '%s' of %s doesn't take value '%" PRIu64 "'",
|
||||||
|
name, object_get_typename(obj), value);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
backend->size = value;
|
backend->size = value;
|
||||||
|
|
1
numa.c
1
numa.c
|
@ -533,6 +533,7 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
|
||||||
error_report("memory backend %s is used multiple times. Each "
|
error_report("memory backend %s is used multiple times. Each "
|
||||||
"-numa option must use a different memdev value.",
|
"-numa option must use a different memdev value.",
|
||||||
path);
|
path);
|
||||||
|
g_free(path);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue