Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-19 Thread Ard Biesheuvel
On Fri, 19 Aug 2022 at 08:41, Gerd Hoffmann wrote: > > On Thu, Aug 18, 2022 at 05:38:37PM +0200, Jason A. Donenfeld wrote: > > Hey Gerd, > > > > > Joining the party late (and still catching up the thread). Given we > > > don't need that anyway with EFI, only with legacy BIOS: Can't that just > >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-18 Thread Gerd Hoffmann
On Thu, Aug 18, 2022 at 05:38:37PM +0200, Jason A. Donenfeld wrote: > Hey Gerd, > > > Joining the party late (and still catching up the thread). Given we > > don't need that anyway with EFI, only with legacy BIOS: Can't that just > > be a protocol between qemu and pc-bios/optionrom/*boot*.S on h

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-18 Thread Jason A. Donenfeld
Hey Gerd, On Tue, Aug 16, 2022 at 10:55:11AM +0200, Gerd Hoffmann wrote: > Hi, > > > > We can make setup_data chaining work with OVMF, but the whole chain > > > should be located in a GPA range that OVMF dictates. > > > > It sounds like what you describe is pretty OVMF-specific though, > > rig

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-16 Thread Gerd Hoffmann
Hi, > > We can make setup_data chaining work with OVMF, but the whole chain > > should be located in a GPA range that OVMF dictates. > > It sounds like what you describe is pretty OVMF-specific though, > right? Do we want to tie things together so tightly like that? > > Given we only need 48 b

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/05/22 00:56, Jason A. Donenfeld wrote: > Hey Laszlo, > > On Thu, Aug 04, 2022 at 03:56:54PM +0200, Laszlo Ersek wrote: >> - do we want setup_data chaining work generally? >> >> - or do we want only the random seed injection to stop crashing OVMF guests? > > Preferably the first - generally.

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hey Laszlo, On Thu, Aug 04, 2022 at 03:56:54PM +0200, Laszlo Ersek wrote: > - do we want setup_data chaining work generally? > > - or do we want only the random seed injection to stop crashing OVMF guests? Preferably the first - generally. Which brings us to your point: > > Given we only need

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 15:56, Laszlo Ersek wrote: > On 08/04/22 15:28, Jason A. Donenfeld wrote: >> On Thu, Aug 4, 2022 at 3:25 PM Laszlo Ersek wrote: >>> >>> On 08/04/22 14:16, Ard Biesheuvel wrote: On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 02:03:

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 03:56:54PM +0200, Laszlo Ersek wrote: > On 08/04/22 15:28, Jason A. Donenfeld wrote: > > On Thu, Aug 4, 2022 at 3:25 PM Laszlo Ersek wrote: > >> > >> On 08/04/22 14:16, Ard Biesheuvel wrote: > >>> On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé > >>> wrote: > >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 15:28, Jason A. Donenfeld wrote: > On Thu, Aug 4, 2022 at 3:25 PM Laszlo Ersek wrote: >> >> On 08/04/22 14:16, Ard Biesheuvel wrote: >>> On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > Hi Daniel

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Laszlo, On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: > None of the existing info passing methods seem early enough, generic > enough, and secure enough (at the same time)... Can you look at the v2 patch? It seems to work on every configuration I throw at it. Keep in mind that

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 14:47, Jason A. Donenfeld wrote: > On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: >> >> Hi Laszlo, >> >> On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: >>> None of the existing info passing methods seem early enough, generic >>> enough, and secure enough (at th

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 15:16, Laszlo Ersek wrote: > On 08/04/22 14:47, Jason A. Donenfeld wrote: >> On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: >>> >>> Hi Laszlo, >>> >>> On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: None of the existing info passing methods seem early enoug

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 4, 2022 at 3:25 PM Laszlo Ersek wrote: > > On 08/04/22 14:16, Ard Biesheuvel wrote: > > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > >> > >> On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > >>> Hi Daniel, > >>> > >>> On Thu, Aug 04, 2022 at 10:25:36AM

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Daniel, On Thu, Aug 4, 2022 at 2:54 PM Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > > The boot parameter header refers to setup_data at an absolute address, > > and each setup_data refers to the next setup_data at an absolute address > > t

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 14:16, Ard Biesheuvel wrote: > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: >> >> On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: >>> Hi Daniel, >>> >>> On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: Yep, and ultimately the inabil

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Laszlo, On Thu, Aug 4, 2022 at 3:17 PM Laszlo Ersek wrote: > > On 08/04/22 14:47, Jason A. Donenfeld wrote: > > On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: > >> > >> Hi Laszlo, > >> > >> On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: > >>> None of the existing info

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The boot parameter header refers to setup_data at an absolute address, > and each setup_data refers to the next setup_data at an absolute address > too. Currently QEMU simply puts the setup_datas right after the kernel > image, a

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: > > Hi Laszlo, > > On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: > > None of the existing info passing methods seem early enough, generic > > enough, and secure enough (at the same time)... > > Can you look at the v2 patch? I

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 4, 2022 at 2:17 PM Jason A. Donenfeld wrote: > > Hi Ard, > > On Thu, Aug 4, 2022 at 2:16 PM Ard Biesheuvel wrote: > > > > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > > > > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > > > Hi Daniel, > > > >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Daniel, On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > Yep, and ultimately the inability to distinguish UEFI vs other firmware > is arguably correct by design, as the QEMU <-> firmware interface is > supposed to be arbitrarily pluggable for any firmware implementation > n

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > Hi Daniel, > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > > Yep, and ultimately the inability to distinguish UEFI vs other firmware > > is arguably correct by design, as the QEMU <-> firmware interface

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Ard Biesheuvel
On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > Hi Daniel, > > > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > > > Yep, and ultimately the inability to distinguish UEFI vs other firmware >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Ard, On Thu, Aug 4, 2022 at 2:16 PM Ard Biesheuvel wrote: > > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > > Hi Daniel, > > > > > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 12:26, Ard Biesheuvel wrote: > On Thu, 4 Aug 2022 at 11:25, Daniel P. Berrangé wrote: >> >> On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: >>> On 08/04/22 09:03, Michael S. Tsirkin wrote: On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Ard Biesheuvel
On Thu, 4 Aug 2022 at 11:25, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: > > On 08/04/22 09:03, Michael S. Tsirkin wrote: > > > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > > >> The boot parameter header refers to setup_data

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: > On 08/04/22 09:03, Michael S. Tsirkin wrote: > > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > >> The boot parameter header refers to setup_data at an absolute address, > >> and each setup_data refers to the nex

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 09:03, Michael S. Tsirkin wrote: > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: >> The boot parameter header refers to setup_data at an absolute address, >> and each setup_data refers to the next setup_data at an absolute address >> too. Currently QEMU simply puts

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The boot parameter header refers to setup_data at an absolute address, > and each setup_data refers to the next setup_data at an absolute address > too. Currently QEMU simply puts the setup_datas right after the kernel > image, a