Re: [edk2-devel] [PATCH 4/5] OvmfPkg/XenPlatformPei: Calibrate APIC timer frequency

2020-01-30 Thread Roger Pau Monné
(XenBusDxe is going to map the page somewhere else). > > The calculated frequency is only logged in this patch, it will be used > in a following patch. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 > Signed-off-by: Anthony PERARD Thanks! Some comments belo

Re: [edk2-devel] [PATCH v4 35/35] OvmfPkg/OvmfXen: use RealTimeClockRuntimeDxe from EmbeddedPkg

2019-08-08 Thread Roger Pau Monné
On Thu, Aug 08, 2019 at 03:03:48PM +0100, Anthony PERARD wrote: > On Wed, Aug 07, 2019 at 06:09:57PM +0200, Roger Pau Monné wrote: > > On Mon, Jul 29, 2019 at 04:39:44PM +0100, Anthony PERARD wrote: > > > A Xen PVH guest doesn't have a RTC tha

Re: [edk2-devel] [PATCH v4 29/35] OvmfPkg/OvmfXen: Override PcdFSBClock to Xen vLAPIC timer frequency

2019-08-08 Thread Roger Pau Monné
On Thu, Aug 08, 2019 at 03:26:41PM +0100, Anthony PERARD wrote: > On Thu, Aug 08, 2019 at 03:44:23PM +0200, Roger Pau Monné wrote: > > On Thu, Aug 08, 2019 at 02:28:32PM +0100, Anthony PERARD wrote: > > > On Wed, Aug 07, 2019 at 05:54:51PM +0200, Roger Pau Monné wrote: > >

Re: [edk2-devel] [PATCH v4 29/35] OvmfPkg/OvmfXen: Override PcdFSBClock to Xen vLAPIC timer frequency

2019-08-08 Thread Roger Pau Monné
On Thu, Aug 08, 2019 at 02:28:32PM +0100, Anthony PERARD wrote: > On Wed, Aug 07, 2019 at 05:54:51PM +0200, Roger Pau Monné wrote: > > On Mon, Jul 29, 2019 at 04:39:38PM +0100, Anthony PERARD wrote: > > > PcdFSBClock is used by SecPeiDxeTimerLibCpu, the TimerLib > > > i

Re: [edk2-devel] [PATCH v4 22/35] OvmfPkg/XenPlatformPei: no hvmloader: get the E820 table via hypercall

2019-08-08 Thread Roger Pau Monné
On Thu, Aug 08, 2019 at 11:41:18AM +0100, Anthony PERARD wrote: > On Wed, Aug 07, 2019 at 05:14:33PM +0200, Roger Pau Monné wrote: > > On Mon, Jul 29, 2019 at 04:39:31PM +0100, Anthony PERARD wrote: > > > When the Xen PVH entry point has been used, hvmloader hasn't run and &

Re: [edk2-devel] [PATCH v4 20/35] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected

2019-08-08 Thread Roger Pau Monné
On Thu, Aug 08, 2019 at 11:38:13AM +0100, Anthony PERARD wrote: > On Wed, Aug 07, 2019 at 05:03:46PM +0200, Roger Pau Monné wrote: > > On Mon, Jul 29, 2019 at 04:39:29PM +0100, Anthony PERARD wrote: > > > +BOOLEAN > > > +Xen

Re: [edk2-devel] [PATCH v4 12/35] OvmfPkg/XenPlatformPei: Grab RSDP from PVH guest start of day struct

2019-08-08 Thread Roger Pau Monné
On Thu, Aug 08, 2019 at 11:26:41AM +0100, Anthony PERARD wrote: > On Wed, Aug 07, 2019 at 04:35:58PM +0200, Roger Pau Monné wrote: > > On Mon, Jul 29, 2019 at 04:39:21PM +0100, Anthony PERARD wrote: > > > Check if there's a start of the day struct provided to PVH guest, s

