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

Re: [PATCH v4 14/17] xen: Add xen_mr_is_memory()



On 2/5/24 09:26, David Hildenbrand wrote:
On 30.04.24 18:49, Edgar E. Iglesias wrote:
From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxx>

Add xen_mr_is_memory() to abstract away tests for the
xen_memory MR.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxx>
---

[...]

  #endif
diff --git a/system/physmem.c b/system/physmem.c
index ad7a8c7d95..1a5ffcba2a 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -2227,7 +2227,7 @@ static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr,
           * because we don't want to map the entire memory in QEMU.
           * In that case just map the requested area.
           */
-        if (block->offset == 0) {
+        if (xen_mr_is_memory(block->mr)) {
              return xen_map_cache(block->mr, addr, len, lock, lock,
                                   is_write);
          }

I'd have moved that into a separate patch, because this is not a simple abstraction here.

Yes please, maybe using Stefano review comment in the description.


Acked-by: David Hildenbrand <david@xxxxxxxxxx>





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.