889702-13104-1-git-send-email-igor.druzhi...@citrix.com
Switched to a new branch 'test'
3102519 xen-mapcache: avoid a race on memory map while using MAP_FIXED
=== OUTPUT BEGIN ===
ERROR: Author email address is mangled by the mailing list
#2:
Author: Igor Druzhinin via
total: 1 errors, 0 wa
On 20/04/2021 09:53, Roger Pau Monné wrote:
On Tue, Apr 20, 2021 at 04:35:02AM +0100, Igor Druzhinin wrote:
When we're replacing the existing mapping there is possibility of a race
on memory map with other threads doing mmap operations - the address being
unmapped/re-mapped could be occupi
r parallel accesses to
the replaced region - those might still fail with SIGBUS due to
xenforeignmemory_map not being atomic. So we're still not expecting those.
Tested-by: Anthony PERARD
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-mapcache.c | 15 ++-
1 file changed, 14 i
Device model is supposed to destroy IOREQ server for itself.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index e8e79e0..30a5948 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen
en created at the requested address.
>
> Also note that at least on FreeBSD using MAP_FIXED will cause mmap to
> try harder to honor the passed address.
>
> Signed-off-by: Roger Pau Monné
> Reviewed-by: Paul Durrant
> ---
> Cc: Stefano Stabellini
> Cc: Anthony Perard
&g
en created at the requested address.
>
> Also note that at least on FreeBSD using MAP_FIXED will cause mmap to
> try harder to honor the passed address.
>
> Signed-off-by: Roger Pau Monné
> ---
> Cc: Stefano Stabellini
> Cc: Anthony Perard
> Cc: Paul Durrant
>
On 15/03/2019 18:38, Anthony PERARD wrote:
> On Fri, Mar 15, 2019 at 06:14:09PM +, Anthony PERARD wrote:
>> On Fri, Mar 15, 2019 at 09:58:47AM +0100, Roger Pau Monne wrote:
>>> Or if it's not possible to honor the hinted address an error is returned
>>> instead. This makes it easier to spot the
On 14/03/2019 15:54, Roger Pau Monné wrote:
> The log of the incoming QEMU is:
>
> qemu-system-i386: -serial pty: char device redirected to /dev/pts/4 (label
> serial0)
> xen: shared page at pfn feff0
> xen: buffered io page at pfn feff1
> xen: buffered io evtchn is 4
> xen_mapcache: xen_map_cach
On 14/11/2018 17:42, Igor Druzhinin wrote:
> On 06/11/2018 12:16, Igor Druzhinin wrote:
>> When blk_flush called in NVMe reset path S/C queues are already freed
>> which means that re-entering AIO handling loop having some IO requests
>> unfinished will lockup or crash as thei
On 06/11/2018 12:16, Igor Druzhinin wrote:
> When blk_flush called in NVMe reset path S/C queues are already freed
> which means that re-entering AIO handling loop having some IO requests
> unfinished will lockup or crash as their SG structures being potentially
> reused. Call blk_
.
Signed-off-by: Igor Druzhinin
---
hw/block/nvme.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index fc7dacb..cdf836e 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -797,6 +797,8 @@ static void nvme_clear_ctrl(NvmeCtrl *n)
{
int i
there is no way to access physmap properly inside
xen_hvm_modified_memory() let's make it a global structure.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 37 +++--
hw/i386/xen/xen-mapcache.c| 2 +-
include/sysemu/xen-mapcache.h
original patch tried to workaround (uneven number of
region_add/del calls on device attach/detach) was fixed in d25836cafd
(memory: do explicit cleanup when remove listeners).
Signed-off-by: Igor Druzhinin
Reported-by: Ross Lagerwall
Acked-by: Anthony PERARD
---
Changes in v2:
* specify the exact
On 17/04/18 15:15, Anthony PERARD wrote:
> On Fri, Apr 06, 2018 at 10:21:23PM +0100, Igor Druzhinin wrote:
>> Commit 99605175c (xen-pt: Fix PCI devices re-attach failed) introduced
>> a subtle bug. As soon as the guest switches off Bus Mastering on the
>> device it immediatel
On 17/04/18 15:15, Anthony PERARD wrote:
> On Fri, Apr 06, 2018 at 10:21:23PM +0100, Igor Druzhinin wrote:
>> Commit 99605175c (xen-pt: Fix PCI devices re-attach failed) introduced
>> a subtle bug. As soon as the guest switches off Bus Mastering on the
>> device it immediatel
ping?
original patch tried to workaround (uneven number of
region_add/del calls on device attach/detach) was fixed in later QEMU
versions.
Signed-off-by: Igor Druzhinin
Reported-by: Ross Lagerwall
---
hw/xen/xen_pt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen_pt.c b
region to fail. PV tools enable some
logic to save and restore PCI configuration state from within the VM
every time it migrates which basically hides the issue.
Older systems will acquire the new record when migrated which should
not change their state for worse.
Signed-off-by: Igor Druzhinin
This should help to avoid problems with accessing the device after
migration/resume without PV drivers. Older systems will acquire
the new record when migrated which should not change their state for
worse.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen_pvdevice.c | 11 +++
1 file
On 21/07/17 14:50, Anthony PERARD wrote:
On Tue, Jul 18, 2017 at 03:22:41PM -0700, Stefano Stabellini wrote:
From: Igor Druzhinin
...
+static uint8_t *xen_replace_cache_entry_unlocked(hwaddr old_phys_addr,
+ hwaddr new_phys_addr
xenforeignmemory_map2() call
with an extended interface that was recently introduced in
libxenforeignmemory [1].
[1] https://www.mail-archive.com/xen-devel@lists.xen.org/msg113007.html
Signed-off-by: Igor Druzhinin
---
configure | 18 +
hw/i386/xen/xen-mapcache.c
t
for compatibility reasons.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 48 ++---
hw/i386/xen/xen-mapcache.c | 4
include/hw/xen/xen_common.h | 1 +
3 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/hw/i386/xen/xen-
Non-functional change.
Signed-off-by: Igor Druzhinin
Reviewed-by: Stefano Stabellini
Reviewed-by: Paul Durrant
---
hw/i386/xen/xen-hvm.c | 57 ---
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386
entry instead of allocating a new one
* Patch 4: don't use xen_phys_offset_to_gaddr in non-compat mode
---
Igor Druzhinin (4):
xen: move physmap saving into a separate function
xen/mapcache: add an ability to create dummy mappings
xen/mapcache: introduce xen_replace_cache_entry()
xen:
Dummys are simple anonymous mappings that are placed instead
of regular foreign mappings in certain situations when we need
to postpone the actual mapping but still have to give a
memory region to QEMU to play with.
This is planned to be used for restore on Xen.
Signed-off-by: Igor Druzhinin
On 04/07/17 17:42, Paul Durrant wrote:
>> -Original Message-
>> From: Igor Druzhinin
>> Sent: 04 July 2017 17:34
>> To: Paul Durrant ; xen-de...@lists.xenproject.org;
>> qemu-devel@nongnu.org
>> Cc: sstabell...@kernel.org; Anthony Perard ;
>> pbonz
On 04/07/17 17:27, Paul Durrant wrote:
>> -Original Message-
>> From: Igor Druzhinin
>> Sent: 04 July 2017 16:48
>> To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org
>> Cc: Igor Druzhinin ; sstabell...@kernel.org;
>> Anthony Perard ; Paul Durrant
xenforeignmemory_map2() call
with an extended interface that was recently introduced in
libxenforeignmemory [1].
[1] https://www.mail-archive.com/xen-devel@lists.xen.org/msg113007.html
Signed-off-by: Igor Druzhinin
---
configure | 18 ++
hw/i386/xen/xen-mapcache.c
Dummys are simple anonymous mappings that are placed instead
of regular foreign mappings in certain situations when we need
to postpone the actual mapping but still have to give a
memory region to QEMU to play with.
This is planned to be used for restore on Xen.
Signed-off-by: Igor Druzhinin
Non-functional change.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 57 ---
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index cffa7e2..d259cf7 100644
--- a/hw/i386/xen
e the logic of xen_replace_cache_entry_unlocked to
reuse the existing entry instead of allocating a new one
* Patch 4: don't use xen_phys_offset_to_gaddr in non-compat mode
---
Igor Druzhinin (4):
xen: move physmap saving into a separate function
xen/mapcache: add an ability to cr
t
for compatibility reasons.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 48 ++---
include/hw/xen/xen_common.h | 1 +
2 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index d2
On 01/07/17 01:08, Stefano Stabellini wrote:
> On Fri, 30 Jun 2017, Igor Druzhinin wrote:
>> This new call is trying to update a requested map cache entry
>> according to the changes in the physmap. The call is searching
>> for the entry, unmaps it, tries to translate the addr
On 01/07/17 01:06, Stefano Stabellini wrote:
> On Fri, 30 Jun 2017, Igor Druzhinin wrote:
>> Dummys are simple anonymous mappings that are placed instead
>> of regular foreign mappings in certain situations when we need
>> to postpone the actual mapping but still have to give
new xenforeignmemory_map2() call
with extended interface that was recently introduced in
libxenforeignmemory [1].
[1] https://www.mail-archive.com/xen-devel@lists.xen.org/msg113007.html
Signed-off-by: Igor Druzhinin
---
configure | 18
hw/i386/xen/xen-mapcache.c
Dummys are simple anonymous mappings that are placed instead
of regular foreign mappings in certain situations when we need
to postpone the actual mapping but still have to give a
memory region to QEMU to play with.
This is planned to be used for restore on Xen.
Signed-off-by: Igor Druzhinin
t
for compatibility reasons.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 45 ++---
include/hw/xen/xen_common.h | 1 +
2 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index d2
n and change
it to a real one later during machine state restore.
Igor Druzhinin (4):
xen: move physmap saving into a separate function
xen/mapcache: add an ability to create dummy mappings
xen/mapcache: introduce xen_remap_cache_entry()
xen: don't use xenstore to save/restore physm
Non-functional change.
Signed-off-by: Igor Druzhinin
---
hw/i386/xen/xen-hvm.c | 57 ---
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index cffa7e2..d259cf7 100644
--- a/hw/i386/xen
On 16/03/17 12:54, Igor Druzhinin wrote:
> On 16/03/17 12:26, Anthony PERARD wrote:
>> On Wed, Mar 15, 2017 at 04:01:19PM +0000, Igor Druzhinin wrote:
>>> Saving/restoring the physmap to/from xenstore was introduced to
>>> QEMU majorly in order to cover up the VRAM re
On 16/03/17 12:26, Anthony PERARD wrote:
> On Wed, Mar 15, 2017 at 04:01:19PM +0000, Igor Druzhinin wrote:
>> Saving/restoring the physmap to/from xenstore was introduced to
>> QEMU majorly in order to cover up the VRAM region restore issue.
>> The sequence of restore opera
this time successfully, and update the VRAM region
metadata accordingly.
Signed-off-by: Igor Druzhinin
---
v5:
* Add an assertion and debug printf
v4:
* Use VGA post_load handler for vram_ptr update
v3:
* Modify qemu_ram_ptr_length similarly with qemu_map_ram_ptr
* Add a comment explaining qemu_m
this time successfully, and update the VRAM region
metadata accordingly.
Signed-off-by: Igor Druzhinin
---
v4:
* Use VGA post_load handler for vram_ptr update
v3:
* Modify qemu_ram_ptr_length similarly with qemu_map_ram_ptr
* Add a comment explaining qemu_map_ram_ptr and qemu_ram_ptr_length
On 13/03/17 21:15, Stefano Stabellini wrote:
> On Mon, 13 Mar 2017, Igor Druzhinin wrote:
>> Saving/restoring the physmap to/from xenstore was introduced to
>> QEMU majorly in order to cover up the VRAM region restore issue.
>> The sequence of restore operations implies that
ddress and update the VRAM region metadata (including
previously registered pointer) accordingly.
Signed-off-by: Igor Druzhinin
---
v3:
* Modify qemu_ram_ptr_length similarly with qemu_map_ram_ptr
* Add a comment explaining qemu_map_ram_ptr and qemu_ram_ptr_length
semantic change for Xen
* Dr
ddress and update the VRAM region metadata (including
previously registered pointer) accordingly.
Signed-off-by: Igor Druzhinin
---
v2:
* Fix some building and coding style issues
---
exec.c | 3 ++
hw/display/vga.c | 2 +-
include/hw/xen/xen.h | 2 +-
xen-hvm-stub.c
ddress and update the VRAM region metadata (including
previously registered pointer) accordingly.
Signed-off-by: Igor Druzhinin
---
exec.c | 3 ++
hw/display/vga.c | 2 +-
include/hw/xen/xen.h | 2 +-
xen-hvm.c| 114
47 matches
Mail list logo