Re: [edk2-devel] [PATCH v4 35/35] OvmfPkg/OvmfXen: use RealTimeClockRuntimeDxe from EmbeddedPkg

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:44PM +0100, Anthony PERARD wrote: > A Xen PVH guest doesn't have a RTC that OVMF would expect, so > PcatRealTimeClockRuntimeDxe fails to initialize and prevent the > firmware from finish to boot. To prevent that, we will use > XenRealTimeClockLib which simply always re

Re: [edk2-devel] [PATCH v4 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:42PM +0100, Anthony PERARD wrote: > XenIoPvhDxe use XenIoMmioLib to reserve some space to be use by the > Grant Tables. > > The call is only done if it is necessary, we simply detect if the > guest is PVH, as in this case there is currently no PCI bus, and no > PCI Xe

Re: [edk2-devel] [PATCH v4 31/35] OvmfPkg/PlatformBootManagerLib: Use a Xen console for ConOut/ConIn

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:40PM +0100, Anthony PERARD wrote: > On a Xen PVH guest, none of the existing serial or console interface > works, so we add a new one, based on XenConsoleSerialPortLib, and > implemented via SerialDxe. > > That is a simple console implementation that can works on both

Re: [edk2-devel] [PATCH v4 29/35] OvmfPkg/OvmfXen: Override PcdFSBClock to Xen vLAPIC timer frequency

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:38PM +0100, Anthony PERARD wrote: > PcdFSBClock is used by SecPeiDxeTimerLibCpu, the TimerLib > implementation. It will also be used by XenTimerDxe. Override > PcdFSBClock to match Xen vLAPIC timer frequency. I'm kind of surprised that his is not automatically detecte

Re: [edk2-devel] [PATCH v4 28/35] OvmfPkg/PlatformBootManagerLib: Handle the absence of PCI bus on Xen PVH

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:37PM +0100, Anthony PERARD wrote: > When running in a Xen PVH guest, there's nothing to do in > PciAcpiInitialization() because there isn't any PCI bus. When the Host > Bridge DID isn't recognised, simply continue. (The value of > PcdOvmfHostBridgePciDevId would be 0 b

Re: [edk2-devel] [PATCH v4 23/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:32PM +0100, Anthony PERARD wrote: > When running as a Xen PVH guest, there is no CMOS to read the memory > size from. Rework GetSystemMemorySize(Below|Above)4gb() so they can > work without CMOS by reading the e820 table. > > Rework XenPublishRamRegions to also care

Re: [edk2-devel] [PATCH v4 22/35] OvmfPkg/XenPlatformPei: no hvmloader: get the E820 table via hypercall

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:31PM +0100, Anthony PERARD wrote: > When the Xen PVH entry point has been used, hvmloader hasn't run and > hasn't prepared an E820 table. The only way left to get an E820 table > is to ask Xen via an hypercall, the call can only be made once so keep > the result cached

Re: [edk2-devel] [PATCH v4 20/35] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:29PM +0100, Anthony PERARD wrote: > XenPvhDetected() can be used to figure out if OVMF has started via the > Xen PVH entry point. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 > Signed-off-by: Anthony PERARD > Acked-by: Laszlo Ersek Thanks, I've got

Re: [edk2-devel] [PATCH v4 12/35] OvmfPkg/XenPlatformPei: Grab RSDP from PVH guest start of day struct

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:21PM +0100, Anthony PERARD wrote: > Check if there's a start of the day struct provided to PVH guest, save > the ACPI RSDP address for later. > > This patch import import arch-x86/hvm/start_info.h from xen.git. You seem to change the types when importing start_info.h

Re: [edk2-devel] [PATCH v4 09/35] OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:18PM +0100, Anthony PERARD wrote: > The ACPI Timer isn't present in a PVH guest, but local APIC works on > both PVH and HVM. > > Note that the use of SecPeiDxeTimerLibCpu might be an issue with a > driver of type DXE_RUNTIME_DRIVER. I've attempted to find out which of

Re: [edk2-devel] [PATCH v4 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-08-07 Thread Roger Pau Monné
On Mon, Jul 29, 2019 at 04:39:15PM +0100, Anthony PERARD wrote: > Add a new entry point for Xen PVH that enter directly in 32bits. > > Information on the expected state of the machine when this entry point > is used can be found at: > https://xenbits.xenproject.org/docs/unstable/misc/pvh.html > >

Re: [edk2-devel] [PATCH v3 24/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-07-25 Thread Roger Pau Monné
On Thu, Jul 25, 2019 at 11:05:34AM +0100, Anthony PERARD wrote: > On Thu, Jul 25, 2019 at 11:08:29AM +0200, Roger Pau Monné wrote: > > On Wed, Jul 24, 2019 at 05:17:59PM +0100, Anthony PERARD wrote: > > > On Tue, Jul 23, 2019 at 11:42:07AM +0200, Roger Pau Monné wrote: > >

Re: [edk2-devel] [PATCH v3 24/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-07-25 Thread Roger Pau Monné
On Wed, Jul 24, 2019 at 05:17:59PM +0100, Anthony PERARD wrote: > On Tue, Jul 23, 2019 at 11:42:07AM +0200, Roger Pau Monné wrote: > > On Mon, Jul 22, 2019 at 03:53:19PM +0100, Anthony PERARD wrote: > > > On Mon, Jul 15, 2019 at 04:15:21PM +0200, Roger Pau Monné wrote: > >

Re: [edk2-devel] [PATCH v3 24/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-07-23 Thread Roger Pau Monné
On Mon, Jul 22, 2019 at 03:53:19PM +0100, Anthony PERARD wrote: > On Mon, Jul 15, 2019 at 04:15:21PM +0200, Roger Pau Monné wrote: > > On Thu, Jul 04, 2019 at 03:42:22PM +0100, Anthony PERARD wrote: > > > When running as a Xen PVH guest, there is no CMOS to read the memory > &

Re: [edk2-devel] [PATCH v3 09/35] OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU

2019-07-23 Thread Roger Pau Monné
On Mon, Jul 22, 2019 at 09:28:20PM +0200, Laszlo Ersek wrote: > On 07/22/19 15:49, Anthony PERARD wrote: > > On Mon, Jul 15, 2019 at 04:22:19PM +0200, Roger Pau Monné wrote: > >> On Thu, Jul 04, 2019 at 03:42:07PM +0100, Anthony PERARD wrote: > >>> ACPI Timer doe

Re: [edk2-devel] [PATCH v3 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-07-15 Thread Roger Pau Monné
On Mon, Jul 15, 2019 at 12:50:29PM +0100, Andrew Cooper wrote: > On 15/07/2019 12:46, Roger Pau Monné wrote: > >> +; > >> +; Jump to the main routine of the pre-SEC code > >> +; skiping the 16-bit part of the routine and > >>

Re: [edk2-devel] [PATCH v3 09/35] OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU

2019-07-15 Thread Roger Pau Monné
On Thu, Jul 04, 2019 at 03:42:07PM +0100, Anthony PERARD wrote: > ACPI Timer does not work in a PVH guest, but local APIC works on both This is not accurate. It's not that the ACPI timer doesn't work, it's just that it's not present. The PM_TMR_BLK should be set to 0 to indicate the lack of PM tim

Re: [edk2-devel] [PATCH v3 24/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-07-15 Thread Roger Pau Monné
On Thu, Jul 04, 2019 at 03:42:22PM +0100, Anthony PERARD wrote: > When running as a Xen PVH guest, there is no CMOS to read the memory > size from. Rework GetSystemMemorySize(Below|Above)4gb() so they can > works without CMOS by reading the e820 table. > > Rework XenPublishRamRegions for PVH, han

Re: [edk2-devel] [PATCH v3 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-07-15 Thread Roger Pau Monné
On Thu, Jul 04, 2019 at 03:42:04PM +0100, Anthony PERARD wrote: > Add a new entry point for Xen PVH that enter directly in 32bits. > > Information on the expected state of the machine when this entry point > is used can be found at: > https://xenbits.xenproject.org/docs/unstable/misc/pvh.html > >