public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hangaohuai <hangaohuai@huawei.com>
To: "lersek@redhat.com" <lersek@redhat.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Hangaohuai <hangaohuai@huawei.com>
Subject: [Help] UEFI boot KVM4T vm hang On TianoCore
Date: Tue, 31 Oct 2017 14:29:11 +0000	[thread overview]
Message-ID: <643686C90A8F6046B2C3783E2A7A06AD3DDBC439@dggeml506-mbs.china.huawei.com> (raw)

Hi, Laszlo Ersek;

I have tested the uefi booting KVM vm with the configuration(xml); but start hang.
Enable the memoryhotplug, with usb3.0 config. The config as Config1 below.

Tested branches:
UDK2017     eea98eea4ccbb1d640657770bccb5497fddc6064
Master       76fd5a660d704538a1b14a58d03a4eef9682b01c

Both hang on the snapshot TianoCore in VNC

Try to shoot the problem;
I find the early version can boot success with the same config.
Maybe the patch1 below cause the problem;

Try to ignore the patch does, the master/ UDK2017 both can boot success.
But I don't know why. Hope for your help,thanks.

Patch1
***********************************************
commit 4f5eff8193096eb847639f090a7dfae3cff95fde
Author: Laszlo Ersek <lersek@redhat.com>
Date:   Fri Mar 4 20:06:26 2016 +0100

OvmfPkg: PciHostBridgeLib: install 64-bit PCI host aperture

diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib
index 3e02778..1d3d10a 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -132,6 +132,13 @@ InitRootBridge (
   RootBus->MemAbove4G.Base      = 0;
   RootBus->MemAbove4G.Limit     = 0;
+  if (PcdGet64 (PcdPciMmio64Size) > 0) {
+    RootBus->AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE;
+    RootBus->MemAbove4G.Base       = PcdGet64 (PcdPciMmio64Base);
+    RootBus->MemAbove4G.Limit      = PcdGet64 (PcdPciMmio64Base) +
+                                     (PcdGet64 (PcdPciMmio64Size) - 1);
+  }
+
   RootBus->Bus.Base  = RootBusNumber;
   RootBus->Bus.Limit = MaxSubBusNumber;
   RootBus->Io.Base   = PcdGet64 (PcdPciIoBase);
diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeL
index bbec746..7a964c7 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
+++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
@@ -51,4 +51,6 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
***********************************************


Config1
***********************************************
<maxMemory slots='256' unit='KiB'>4294967296</maxMemory>
  <memory unit='KiB'>4294967</memory>
  <currentMemory unit='KiB'>4294967</currentMemory>
Xxxx
<controller type='usb' index='2' model='nec-xhci'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1c' function='0x0'/>
 </controller>
***********************************************





             reply	other threads:[~2017-10-31 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 14:29 Hangaohuai [this message]
2017-11-06 19:10 ` [Help] UEFI boot KVM4T vm hang On TianoCore Laszlo Ersek
2017-11-07  2:39   ` Hangaohuai
2017-11-07 14:06     ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=643686C90A8F6046B2C3783E2A7A06AD3DDBC439@dggeml506-mbs.china.huawei.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox