In xen-all.c there are unneeded dependencies on xen-legacy-backend.c:
- xen_init() uses xen_pv_printf() to report errors, but it does not
provide a pointer to the struct XenLegacyDevice, so it is kind of
useless, we can use standard error_report() instead.
- xen-all.c has function xenstore_record_dm_state() which uses global
variable "xenstore" defined and initialized in xen-legacy-backend.c
It is used exactly once, so we can just open a new connection to the
xenstore, update DM state and close connection back.
Those two changes allows us to remove xen-legacy-backend.c at all,
what should be done in the future anyways. But right now this patch
moves us one step close to have QEMU build without legacy Xen
backends.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
In v4:
- New in v4, previous was part of "xen: add option to disable legacy
backends"
- Do not move xenstore global variable from xen-legacy-backend.c,
instead use a local variable.
---
accel/xen/xen-all.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)