debuggers.hg
changeset 11080:111936ef4291
[IA64] catch up new hypercall HYPERVISR_hvm_op for IPF (libxc)
append xc_set_hvm_param for IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
append xc_set_hvm_param for IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
author | awilliam@xenbuild.aw |
---|---|
date | Wed Aug 09 10:04:43 2006 -0600 (2006-08-09) |
parents | d735526b02ec |
children | fc6c3d866477 |
files | tools/libxc/ia64/xc_ia64_hvm_build.c |
line diff
1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c Wed Aug 09 09:59:52 2006 -0600 1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c Wed Aug 09 10:04:43 2006 -0600 1.3 @@ -6,6 +6,7 @@ 1.4 #include <zlib.h> 1.5 #include "xen/arch-ia64.h" 1.6 #include <xen/hvm/ioreq.h> 1.7 +#include <xen/hvm/params.h> 1.8 1.9 static int 1.10 xc_ia64_copy_to_domain_pages(int xc_handle, uint32_t domid, void* src_page, 1.11 @@ -40,6 +41,31 @@ error_out: 1.12 return -1; 1.13 } 1.14 1.15 +static void 1.16 +xc_set_hvm_param(int handle, domid_t dom, int param, unsigned long value) 1.17 +{ 1.18 + DECLARE_HYPERCALL; 1.19 + xen_hvm_param_t arg; 1.20 + int rc; 1.21 + 1.22 + hypercall.op = __HYPERVISOR_hvm_op; 1.23 + hypercall.arg[0] = HVMOP_set_param; 1.24 + hypercall.arg[1] = (unsigned long)&arg; 1.25 + 1.26 + arg.domid = dom; 1.27 + arg.index = param; 1.28 + arg.value = value; 1.29 + 1.30 + if (mlock(&arg, sizeof(arg)) != 0) { 1.31 + PERROR("Could not lock memory for set parameter"); 1.32 + return; 1.33 + } 1.34 + 1.35 + rc = do_xen_hypercall(handle, &hypercall); 1.36 + safe_munlock(&arg, sizeof(arg)); 1.37 + if (rc < 0) 1.38 + PERROR("set HVM parameter failed (%d)", rc); 1.39 +} 1.40 1.41 #define HOB_SIGNATURE 0x3436474953424f48 // "HOBSIG64" 1.42 #define GFW_HOB_START ((4UL<<30)-(14UL<<20)) // 4G - 14M 1.43 @@ -568,6 +594,10 @@ setup_guest(int xc_handle, uint32_t dom, 1.44 goto error_out; 1.45 } 1.46 1.47 + xc_set_hvm_param(xc_handle, dom, 1.48 + HVM_PARAM_STORE_PFN, STORE_PAGE_START>>PAGE_SHIFT); 1.49 + xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_EVTCHN, store_evtchn); 1.50 + 1.51 *store_mfn = page_array[1]; 1.52 sp = (shared_iopage_t *)xc_map_foreign_range(xc_handle, dom, 1.53 PAGE_SIZE, PROT_READ|PROT_WRITE, page_array[0]);