ia64/xen-unstable

changeset 2153:d000e4ddb729

bitkeeper revision 1.1159.1.28 (41187b95qq9FYQ9PqtZM83wzpOUnlw)

cleanups
author iap10@labyrinth.cl.cam.ac.uk
date Tue Aug 10 07:39:01 2004 +0000 (2004-08-10)
parents 92b8c987ae83
children 3ba188e96131 c7f623950d2d 11ed253673e3 0e3215a4abfa 20558f1acfc7
files linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c linux-2.6.7-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c tools/misc/xen-clone
line diff
     1.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c	Mon Aug 09 23:22:10 2004 +0000
     1.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c	Tue Aug 10 07:39:01 2004 +0000
     1.3 @@ -377,16 +377,9 @@ void __init setup_arch(char **cmdline_p)
     1.4          pfn_to_mfn_frame_list[j] = 
     1.5              virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
     1.6      }
     1.7 -//pfn_to_mfn_frame_list[0] = 0xdeadbeff;
     1.8 -printk("Hsi %lx %lx :: %lx\n",    pfn_to_mfn_frame_list,
     1.9 -       virt_to_machine(pfn_to_mfn_frame_list),
    1.10 -HYPERVISOR_shared_info->arch.mfn_to_pfn_start
    1.11 -       );
    1.12      HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
    1.13  	virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
    1.14  
    1.15 -
    1.16 -
    1.17      /* If we are a privileged guest OS then we should request IO privileges. */
    1.18      if ( start_info.flags & SIF_PRIVILEGED ) 
    1.19      {
     2.1 --- a/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/setup.c	Mon Aug 09 23:22:10 2004 +0000
     2.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/setup.c	Tue Aug 10 07:39:01 2004 +0000
     2.3 @@ -139,7 +139,7 @@ static struct resource data_resource = {
     2.4  shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
     2.5  EXPORT_SYMBOL(HYPERVISOR_shared_info);
     2.6  
     2.7 -unsigned long *phys_to_machine_mapping;
     2.8 +unsigned long *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
     2.9  EXPORT_SYMBOL(phys_to_machine_mapping);
    2.10  
    2.11  multicall_entry_t multicall_list[8];
    2.12 @@ -1098,7 +1098,9 @@ static int __init noreplacement_setup(ch
    2.13   */
    2.14  void __init setup_arch(char **cmdline_p)
    2.15  {
    2.16 -	unsigned long max_low_pfn;
    2.17 +        int i,j;
    2.18 +
    2.19 +        unsigned long max_low_pfn;
    2.20  
    2.21  	HYPERVISOR_vm_assist(VMASST_CMD_enable,
    2.22  			     VMASST_TYPE_4gb_segments);
    2.23 @@ -1188,6 +1190,16 @@ void __init setup_arch(char **cmdline_p)
    2.24  #endif
    2.25  	paging_init();
    2.26  
    2.27 +	pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
    2.28 +	for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
    2.29 +	{	
    2.30 +	     pfn_to_mfn_frame_list[j] = 
    2.31 +		  virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
    2.32 +	}
    2.33 +	HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
    2.34 +	     virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
    2.35 +
    2.36 +
    2.37  #ifdef CONFIG_EARLY_PRINTK
    2.38  	{
    2.39  		char *s = strstr(*cmdline_p, "earlyprintk=");
     3.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Aug 09 23:22:10 2004 +0000
     3.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Aug 10 07:39:01 2004 +0000
     3.3 @@ -304,22 +304,28 @@ static void kick_pending_request_queues(
     3.4  
     3.5  
     3.6  /* Upon block read completion, issue a dummy machphys update for the
     3.7 -pages in the buffer, just in case we're being migrated. */
     3.8 +pages in the buffer, just in case we're being migrated. 
     3.9 +THIS CODE SHOULD BE REMOVED WHEN WE HAVE GRANT TABLES */
    3.10  
    3.11 -static void blkif_read_completion(struct request *req)
    3.12 +static void blkif_completion(blkif_response_t *bret, struct request *req)
    3.13  {
    3.14 +#if 0
    3.15  	struct bio *bio;
    3.16  	struct bio_vec *bvec;
    3.17  	int idx;
    3.18 -	unsigned long mfn, pfn
    3.19 +	unsigned long mfn, pfn;
    3.20  
    3.21 -	rq_for_each_bio(bio, req) {
    3.22 +	if( bret->operation == BLKIF_OP_READ )
    3.23 +	{
    3.24 +	    rq_for_each_bio(bio, req) {
    3.25  		bio_for_each_segment(bvec, bio, idx) {
    3.26  		    mfn = page_to_phys(bvec->bv_page)>>PAGE_SHIFT;
    3.27  		    pfn = machine_to_phys_mapping[mfn];
    3.28  		    queue_machphys_update(mfn, pfn);
    3.29  		}
    3.30 +	    }
    3.31  	}
    3.32 +#endif
    3.33  }
    3.34  
    3.35  
    3.36 @@ -354,9 +360,7 @@ static irqreturn_t blkif_int(int irq, vo
    3.37  				BUG();
    3.38  
    3.39  			end_that_request_last(req);
    3.40 -
    3.41 -			if( bret->operation == BLKIF_OP_READ )
    3.42 -			    blkif_read_completion( req );
    3.43 +			blkif_completion( bret, req );
    3.44  			break;
    3.45                  case BLKIF_OP_PROBE:
    3.46                          memcpy(&blkif_control_rsp, bret, sizeof(*bret));
     4.1 --- a/tools/misc/xen-clone	Mon Aug 09 23:22:10 2004 +0000
     4.2 +++ b/tools/misc/xen-clone	Tue Aug 10 07:39:01 2004 +0000
     4.3 @@ -75,6 +75,7 @@ then
     4.4   cd ${DEST_BK_REP} 
     4.5   ln -sf ../install install
     4.6   make -j4 world
     4.7 + make -j4 linux26
     4.8   cd ../install/boot
     4.9   [ -r vmlinuz-${LINUX_VER}-xen0 ] && ln -s vmlinuz-${LINUX_VER}-xen0 xenolinux.gz
    4.10