Re: [edk2] [PATCH 1/6] OvmfPkg: SmbiosPlatformDxe: move IsEntryPointStructureValid() to Xen.c

2015-07-16 Thread Wei Liu
On Thu, Jul 16, 2015 at 12:41:17AM +0200, Laszlo Ersek wrote: > This function is only called from Xen.c, so it should be defined in Xen.c > and have internal linkage (ie. STATIC). > > Cc: Jordan Justen > Cc: Wei Liu > Cc: Gabriel Somlo > Contributed-under: TianoCore Contr

Re: [edk2] [PATCH 2/6] OvmfPkg: SmbiosPlatformDxe: restrict current Xen code to IA32/X64

2015-07-16 Thread Wei Liu
ypercallLib/X86XenHypercall.c".) > > This change enables SmbiosPlatformDxe for ARM architectures; update the > VALID_ARCHITECTURES comment accordingly. > > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Wei Liu > Cc: Gabriel Somlo > Contributed-under: Tia

Re: [edk2] [RFC 0/4] OvmfPkg: (almost) enable >= 64 GB guests

2015-06-10 Thread Wei Liu
On Wed, Jun 10, 2015 at 03:18:50PM +0100, Wei Liu wrote: > On Mon, Jun 08, 2015 at 11:46:47PM +0200, Laszlo Ersek wrote: > > This is in response to > > > > http://thread.gmane.org/gmane.comp.bios.tianocore.devel/15253 > > http://thread.gmane.org/gmane.comp.emulators.xen

Re: [edk2] [RFC 0/4] OvmfPkg: (almost) enable >= 64 GB guests

2015-06-10 Thread Wei Liu
On Wed, Jun 10, 2015 at 03:18:50PM +0100, Wei Liu wrote: > On Mon, Jun 08, 2015 at 11:46:47PM +0200, Laszlo Ersek wrote: > > This is in response to > > > > http://thread.gmane.org/gmane.comp.bios.tianocore.devel/15253 > > http://thread.gmane.org/gmane.comp.emulators.xen

Re: [edk2] [RFC 0/4] OvmfPkg: (almost) enable >= 64 GB guests

2015-06-10 Thread Wei Liu
't actually work. Ideas > welcome. > > Cc: Maoming > Cc: Huangpeng (Peter) > Cc: Wei Liu > > Thanks > Laszlo > Thanks Laszlo. I think only the first two patches matter to Xen so I only tested those. Now I'm able to boot a guest with more than 64GB ram. Her

Re: [edk2] [Xen-devel] The size of memory is wrong inside of virtual machine(VM) when using OVMF

2015-06-09 Thread Wei Liu
On Mon, Jun 08, 2015 at 10:57:30PM +0200, Laszlo Ersek wrote: [...] > > The issue is real. I've been working on some patches today for this. > I'll soon send an RFC series. > > It's actually easy to *test* this scenario: just create a 128GB or so > file, with "fallocate", on a sufficiently big fi

Re: [edk2] [Xen-devel] The size of memory is wrong inside of virtual machine(VM) when using OVMF

2015-06-07 Thread Wei Liu
On Mon, Jun 01, 2015 at 09:13:08AM +, Maoming wrote: > Hi all: >I encountered a troublesome problem about OVMF. >I used OVMF.fd as a BIOS of virtual machine(VM). > >1、my environment: >xen_version: 4.6-unstable >I git clone xen from git://xenb

Re: [edk2] Question about PEX boot on Xen with OVMF as bios

