Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-23 Thread Igor Mammedov
On Wed, 23 Feb 2022 09:16:51 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Tue, 22 Feb 2022 10:42:55 +0100 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > > And the upstream code is now pretty much identical except for the > > > > >

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-23 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Tue, 22 Feb 2022 10:42:55 +0100 > Gerd Hoffmann wrote: > > > Hi, > > > > > > And the upstream code is now pretty much identical except for the > > > > default; note that for TCG you do need to keep to 40 I think. > > > > > > will TCG work

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-23 Thread Igor Mammedov
On Tue, 22 Feb 2022 10:42:55 +0100 Gerd Hoffmann wrote: > Hi, > > > > And the upstream code is now pretty much identical except for the > > > default; note that for TCG you do need to keep to 40 I think. > > > > will TCG work with 40bits on host that supports less than that? > > When I

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-23 Thread Igor Mammedov
On Tue, 22 Feb 2022 11:00:55 + Joao Martins wrote: > On 2/21/22 15:28, Joao Martins wrote: > > On 2/21/22 06:58, Igor Mammedov wrote: > >> On Fri, 18 Feb 2022 17:12:21 + > >> Joao Martins wrote: > >> > >>> On 2/14/22 15:31, Igor Mammedov wrote: > On Mon, 14 Feb 2022 15:05:00

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-22 Thread Joao Martins
On 2/21/22 15:28, Joao Martins wrote: > On 2/21/22 06:58, Igor Mammedov wrote: >> On Fri, 18 Feb 2022 17:12:21 + >> Joao Martins wrote: >> >>> On 2/14/22 15:31, Igor Mammedov wrote: On Mon, 14 Feb 2022 15:05:00 + Joao Martins wrote: > On 2/14/22 14:53, Igor Mammedov

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-22 Thread Gerd Hoffmann
Hi, > > And the upstream code is now pretty much identical except for the > > default; note that for TCG you do need to keep to 40 I think. > > will TCG work with 40bits on host that supports less than that? When I understand things correctly the problem is that the phys-bits limit applies

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-22 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Mon, 21 Feb 2022 13:15:40 + > "Dr. David Alan Gilbert" wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Tue, Feb 15, 2022 at 10:53:58AM +0100, Gerd Hoffmann wrote: > > > > Hi, > > > > > > > > > I don't know what

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-22 Thread Igor Mammedov
On Mon, 21 Feb 2022 13:15:40 + "Dr. David Alan Gilbert" wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Tue, Feb 15, 2022 at 10:53:58AM +0100, Gerd Hoffmann wrote: > > > Hi, > > > > > > > I don't know what behavior should be if firmware tries to program > > > > PCI64

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-21 Thread Joao Martins
On 2/21/22 06:58, Igor Mammedov wrote: > On Fri, 18 Feb 2022 17:12:21 + > Joao Martins wrote: > >> On 2/14/22 15:31, Igor Mammedov wrote: >>> On Mon, 14 Feb 2022 15:05:00 + >>> Joao Martins wrote: On 2/14/22 14:53, Igor Mammedov wrote: > On Mon, 7 Feb 2022 20:24:20

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-21 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Tue, Feb 15, 2022 at 10:53:58AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > I don't know what behavior should be if firmware tries to program > > > PCI64 hole beyond supported phys-bits. > > > > Well, you are basically f*cked. > > > >

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-20 Thread Igor Mammedov
On Fri, 18 Feb 2022 17:12:21 + Joao Martins wrote: > On 2/14/22 15:31, Igor Mammedov wrote: > > On Mon, 14 Feb 2022 15:05:00 + > > Joao Martins wrote: > >> On 2/14/22 14:53, Igor Mammedov wrote: > >>> On Mon, 7 Feb 2022 20:24:20 + > >>> Joao Martins wrote: > +{ > +

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-18 Thread Joao Martins
On 2/14/22 15:31, Igor Mammedov wrote: > On Mon, 14 Feb 2022 15:05:00 + > Joao Martins wrote: >> On 2/14/22 14:53, Igor Mammedov wrote: >>> On Mon, 7 Feb 2022 20:24:20 + >>> Joao Martins wrote: +{ +PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); +

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-16 Thread Gerd Hoffmann
Hi, > What I overlooked was the emphasis you had on desktops (qemu default bigger > than > host-advertised), where I am thinking mostly in servers. Yep, on servers you have the reverse problem that phys-bits=40 might be too small for very large guests. > > To make things even worse: The

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-16 Thread Joao Martins
On 2/16/22 08:19, Gerd Hoffmann wrote: > On Tue, Feb 15, 2022 at 07:37:40PM +, Joao Martins wrote: >> On 2/15/22 09:53, Gerd Hoffmann wrote: >>> What is missing: >>> >>> * Some way for the firmware to get a phys-bits value it can actually >>>use. One possible way would be to have a

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-16 Thread Daniel P . Berrangé
On Tue, Feb 15, 2022 at 10:53:58AM +0100, Gerd Hoffmann wrote: > Hi, > > > I don't know what behavior should be if firmware tries to program > > PCI64 hole beyond supported phys-bits. > > Well, you are basically f*cked. > > Unfortunately there is no reliable way to figure what phys-bits

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-16 Thread Gerd Hoffmann
On Tue, Feb 15, 2022 at 07:37:40PM +, Joao Martins wrote: > On 2/15/22 09:53, Gerd Hoffmann wrote: > > What is missing: > > > > * Some way for the firmware to get a phys-bits value it can actually > >use. One possible way would be to have a paravirtual bit somewhere > >telling

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-15 Thread Joao Martins
On 2/15/22 09:53, Gerd Hoffmann wrote: > What is missing: > > * Some way for the firmware to get a phys-bits value it can actually >use. One possible way would be to have a paravirtual bit somewhere >telling whenever host-phys-bits is enabled or not. > If we are not talking about *very

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-15 Thread Gerd Hoffmann
Hi, > I don't know what behavior should be if firmware tries to program > PCI64 hole beyond supported phys-bits. Well, you are basically f*cked. Unfortunately there is no reliable way to figure what phys-bits actually is. Because of that the firmware (both seabios and edk2) tries to place

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-14 Thread Igor Mammedov
On Mon, 14 Feb 2022 15:05:00 + Joao Martins wrote: > On 2/14/22 14:53, Igor Mammedov wrote: > > On Mon, 7 Feb 2022 20:24:20 + > > Joao Martins wrote: > > > >> It is assumed that the whole GPA space is available to be DMA > >> addressable, within a given address space limit, expect

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-14 Thread Joao Martins
On 2/14/22 14:53, Igor Mammedov wrote: > On Mon, 7 Feb 2022 20:24:20 + > Joao Martins wrote: > >> It is assumed that the whole GPA space is available to be DMA >> addressable, within a given address space limit, expect for a >> tiny region before the 4G. Since Linux v5.4, VFIO validates

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-14 Thread Igor Mammedov
On Mon, 7 Feb 2022 20:24:20 + Joao Martins wrote: > It is assumed that the whole GPA space is available to be DMA > addressable, within a given address space limit, expect for a > tiny region before the 4G. Since Linux v5.4, VFIO validates > whether the selected GPA is indeed valid i.e. not

[PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-07 Thread Joao Martins
It is assumed that the whole GPA space is available to be DMA addressable, within a given address space limit, expect for a tiny region before the 4G. Since Linux v5.4, VFIO validates whether the selected GPA is indeed valid i.e. not reserved by IOMMU on behalf of some specific devices or