On Mon, Oct 24, 2011 at 10:25:26AM -0700, Alexander Graf wrote: > On 23.10.2011, at 22:29, David Gibson wrote: > > On Thu, Oct 20, 2011 at 11:49:40PM -0700, Alexander Graf wrote: [snip] > >>> This gets further complicated in the case of the w-i-p patch I have to > >>> properly advertise page sizes, where it's not just presence or absence > >>> of a feature, but the specific SLB and HPTE encodings must be > >>> advertised to the guest. > >> > >> Yup, so we'd read out the host dt to find the host possible > >> encodings (probably a bad idea, but that's a different story) > > > > Um, a different story perhaps, but one I kind of need an answer to in > > the near future... I can query the host cpu's page sizes easily > > enough, but I'm really not sure where this should be stashed before > > filtering as suggested below. > > Page sizes are usually powers of 2, so we should be ok with just > having a bitmap there with each bit meaning 1 << (n + 12).
Not sufficient. Again, it's not just the presence/absence of page sizes I need, but the SLB and HPTE bit encodings. And even if it weren't for that, we need which base page size versus actual page sizes combinations are supported, not just whether a given page size is supported somehow. I did have a draft patch adding more generalized multiple page size support to TCG, which would have provided a solution except that a) I don't really want to finish tha off - still a fair bit of work - just in order to pass through host page sizes and b) I lost the draft in an unfortunate encfs+git corruption incident :(. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson