Dan Magenheimer
2009-Nov-20 00:32 UTC
[Xen-devel] Testing for domain states (before starting, before restarting, and after "save")
Is there a way (in the hypervisor) to test a domain to see if is created but has not yet executed its first instruction (or has been restored/live-migrated but has not yet executed its first instruction post-restore)? Or to see if it has been stopped in anticipation of a save (or live migrate) and will not execute more instructions unless/until it is restored (or revived on the live-migrate target machine)? I''m writing routines for tsc_mode that assumes each of those conditions and, rather than just comment about it, thought it would be nice to fail if the assumption is incorrect. If not (or if it is too complicated), I''ll just use comments. Thanks, Dan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2009-Nov-20 09:33 UTC
Re: [Xen-devel] Testing for domain states (before starting, before restarting, and after "save")
Hi, At 00:32 +0000 on 20 Nov (1258677171), Dan Magenheimer wrote:> Is there a way (in the hypervisor) to test a domain to see if is > created but has not yet executed its first instruction (or has been > restored/live-migrated but has not yet executed its first instruction > post-restore)?I don''t think that''s explicitly available, but if it''s paused and all its vcpus'' scheduler stats are at zero, that''s probably good enough for the kind of sanity check you''re talking about.> Or to see if it has been stopped in anticipation of a > save (or live migrate) and will not execute more instructions > unless/until it is restored (or revived on the live-migrate target > machine)?That''s easier: it''s shut down with shutdown code suspend. That doesn''t mean it will never run again in this domain, because of the Remus fast-resume path, but it does mean no more instructions executed before some kind of resume. Cheers, Tim.> I''m writing routines for tsc_mode that assumes each of those conditions and, rather than just comment about it, thought it would be nice to fail if the assumption is incorrect. If not (or if it is too complicated), I''ll just use comments. > > Thanks, > Dan >Content-Description: ATT00001.txt> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel