[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] catch up new hypercall HYPERVISR_hvm_op for IPF
# HG changeset patch # User awilliam@xxxxxxxxxxx # Node ID d735526b02ec060cbe98ef93119f60898c174e7b # Parent 54550e85f25a23759e48141af48dde1626d5ae0c [IA64] catch up new hypercall HYPERVISR_hvm_op for IPF append HYPERVISOR_hvm_op for IPF Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx> Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx> --- xen/arch/ia64/vmx/vmx_hypercall.c | 48 +++++++++++++++++++++++++++++++++++- xen/arch/ia64/xen/hypercall.c | 2 - xen/include/asm-ia64/vmx_platform.h | 2 + 3 files changed, 50 insertions(+), 2 deletions(-) diff -r 54550e85f25a -r d735526b02ec xen/arch/ia64/vmx/vmx_hypercall.c --- a/xen/arch/ia64/vmx/vmx_hypercall.c Wed Aug 09 08:34:06 2006 -0600 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c Wed Aug 09 09:59:52 2006 -0600 @@ -35,4 +35,50 @@ #include <asm/dom_fw.h> #include <xen/domain.h> -/* This file will include the hypercall code for VT-i domain, soon. */ +long +do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg) +{ + long rc = 0; + + switch (op) { + case HVMOP_set_param: + case HVMOP_get_param: + { + struct xen_hvm_param a; + struct domain *d; + + if (copy_from_guest(&a, arg, 1)) + return -EFAULT; + + if (a.index > HVM_NR_PARAMS) + return -EINVAL; + + if (a.domid == DOMID_SELF) { + get_knownalive_domain(current->domain); + d = current->domain; + } + else if (IS_PRIV(current->domain)) { + d = find_domain_by_id(a.domid); + if (!d) + return -ESRCH; + } + else + return -EPERM; + + if (op == HVMOP_set_param) { + rc = 0; + d->arch.hvm_domain.params[a.index] = a.value; + } + else + rc = d->arch.hvm_domain.params[a.index]; + + put_domain(d); + return rc; + } + + default: + DPRINTK("Bad HVM op %ld.\n", op); + rc = -ENOSYS; + } + return rc; +} diff -r 54550e85f25a -r d735526b02ec xen/arch/ia64/xen/hypercall.c --- a/xen/arch/ia64/xen/hypercall.c Wed Aug 09 08:34:06 2006 -0600 +++ b/xen/arch/ia64/xen/hypercall.c Wed Aug 09 09:59:52 2006 -0600 @@ -70,7 +70,7 @@ hypercall_t ia64_hypercall_table[] = (hypercall_t)do_ni_hypercall, /* */ (hypercall_t)do_event_channel_op, (hypercall_t)do_physdev_op, - (hypercall_t)do_ni_hypercall, /* */ + (hypercall_t)do_hvm_op, /* */ (hypercall_t)do_ni_hypercall, /* */ /* 35 */ (hypercall_t)do_ni_hypercall, /* */ (hypercall_t)do_ni_hypercall, /* */ diff -r 54550e85f25a -r d735526b02ec xen/include/asm-ia64/vmx_platform.h --- a/xen/include/asm-ia64/vmx_platform.h Wed Aug 09 08:34:06 2006 -0600 +++ b/xen/include/asm-ia64/vmx_platform.h Wed Aug 09 09:59:52 2006 -0600 @@ -20,6 +20,7 @@ #define __ASM_IA64_VMX_PLATFORM_H__ #include <public/xen.h> +#include <public/hvm/params.h> #include <public/arch-ia64.h> #include <asm/hvm/vioapic.h> struct mmio_list; @@ -27,6 +28,7 @@ typedef struct virtual_platform_def { unsigned long shared_page_va; unsigned long pib_base; unsigned char xtp; + unsigned long params[HVM_NR_PARAMS]; struct mmio_list *mmio; /* One IOSAPIC now... */ struct hvm_vioapic vioapic; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |