qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions


From: Thomas Huth
Subject: Re: [RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions
Date: Mon, 15 Mar 2021 06:14:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 15/03/2021 00.29, Philippe Mathieu-Daudé wrote:
Restrict CPU I/O instructions to architectures providing
I/O bus.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
  tests/qtest/fuzz/generic_fuzz.c   | 16 ++++++++++------
  tests/qtest/fuzz/qtest_wrappers.c |  4 ++++
  2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c
index ee8c17a04c4..3e0089f4a63 100644
--- a/tests/qtest/fuzz/generic_fuzz.c
+++ b/tests/qtest/fuzz/generic_fuzz.c
@@ -304,6 +304,13 @@ static bool get_io_address(address_range *result, 
AddressSpace *as,
      return cb_info.found;
  }
+static bool get_mmio_address(address_range *result,
+                             uint8_t index, uint32_t offset)
+{
+    return get_io_address(result, &address_space_memory, index, offset);
+}
+
+#ifdef TARGET_HAS_IOPORT

Sorry, but the qtests are generic code, I don't think we should introduce target specific ifdefs here...?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]