Ke, Liping
2009-Apr-17 02:32 UTC
[Xen-devel] HVM with old kernel(rh5.1) assigned device resume failure because of restore sequence
Hi, Yuji Shimada Latest, QA reported that on rh5.1, if we enable pci_power_mgmt, after hvm resume, assigned e1000e 82572EI Gigabit network card could not resume back. (the card has pm cap) We root cause this bug is caused by the incorrect cooperation of old kernel/qemu pci register restore sequence during D3hot->D0. Older kernel(before 2.6.18 in rh5.1) cmd register is restored before Bar register, it will cause qemu passthrough pt_mapping_bars failure. (In qemu, pt_bar_mappings is done in pt_cmd_reg_write. pt_bar_reg_write is not performed yet, then pt_bar_mappings can''t map the correct address) Latest kernel (after 2.6.2X) has no such problem. (When do pt_bar_mapping in pt_cmd_reg_write, pt_bar_reg_write is already done). I pasted corrected Qemu(2.6.29) log (line 660) and uncorrected Qemu(rh5.1) Log (Line 554) and add [ criping XXX] comments for your reference. For supporting old kernel, could we consider to change the pt_bar_mappings sequence in Qemu? We''d like to have your opinions first. Thanks a lot for your help! Criping _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yuji Shimada
2009-Apr-17 06:58 UTC
Re: [Xen-devel] HVM with old kernel(rh5.1) assigned device resume failure because of restore sequence
On Fri, 17 Apr 2009 10:32:31 +0800 "Ke, Liping" <liping.ke@intel.com> wrote:> Older kernel(before 2.6.18 in rh5.1) cmd register is restored before Bar register, > it will cause qemu passthrough pt_mapping_bars failure. > (In qemu, pt_bar_mappings is done in pt_cmd_reg_write. pt_bar_reg_write is not performed > yet, then pt_bar_mappings can''t map the correct address) > Latest kernel (after 2.6.2X) has no such problem. (When do pt_bar_mapping in pt_cmd_reg_write, > pt_bar_reg_write is already done). > > I pasted corrected Qemu(2.6.29) log (line 660) and uncorrected Qemu(rh5.1) Log (Line 554) > and add [ criping XXX] comments for your reference. > For supporting old kernel, could we consider to change the pt_bar_mappings sequence in Qemu? > We''d like to have your opinions first.The following modification is required. When pt_bar_reg_write is called, it should call pt_bar_mapping if memory space bit or IO space bit in command register is ''1''. As a result IO/memory resource is mapped at the correct address. Thanks, -- Yuji Shimada _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ke, Liping
2009-Apr-17 07:06 UTC
RE: [Xen-devel] HVM with old kernel(rh5.1) assigned device resume failure because of restore sequence
Hi, Shimada OK, thanks a lot. It would be nice. So you will send out the small fix or you want us to make the patch? Regards, Criping Yuji Shimada wrote:> On Fri, 17 Apr 2009 10:32:31 +0800 > "Ke, Liping" <liping.ke@intel.com> wrote: > >> Older kernel(before 2.6.18 in rh5.1) cmd register is restored before >> Bar register, >> it will cause qemu passthrough pt_mapping_bars failure. >> (In qemu, pt_bar_mappings is done in pt_cmd_reg_write. >> pt_bar_reg_write is not performed >> yet, then pt_bar_mappings can''t map the correct address) >> Latest kernel (after 2.6.2X) has no such problem. (When do >> pt_bar_mapping in pt_cmd_reg_write, pt_bar_reg_write is already >> done). >> >> I pasted corrected Qemu(2.6.29) log (line 660) and uncorrected >> Qemu(rh5.1) Log (Line 554) >> and add [ criping XXX] comments for your reference. >> For supporting old kernel, could we consider to change the >> pt_bar_mappings sequence in Qemu? We''d like to have your opinions >> first. > > The following modification is required. > > When pt_bar_reg_write is called, it should call pt_bar_mapping if > memory space bit or IO space bit in command register is ''1''. > > As a result IO/memory resource is mapped at the correct address. > > Thanks,_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yuji Shimada
2009-Apr-17 08:19 UTC
Re: [Xen-devel] HVM with old kernel(rh5.1) assigned device resume failure because of restore sequence
Hi, Ke I would like you to make the patch if you can. Thanks, -- Yuji Shimada On Fri, 17 Apr 2009 15:06:55 +0800 "Ke, Liping" <liping.ke@intel.com> wrote:> Hi, Shimada > OK, thanks a lot. It would be nice. > So you will send out the small fix or you want us to make the patch? > Regards, > Criping_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ke, Liping
2009-Apr-17 08:23 UTC
RE: [Xen-devel] HVM with old kernel(rh5.1) assigned device resume failure because of restore sequence
OK, we''ll send it out a little later. Thanks& Regards, criping Yuji Shimada wrote:> Hi, Ke > > I would like you to make the patch if you can. > > Thanks, > >> Hi, Shimada >> OK, thanks a lot. It would be nice. >> So you will send out the small fix or you want us to make the patch? >> Regards, Criping_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel