Re: [RFC PATCH 0/2] Handle physical address bits

2020-11-05 Thread Dario Faggioli
On Wed, 2020-11-04 at 13:03 +, Daniel P. Berrangé wrote:
> On Thu, Oct 29, 2020 at 03:55:30PM +, Dario Faggioli wrote:
> > 
> > Using current QEMU's default of 40 may limit the amount of RAM the
> > guest
> > can see (which is the reason why, in our packages, we bump that to
> > 42; and
> > as far as I've understood from reading some old mailing list
> > threads on
> > the subject, other downstreams do something similar).
> 
> In RHEL we provide custom machine types which set host-phys-bits=on
> by
> default, which is why making it configurable in libvirt hasn't been a
> high priority previously.
> 
Yeah, and as I said, we bump that 40 to 42 in our QEMU package. I guess
this is why not many people have bumped into this on our side either.

Until now that I bumped into it... So, sad to admit, but apparently 42
was not the answer in this case. :-P

Thanks and Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
---
<> (Raistlin Majere)


signature.asc
Description: This is a digitally signed message part


Re: [RFC PATCH 0/2] Handle physical address bits

2020-11-04 Thread Daniel P . Berrangé
On Thu, Oct 29, 2020 at 03:55:30PM +, Dario Faggioli wrote:
> Hello everyone,
> 
> These patches let one specify how wide the physical addresses are, in
> bits.
> 
> Using current QEMU's default of 40 may limit the amount of RAM the guest
> can see (which is the reason why, in our packages, we bump that to 42; and
> as far as I've understood from reading some old mailing list threads on
> the subject, other downstreams do something similar).

In RHEL we provide custom machine types which set host-phys-bits=on by
default, which is why making it configurable in libvirt hasn't been a
high priority previously.

> 
> It also can cause other problems, such as the one described in:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=1578278#c5
> 
> Basically, the VM thinking and reporting to the user that L1TF is
> unmitigated, because while its RAM may fits in MAX_PHYS_ADDR (e.g., equal
> to 42 or 40) it does not fit in MAX_PHYS_ADDR/2, which is necessary for
> PTE inversion to be effective.

Yep, that's not nice.

> The series alleviates the problem by providing an user with an easy way
> to either specify an arbitrary number of physical address bits bits for
> the VM (with, e.g., ) or just
> using the same number of bits of the host (with  mode='passthrough'/>).
> 
> This in theory is already possible, but only in an hack-ish way, such as
> adding:
> 
> 
>  
>  
> 
> 
> But this is super inconvenient. :-)

And explicitly unsupported in a production deployment, so not a viable
solution except for experimentation.

> I have not done it such as host-phys-bits=on is automatically added when
> using cpu-passthrough as CPU model, as I think that that actually
> belongs in QEMU.

Agreed, I think I raised that as a suggestion before too.


Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|