qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [qemu-s390x] [PATCH v5 05/12] s390-ccw: move auxiliary


From: Collin L. Walling
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH v5 05/12] s390-ccw: move auxiliary IPL data to separate location
Date: Tue, 6 Feb 2018 12:10:55 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/06/2018 05:13 AM, Viktor Mihajlovski wrote:
On 06.02.2018 10:23, Thomas Huth wrote:
On 05.02.2018 21:57, Collin L. Walling wrote:
[...]
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 0d06fc1..3e3c3b8 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -399,6 +399,20 @@ void s390_reipl_request(void)
      qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
  }
+static void s390_ipl_prepare_qipl(S390CPU *cpu)
+{
+    S390IPLState *ipl = get_ipl_device();
+    uint8_t *addr;
+    uint64_t len = 4096;
+
+    addr = cpu_physical_memory_map(cpu->env.psa, &len, 1);
+    if (!addr || len < 204 + sizeof(QemuIplParameters)) {
+        error_report("Cannot set QEMU IPL parameters");
I think you should return or exit() here. Otherwise the memcpy below
accesses an illegal memory range.Right, I have noticed and fixed that on my 
private branch, but forgot to
update the patch. Collin, could you squash in a
             return;

Can do.

[...]


--
- Collin L Walling




reply via email to

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