|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Design session "grant v3"
On 22.09.22 20:43, Jan Beulich wrote: On 22.09.2022 15:42, Marek Marczykowski-Górecki wrote: What was meant here are the additional resources the hypervisor will need for higher grant counts of a guest. With the tree approach the number of grant frames will be basically controlled by the guest and imposing a limit like today wouldn't work very well (especially with the current default of only 64 grant frames).
It is an additional layer in the PV case: even when mapping a foreign page to only a single local PFN there could be multiple PTEs referencing it. I didn't think of the problem doing multiple mappings of the same grant. I will look into that. While thinking about this I started wondering in how far things are actually working correctly right now for backends in PVH/HVM: Any mapping of a grant is handed to p2m_add_page(), which insists on there being exactly one mapping of any particular MFN, unless the page is a foreign one. But how does that allow a domain to map its own grants, e.g. when block-attaching a device locally in Dom0? Afaict the grant-map would succeed, but the page would be unmapped from its original GFN.Yann: can backend refuse revoking? Jürgen: it shouldn't be this way, but revoke could be controlled by feature flag; revoke could pass scratch page per revoke call (more flexible control)A single scratch page comes with the risk of data corruption, as all I/O would be directed there. A sink page (for memory writes) would likely be okay, but device writes (memory reads) can't be done from a surrogate page. I don't see that problem. In case the grant is revoked due to a malicious/buggy backend, you can't trust the I/O data anyway. And in case the frontend is revoking the grant because the frontend is malicious, this isn't an issue either.
Yes. But large pages have another downside: The backend needs to know it is a large page, otherwise it might get confused. So while this sounds like a nice idea, it is cumbersome in practice. But maybe someone is coming up with a nice idea how to solve that. Edwin: what happens when shattering that large page? Jürgen: on live migration pages are rebuilt anyway, can reconstruct large pagesIf only we did already rebuild large pages ... Indeed. But OTOH shattering shouldn't be a problem at least for PVH/HVM guests, as we are speaking of gfns here. And PV guests don't have large pages anyway. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |