qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 5/7] sysbus: Add new platform bus helper devi


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH v3 5/7] sysbus: Add new platform bus helper device
Date: Fri, 26 Sep 2014 14:26:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

On 09/26/2014 02:05 PM, Paolo Bonzini wrote:
Il 24/09/2014 17:22, Alexander Graf ha scritto:
+    if (!memory_region_is_mapped(sbdev_mr)) {
+        /* Region is not mapped? */
+        return -1;
+    }
+
+    parent_mr = object_property_get_link(OBJECT(sbdev_mr), "container", NULL);
+
+    assert(parent_mr);
+    if (parent_mr != pbus_mr_obj) {
+        /* MMIO region is not mapped on platform bus */
+        return -1;
+    }
+
+    return object_property_get_int(OBJECT(sbdev_mr), "addr", NULL);
I think this should try going through the parent recursively until
reaching NULL (which would fail) or pbus_mr_obj.

Are you sure? Imagine one sysbus device includes another. We only want to look at the region the lowest sysbus device exposes, no?


Alex




reply via email to

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