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:
Peter Maydell 2019-01-31 11:20:26 +00:00
commit 006dce5f8f
3 changed files with 10 additions and 5 deletions

View File

@ -82,7 +82,8 @@ static void set_mem_path(Object *o, const char *str, Error **errp)
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
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;
}
g_free(fb->mem_path);
@ -120,7 +121,8 @@ static void file_memory_backend_set_align(Object *o, Visitor *v,
uint64_t val;
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;
}

View File

@ -57,7 +57,8 @@ host_memory_backend_set_size(Object *obj, Visitor *v, const char *name,
uint64_t value;
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;
}
@ -66,8 +67,9 @@ host_memory_backend_set_size(Object *obj, Visitor *v, const char *name,
goto out;
}
if (!value) {
error_setg(&local_err, "Property '%s.%s' doesn't take value '%"
PRIu64 "'", object_get_typename(obj), name, value);
error_setg(&local_err,
"property '%s' of %s doesn't take value '%" PRIu64 "'",
name, object_get_typename(obj), value);
goto out;
}
backend->size = value;

1
numa.c
View File

@ -533,6 +533,7 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
error_report("memory backend %s is used multiple times. Each "
"-numa option must use a different memdev value.",
path);
g_free(path);
exit(1);
}