[SeaBIOS] [Question] Debug Seabios by GDB with Qemu

2018-01-28 Thread Liu, Jing2
Hello, I am using Seabios for qemu startup, and interested in the debugging by GDB to see how the bios works. Currently, I do it as https://www.seabios.org/Debugging said but met some problems so that couldn't move on. :( Could someone give some pointers on what I missed or have to do to

Re: [SeaBIOS] [Question] Debug Seabios by GDB with Qemu

2018-02-05 Thread Liu, Jing2
On 2/5/2018 7:10 PM, Liu, Jing2 wrote: Hi Kevin, On 1/31/2018 10:46 AM, Kevin O'Connor wrote: On Mon, Jan 29, 2018 at 02:18:45PM +0800, Liu, Jing2 wrote: Hello, I am using Seabios for qemu startup, and interested in the debugging by GDB to see how the bios works. Currently, I do

Re: [SeaBIOS] [Question] Debug Seabios by GDB with Qemu

2018-02-05 Thread Liu, Jing2
Hi Kevin, On 1/31/2018 10:46 AM, Kevin O'Connor wrote: On Mon, Jan 29, 2018 at 02:18:45PM +0800, Liu, Jing2 wrote: Hello, I am using Seabios for qemu startup, and interested in the debugging by GDB to see how the bios works. Currently, I do it as https://www.seabios.org/Debugging said

Re: [SeaBIOS] [PATCH] pci: add RedHat PCI BRIDGE capability

