]> xenbits.xensource.com Git - people/royger/xen.git/commit
x86/hvm: stop passing explicit domid to hvm_create_ioreq_server()
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 20 Mar 2018 18:05:22 +0000 (18:05 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 21 Mar 2018 18:24:50 +0000 (18:24 +0000)
commit9a422c035a880b4472195521d1f877a4e733bf8b
treed33737c6997881f4291445b0f187b692fd08ed9c
parentf5eff146efb72ee8724fd13073e6c796fc8d0701
x86/hvm: stop passing explicit domid to hvm_create_ioreq_server()

Only in the legacy 'default server' case do we pass anything other than
current->domain->domain_id, and in that case we pass the value of
HVM_PARAM_DM_DOMAIN.

The only known user of HVM_PARAM_DM_DOMAIN is qemu-trad (and only when
compiled as a stubdom), which always sets it to DOMID_SELF (ignoring the
return value of xc_set_hvm_param) [1] and never reads it.

This patch:

- Disallows setting HVM_PARAM_DM_DOMAIN to anything other than DOMID_SELF
  and removes the call to hvm_set_dm_domain().
- Stops passing a domid to hvm_create_ioreq_server()
- Changes hvm_create_ioreq_server() to always set
  current->domain->domain_id as the domid of the emulating domain
- Removes the hvm_set_dm_domain() implementation since it is no longer
  needed.

[1] http://xenbits.xen.org/gitweb/?p=qemu-xen-traditional.git;a=blob;f=hw/xen_machine_fv.c;#l299

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/dm.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/ioreq.c
xen/include/asm-x86/hvm/ioreq.h