]> xenbits.xensource.com Git - xen.git/commit
x86/hvm: don't unconditionally create a default ioreq server
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 12 Dec 2016 08:49:10 +0000 (09:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 12 Dec 2016 08:49:10 +0000 (09:49 +0100)
commite7dabe59c3239dc9ef9edbc49ed54f754616ebf7
treef4232fe149473577044b0380f78e848178917cf5
parentfd3656422f2dd3b8157907f4da9f239386621759
x86/hvm: don't unconditionally create a default ioreq server

Avoid doing so if the domain is not under construction.

If upstream QEMU is in use then it will explicitly create an ioreq server
rather than implicitly creating the default ioreq server, which is a
side-effect of reading HVM_PARAM_IOREQ_PFN, HVM_PARAM_BUFIOREQ_PFN,
or HVM_PARAM_BUFIOREQ_EVTCHN (as is done by legacy QEMUs).

However, if the domain is subsequently saved/migrated then those parameters
are read and hence the default server will be unnecessarily instantiated.

This patch adds an extra check of the 'creation_finished' flag when those
HVM params are read and will only instantiate the server if the domain is
under construction, which will always be the case when QEMU is invoked.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c