]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
x86/HVM: differentiate IO/mem resources tracked by ioreq server
authorShuai Ruan <shuai.ruan@linux.intel.com>
Fri, 29 Jan 2016 16:49:11 +0000 (17:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 29 Jan 2016 16:49:11 +0000 (17:49 +0100)
commitf5a32c5b8eacbcd727939c9b4d2d98cf619bcbd6
treecd66e0cfb85659dd0eefa342cd27d247ba8f764f
parenta9da09b8646dac7ce2b85e9a216f1566defc2196
x86/HVM: differentiate IO/mem resources tracked by ioreq server

Currently in ioreq server, guest write-protected ram pages are
tracked in the same rangeset with device mmio resources. Yet
unlike device mmio, which can be in big chunks, the guest write-
protected pages may be discrete ranges with 4K bytes each. This
patch uses a seperate rangeset for the guest ram pages.

To differentiate the ioreq type between the write-protected memory
ranges and the mmio ranges when selecting an ioreq server, the p2m
type is retrieved by calling get_page_from_gfn(). And we do not
need to worry about the p2m type change during the ioreq selection
process.

Note: Previously, a new hypercall or subop was suggested to map
write-protected pages into ioreq server. However, it turned out
handler of this new hypercall would be almost the same with the
existing pair - HVMOP_[un]map_io_range_to_ioreq_server, and there's
already a type parameter in this hypercall. So no new hypercall
defined, only a new type is introduced.

Signed-off-by: Shuai Ruan <shuai.ruan@linux.intel.com>
Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_domain.c
xen/arch/x86/hvm/hvm.c
xen/include/asm-x86/hvm/domain.h
xen/include/public/hvm/hvm_op.h