[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/6] vhost: add regions to temporary list
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/6] vhost: add regions to temporary list |
Date: |
Fri, 15 Dec 2017 16:11:40 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
* Paolo Bonzini (address@hidden) wrote:
> On 15/12/2017 14:30, Dr. David Alan Gilbert wrote:
> >> Also it seems that we have a race in current code where
> >> region_del() unrefs memory region first and then by the
> >> commit time memory region could be gone since old flatview
> >> is unreffed before commit callback is called, but guest still
> >> uses old memory map until vhost_set_mem_table() is complete.
> >> We probably should unref deleted(old) sections after
> >> guest gets new memmap.
> >
> > Will they really get cleaned up before the commit() returns?
> > There's no rcu like thing guarding it?
>
> The memory subsystem only keeps them alive until before commmit() is
> invoked.
Hmm ok; I guess then we do need to keep the temporary list of
MemoryRegionSections and unref all the old ones after the end of the callback.
I'll rework it (again).
Dave
> Paolo
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- [Qemu-devel] [PATCH v4 3/6] vhost: Add temporary memory structure, (continued)
[Qemu-devel] [PATCH v4 5/6] vhost: compare and flip in new memory region list, Dr. David Alan Gilbert (git), 2017/12/13
[Qemu-devel] [PATCH v4 6/6] vhost: Clean out old vhost_set_memory and friends, Dr. David Alan Gilbert (git), 2017/12/13