qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] x86: host-phys-bits-limit option


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] x86: host-phys-bits-limit option
Date: Wed, 12 Dec 2018 12:12:33 -0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Dec 12, 2018 at 05:08:39PM +0800, Yu Zhang wrote:
> On Tue, Dec 11, 2018 at 05:25:27PM -0200, Eduardo Habkost wrote:
> > Some downstream distributions of QEMU set host-phys-bits=on by
> > default.  This worked very well for most use cases, because
> > phys-bits really didn't have huge consequences. The only
> > difference was on the CPUID data seen by guests, and on the
> > handling of reserved bits.
> > 
> > This changed in KVM commit 855feb673640 ("KVM: MMU: Add 5 level
> > EPT & Shadow page table support").  Now choosing a large
> > phys-bits value for a VM has bigger impact: it will make KVM use
> > 5-level EPT even when it's not really necessary.  This means
> > using the host phys-bits value may not be the best choice.
> > 
> > Management software could address this problem by manually
> > configuring phys-bits depending on the size of the VM and the
> > amount of MMIO address space required for hotplug.  But this is
> > not trivial to implement.
> > 
> > However, there's another workaround that would work for most
> > cases: keep using the host phys-bits value, but only if it's
> > smaller than 48.  This patch makes this possible by introducing a
> > new "-cpu" option: "host-phys-bits-limit".  Management software
> > or users can make sure they will always use 4-level EPT using:
> > "host-phys-bits=on,host-phys-bits-limit=48".
> > 
> > This behavior is still not enabled by default because QEMU
> > doesn't enable host-phys-bits=on by default.  But users,
> > management software, or downstream distributions may choose to
> > change their defaults using the new option.
> > 
> > Signed-off-by: Eduardo Habkost <address@hidden>
> 
> Thanks, Eduardo. One question is, should we check host-phys-bits-limit
> against 48? If not, how about we just say in the commit message, that
> the suggested value of host-phys-bits-limit is no bigger than 48 to
> ensure a 4-level EPT? :-)

I'm not sure I understood the question.  I tried to document this
at:

|                                      [...]  Management software
| or users can make sure they will always use 4-level EPT using:
| "host-phys-bits=on,host-phys-bits-limit=48".

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]