2018-08-08 Thread Liu, Jing2
On 8/8/2018 6:44 PM, Laszlo Ersek wrote: On 08/08/18 05:24, Liu, Jing2 wrote: On 8/7/2018 7:43 PM, Laszlo Ersek wrote: On 08/07/18 09:20, Jing Liu wrote: [snip] -    if (pci_config_readw(bdf, PCI_VENDOR_ID) == PCI_VENDOR_ID_REDHAT && -    pci_config_readw(bdf, PCI_D

Re: [SeaBIOS] [PATCH] pci: add RedHat PCI BRIDGE capability

2018-08-07 Thread Liu, Jing2
On 8/7/2018 7:43 PM, Laszlo Ersek wrote: adding Marcel; comments at the bottom On 08/07/18 09:20, Jing Liu wrote: Add a device-specific capability for the RedHat PCI BRIDGE to enable reserving additional resources. Signed-off-by: Jing Liu --- src/fw/pciinit.c | 9 ++---

Re: [SeaBIOS] [PATCH v2 0/3] pci: resource reserve capability found

2018-08-15 Thread Liu, Jing2
Hi all, I re-send the serial because of wrong numbering last time. Sorry for troubling. Thanks! Jing On 8/16/2018 10:32 AM, Jing Liu wrote: This patch serial is about QEMU resource reserve capability finding in firmware. Firstly, this fixes a logic bug. When the capability is truncated, return

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-15 Thread Liu, Jing2
Hi Zihan, I copy your comments of this patch several days ago here, and hope we could continue some discussion in this serial. On 8/16/2018 10:32 AM, Jing Liu wrote: [...] static u8 pci_find_resource_reserve_capability(u16 bdf) { -if (pci_config_readw(bdf, PCI_VENDOR_ID) ==

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-16 Thread Liu, Jing2
On 8/16/2018 1:06 PM, Zihan Yang wrote: Liu, Jing2 于2018年8月16日周四 上午10:39写道: Hi Zihan, I copy your comments of this patch several days ago here, and hope we could continue some discussion in this serial. Hi Jing, Sorry for the delay. I tested at the code just now and find that pcie

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-16 Thread Liu, Jing2
Hi Gerd, On 8/16/2018 3:19 PM, Gerd Hoffmann wrote: Hi, I think PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE shoud be added too, in case we put a pcie_pci_bridge at the host bus. Yes, please. Thanks for comments. Sure, can be added simply. While this bridge doesn't have resource reserve capability

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-16 Thread Liu, Jing2
On 8/16/2018 3:18 PM, Gerd Hoffmann wrote: Hi, +if (pci_config_readw(bdf, PCI_VENDOR_ID) != PCI_VENDOR_ID_REDHAT) { +dprintf(1, "PCI: QEMU resource reserve cap vendor ID doesn't match.\n"); I'd suggest to use a higher debug level for this one, 3 would be a good pick I

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource

2018-08-14 Thread Liu, Jing2
On 8/13/2018 7:54 PM, Zihan Yang wrote: Enable the firmware recognizing RedHat legacy PCI bridge device ID, so QEMU can reserve additional PCI bridge resource capability. Signed-off-by: Jing Liu --- src/fw/pciinit.c | 50 +-

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-17 Thread Liu, Jing2
On 8/16/2018 9:10 PM, Gerd Hoffmann wrote: On Thu, Aug 16, 2018 at 05:30:45PM +0800, Liu, Jing2 wrote: Hi Gerd, On 8/16/2018 3:19 PM, Gerd Hoffmann wrote: Hi, I think PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE shoud be added too, in case we put a pcie_pci_bridge at the host bus. Yes, please

Re: [SeaBIOS] [Qemu-devel] [PATCH v2 0/3] hw/pci: PCI resource reserve capability

2018-08-16 Thread Liu, Jing2
Hi Laszlo, Thanks very much for your reminder. Looking forward to comments from all! Thanks, Jing On 8/17/2018 12:17 AM, Laszlo Ersek wrote: Hi, On 08/16/18 11:28, Jing Liu wrote: This patch serial is about PCI resource reserve capability. First patch refactors the resource reserve fields

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-23 Thread Liu, Jing2
Hi Laszlo, On 8/22/2018 5:13 PM, Laszlo Ersek wrote: On 08/16/18 12:43, Liu, Jing2 wrote: On 8/16/2018 3:18 PM, Gerd Hoffmann wrote:    Hi, +    if (pci_config_readw(bdf, PCI_VENDOR_ID) != PCI_VENDOR_ID_REDHAT) { +    dprintf(1, "PCI: QEMU resource reserve cap vendor ID doesn't

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-24 Thread Liu, Jing2
On 8/24/2018 4:02 PM, Laszlo Ersek wrote: On 08/24/18 09:48, Liu, Jing2 wrote: [...] +    if (pci_config_readw(bdf, PCI_VENDOR_ID) != PCI_VENDOR_ID_REDHAT) { +    dprintf(1, "PCI: QEMU resource reserve cap vendor ID doesn't match.\n"); I'd suggest to use a higher d

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-24 Thread Liu, Jing2
On 8/24/2018 3:12 PM, Laszlo Ersek wrote: On 08/24/18 04:23, Liu, Jing2 wrote: Hi Laszlo, On 8/22/2018 5:13 PM, Laszlo Ersek wrote: On 08/16/18 12:43, Liu, Jing2 wrote: On 8/16/2018 3:18 PM, Gerd Hoffmann wrote:     Hi, +    if (pci_config_readw(bdf, PCI_VENDOR_ID

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-24 Thread Liu, Jing2
On 8/24/2018 3:12 PM, Laszlo Ersek wrote: On 08/24/18 04:23, Liu, Jing2 wrote: Hi Laszlo, On 8/22/2018 5:13 PM, Laszlo Ersek wrote: On 08/16/18 12:43, Liu, Jing2 wrote: On 8/16/2018 3:18 PM, Gerd Hoffmann wrote:     Hi, +    if (pci_config_readw(bdf, PCI_VENDOR_ID

Re: [SeaBIOS] [PATCH v2 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-24 Thread Liu, Jing2
Hi Gerd, On 8/24/2018 4:24 PM, Gerd Hoffmann wrote: I imagine you'd post v3 with the update Gerd requested for the debug level(s), and then I'd respond with my R-b. (Obviously I'm not a SeaBIOS maintainer so that'll not be "decisive" by any means.) Oh, BTW, I am considering, if only dismatch

Re: [SeaBIOS] [PATCH v3 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-26 Thread Liu, Jing2
Hi Marcel, On 8/25/2018 11:59 PM, Marcel Apfelbaum wrote: On 08/24/2018 11:53 AM, Jing Liu wrote: Enable the firmware recognizing RedHat legacy PCI bridge device ID, so QEMU can reserve additional PCI bridge resource capability. Change the debug level lower to 3 when it is non-QEMU bridge.

Re: [SeaBIOS] hotplug failure issue on pci-bridge

2018-07-16 Thread Liu, Jing2
Hi Laszlo, On 7/12/2018 3:29 PM, Laszlo Ersek wrote: On 07/12/18 07:43, Liu, Jing2 wrote: Yep, thanks for the advice. But hotplugging on pci-bridge is the actual use case request so we would better solve and fix this. You can cold-plug a PCI Express Root Port in the Q35 root complex (pcie.0

Re: [SeaBIOS] [PATCH v3 3/3] pci: recognize RH PCI legacy bridge resource reservation capability

2018-08-30 Thread Liu, Jing2
Hi Marcel, On 8/28/2018 12:58 AM, Marcel Apfelbaum wrote: On 08/24/2018 11:53 AM, Jing Liu wrote: Enable the firmware recognizing RedHat legacy PCI bridge device ID, so QEMU can reserve additional PCI bridge resource capability. Change the debug level lower to 3 when it is non-QEMU bridge.

[SeaBIOS] hotplug failure issue on pci-bridge

2018-07-10 Thread Liu, Jing2
Hi, Recently, we tried some hotplug issues. The case is: when hotplug a device (e.g. iGPU) onto pci-bridge after guest booting up, guest reports "BAR 2: no space for [mem size 0x4000 64bit pref]" etc. Seabios checks all the devices under the pci-bridge when qemu launching the guest, and

Re: [SeaBIOS] hotplug failure issue on pci-bridge

2018-07-11 Thread Liu, Jing2
Yep, thanks for the advice. But hotplugging on pci-bridge is the actual use case request so we would better solve and fix this. On 7/11/2018 6:38 PM, Laszlo Ersek wrote: On 07/11/18 05:12, Liu, Jing2 wrote: Hi, Recently, we tried some hotplug issues. The case is: when hotplug a device (e.g

Re: [SeaBIOS] [PATCH v3 0/3] pci: resource reserve capability found

2018-09-14 Thread Liu, Jing2
Thanks, Gerd and Kevin! BR, Jing Liu On 9/13/2018 5:10 PM, Gerd Hoffmann wrote: On Mon, Sep 03, 2018 at 05:36:56PM -0400, Kevin O'Connor wrote: On Fri, Aug 24, 2018 at 04:52:58PM +0800, Jing Liu wrote: This patch serial is about QEMU resource reserve capability finding in firmware. Firstly,