Hi,
Doi.Tsunehisa@xxxxxxxxxxxxxx wrote:
> Sorry!! I refered old version of x86 code. Currently, it modified.
> I will correct, soon.
I modified it.
Thanks,
- Tsunehisa Doi
# HG changeset patch
# User Doi.Tsunehisa@xxxxxxxxxxxxxx
# Node ID 39feb5061f88cefe00548879459c01e547bc9eec
# Parent 571022d5afa2627e0662f5916edb947d362eeeef
append HYPERVISOR_hvm_op for IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>
diff -r 571022d5afa2 -r 39feb5061f88 xen/arch/ia64/vmx/vmx_hypercall.c
--- a/xen/arch/ia64/vmx/vmx_hypercall.c Mon Aug 07 14:11:58 2006 -0600
+++ b/xen/arch/ia64/vmx/vmx_hypercall.c Tue Aug 08 12:26:02 2006 +0900
@@ -35,4 +35,53 @@
#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 571022d5afa2 -r 39feb5061f88 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c Mon Aug 07 14:11:58 2006 -0600
+++ b/xen/arch/ia64/xen/hypercall.c Tue Aug 08 12:26:02 2006 +0900
@@ -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 571022d5afa2 -r 39feb5061f88 xen/include/asm-ia64/vmx_platform.h
--- a/xen/include/asm-ia64/vmx_platform.h Mon Aug 07 14:11:58 2006 -0600
+++ b/xen/include/asm-ia64/vmx_platform.h Tue Aug 08 12:26:02 2006 +0900
@@ -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-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|