Skip to contentSkip to conversation

Xen queue

GIT PULL Applied Edgar E. Iglesias 2 participants 5 messages Jul 12, 2024

lore
Share & tools
lore
#0 lore raw

From: "Edgar E. Iglesias" <[email protected]>

The following changes since commit 23901b2b721c0576007ab7580da8aa855d6042a9:

Merge tag 'pull-target-arm-20240711' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-07-11 12:00:00 -0700)

are available in the Git repository at:

https://gitlab.com/edgar.iglesias/qemu.git tags/edgar/xen-queue-2024-07-12.for-upstream

for you to fetch changes up to 872cb9cced796e75d4f719c31d70ed5fd629efca:

xen: mapcache: Fix unmapping of first entries in buckets (2024-07-12 00:17:36 +0200)

----------------------------------------------------------------
Edgars Xen queue.

----------------------------------------------------------------
Edgar E. Iglesias (2):
physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs
xen: mapcache: Fix unmapping of first entries in buckets

Stefano Stabellini (1):
MAINTAINERS: add Edgar as Xen maintainer

 MAINTAINERS           |  1 +
 hw/xen/xen-mapcache.c | 12 +++++++++++-
 system/physmem.c      |  4 ++++
 3 files changed, 16 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
#1 lore raw

[PULL v1 3/3] xen: mapcache: Fix unmapping of first entries in buckets

From: "Edgar E. Iglesias" <[email protected]>

This fixes the clobbering of the entry->next pointer when unmapping the first entry in a bucket of a mapcache.

Fixes 123acd816d ("xen: mapcache: Unmap first entries in buckets")
---
 hw/xen/xen-mapcache.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
hw/xen/xen-mapcache.c +11 -1
index 5f23b0adbe..18ba7b1d8f 100644
@@ -597,7 +597,17 @@ static void xen_invalidate_map_cache_entry_unlocked(MapCache *mc,
         pentry->next = entry->next;
         g_free(entry);
     } else {
-        memset(entry, 0, sizeof *entry);
+        /*
+         * Invalidate mapping but keep entry->next pointing to the rest
+         * of the list.
+         *
+         * Note that lock is already zero here, otherwise we don't unmap.
+         */
+        entry->paddr_index = 0;
+        entry->vaddr_base = NULL;
+        entry->valid_mapping = NULL;
+        entry->flags = 0;
+        entry->size = 0;
     }
 }
 
Signature · 1 line
2.43.0
#2 lore raw

[PULL v1 1/3] MAINTAINERS: add Edgar as Xen maintainer

In reply to Edgar E. Iglesias

From: Stefano Stabellini <[email protected]>

Add Edgar as Xen subsystem maintainer in QEMU. Edgar has been a QEMU maintainer for years, and has already made key changes to one of the most difficult areas of the Xen subsystem (the mapcache).

Edgar volunteered helping us maintain the Xen subsystem in QEMU and we are very happy to welcome him to the team. His knowledge and expertise with QEMU internals will be of great help.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 6725913c8b..63e11095a2 100644
@@ -536,6 +536,7 @@ X86 Xen CPUs
 M: Stefano Stabellini <[email protected]>
 M: Anthony PERARD <[email protected]>
 M: Paul Durrant <[email protected]>
+M: Edgar E. Iglesias <[email protected]>
 L: [email protected]
 S: Supported
 F: */xen*
Signature · 1 line
2.43.0
#3 lore raw

[PULL v1 2/3] physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs

In reply to Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Bail out in qemu_ram_block_from_host() when xen_ram_addr_from_mapcache() does not find an existing mapping.

---
 system/physmem.c | 4 ++++
 1 file changed, 4 insertions(+)
system/physmem.c +4 -0
index 14aa025d41..2154432cb6 100644
@@ -2277,6 +2277,10 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
         ram_addr_t ram_addr;
         RCU_READ_LOCK_GUARD();
         ram_addr = xen_ram_addr_from_mapcache(ptr);
+        if (ram_addr == RAM_ADDR_INVALID) {
+            return NULL;
+        }
+
         block = qemu_get_ram_block(ram_addr);
         if (block) {
             *offset = ram_addr - block->offset;
Signature · 1 line
2.43.0
#4 lore raw
In reply to Edgar E. Iglesias
Quoted 8 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias"<[email protected]>

The following changes since commit 23901b2b721c0576007ab7580da8aa855d6042a9:

   Merge tag 'pull-target-arm-20240711' ofhttps://git.linaro.org/people/pmaydell/qemu-arm  into staging (2024-07-11 12:00:00 -0700)

are available in the Git repository at:

Quoted 8 lines
   https://gitlab.com/edgar.iglesias/qemu.git  tags/edgar/xen-queue-2024-07-12.for-upstream

for you to fetch changes up to 872cb9cced796e75d4f719c31d70ed5fd629efca:

xen: mapcache: Fix unmapping of first entries in buckets (2024-07-12 00:17:36 +0200)

----------------------------------------------------------------
Edgars Xen queue.

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.

r~