[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 2/9] x86/PV: properly set shadow allocation for Dom0
On 22.09.2021 15:31, Andrew Cooper wrote: > On 21/09/2021 08:17, Jan Beulich wrote: >> @@ -933,7 +934,18 @@ int __init dom0_construct_pv(struct doma >> #ifdef CONFIG_SHADOW_PAGING >> if ( opt_dom0_shadow ) >> { >> + bool preempted; >> + >> printk("Switching dom0 to using shadow paging\n"); >> + >> + nr_pt_pages = dom0_paging_pages(d, nr_pages); >> + >> + do { >> + preempted = false; >> + shadow_set_allocation(d, nr_pt_pages, &preempted); >> + process_pending_softirqs(); >> + } while ( preempted ); > > This is still broken. > > The loop setting the shadow allocation needs to be outside of this > conditional, because it is not related to early activation of the l1tf > tasklet. Well, I'm not sure what to say. On v1 you already said so. But then you didn't care to reply to me responding: "Are you suggesting to set up a (perhaps large) shadow pool just in case we need to enable shadow mode on Dom0? And all of this memory to then remain unused in the majority of cases? Plus even if so, I'd view this as a 2nd, independent step, largely orthogonal to the handling of "dom0=shadow". If somebody really wanted that, I think this should be driven by an explicit setting of the shadow pool size, indicating the admin is willing to waste the memory. I'm further puzzled by "not to retain upstream's security vulnerability" - are you saying upstream is vulnerable in some way, while perhaps you (XenServer) are not? In general I don't think I view downstream decisions as a driving factor for what upstream does, when the result is deliberately different behavior from upstream." Which has left me with no justification to make the change you're requesting. I've now got an ack by Tim and an R-b by Roger. I also view the change as is being an improvement on its own (i.e. I question you saying "This is still broken."), even if (later) we were to follow what you request. For this reason I'll give it a day or two for you to reply, but otherwise I'll commit the patch as is, leaving further adjustments for a future change (by you, me, or anyone else). Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |