|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH 0/9] Defer completion and ring destruction until backend grant release
On 23/10/2026 17:14, Tu Dinh wrote: > Hello, > > When a backend is accessing a grant entry, it'll set the GTF_reading| > GTF_writing bits on that entry. RevokeForeignAccess will fail as long as > these bits are still set. > > WinPV drivers assume that you can ignore RevokeForeignAccess failures > after a certain number of retries. This is unfortunately not the case, > as backends can still access the grants and corrupt things. We've > observed data corruption that we suspect as being caused by this issue. > > This series attempts to clarify the fallible nature of > RevokeForeignAccess, and fixes the problem by deferring request > completion and ring destruction until after the corresponding grants > have been released by the backend. > > It's freshly written and will undergo testing on our side, but I'd > appreciate if you could test this series on your testing infrastructure > as well to reveal any early errors. > > This is the first series of fix for a class of similar issues. Further > fixes will be needed in other drivers using the grant interface (esp. > XenVif, XenIface); there are also other issues that have not been > discussed in this series. > There's a deadlock somewhere in this series, I'm looking for it. I'll send a v2. > Tu Dinh (9): > granter: Correct the accounting of Current > Use GNTTAB_INTERFACE_V5 > frontend: Initialize the granter before the ring > granter: Split GranterTryPut to its own function > granter: Decouple cache lifetime from Connected > granter: Introduce GranterD0ToD3/D3ToD0 > ring: Introduce RingD3ToD0/RingD0ToD3 > ring: Defer destruction until backend grant release > ring: Defer request completion until backend grant release > > include/gnttab_interface.h | 90 +++-- > src/xenvbd.inf | 6 +- > src/xenvbd/frontend.c | 63 ++-- > src/xenvbd/frontend.h | 4 +- > src/xenvbd/granter.c | 173 +++++++--- > src/xenvbd/granter.h | 17 +- > src/xenvbd/ring.c | 662 +++++++++++++++++++++++++++++-------- > src/xenvbd/ring.h | 13 + > 8 files changed, 807 insertions(+), 221 deletions(-) > -- Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |