From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwCeN-0004KG-2B for qemu-devel@nongnu.org; Mon, 08 Jul 2013 10:42:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwCeI-0003bi-R5 for qemu-devel@nongnu.org; Mon, 08 Jul 2013 10:42:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwCeI-0003b4-IT for qemu-devel@nongnu.org; Mon, 08 Jul 2013 10:42:42 -0400 Message-ID: <51DAD064.1020209@redhat.com> Date: Mon, 08 Jul 2013 16:44:52 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 10/11] qemu-ga: Install Windows VSS provider on `qemu-ga -s install' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tomoki Sekiyama Cc: "libaiqing@huawei.com" , "ghammer@redhat.com" , "stefanha@gmail.com" , "qemu-devel@nongnu.org" , "mdroth@linux.vnet.ibm.com" , "vrozenfe@redhat.com" , "lcapitulino@redhat.com" , Paolo Bonzini , Seiji Aguchi , "areis@redhat.com" On 07/08/13 16:16, Tomoki Sekiyama wrote: > On 7/8/13 9:58 , "Laszlo Ersek" wrote: > >> On 07/05/13 19:06, Tomoki Sekiyama wrote: >>> On 7/4/13 8:54 , "Paolo Bonzini" wrote: >>> >>>> Il 03/07/2013 18:19, Tomoki Sekiyama ha scritto: >>>>> On 7/3/13 11:58 , "Paolo Bonzini" wrote: >>>>> >>>>>> Il 03/07/2013 17:49, Tomoki Sekiyama ha scritto: >>>>>>> - return ga_install_service(path, log_filepath, >>>>>>> fixed_state_dir); >>>>>>> + if (ga_install_vss_provider()) { >>>>>>> + return EXIT_FAILURE; >>>>>>> + } >>>>>>> + if (ga_install_service(path, log_filepath, >>>>>>> fixed_state_dir)) { >>>>>>> + ga_uninstall_vss_provider(); >>>>>>> + return EXIT_FAILURE; >>>>>>> + } >>>>>>> + return 0; >>>>>>> } else if (strcmp(service, "uninstall") == 0) { >>>>>>> + ga_uninstall_vss_provider(); >>>>>>> return ga_uninstall_service(); >>>>>> >>>>>> I think this shouldn't be a hard failure. Only the freeze/thaw >>>>>> commands >>>>>> should fail. >>>>>> >>>>>> Paolo >>>>> >>>>> Do you mean that qemu-ga should work without qga-provider.dll etc. >>>>> even if it is configured --with-vss-sdk ? >>>> >>>> Yes, and I'm even wondering if we should move all VSS code to a DLL >>>> (provider and requestor---they are very tied to each other anyway >>>> because of hEventFrozen/hEventThaw), and have qemu-ga simply look for >>>> qga-provider.dll dropped into the executable directory. >>>> >>>> Then qemu-ga can look for it even if it is not configured >>>> --with-vss-sdk. >>> >>> Hm, that sounds reasonable. >>> >>> I will try on moving the requestor into qga-provider.dll at next >>> iteration. >> >> Is it OK with you if I skip reviewing v5 then? If the v5->v6 >> reorganization is going to be intrusive (ie. I won't be able to do a >> patch-by-patch interdiff), then I'd prefer skipping v5. > > Yes. I appreciate your review for the next version. > > It actually requires some rework especially in "Error" handling in > the requester, because I'd not like to link glib and some other dlls > to VSS system service.... May be need to give function pointer of > error_set_win32() to the dll, or something like that. I haven't given much thought yet to extracting the requestor side into a DLL as well (I did read your discussion with Paolo, but that was it). Should one DLL contain both the requestor and the provider? I think that would not be very pure, the DLL registered as VSS provider would carry a lot of cruft. Vice versa, when you load the same DLL into qemu-ga for the requestor role, then the provider parts are cruft. OTOH two DLLs would be overly complex... Hopefully windows loads the DLL with an mmap()-like mechanism, and the two instances of the one common-purpose DLL will be shared im memory. Laszlo