* [PULL v1 0/3] Xen queue
@ 2024-07-12 11:02 Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 1/3] MAINTAINERS: add Edgar as Xen maintainer Edgar E. Iglesias
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2024-07-12 11:02 UTC (permalink / raw)
To: qemu-devel
Cc: sstabellini, anthony, paul, alex.bennee, peter.maydell,
richard.henderson, edgar.iglesias
From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
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(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PULL v1 1/3] MAINTAINERS: add Edgar as Xen maintainer
2024-07-12 11:02 [PULL v1 0/3] Xen queue Edgar E. Iglesias
@ 2024-07-12 11:02 ` Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 2/3] physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs Edgar E. Iglesias
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2024-07-12 11:02 UTC (permalink / raw)
To: qemu-devel
Cc: sstabellini, anthony, paul, alex.bennee, peter.maydell,
richard.henderson, edgar.iglesias, Stefano Stabellini
From: Stefano Stabellini <sstabellini@kernel.org>
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.
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Anthony PERARD <anthony@xenproject.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 6725913c8b..63e11095a2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -536,6 +536,7 @@ X86 Xen CPUs
M: Stefano Stabellini <sstabellini@kernel.org>
M: Anthony PERARD <anthony@xenproject.org>
M: Paul Durrant <paul@xen.org>
+M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
L: xen-devel@lists.xenproject.org
S: Supported
F: */xen*
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PULL v1 2/3] physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs
2024-07-12 11:02 [PULL v1 0/3] Xen queue Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 1/3] MAINTAINERS: add Edgar as Xen maintainer Edgar E. Iglesias
@ 2024-07-12 11:02 ` Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 3/3] xen: mapcache: Fix unmapping of first entries in buckets Edgar E. Iglesias
2024-07-12 22:11 ` [PULL v1 0/3] Xen queue Richard Henderson
3 siblings, 0 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2024-07-12 11:02 UTC (permalink / raw)
To: qemu-devel
Cc: sstabellini, anthony, paul, alex.bennee, peter.maydell,
richard.henderson, edgar.iglesias, Paolo Bonzini, Peter Xu,
David Hildenbrand, Philippe Mathieu-Daudé
From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
Bail out in qemu_ram_block_from_host() when
xen_ram_addr_from_mapcache() does not find an existing
mapping.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
system/physmem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/system/physmem.c b/system/physmem.c
index 14aa025d41..2154432cb6 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PULL v1 3/3] xen: mapcache: Fix unmapping of first entries in buckets
2024-07-12 11:02 [PULL v1 0/3] Xen queue Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 1/3] MAINTAINERS: add Edgar as Xen maintainer Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 2/3] physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs Edgar E. Iglesias
@ 2024-07-12 11:02 ` Edgar E. Iglesias
2024-07-12 22:11 ` [PULL v1 0/3] Xen queue Richard Henderson
3 siblings, 0 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2024-07-12 11:02 UTC (permalink / raw)
To: qemu-devel
Cc: sstabellini, anthony, paul, alex.bennee, peter.maydell,
richard.henderson, edgar.iglesias, Anthony PERARD,
Edgar E. Iglesias, xen-devel
From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
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")
Reported-by: Anthony PERARD <anthony.perard@vates.tech>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
hw/xen/xen-mapcache.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
index 5f23b0adbe..18ba7b1d8f 100644
--- a/hw/xen/xen-mapcache.c
+++ b/hw/xen/xen-mapcache.c
@@ -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;
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PULL v1 0/3] Xen queue
2024-07-12 11:02 [PULL v1 0/3] Xen queue Edgar E. Iglesias
` (2 preceding siblings ...)
2024-07-12 11:02 ` [PULL v1 3/3] xen: mapcache: Fix unmapping of first entries in buckets Edgar E. Iglesias
@ 2024-07-12 22:11 ` Richard Henderson
3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2024-07-12 22:11 UTC (permalink / raw)
To: Edgar E. Iglesias, qemu-devel
Cc: sstabellini, anthony, paul, alex.bennee, peter.maydell,
edgar.iglesias
On 7/12/24 04:02, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias"<edgar.iglesias@amd.com>
>
> 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:
>
> 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~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-12 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 11:02 [PULL v1 0/3] Xen queue Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 1/3] MAINTAINERS: add Edgar as Xen maintainer Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 2/3] physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs Edgar E. Iglesias
2024-07-12 11:02 ` [PULL v1 3/3] xen: mapcache: Fix unmapping of first entries in buckets Edgar E. Iglesias
2024-07-12 22:11 ` [PULL v1 0/3] Xen queue Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).