2015-06-07 Thread Wei Liu
Hi Please CC me and Anthony (CC'ed) in the future if you have questions regarding OVMF on Xen. On Tue, May 26, 2015 at 12:02:22PM +0200, Laszlo Ersek wrote: > On 05/25/15 03:50, lidonglin wrote: > > Hi all: > > > Recentlly, I want to use PXE boot on Xen with OVMF as bios. At > > beginning, I jus

Re: [edk2] [Xen-devel] Windows 8 64bit Guest BSOD when using OVMF to boot and *install* from CDROM(when configured with more than 4G memory)

2015-05-10 Thread Wei Liu
Please don't top post. On Mon, May 11, 2015 at 01:52:38AM +, lidonglin wrote: > Hi all: > Did you encounter this BSOD problem ? I try > git://xenbits.xen.org/ovmf.git and other ovmf repos. I found > installing win8 64bit os (memory > 4G) with OVMF on xen > hypervisor al

Re: [edk2] [Xen-devel] Windows 8 64bit Guest BSOD when using OVMF to boot and *install* from CDROM(when configured with more than 4G memory)

2015-05-08 Thread Wei Liu
On Fri, May 08, 2015 at 10:39:43AM +0100, Ian Campbell wrote: > On Fri, 2015-05-08 at 07:31 +0100, Wei Liu wrote: > > On Thu, May 07, 2015 at 10:29:55AM +0100, Ian Campbell wrote: > > > On Thu, 2015-05-07 at 09:02 +0200, Laszlo Ersek wrote: > > > > (Plus, you are clon

Re: [edk2] [Xen-devel] Windows 8 64bit Guest BSOD when using OVMF to boot and *install* from CDROM(when configured with more than 4G memory)

2015-05-07 Thread Wei Liu
On Thu, May 07, 2015 at 10:29:55AM +0100, Ian Campbell wrote: > On Thu, 2015-05-07 at 09:02 +0200, Laszlo Ersek wrote: > > (Plus, you are cloning a git repo that may or may not be > > identical to the (semi-)official edk2 git repo.) > > FWIW git://xenbits.xen.org/ovmf.git is a direct descendant of

Re: [edk2] [PATCH] OvmfPkg: AcpiPlatformDxe: PCI enumeration may be disabled

2015-02-12 Thread Wei Liu
On Thu, Feb 12, 2015 at 01:33:50PM +0100, Laszlo Ersek wrote: > On 02/12/15 13:29, Wei Liu wrote: > > On Thu, Feb 12, 2015 at 01:16:07PM +0100, Laszlo Ersek wrote: > >> SVN r16411 delayed ACPI table installation until PCI enumeration was > >> complete, because on QEMU th

Re: [edk2] [PATCH] OvmfPkg: AcpiPlatformDxe: PCI enumeration may be disabled

2015-02-12 Thread Wei Liu
OTOCOL. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek This patch fixes the bug I have. Thanks! Tested-by: Wei Liu Wei. -- Dive into the World of Parallel Programming

Re: [edk2] [PATCH] MdeModulePkg: mark completion of PCI enumeration in PciEnumeratorLight

2015-02-12 Thread Wei Liu
On Thu, Feb 12, 2015 at 11:46:04AM +0100, Laszlo Ersek wrote: > On 02/11/15 21:23, Wei Liu wrote: > > I had an issue when trying to boot Xen HVM guest with latest OVMF > > master. Guest crashed with memory violation, and the bisection pointed > > to 66b280df2 ("Ovmf

Re: [edk2] [PATCH] MdeModulePkg: mark completion of PCI enumeration in PciEnumeratorLight

2015-02-12 Thread Wei Liu
On Thu, Feb 12, 2015 at 01:23:26AM +, Ni, Ruiyu wrote: > Wei, > No you cannot install gEfiPciEnumerationCompleteProtocolGuid in > PciEnumeratorLight(). > > For a real platform, PCI BUS is fully enumerated in PciEnumerator() > and later if reconnect happens, it's light enumerated in > PciEnumer

[edk2] [PATCH] MdeModulePkg: mark completion of PCI enumeration in PciEnumeratorLight

2015-02-11 Thread Wei Liu
in guest crash. The fix is to install gEfiPciEnumerationCompleteProtocolGuid in PciEnumeratorLight. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu Cc: Feng Tian Cc: Anthony Perard Cc: Laszlo Ersek Cc: Jordan Justen --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerato

[edk2] Xen OVMF regression

2015-02-11 Thread Wei Liu
Hi Anthony and Laszlo The following commit caused Xen hvm guest failed to boot. commit 66b280df282ae82888d2eb416bfeda3f65afa386 Author: Laszlo Ersek Date: Thu Nov 20 09:58:28 2014 + OvmfPkg: AcpiPlatformDxe: make dependency on PCI enumeration explicit The ACPI payload that OVMF d

Re: [edk2] [Xen-devel] [PATCH RFC 04/18] OvmfPkg/XenbusDxe: Add support to make Xen Hypercalls.

2014-07-17 Thread Wei Liu
On Wed, Jul 16, 2014 at 01:37:05PM -0400, Konrad Rzeszutek Wilk wrote: [...] > > + > > +EFI_STATUS > > +XenHyperpageInit ( > > + XENBUS_DEVICE *Dev > > + ) > > +{ > > + EFI_HOB_GUID_TYPE *GuidHob; > > + EFI_XEN_INFO*XenInfo; > > + > > + GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); >

Re: [edk2] [PATCH 1/2] OvmfPkg/SMBIOS: Reuse handles supplied by underlying VM

2014-05-15 Thread Wei Liu
On Wed, May 14, 2014 at 12:34:14PM -0400, Gabriel L. Somlo wrote: > On Wed, May 14, 2014 at 02:55:15PM +0100, Wei Liu wrote: > > On Wed, May 14, 2014 at 03:31:48PM +0200, Laszlo Ersek wrote: > > > On 05/14/14 00:13, Gabriel L. Somlo wrote: > > > > The SMBIOS specifi

Re: [edk2] [PATCH 1/2] OvmfPkg/SMBIOS: Reuse handles supplied by underlying VM

2014-05-14 Thread Wei Liu
// > > -SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; > > +SmbiosHandle = SmbiosTable.Hdr->Handle; > > Status = Smbios->Add ( > > Smbios, > > NULL, > > > > This patch should be tested by Xen

Re: [edk2] [PATCH 0/7] Merge OvmfPkg/PlatformPei QEMU and Xen boot paths

2014-01-30 Thread Wei Liu
Other than that everything looks good. Reviewed-by: Wei Liu Thanks! Wei. > Jordan Justen (7): > OvmfPkg/PlatformPei: Add mXen boolean to indicate Xen is running > OvmfPkg/PlatformPei: Hide Xen Leaf details > OvmfPkg/PlatformPei: Add XenPublishRamRegions > OvmfPk

Re: [edk2] [PATCH v4 16/26] OvmfPkg: PlatformPei: reserve SEC/PEI temp RAM for S3 resume

2014-01-13 Thread Wei Liu
On Fri, Jan 10, 2014 at 03:49:52PM -0800, Jordan Justen wrote: > On Fri, Jan 10, 2014 at 4:16 AM, Wei Liu wrote: > > Thanks for bringing this to Xen-devel! > > On Thu, Jan 09, 2014 at 03:03:06PM -0800, Jordan Justen wrote: > >> On Thu, Jan 9, 2014 at 2:00 PM, Laszlo Ersek

Re: [edk2] [PATCH v4 16/26] OvmfPkg: PlatformPei: reserve SEC/PEI temp RAM for S3 resume

2014-01-10 Thread Wei Liu
Thanks for bringing this to Xen-devel! On Thu, Jan 09, 2014 at 03:03:06PM -0800, Jordan Justen wrote: > On Thu, Jan 9, 2014 at 2:00 PM, Laszlo Ersek wrote: > > On 01/09/14 22:47, Jordan Justen wrote: > >> On Thu, Jan 9, 2014 at 12:41 PM, Laszlo Ersek wrote: > >>> On 01/09/14 01:45, Jordan Justen

Re: [edk2] [Xen-devel] [PATCH v4 0/7] Make OVMF fully working with Xen

2013-12-05 Thread Wei Liu
On Thu, Dec 05, 2013 at 10:17:32AM -0800, Jordan Justen wrote: > On Thu, 2013-12-05 at 11:52 +0000, Wei Liu wrote: > > On Sat, Nov 30, 2013 at 03:58:18PM -0800, Jordan Justen wrote: > > > Series Reviewed-by: Jordan Justen > > > > > > Some minor is

Re: [edk2] [Xen-devel] [PATCH v4 0/7] Make OVMF fully working with Xen

2013-12-05 Thread Wei Liu
On Sat, Nov 30, 2013 at 03:58:18PM -0800, Jordan Justen wrote: > Series Reviewed-by: Jordan Justen > > Some minor issues mentioned in a reply to patch 1. > Hi Jordan Is there any more concerns regarding this series? All patches have reviewed-by tag now. I was quite clear about Ray's question.

Re: [edk2] [PATCH v4 1/7] MdeModulePkg: introduce PcdPciDisableBusEnumeration

2013-12-04 Thread Wei Liu
Please don't drop Xen-devel. On Wed, Dec 04, 2013 at 08:13:13AM +, Ni, Ruiyu wrote: > Jordan/Wei, > Does Xen care about the PCI option rom? Because I just found the Yes. In seabios case it calls options roms if there's any. I think OVMF should do the same thing. > PciBusNoEnumerationDxe driv

Re: [edk2] [Xen-devel] [PATCH v4 0/7] Make OVMF fully working with Xen

2013-12-01 Thread Wei Liu
On Sat, Nov 30, 2013 at 03:58:18PM -0800, Jordan Justen wrote: > Series Reviewed-by: Jordan Justen > Thanks! Wei. > Some minor issues mentioned in a reply to patch 1. > > -Jordan > -- Rapidly troubleshoot problems b

[edk2] [PATCH v4 4/7] OvmfPkg: detect Xen earlier

2013-11-29 Thread Wei Liu
This is useful for initializing memory map. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu Reviewed-by: Jordan Justen --- OvmfPkg/PlatformPei/Platform.c |8 +++- OvmfPkg/PlatformPei/Platform.h |5 + OvmfPkg/PlatformPei/Xen.c | 12

[edk2] [PATCH v4 7/7] OvmfPkg: enable Xen specific path

2013-11-29 Thread Wei Liu
This patch sets PcdPciDisableBusEnumeration to true then makes use of PublishPeiMemory and XenMemMapInitialization to construct memory map for Xen guest. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/OvmfPkgIa32.dsc |6 +- OvmfPkg

[edk2] [PATCH v4 6/7] OvmfPkg: introduce XenMemMapInitialization

2013-11-29 Thread Wei Liu
This function parses E820 map provided by Xen and arrange memory maps accordingly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Platform.c | 70 OvmfPkg/PlatformPei/Platform.h |8

[edk2] [PATCH v4 3/7] OvmfPkg: define EFI_XEN_OVMF_INFO

2013-11-29 Thread Wei Liu
EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It must match the definition on Xen side. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Xen.h | 45 + 1 file changed, 45

[edk2] [PATCH v4 2/7] OvmfPkg: introduce E820.h

2013-11-29 Thread Wei Liu
E820 definitions copied from IntelFrameworkModulePkg/Csm/ LegacyBiosDxe/LegacyBiosInterface.h. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu Reviewed-by: Jordan Justen --- OvmfPkg/Include/IndustryStandard/E820.h | 46 +++ 1 file

[edk2] [PATCH v4 5/7] OvmfPkg: introduce PublishPeiMemory

2013-11-29 Thread Wei Liu
Signed-off-by: Wei Liu Reviewed-by: Jordan Justen --- OvmfPkg/PlatformPei/MemDetect.c | 36 +++- OvmfPkg/PlatformPei/Platform.h |5 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei

[edk2] [PATCH v4 1/7] MdeModulePkg: introduce PcdPciDisableBusEnumeration

2013-11-29 Thread Wei Liu
this PCD is false (allow full PCI enumeration) to preserve the same behavior before this change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c |5 - MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf |1

[edk2] [PATCH v4 0/7] Make OVMF fully working with Xen

2013-11-29 Thread Wei Liu
library inclusion in Ovmf*.dsc * some coding style fixes Changes since RFC v2: * PcdPciAllowFullEnumeration -> PcdPciDisableBusEnumeration * enable Xen path in dedicated patch * OVMF info moved to dedicated header Wei Liu (7): MdeModulePkg: introduce PcdPciDisableBusEnumeration Ovmf

Re: [edk2] [Xen-devel] [PATCH v3 8/8] OvmfPkg: enable Xen specific path

2013-11-29 Thread Wei Liu
On Thu, Nov 28, 2013 at 08:39:10PM -0800, Jordan Justen wrote: > On Tue, Nov 26, 2013 at 11:26 AM, Wei Liu wrote: > > This patch sets PcdPciDisableBusEnumeration to true then makes use of > > PublishPeiMemory and XenMemMapInitialization to construct memory map fo

Re: [edk2] [PATCH v3 6/8] OvmfPkg: introduce PublishPeiMemory

2013-11-29 Thread Wei Liu
On Thu, Nov 28, 2013 at 08:31:11PM -0800, Jordan Justen wrote: [...] > > + VOID > > + ) > > +{ > > + EFI_STATUS Status; > > + EFI_PHYSICAL_ADDRESSMemoryBase; > > + UINT64 MemorySize; > > + UINT64 LowerMemorySize; > > + > > +

Re: [edk2] [Xen-devel] [PATCH v3 2/8] OvmfPkg: introduce E820.h

2013-11-27 Thread Wei Liu
IONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ Is the above one OK? Wei. > Thanks, > Hot > > -Original Message----- > From: Jordan Justen [mailto:jljus...@gmail.com] > Sent: Thursday, November 28, 2013 8:19 AM > To: Wei Liu > Cc: Konrad Rzeszutek Wilk; edk2-de

Re: [edk2] [Xen-devel] [PATCH v3 3/8] OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo

2013-11-27 Thread Wei Liu
On Wed, Nov 27, 2013 at 05:36:01PM -0800, Jordan Justen wrote: > On Wed, Nov 27, 2013 at 5:09 PM, Jordan Justen wrote: > > On Tue, Nov 26, 2013 at 11:25 AM, Wei Liu wrote: > >> EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It > >> must match

Re: [edk2] [Xen-devel] [PATCH v3 2/8] OvmfPkg: introduce E820.h

2013-11-27 Thread Wei Liu
On Wed, Nov 27, 2013 at 04:18:38PM -0800, Jordan Justen wrote: > On Wed, Nov 27, 2013 at 4:22 AM, Wei Liu wrote: > > On Tue, Nov 26, 2013 at 02:47:13PM -0500, Konrad Rzeszutek Wilk wrote: > >> On Tue, Nov 26, 2013 at 07:25:58PM +, Wei Liu wrote: > >> >

Re: [edk2] [Xen-devel] [PATCH v3 2/8] OvmfPkg: introduce E820.h

2013-11-27 Thread Wei Liu
On Tue, Nov 26, 2013 at 02:47:13PM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Nov 26, 2013 at 07:25:58PM +0000, Wei Liu wrote: > > E820 definitions copied from IntelFrameworkModulePkg/Csm/ > > LegacyBiosDxe/LegacyBiosInterface.h. > > > > Contributed-under: TianoCore

Re: [edk2] [PATCH v3 1/8] MdeModulePkg: introduce PcdPciDisableBusEnumeration

2013-11-27 Thread Wei Liu
On Tue, Nov 26, 2013 at 10:26:12PM +, Kinney, Michael D wrote: > Wei, > > I recommend you put the declaration of the new PCD in the next section if > MdeModulePkg.dec so it supports PatchableInModule as well. > Thanks Mike. I will do this. Wei.

[edk2] [PATCH v3 2/8] OvmfPkg: introduce E820.h

2013-11-26 Thread Wei Liu
E820 definitions copied from IntelFrameworkModulePkg/Csm/ LegacyBiosDxe/LegacyBiosInterface.h. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu Reviewed-by: Jordan Justen --- OvmfPkg/Include/IndustryStandard/E820.h | 46 +++ 1 file

[edk2] [PATCH v3 5/8] OvmfPkg: detect Xen earlier

2013-11-26 Thread Wei Liu
This is useful for initializing memory map. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Platform.c |8 +++- OvmfPkg/PlatformPei/Platform.h |5 + OvmfPkg/PlatformPei/Xen.c | 12 +--- 3 files changed, 13

[edk2] [PATCH v3 0/8] Make OVMF fully working with Xen

2013-11-26 Thread Wei Liu
ation -> PcdPciDisableBusEnumeration * enable Xen path in dedicated patch * OVMF info moved to dedicated header Wei Liu (8): MdeModulePkg: introduce PcdPciDisableBusEnumeration OvmfPkg: introduce E820.h OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo OvmfPkg: extract OVMF info passed by Xen h

[edk2] [PATCH v3 1/8] MdeModulePkg: introduce PcdPciDisableBusEnumeration

2013-11-26 Thread Wei Liu
full PCI enumeration) to preserve the same behavior before this change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c |5 - MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf |1 + MdeModulePkg/MdeModulePkg.dec

[edk2] [PATCH v3 8/8] OvmfPkg: enable Xen specific path

2013-11-26 Thread Wei Liu
This patch sets PcdPciDisableBusEnumeration to true then makes use of PublishPeiMemory and XenMemMapInitialization to construct memory map for Xen guest. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/OvmfPkgIa32.dsc |5 +++-- OvmfPkg

[edk2] [PATCH v3 3/8] OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo

2013-11-26 Thread Wei Liu
EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It must match the definition on Xen side. XenInfo is extended to include necessary bits as well. Currently only E820 map is in use. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg

[edk2] [PATCH v3 7/8] OvmfPkg: introduce XenMemMapInitialization

2013-11-26 Thread Wei Liu
This function parses Xen OVMF info and arrange memory maps accordingly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Platform.c | 70 1 file changed, 70 insertions(+) diff --git a/OvmfPkg

[edk2] [PATCH v3 4/8] OvmfPkg: extract OVMF info passed by Xen hvmloader

2013-11-26 Thread Wei Liu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Xen.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c index a720b91..737cb15 100644 --- a

[edk2] [PATCH v3 6/8] OvmfPkg: introduce PublishPeiMemory

2013-11-26 Thread Wei Liu
Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/MemDetect.c | 36 +++- OvmfPkg/PlatformPei/Platform.h |5 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 9f6ca19..dc44745

Re: [edk2] [PATCH RFC v2 7/7] OvmfPkg: introduce XenMemMapInitialization

2013-11-26 Thread Wei Liu
On Mon, Nov 25, 2013 at 12:38:04PM -0800, Jordan Justen wrote: > Regarding patches 5-7, it seems like the mem-map code flow could be > more shared. It is a bit challenging to unravel things though. > Indeed. It's a bit unfortunate that this path is shared by all users of OVMF. And from a previous

Re: [edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration ... [and one more message]

2013-11-26 Thread Wei Liu
thing. Do you think it is necessary to add in PatachbleInModule? (note to self: state clearly the types of the PCD in the commit message in next version) Wei. > Mike > > -Original Message- > From: Wei Liu [mailto:wei.l...@citrix.com] > Sent: Monday, Nov

Re: [edk2] [PATCH RFC v2 4/7] OvmfPkg: extract OVMF info passed by Xen hvmloader

2013-11-25 Thread Wei Liu
On Sun, Nov 24, 2013 at 06:01:03PM -0800, Jordan Justen wrote: [...] > >mXenInfo.HyperPages = AllocatePages (TransferPages); > > @@ -72,6 +78,31 @@ XenConnect ( > >/* TBD: Locate hvm_info and reserve it away. */ > >mXenInfo.HvmInfo = NULL; > > > > + if (!AsciiStrCmp ((CHAR8 *) Info->Si

Re: [edk2] [Xen-devel] [PATCH RFC v2 3/7] OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo

2013-11-25 Thread Wei Liu
On Sun, Nov 24, 2013 at 05:46:42PM -0800, Jordan Justen wrote: > On Tue, Nov 19, 2013 at 12:38 PM, Wei Liu wrote: > > EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It > > must match the definition on Xen side. > > > > XenInfo is extended to

Re: [edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration

2013-11-25 Thread Wei Liu
On Sun, Nov 24, 2013 at 02:05:01PM -0800, Jordan Justen wrote: > Feng, what do you think of this change to MdeModulePkg? > > Wei, How about PcdPciDisableBusEnumeration instead? > I have no objection to the new name. Wei. > -Jordan --

Re: [edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration ... [and one more message]

2013-11-25 Thread Wei Liu
On Mon, Nov 25, 2013 at 03:12:04AM +, Kinney, Michael D wrote: > Jordan, > > I agree that removing code duplication is a good idea. > > I believe we can make the one in the MdeModulePkg functional > everywhere. Size will be the only remaining difference. This can be > addressed longer term.

[edk2] [PATCH RFC v2 7/7] OvmfPkg: introduce XenMemMapInitialization

2013-11-19 Thread Wei Liu
This function parses Xen OVMF info and arrange memory maps accordingly. It also sets PcdPciAllowFullEnumeration to false to prevent OVMF from playing with PCI devices. Signed-off-by: Wei Liu --- OvmfPkg/OvmfPkgIa32.dsc |5 ++- OvmfPkg/OvmfPkgIa32X64.dsc |5

[edk2] [PATCH RFC v2 3/7] OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo

2013-11-19 Thread Wei Liu
EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It must match the definition on Xen side. XenInfo is extended to include those bits as well. Currently only E820 map is in use. Signed-off-by: Wei Liu --- OvmfPkg/Include/Guid/XenInfo.h | 27 +++ 1

[edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration

2013-11-19 Thread Wei Liu
Platforms such as Xen already enumerates PCI bridges and devices. Use this PCD to control EDK2 behavior. The default behavior is to allow full PCI enumeration. This is the same behavior as before this change. Signed-off-by: Wei Liu Cc: Gerd Hoffmann Cc: Laszlo Ersek --- MdeModulePkg/Bus/Pci

[edk2] [PATCH RFC v2 2/7] OvmfPkg: introduce E820.h

2013-11-19 Thread Wei Liu
E820 definitions copied from IntelFrameworkModulePkg/Csm/ LegacyBiosDxe/LegacyBiosInterface.h. Signed-off-by: Wei Liu --- OvmfPkg/Include/IndustryStandard/E820.h | 46 +++ 1 file changed, 46 insertions(+) create mode 100644 OvmfPkg/Include/IndustryStandard/E820.h

[edk2] [PATCH RFC v2 6/7] OvmfPkg: introduce PublishPeiMemory

2013-11-19 Thread Wei Liu
this approach? Probabaly more refactoring to the existing code is needed? I would like to know this. Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/MemDetect.c | 36 +++- OvmfPkg/PlatformPei/Platform.h |5 + 2 files changed, 40 insertions(+), 1 del

[edk2] [PATCH RFC v2 5/7] OvmfPkg: detect Xen earlier

2013-11-19 Thread Wei Liu
This is useful for initializing memory map. Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Platform.c |8 +++- OvmfPkg/PlatformPei/Platform.h |5 + OvmfPkg/PlatformPei/Xen.c | 12 +--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/OvmfPkg

[edk2] [PATCH RFC v2 4/7] OvmfPkg: extract OVMF info passed by Xen hvmloader

2013-11-19 Thread Wei Liu
Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Xen.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c index a720b91..fbb2619 100644 --- a/OvmfPkg/PlatformPei/Xen.c +++ b/OvmfPkg/PlatformPei/Xen.c

[edk2] [PATCH RFC v2 0/7] Make OVMF fully working with Xen

2013-11-19 Thread Wei Liu
: doesn't break). The code path is the same as before if Xen is not detected. Comments are welcomed. The tree can be found at: http://xenbits.xen.org/git-http/people/liuw/ovmf.git rfc-v2 starting from 4ba5c67e. Wei. Wei Liu (7): MdeModulePkg: introduce PcdPciAllowFullEnumeration Ov

Re: [edk2] [Xen-devel] [PATCH RFC 0/7] OvmfPkg: make OVMF fully working with Xen

2013-11-18 Thread Wei Liu
On Sat, Nov 16, 2013 at 06:11:20PM -0800, Jordan Justen wrote: > On Sat, Nov 16, 2013 at 5:31 PM, Wei Liu wrote: > > On Sat, Nov 16, 2013 at 3:31 AM, Jordan Justen wrote: > >> When I try to boot this on qemu or kvm, it asserts because the video > >> framebuffer addr

Re: [edk2] [Xen-devel] [PATCH RFC 0/7] OvmfPkg: make OVMF fully working with Xen

2013-11-16 Thread Wei Liu
On Sun, Nov 17, 2013 at 02:24:35AM +, Wei Liu wrote: > On Sun, Nov 17, 2013 at 2:11 AM, Jordan Justen wrote: > > On Sat, Nov 16, 2013 at 5:31 PM, Wei Liu wrote: > >> On Sat, Nov 16, 2013 at 3:31 AM, Jordan Justen wrote: > >>> When I try to boot this on qemu

[edk2] [PATCH RFC 1/7] HACK: Use DeutPkg/PciRootBridgeNoEnumeration and PciBusNoEnumerationDxe

2013-11-15 Thread Wei Liu
Xen hvmloader has already allocated resources for PCI devices. OVMF should not need to fiddle with that. Apparently this can be made configurable so that it benifits Xen / Coreboot etc. Advise welcomed. Signed-off-by: Wei Liu --- OvmfPkg/OvmfPkgX64.dsc |8 ++-- OvmfPkg/OvmfPkgX64.fdf

[edk2] [PATCH RFC 0/7] OvmfPkg: make OVMF fully working with Xen

2013-11-15 Thread Wei Liu
nifit for other use cases. Wei. Wei Liu (7): HACK: Use DeutPkg/PciRootBridgeNoEnumeration and PciBusNoEnumerationDxe OvmfPkg: introduce E820.h OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo OvmfPkg: extract OVMF info passed by Xen hvmloader OvmfPkg: detect Xen earlier Ovm

[edk2] [PATCH RFC 4/7] OvmfPkg: extract OVMF info passed by Xen hvmloader

2013-11-15 Thread Wei Liu
Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Xen.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c index a720b91..b4c1247 100644 --- a/OvmfPkg/PlatformPei/Xen.c +++ b/OvmfPkg/PlatformPei/Xen.c

[edk2] [PATCH RFC 2/7] OvmfPkg: introduce E820.h

2013-11-15 Thread Wei Liu
E820.h is extracted from LinuxBzimage.h. The definition is generally useful in other cases as well so it deserves its own header. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/Include/IndustryStandard/E820.h | 34

[edk2] [PATCH RFC 7/7] OvmfPkg: introduce XenMemMapInitialization

2013-11-15 Thread Wei Liu
This function parses Xen OVMF info and arrange memory maps accordingly. Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Platform.c | 83 +++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei

[edk2] [PATCH RFC 6/7] OvmfPkg: introduce PublishPeiMemory

2013-11-15 Thread Wei Liu
this approach? Probabaly more refactoring to the existing code is needed? I would like to know this. Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/MemDetect.c | 36 +++- OvmfPkg/PlatformPei/Platform.h |5 + 2 files changed, 40 insertions(+), 1 del

[edk2] [PATCH RFC 3/7] OvmfPkg: define EFI_XEN_OVMF_INFO and extend XenInfo

2013-11-15 Thread Wei Liu
EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It must match the definition on Xen side. XenInfo is extended to include those bits as well. Signed-off-by: Wei Liu --- OvmfPkg/Include/Guid/XenInfo.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a

[edk2] [PATCH RFC 5/7] OvmfPkg: detect Xen earlier

2013-11-15 Thread Wei Liu
This is useful for initializing memory map. Signed-off-by: Wei Liu --- OvmfPkg/PlatformPei/Platform.c |8 +++- OvmfPkg/PlatformPei/Platform.h |5 + OvmfPkg/PlatformPei/Xen.c | 12 +--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/OvmfPkg

Re: [edk2] Passing Xen memory map and resource map to OVMF

2013-11-15 Thread Wei Liu
On Thu, Nov 14, 2013 at 08:42:39AM -0800, Andrew Fish wrote: [...] > > > > >From a UEFI spec perspective you only need to produce > >EFI_PCI_ROOT_BRIGE_IO_PROTOCOL and a EFI_PCI_IO_PROTOCOL per device. This is > >all that is required to make generic UEFI code (all the PCI drivers, shell > >com

Re: [edk2] Passing Xen memory map and resource map to OVMF

2013-11-14 Thread Wei Liu
On Thu, Nov 14, 2013 at 08:58:18AM +0100, Gerd Hoffmann wrote: > Hi, > > > > > OVMF > > > > should just use whatever it gets. > > > > > > What would OVMF use them for? > > > > > > > To reserve range for MMIO holes, so that later PCI resource allocation > > protocol can only use those ranges.

Re: [edk2] Passing Xen memory map and resource map to OVMF

2013-11-13 Thread Wei Liu
On Wed, Nov 13, 2013 at 03:23:05PM +0100, Gerd Hoffmann wrote: > Hi, > > > > > MMIO holes, IO range created by hvmloader. > > > > > > Why? All (memory) address space not backed by ram effectively is mmio. > > > There is no need to explicitly declare holes ... > > > > > > > Yes there is, beca

Re: [edk2] Passing Xen memory map and resource map to OVMF

2013-11-13 Thread Wei Liu
On Wed, Nov 13, 2013 at 02:53:34PM +0100, Gerd Hoffmann wrote: > On Mi, 2013-11-13 at 11:58 +0000, Wei Liu wrote: > > On Wed, Nov 13, 2013 at 08:03:39AM +0100, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > The first thing that comes in mind is to

Re: [edk2] [Xen-devel] Passing Xen memory map and resource map to OVMF

2013-11-13 Thread Wei Liu
On Tue, Nov 12, 2013 at 11:51:10AM -0800, Jordan Justen wrote: > On Tue, Nov 12, 2013 at 10:33 AM, Wei Liu wrote: > > Hi all > > > > Currently OVMF determines memory size by consulting CMOS, then it makes > > up memory map of its own. > > > > Consulting mem

Re: [edk2] Passing Xen memory map and resource map to OVMF

2013-11-13 Thread Wei Liu
On Wed, Nov 13, 2013 at 08:03:39AM +0100, Gerd Hoffmann wrote: > Hi, > > > > The first thing that comes in mind is to reuse E820 table for memory map > > > plus some extra fields for io / mmio resources. But I guess UEFI is the > > > new world so stuffs like E820 from old world will be less popu

[edk2] Passing Xen memory map and resource map to OVMF

2013-11-12 Thread Wei Liu
Hi all Currently OVMF determines memory size by consulting CMOS, then it makes up memory map of its own. Consulting memory size by reading CMOS limits the RAM size to 1TB as there's only 3 bytes from 0x5b-0x5d in CMOS, where the upper memory size is stored. And from Xen's point of view, OVMF sho

Re: [edk2] [Xen-devel] [PATCH] OvmfPkg/PlatformPei: allow platform to specify start of PCI MMIO region

2013-11-08 Thread Wei Liu
On Fri, Nov 08, 2013 at 01:25:34PM -0500, Konrad Rzeszutek Wilk wrote: > On Fri, Nov 08, 2013 at 05:49:39PM +0000, Wei Liu wrote: > > The original code calculates the start of PCI MMIO region automatically, > > which is not desirable when running under Xen, as Xen is responsible of

[edk2] [PATCH] OvmfPkg/PlatformPei: allow platform to specify start of PCI MMIO region

2013-11-08 Thread Wei Liu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu --- OvmfPkg/OvmfPkg.dec |3 +++ OvmfPkg/PlatformPei/Platform.c | 13 +++-- OvmfPkg/PlatformPei/PlatformPei.inf |1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/OvmfPkg

Re: [edk2] [PATCH] OvmfPkg/PlatformPei: emulated NV storage must be EfiRuntimeServicesData

2013-10-28 Thread Wei Liu
On Mon, Oct 28, 2013 at 01:04:33PM +0100, Laszlo Ersek wrote: > SVN r14770 ("OvmfPkg/PlatformPei: correctly align emulated NV storage") > made sure the emulated NV storage was allocated with correct alignment. > > However, the AllocateRuntimePool() -> AllocateAlignedPages() change > flipped the me

Re: [edk2] [PATCH] OvmfPkg/PlatformPei: correctly align emulated NV storage

2013-10-14 Thread Wei Liu
Ping? On Mon, Oct 07, 2013 at 03:58:51PM +0100, Wei Liu wrote: > Per 2c4b18e ("MdeModulePkg: Add the alignment check for FTW spare area > address and length, and add the check for PcdFlashNvStorageVariableSize > <= PcdFlashNvStorageFtwSpareSize."), FTWDxe refuses to initi

[edk2] [PATCH] OvmfPkg/PlatformPei: correctly align emulated NV storage

2013-10-07 Thread Wei Liu
Depending on configuration, memory for FTWDxe might be dynamically allocated in PlatformPei. This patch makes sure that the allocated memory region is aligned. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu Cc: Jordan Justen Cc: Andrew Fish --- OvmfPkg/PlatformPei/Plat

Re: [edk2] [PATCH] OvmfPkg/EmuVariableFvbRuntimeDxe: correctly align emulated NV storage

2013-10-07 Thread Wei Liu
On a second thought I think this approach is not correct. Maybe I should make the allocation aligned in the first place as Andrew Fish suggested. Please ignore this patch for now. Wei. On Mon, Oct 07, 2013 at 12:38:25PM +0100, Wei Liu wrote: > Per 2c4b18e ("MdeModulePkg: Add the alignme

[edk2] [PATCH] OvmfPkg/EmuVariableFvbRuntimeDxe: correctly align emulated NV storage

2013-10-07 Thread Wei Liu
ock size. In EmuVariableFvbRuntimeDxe, FTW spare space base is set to a SubPtr inside the emulated NV storage, which is only guaranteed to align to 4KiB block. Make it align to EMU_FVB_BLOCK_SIZE to comply with the check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu

Re: [edk2] FTW spare space alignment with emulated NV storage

2013-10-07 Thread Wei Liu
On Wed, Oct 02, 2013 at 08:47:06AM -0700, Andrew Fish wrote: [...] > > [PcdsDynamicDefault] > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > >

Re: [edk2] FTW spare space alignment with emulated NV storage

2013-10-02 Thread Wei Liu
On Tue, Oct 01, 2013 at 10:33:49AM -0700, Andrew Fish wrote: > > On Oct 1, 2013, at 10:10 AM, Wei Liu wrote: > > > Hi OVMF experts > > > > I'm trying to make OVMF work with Xen HVM and discover a possible bug in > > EDK2 OVMF. The root cause is that EmuVa

Re: [edk2] FTW spare space alignment with emulated NV storage

2013-10-01 Thread Wei Liu
On Tue, Oct 01, 2013 at 06:10:57PM +0100, Wei Liu wrote: > Hi OVMF experts > > I'm trying to make OVMF work with Xen HVM and discover a possible bug in > EDK2 OVMF. The root cause is that EmuVariableFvbRuntimeDxe sets FTW > spare space base address to a not-aligned add

[edk2] FTW spare space alignment with emulated NV storage

2013-10-01 Thread Wei Liu
ents. Thanks Wei. 8<--- >From c2e3c03d13a1f1064fbc400c25e93f3703fbdae7 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 1 Oct 2013 17:43:18 +0100 Subject: [PATCH] OvmfPkg: correctly align emulated NV storage Per 2c4b18e ("MdeModulePkg: Add the alignment check for FTW spare