x86/hvm/ioreq: defer mapping gfns until they are actually requested
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 9 Aug 2017 15:22:35 +0000 (16:22 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 3 Apr 2018 16:00:35 +0000 (17:00 +0100)
commit3fefa0f15d0fa5c0688f9c03a91a9ae3be16b4bf
treee6250e8e56de86430c2f7b911056158b708ffd32
parent5997aeb14a633f36fc4c19bbfe1e3c338975347f
x86/hvm/ioreq: defer mapping gfns until they are actually requested

A subsequent patch will introduce a new scheme to allow an emulator to
map ioreq server pages directly from Xen rather than the guest P2M.

This patch lays the groundwork for that change by deferring mapping of
gfns until their values are requested by an emulator. To that end, the
pad field of the xen_dm_op_get_ioreq_server_info structure is re-purposed
to a flags field and new flag, XEN_DMOP_no_gfns, defined which modifies the
behaviour of XEN_DMOP_get_ioreq_server_info to allow the caller to avoid
requesting the gfn values.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/libs/devicemodel/core.c
tools/libs/devicemodel/include/xendevicemodel.h
xen/arch/x86/hvm/dm.c
xen/arch/x86/hvm/ioreq.c
xen/include/asm-x86/hvm/domain.h
xen/include/public/hvm/dm_op.h