qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file


From: Paolo Bonzini
Subject: Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file
Date: Fri, 23 Sep 2022 08:00:00 +0200



Il gio 22 set 2022, 22:33 Gerd Hoffmann <kraxel@redhat.com> ha scritto:
On Thu, Sep 22, 2022 at 02:38:02PM +0200, Paolo Bonzini wrote:
> On Thu, Sep 22, 2022 at 2:21 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
> > No.  This will basically inform the guest that host-phys-bits has been
> > enabled (and pass the number of bits).  So the firmware can make use of
> > the available address space instead of trying to be as conservative as
> > possible to avoid going beyond the (unknown) limit.
>
> Intel processors that are not extremely old have host-phys-bits equal
> to 39, 46 or 52. Older processors that had 36, in all likelihood,
> didn't have IOMMUs (so no big 64-bit BARs).
>
> AMD processors have had 48 for a while, though older consumer processors had 40.

How reliable is the vendorid?

Pretty reliable. In principle it can be changed, but there's no good reason to do it (especially in a long lived VM) and it requires manual command line intervention.


Given newer processors have more than 40 and for older ones we know
the possible values for the two relevant x86 vendors we could do
something along the lines of:

   phys-bits >= 41                   -> valid
   phys-bits == 40    + AuthenticAMD -> valid
   phys-bits == 36,39 + GenuineIntel -> valid
   everything else                   -> invalid

Does that look sensible to you?

Yes, it does! Is phys-bits == 36 the same as invalid? If so that's even one fewer special case to handle.

Paolo


take care,
  Gerd


reply via email to

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