[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 09/11] i386/pc: bounds check phys-bits against max used GP
From: |
Igor Mammedov |
Subject: |
Re: [PATCH v8 09/11] i386/pc: bounds check phys-bits against max used GPA |
Date: |
Mon, 18 Jul 2022 15:56:57 +0200 |
On Mon, 18 Jul 2022 15:16:22 +0200
Igor Mammedov <imammedo@redhat.com> wrote:
> On Fri, 15 Jul 2022 18:16:26 +0100
> Joao Martins <joao.m.martins@oracle.com> wrote:
>
> > Calculate max *used* GPA against the CPU maximum possible address
> > and error out if the former surprasses the latter. This ensures
> > max used GPA is reacheable by configured phys-bits. Default phys-bits
> > on Qemu is TCG_PHYS_ADDR_BITS (40) which is enough for the CPU to
> > address 1Tb (0xff ffff ffff) or 1010G (0xfc ffff ffff) in AMD hosts
> > with IOMMU.
> >
> > This is preparation for AMD guests with >1010G, where it will want relocate
> > ram-above-4g to be after 1Tb instead of 4G.
> >
> > Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
>
> Acked-by: Igor Mammedov <imammedo@redhat.com>
[...]
> > + return pc_pci_hole64_start() + pci_hole64_size - 1;
off by 1?
> > +}
> > +
[...]