Re: [PATCH] KVM: selftests: Create memslot 0 at GPA 0x100000000 on x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 15, 2024, David Matlack wrote:
> On Thu, Mar 14, 2024 at 4:14 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> > > >   5. Use separate memslots for CODE, DATA, and PT by default.  This will allow
> > > >      for more precise sizing of the CODE and DATA slots.
> > >
> > > What do you mean by "[separate memslots] will allow for more precise sizing"?
> >
> > I suspect there is a _lot_ of slop in the arbitrary 512 pages that are tacked on
> > by vm_nr_pages_required().  Those 2MiBs probably don't matter, I just don't like
> > completely magical numbers.
> 
> That makes sense, we can probably tighten up those heuristics and
> maybe even get rid of the magic numbers. But I wasn't following what
> _separate memslots_ has to do with it?

Ah, don't dwell on that too much, it was somewhat of a passing thought.

My thinking was that the gorilla math for the page tables makes it hard to determine
how much of those 512 pages is actually for DATA, versus how much is actually a
weird recursive calculation for the page tables themselves.  I.e. it's hard to
trim down @nr_pages, because it might no be easy to tell if DATA shrank too much,
or if it actually caused to PT to shrink too much, and so no one touches that mess.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux