ia64/xen-unstable

changeset 7503:aa81f4e44ca5

Fixes for first step in getting domU back up (by Kevin Tian)
author djm@kirby.fc.hp.com
date Mon Oct 31 17:27:38 2005 -0600 (2005-10-31)
parents 7eac3edd0589
children 4f8302838037
files linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/privcmd.c.patch xen/arch/ia64/xen/hypercall.c xen/arch/ia64/xen/xenmisc.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/privcmd.c.patch	Mon Oct 24 21:00:35 2005 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/privcmd.c.patch	Mon Oct 31 17:27:38 2005 -0600
     1.3 @@ -11,39 +11,43 @@ diff -Naur xen/privcmd/privcmd.c xen.pat
     1.4   				if ((rc = direct_remap_pfn_range(
     1.5   					vma,
     1.6   					msg[j].va&PAGE_MASK, 
     1.7 -@@ -148,6 +151,7 @@
     1.8 - 	}
     1.9 - 	break;
    1.10 +@@ -180,6 +183,15 @@
    1.11 + 		for (i = 0; i < m.num; i++, addr += PAGE_SIZE, p++) {
    1.12 + 			if (get_user(mfn, p))
    1.13 + 				return -EFAULT;
    1.14 ++#ifdef __ia64__
    1.15 ++			ret = remap_pfn_range(vma,
    1.16 ++					      addr&PAGE_MASK,
    1.17 ++					      mfn,
    1.18 ++					      1<<PAGE_SHIFT,
    1.19 ++					      vma->vm_page_prot);
    1.20 ++			if (ret < 0)
    1.21 ++			    goto batch_err;
    1.22 ++#else
    1.23   
    1.24 -+#ifndef __ia64__
    1.25 - 	case IOCTL_PRIVCMD_MMAPBATCH: {
    1.26 - 		mmu_update_t u;
    1.27 - 		privcmd_mmapbatch_t m;
    1.28 -@@ -206,7 +210,9 @@
    1.29 - 	}
    1.30 + 			ret = create_lookup_pte_addr(vma->vm_mm, addr, &ptep);
    1.31 + 			if (ret)
    1.32 +@@ -190,6 +202,7 @@
    1.33 + 
    1.34 + 			if (HYPERVISOR_mmu_update(&u, 1, NULL, m.dom) < 0)
    1.35 + 				put_user(0xF0000000 | mfn, p);
    1.36 ++#endif
    1.37 + 		}
    1.38 + 
    1.39 + 		ret = 0;
    1.40 +@@ -205,6 +218,7 @@
    1.41   	break;
    1.42   #endif
    1.43 -+#endif
    1.44   
    1.45  +#ifndef __ia64__
    1.46   	case IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN: {
    1.47   		unsigned long m2pv = (unsigned long)machine_to_phys_mapping;
    1.48   		pgd_t *pgd = pgd_offset_k(m2pv);
    1.49 -@@ -218,6 +224,7 @@
    1.50 +@@ -216,6 +230,7 @@
    1.51   			-EFAULT: 0;
    1.52   	}
    1.53   	break;
    1.54  +#endif
    1.55   
    1.56 - 	case IOCTL_PRIVCMD_INITDOMAIN_STORE: {
    1.57 - 		extern int do_xenbus_probe(void*);
    1.58 -@@ -241,6 +248,9 @@
    1.59 - 
    1.60 - 		/* Initial connect. Setup channel and page. */
    1.61 - 		xen_start_info->store_evtchn = data;
    1.62 -+#ifdef __ia64__
    1.63 -+#define	pfn_to_mfn(x)	(x)
    1.64 -+#endif
    1.65 - 		xen_start_info->store_mfn =
    1.66 - 			pfn_to_mfn(virt_to_phys((void *)page) >>
    1.67 - 				   PAGE_SHIFT);
    1.68 + 	default:
    1.69 + 		ret = -EINVAL;
     2.1 --- a/xen/arch/ia64/xen/hypercall.c	Mon Oct 24 21:00:35 2005 -0600
     2.2 +++ b/xen/arch/ia64/xen/hypercall.c	Mon Oct 31 17:27:38 2005 -0600
     2.3 @@ -187,6 +187,10 @@ ia64_hypercall (struct pt_regs *regs)
     2.4  		regs->r8 = do_console_io(regs->r14, regs->r15, regs->r16);
     2.5  		break;
     2.6  
     2.7 +	    case __HYPERVISOR_xen_version:
     2.8 +		regs->r8 = do_xen_version(regs->r14, regs->r15);
     2.9 +		break;
    2.10 +
    2.11  	    default:
    2.12  		printf("unknown hypercall %x\n", regs->r2);
    2.13  		regs->r8 = (unsigned long)-1;
     3.1 --- a/xen/arch/ia64/xen/xenmisc.c	Mon Oct 24 21:00:35 2005 -0600
     3.2 +++ b/xen/arch/ia64/xen/xenmisc.c	Mon Oct 31 17:27:38 2005 -0600
     3.3 @@ -290,8 +290,8 @@ void context_switch(struct vcpu *prev, s
     3.4  //prev->domain->domain_id,(long)prev&0xffffff,next->domain->domain_id,(long)next&0xffffff);
     3.5  //if (prev->domain->domain_id == 1 && next->domain->domain_id == 0) cs10foo();
     3.6  //if (prev->domain->domain_id == 0 && next->domain->domain_id == 1) cs01foo();
     3.7 -printk("@@sw%d/%x %d->%d\n",smp_processor_id(), hard_smp_processor_id (),
     3.8 -       prev->domain->domain_id,next->domain->domain_id);
     3.9 +//printk("@@sw%d/%x %d->%d\n",smp_processor_id(), hard_smp_processor_id (),
    3.10 +//       prev->domain->domain_id,next->domain->domain_id);
    3.11      if(VMX_DOMAIN(prev)){
    3.12      	vtm_domain_out(prev);
    3.13      }