From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: Re: [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time Date: Fri, 12 Jun 2015 23:04:39 +0800 Message-ID: <557AF507.1030002@gmail.com> References: <1433734997-26570-1-git-send-email-yanghy@cn.fujitsu.com> <5577FE03.1010703@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD0259432A8@AMSPEX01CL01.citrite.net> <55781782.3060502@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02594332D@AMSPEX01CL01.citrite.net> <55782188.8090306@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02594346F@AMSPEX01CL01.citrite.net> <5578E0C3.8090606@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD025944B83@AMSPEX01CL01.citrite.net> <55794B5C.8010705@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD025944F59@AMSPEX01CL01.citrite.net> <55798613.4050502@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD0259459AF@AMSPEX01CL01.citrite.net> <557A506A.70203@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD025946807@AMSPEX01CL01.citrite.net> <557AB3C8.8020102@ cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD025946F59@AMSPEX01CL01.citrite.net> <557ABDFD.2080904@cn.fujitsu.com> <9AAE0902D5BC7E449B7C8E4E778ABCD025947017@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD025947017@AMSPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant , Wen Congyang , Yang Hongyang , Andrew Cooper , "xen-devel@lists.xen.org" Cc: Wei Liu , Ian Campbell , "guijianfeng@cn.fujitsu.com" , "yunhong.jiang@intel.com" , Eddie Dong , "rshriram@cs.ubc.ca" , Ian Jackson List-Id: xen-devel@lists.xenproject.org At 2015/6/12 19:48, Paul Durrant Wrote: >> -----Original Message----- >> From: Wen Congyang [mailto:wency@cn.fujitsu.com] >> Sent: 12 June 2015 12:10 >> To: Paul Durrant; Yang Hongyang; Andrew Cooper; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbell; guijianfeng@cn.fujitsu.com; >> yunhong.jiang@intel.com; Eddie Dong; rshriram@cs.ubc.ca; Ian Jackson >> Subject: Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq >> page only one time >> >> On 06/12/2015 06:54 PM, Paul Durrant wrote: >>>> -----Original Message----- >>>> From: Wen Congyang [mailto:wency@cn.fujitsu.com] >>>> Sent: 12 June 2015 11:26 >>>> To: Paul Durrant; Yang Hongyang; Andrew Cooper; xen- >> devel@lists.xen.org >>>> Cc: Wei Liu; Ian Campbell; guijianfeng@cn.fujitsu.com; >>>> yunhong.jiang@intel.com; Eddie Dong; rshriram@cs.ubc.ca; Ian Jackson >>>> Subject: Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero >> ioreq >>>> page only one time >>>> >>>> On 06/12/2015 03:41 PM, Paul Durrant wrote: >>>>>> -----Original Message----- >>>>>> From: Wen Congyang [mailto:wency@cn.fujitsu.com] >>>>>> Sent: 12 June 2015 04:22 >>>>>> To: Paul Durrant; Yang Hongyang; Andrew Cooper; xen- >>>> devel@lists.xen.org >>>>>> Cc: Wei Liu; Ian Campbell; guijianfeng@cn.fujitsu.com; >>>>>> yunhong.jiang@intel.com; Eddie Dong; rshriram@cs.ubc.ca; Ian Jackson >>>>>> Subject: Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero >>>> ioreq >>>>>> page only one time >>>>>> >>>>>> On 06/11/2015 09:25 PM, Paul Durrant wrote: >>>>>>>> -----Original Message----- >>>>>>>> From: Yang Hongyang [mailto:yanghy@cn.fujitsu.com] >>>>>>>> Sent: 11 June 2015 13:59 >>>>>>>> To: Paul Durrant; Wen Congyang; Andrew Cooper; xen- >>>>>> devel@lists.xen.org >>>>>>>> Cc: Wei Liu; Ian Campbell; guijianfeng@cn.fujitsu.com; >>>>>>>> yunhong.jiang@intel.com; Eddie Dong; rshriram@cs.ubc.ca; Ian >> Jackson >>>>>>>> Subject: Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: >> zero >>>>>> ioreq >>>>>>>> page only one time >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 06/11/2015 06:20 PM, Paul Durrant wrote: >>>>>>>>>> -----Original Message----- >>>>>>>>>> From: Wen Congyang [mailto:wency@cn.fujitsu.com] >>>>>>>>>> Sent: 11 June 2015 09:48 >>>>>>>>>> To: Paul Durrant; Andrew Cooper; Yang Hongyang; xen- >>>>>>>> devel@lists.xen.org >>>>>>>>>> Cc: Wei Liu; Ian Campbell; guijianfeng@cn.fujitsu.com; >>>>>>>> [...] >>>>>>>>> >>>>>>>>>> >>>>>>>>>> In our implementation, we don't start a new emulator. The codes >>>> can >>>>>>>> work, >>>>>>>>>> but some bugs may be not triggered. >>>>>>>>>> >>>>>>>>> >>>>>>>>> How do you reconcile the incoming QEMU save record with the >>>> running >>>>>>>> emulator state? >>>>>>>> >>>>>>>> We introduce a qmp command "xen-load-devices- >>>>>>>> state"(libxl__qmp_restore) which >>>>>>>> can restore the emulator state. The step of resotre emulator state at >> a >>>>>>>> checkpoint is: >>>>>>>> >>>>>>>> 1. libxl__qmp_stop -> vm_stop() in qemu >>>>>>>> 2. libxl__qmp_restore -> load_vmstate() in qemu >>>>>>>> 3. libxl__qmp_resume -> vm_start() in qemu >>>>>>>> >>>>>>> >>>>>>> Ok, that sounds like the ideal time to hook back into Xen by creating a >>>> new >>>>>> ioreq server. >>>>>> >>>>>> I have some questions about ioreq server: >>>>>> 1. If we use old version xen and newest version qemu, is it OK? Is >> default >>>>>> ioreq server created when the guest is created. >>>> xen_create_ioreq_server() >>>>>> does >>>>>> nothing, and xen_get_ioreq_server_info() will get the default ioreq >>>> server >>>>>> information. >>>>>> Is it right? >>>>> >>>>> No. It's not compatible in that direction. A new Xen will work with an old >>>> QEMU but not the other way round. >> >> If the xen is newest, and qemu is old, how is the default ioreq server created >> for the emulator? Will the old qemu call xc_get_hvm_param(), and the >> hypervisor >> then creates a default ioreq server? >> get is a 'readonly' operation, and creating the default ioreq server in it is >> very strange. >> > > Might be strange, but that's the way it's done. If I only want to get the default ioreq server pfn, and don't want to create the default ioreq server, how can I do it? Thanks Wen Congyang > >>>>> >>>>>> 2. Why we create a default ioreq server when getting the hvm param if >>>> there >>>>>> is already a >>>>>> not default ioreq server? >>>>> >>>>> If something reads the 'legacy' HVM params then that is Xen's trigger to >>>> create the default server. Any 'new' emulator should be using the ioreq >>>> server hypercalls so the default server will not be needed. >>>> >>>> If there are two ioreq servers: default ioreq server, and a ioreq server >>>> created by emulator. The guest can work it correctly in >>>> this case? >>> >>> You mean a secondary emulator? Yes, that's why there is the notion of >> default ioreq server... to allow a secondary emulator to be used even when >> an old QEMU is in use. >> >> No, only one emulator. Can we run more than one emulator for one hvm >> guest? How >> to do it? >> > > Yes, more than one emulator can run. There's nothing in libxl to do it, but we do it in XenServer using XAPI. > >>> >>>> Is there any application(not emulator) that uses the libxenctrl >>>> directly? >>>> >>> >>> What do you mean by application? Toolstacks may use libxenctrl. >> >> For example: libvirt. I know it uses libxl now. Is there any similar application >> which uses libxenctrl. > > Well, XAPI uses it for one. > > Paul > >> >> Thanks >> Wen Congyang >> >>> >>> Paul >>> >>>> Thanks >>>> Wen Congyang >>>> >>>>> >>>>>> 3. In the far end, we will clear the ioreq page, and this ioreq page is >> used >>>> for >>>>>> default >>>>>> ioreq server, is it right? >>>>> >>>>> Yes, AFAIK it's only the 'magic' pages that get cleared at the far end - and >>>> that includes the default server pages. Other ioreq servers will have their >>>> pages cleared on re-insertion to the P2M at the source end when the >> server >>>> is disabled. >>>>> >>>>> Paul >>>>> >>>>>> >>>>>> Thanks >>>>>> Wen Congyang >>>>>> >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>>>> >>>>>>>>> Paul >>>>>>>>> >>>>>>>>>> Thanks >>>>>>>>>> Wen Congyang >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Paul >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks >>>>>>>>>>>> Wen Congyang >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Paul >>>>>>>>>>>>> >>>>>>>>>>>>>> We will set to the guest to a new state, the old state should >> be >>>>>>>>>> dropped. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>> Wen Congyang >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Paul >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>> Wen Congyang >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Paul >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>>> Wen Congyang >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> ~Andrew >>>>>>>>>>>>>>>>>>> . >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> . >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> . >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >> _______________________________________________ >>>>>>>>>>>>>> Xen-devel mailing list >>>>>>>>>>>>>> Xen-devel@lists.xen.org >>>>>>>>>>>>>> http://lists.xen.org/xen-devel >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Xen-devel mailing list >>>>>>>>>>>>> Xen-devel@lists.xen.org >>>>>>>>>>>>> http://lists.xen.org/xen-devel >>>>>>>>>>>>> . >>>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Xen-devel mailing list >>>>>>>>> Xen-devel@lists.xen.org >>>>>>>>> http://lists.xen.org/xen-devel >>>>>>>>> . >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks, >>>>>>>> Yang. >>>>>>> . >>>>>>> >>>>> >>>>> . >>>>> >>> >>> . >>> > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >