CA-94335: Dom0 should be managed in xenopsd before the record is created.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Open the log file as append rather than write. This saves truncating it in the case of a localhost migrate, loosing the save half of the log.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Remove use of syslog from the C bindings, replacing them with writes to stdout and stderr. The parent of the xenguest fork is already capturing stdout and stderr from libxc, and will pass them on to syslog. This way, the syslog()'d messages will also find their way into xenguest.$DOMID.log.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Implement the save/restore framework for propagaing the Windows Generation ID.

Xenguest being linked directly agianst libxc, the changes are confined to
suitable #ifdefs to allow compilation against multiple versions of Xen.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Don't call VM.stat every time we receive a xapi event on a VM.

VM.stat is expensive as it does lots of xenstore reads - just check that
the VM exists in xenopsd's database instead.

Signed-off-by: John Else <john.else@citrix.com>
Dump xenopsd updates every time we push an update.

Signed-off-by: John Else <john.else@citrix.com>
Sort events properly.

Signed-off-by: John Else <john.else@citrix.com>
CA-87377: Snapshot updates state in inject_barrier

Xapi then receives updates including barrier information from the
updates.get API call. Xapi processes the barriers first, as these
have threads waiting on them.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-87377: Add barriers info to xn diagnostics

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #1062 from vbmithr/CA-87377

CA-87377
Merge pull request #1063 from andyhhp/xenguest-genid

Xenguest Generation ID support for save/restore
Merge pull request #1006 from jeromemaloberti/CA-94335-bis

CA-94335: Dom0 should be managed in xenopsd before the record is created.