@@ -85,7 +85,7 @@ request completes. Unexpected accesses must not cause memory corruption or
leaks in QEMU.
Invalid device register accesses can be reported with
-``qemu_log_mask(LOG_GUEST_ERROR, ...)``. The ``-d guest_errors`` command-line
+``qemu_log_mask(LOG_GUEST_ERROR, ...)``. The ``-d guest_error`` command-line
option enables these log messages.
Live Migration
@@ -46,7 +46,7 @@ def common_vm_setup(self, custom_kernel=False):
self.vm.add_args("-accel", "kvm")
self.vm.add_args("-cpu", "host")
self.vm.add_args("-machine", "iommu=smmuv3")
- self.vm.add_args("-d", "guest_errors")
+ self.vm.add_args("-d", "guest_error,invalid_mem")
self.vm.add_args('-bios', os.path.join(BUILD_DIR, 'pc-bios',
'edk2-aarch64-code.fd'))
self.vm.add_args('-device', 'virtio-rng-pci,rng=rng0')
@@ -418,7 +418,7 @@ static void test_host_i2c(const void *data)
qts = qtest_initf("-M %s -smp %d,cores=1,threads=%d -nographic "
"-nodefaults -serial mon:stdio -S "
- "-d guest_errors",
+ "-d guest_error,invalid_mem",
machine, SMT, SMT);
/* Check the I2C master status registers after POR */
@@ -486,7 +486,7 @@ const QEMULogItem qemu_log_items[] = {
"show CPU state before CPU resets" },
{ LOG_UNIMP, "unimp",
"log unimplemented functionality" },
- { LOG_GUEST_ERROR, "guest_errors",
+ { LOG_GUEST_ERROR, "guest_error",
"log when the guest OS does something invalid (eg accessing a\n"
"non-existent register)" },
{ CPU_LOG_PAGE, "page",
@@ -521,6 +521,10 @@ int qemu_str_to_log_mask(const char *str)
for (item = qemu_log_items; item->mask != 0; item++) {
mask |= item->mask;
}
+ } else if (g_str_equal(*tmp, "guest_errors")) {
+ warn_report("Log option guest_errors is deprecated. "
+ "Use guest_error,invalid_mem instead.");
+ mask |= LOG_GUEST_ERROR | LOG_INVALID_MEM;
#ifdef CONFIG_TRACE_LOG
} else if (g_str_has_prefix(*tmp, "trace:") && (*tmp)[6] != '\0') {
trace_enable_events((*tmp) + 6);
Rename guest_errors to guest_error to match the log constant and print a warning for -d guest_errors to remind using guest_error,invalid_mem instead but preserve previous behaviour for convenience. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> --- This patch is optional, only to preserve current behaviour if that's desired. docs/devel/secure-coding-practices.rst | 2 +- tests/avocado/smmu.py | 2 +- tests/qtest/pnv-host-i2c-test.c | 2 +- util/log.c | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-)