[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] cleanup the hypercall handling code for VT-i domain
# HG changeset patch # User awilliam@xxxxxxxxxxx # Node ID b94d43606bcd7328d86d92194b8b24b332e5f0bf # Parent 561df7d9cecc92d08bcc34ed45880062b06dc2e6 [IA64] cleanup the hypercall handling code for VT-i domain Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx> Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx> Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx> --- xen/arch/ia64/vmx/vmx_hypercall.c | 178 -------------------------------------- xen/arch/ia64/vmx/vmx_ivt.S | 68 -------------- 2 files changed, 2 insertions(+), 244 deletions(-) diff -r 561df7d9cecc -r b94d43606bcd xen/arch/ia64/vmx/vmx_hypercall.c --- a/xen/arch/ia64/vmx/vmx_hypercall.c Wed Aug 02 15:09:56 2006 -0600 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c Thu Aug 03 10:38:04 2006 -0600 @@ -35,180 +35,4 @@ #include <asm/dom_fw.h> #include <xen/domain.h> -extern long do_sched_op_compat(int cmd, unsigned long arg); - -void hyper_not_support(void) -{ - VCPU *vcpu=current; - vcpu_set_gr(vcpu, 8, -1, 0); - vmx_vcpu_increment_iip(vcpu); -} - -void hyper_mmu_update(void) -{ - VCPU *vcpu=current; - u64 r32,r33,r34,r35,ret; - vcpu_get_gr_nat(vcpu,16,&r32); - vcpu_get_gr_nat(vcpu,17,&r33); - vcpu_get_gr_nat(vcpu,18,&r34); - vcpu_get_gr_nat(vcpu,19,&r35); - ret=vmx_do_mmu_update((mmu_update_t*)r32,r33,(u64 *)r34,r35); - vcpu_set_gr(vcpu, 8, ret, 0); - vmx_vcpu_increment_iip(vcpu); -} - -void hyper_dom_mem_op(void) -{ - VCPU *vcpu=current; - u64 r32,r33,r34,r35,r36; - u64 ret; - vcpu_get_gr_nat(vcpu,16,&r32); - vcpu_get_gr_nat(vcpu,17,&r33); - vcpu_get_gr_nat(vcpu,18,&r34); - vcpu_get_gr_nat(vcpu,19,&r35); - vcpu_get_gr_nat(vcpu,20,&r36); -// ret=do_dom_mem_op(r32,(u64 *)r33,r34,r35,r36); - ret = 0; - printf("do_dom_mem return value: %lx\n", ret); - vcpu_set_gr(vcpu, 8, ret, 0); - - /* Hard to define a special return value to indicate hypercall restart. - * So just add a new mark, which is SMP safe - */ - if (vcpu->arch.hypercall_continuation == 1) - vcpu->arch.hypercall_continuation = 0; - else - vmx_vcpu_increment_iip(vcpu); -} - - -void hyper_sched_op_compat(void) -{ - VCPU *vcpu=current; - u64 r32,r33,ret; - vcpu_get_gr_nat(vcpu,16,&r32); - vcpu_get_gr_nat(vcpu,17,&r33); - ret=do_sched_op_compat(r32,r33); - vcpu_set_gr(vcpu, 8, ret, 0); - - vmx_vcpu_increment_iip(vcpu); -} - -void hyper_dom0_op(void) -{ - VCPU *vcpu=current; - u64 r32,ret; - vcpu_get_gr_nat(vcpu,16,&r32); - ret=do_dom0_op(guest_handle_from_ptr(r32, dom0_op_t)); - vcpu_set_gr(vcpu, 8, ret, 0); - - vmx_vcpu_increment_iip(vcpu); -} - -void hyper_event_channel_op_compat(void) -{ - VCPU *vcpu=current; - u64 r32,ret; - vcpu_get_gr_nat(vcpu,16,&r32); - ret=do_event_channel_op_compat(guest_handle_from_ptr(r32, evtchn_op_t)); - vcpu_set_gr(vcpu, 8, ret, 0); - vmx_vcpu_increment_iip(vcpu); -} - -void hyper_xen_version(void) -{ - VCPU *vcpu=current; - u64 r32,r33,ret; - vcpu_get_gr_nat(vcpu,16,&r32); - vcpu_get_gr_nat(vcpu,17,&r33); - ret=do_xen_version((int )r32,guest_handle_from_ptr(r33, void)); - vcpu_set_gr(vcpu, 8, ret, 0); - vmx_vcpu_increment_iip(vcpu); -} -/* -static int do_lock_page(VCPU *vcpu, u64 va, u64 lock) -{ - ia64_rr rr; - thash_cb_t *hcb; - hcb = vmx_vcpu_get_vtlb(vcpu); - rr = vmx_vcpu_rr(vcpu, va); - return thash_lock_tc(hcb, va ,1U<<rr.ps, rr.rid, DSIDE_TLB, lock); -} - */ -/* - * Lock guest page in vTLB, so that it's not relinquished by recycle - * session when HV is servicing that hypercall. - */ - -/* -void hyper_lock_page(void) -{ -//TODO: - VCPU *vcpu=current; - u64 va,lock, ret; - vcpu_get_gr_nat(vcpu,16,&va); - vcpu_get_gr_nat(vcpu,17,&lock); - ret=do_lock_page(vcpu, va, lock); - vcpu_set_gr(vcpu, 8, ret, 0); - - vmx_vcpu_increment_iip(vcpu); -} - */ - -static int do_set_shared_page(VCPU *vcpu, u64 gpa) -{ - u64 o_info; - struct domain *d = vcpu->domain; - struct vcpu *v; - struct page_info *page; - if(vcpu->domain!=dom0) - return -EPERM; - o_info = (u64)vcpu->domain->shared_info; - again: - d->shared_info= (shared_info_t *)domain_mpa_to_imva(vcpu->domain, gpa); - page = virt_to_page(d->shared_info); - if (get_page(page, d) == 0) - goto again; - - /* Copy existing shared info into new page */ - if (o_info) { - memcpy((void*)d->shared_info, (void*)o_info, PAGE_SIZE); - for_each_vcpu(d, v) { - v->vcpu_info = &d->shared_info->vcpu_info[v->vcpu_id]; - } - /* If original page belongs to xen heap, then relinguish back - * to xen heap. Or else, leave to domain itself to decide. - */ - if (likely(IS_XEN_HEAP_FRAME(virt_to_page(o_info)))) - free_xenheap_page((void *)o_info); - } else - memset(d->shared_info, 0, PAGE_SIZE); - put_page(page); - return 0; -} - -void hyper_set_shared_page(void) -{ - VCPU *vcpu=current; - u64 gpa,ret; - vcpu_get_gr_nat(vcpu,16,&gpa); - - ret=do_set_shared_page(vcpu, gpa); - vcpu_set_gr(vcpu, 8, ret, 0); - - vmx_vcpu_increment_iip(vcpu); -} - -/* -void hyper_grant_table_op(void) -{ - VCPU *vcpu=current; - u64 r32,r33,r34,ret; - vcpu_get_gr_nat(vcpu,16,&r32); - vcpu_get_gr_nat(vcpu,17,&r33); - vcpu_get_gr_nat(vcpu,18,&r34); - - ret=do_grant_table_op((unsigned int)r32, (void *)r33, (unsigned int)r34); - vcpu_set_gr(vcpu, 8, ret, 0); -} -*/ +/* This file will include the hypercall code for VT-i domain, soon. */ diff -r 561df7d9cecc -r b94d43606bcd xen/arch/ia64/vmx/vmx_ivt.S --- a/xen/arch/ia64/vmx/vmx_ivt.S Wed Aug 02 15:09:56 2006 -0600 +++ b/xen/arch/ia64/vmx/vmx_ivt.S Thu Aug 03 10:38:04 2006 -0600 @@ -423,7 +423,6 @@ ENTRY(vmx_break_fault) mov r31=pr mov r19=11 mov r30=cr.iim - movl r29=0x1100 ;; #ifdef VTI_DEBUG // break 0 is already handled in vmx_ia64_handle_break. @@ -431,9 +430,7 @@ ENTRY(vmx_break_fault) (p6) br.sptk vmx_fault_11 ;; #endif - cmp.eq p6,p7=r29,r30 - (p6) br.dptk.few vmx_hypercall_dispatch - (p7) br.sptk.many vmx_dispatch_break_fault + br.sptk.many vmx_dispatch_break_fault ;; VMX_FAULT(11); END(vmx_break_fault) @@ -1140,33 +1137,6 @@ END(vmx_dispatch_break_fault) END(vmx_dispatch_break_fault) -ENTRY(vmx_hypercall_dispatch) - VMX_SAVE_MIN_WITH_COVER - ssm psr.ic - ;; - srlz.i // guarantee that interruption collection is on - ;; - (p15) ssm psr.i // restore psr.i - adds r3=8,r2 // set up second base pointer - ;; - VMX_SAVE_REST - ;; - movl r14=ia64_leave_hypervisor - movl r2=hyper_call_table - ;; - mov rp=r14 - shladd r2=r15,3,r2 - ;; - ld8 r2=[r2] - ;; - mov b6=r2 - ;; - br.call.sptk.many b6=b6 - ;; -END(vmx_hypercall_dispatch) - - - ENTRY(vmx_dispatch_interrupt) VMX_SAVE_MIN_WITH_COVER_R19 // uses r31; defines r2 and r3 ;; @@ -1187,39 +1157,3 @@ ENTRY(vmx_dispatch_interrupt) add out1=16,sp // pass pointer to pt_regs as second arg br.call.sptk.many b6=ia64_handle_irq END(vmx_dispatch_interrupt) - - - - .rodata - .align 8 - .globl hyper_call_table -hyper_call_table: - data8 hyper_not_support //hyper_set_trap_table /* 0 */ - data8 hyper_mmu_update - data8 hyper_not_support //hyper_set_gdt - data8 hyper_not_support //hyper_stack_switch - data8 hyper_not_support //hyper_set_callbacks - data8 hyper_not_support //hyper_fpu_taskswitch /* 5 */ - data8 hyper_sched_op_compat - data8 hyper_dom0_op - data8 hyper_not_support //hyper_set_debugreg - data8 hyper_not_support //hyper_get_debugreg - data8 hyper_not_support //hyper_update_descriptor /* 10 */ - data8 hyper_not_support //hyper_set_fast_trap - data8 hyper_dom_mem_op - data8 hyper_not_support //hyper_multicall - data8 hyper_not_support //hyper_update_va_mapping - data8 hyper_not_support //hyper_set_timer_op /* 15 */ - data8 hyper_event_channel_op_compat - data8 hyper_xen_version - data8 hyper_not_support //hyper_console_io - data8 hyper_not_support //hyper_physdev_op - data8 hyper_not_support //hyper_grant_table_op /* 20 */ - data8 hyper_not_support //hyper_vm_assist - data8 hyper_not_support //hyper_update_va_mapping_otherdomain - data8 hyper_not_support //hyper_switch_vm86 - data8 hyper_not_support //hyper_boot_vcpu - data8 hyper_not_support //hyper_ni_hypercall /* 25 */ - data8 hyper_not_support //hyper_mmuext_op - data8 hyper_not_support //tata8 hyper_lock_page - data8 hyper_set_shared_page _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |