ia64/xen-unstable

changeset 528:b912fe2f29ba

bitkeeper revision 1.289.2.1 (3f0a85f5xjvFUq5ZTEasVl-wUhVijg)

Kill off hypervisor_defs.h and physdev.h.
author sos22@labyrinth.cl.cam.ac.uk
date Tue Jul 08 08:51:01 2003 +0000 (2003-07-08)
parents 07cb518caf2f
children 4e67516e7fa8
files .rootkeys tools/internal/Makefile tools/internal/hypervisor_defs.h tools/internal/physdev.h tools/internal/xi_build.c tools/internal/xi_create.c tools/internal/xi_phys_grant.c tools/internal/xi_phys_probe.c tools/internal/xi_phys_revoke.c tools/internal/xi_start.c tools/internal/xi_stop.c
line diff
     1.1 --- a/.rootkeys	Mon Jul 07 14:45:15 2003 +0000
     1.2 +++ b/.rootkeys	Tue Jul 08 08:51:01 2003 +0000
     1.3 @@ -114,9 +114,7 @@ 3eb781fc6vgq5yhkJRGDLY9gWWRY2A tools/con
     1.4  3eb781fdl4lXWYZzmqDDUAYhAThRqQ tools/internal/Makefile
     1.5  3eb781fdc539MQQm47rYRCCR3N5i-Q tools/internal/dom0_defs.h
     1.6  3ee609b3Yr4aggmLSKmhiIzT8-nURA tools/internal/dom0_ops.h
     1.7 -3eb781fddjylXbsepjppUyIXa5lcaQ tools/internal/hypervisor_defs.h
     1.8  3eb781fdKiQbgozBsgs_zzJQ9ubehw tools/internal/mem_defs.h
     1.9 -3f04589dFbtsbWWwAXq3I92UiAogCg tools/internal/physdev.h
    1.10  3ec61e1bJCeJJu0SsptmDpA1xKvwvw tools/internal/rpm.spec
    1.11  3eb781fdgbSkh2O6JQS-65Dz4n0ItQ tools/internal/xi_build.c
    1.12  3eb781fdW1SAyiaC4mTsXq_9fRHh-A tools/internal/xi_create.c
     2.1 --- a/tools/internal/Makefile	Mon Jul 07 14:45:15 2003 +0000
     2.2 +++ b/tools/internal/Makefile	Tue Jul 08 08:51:01 2003 +0000
     2.3 @@ -1,4 +1,5 @@
     2.4  CC = gcc
     2.5 +CFLAGS = -Wall -I../../xen/include
     2.6  XI_CREATE = xi_create
     2.7  XI_START = xi_start
     2.8  XI_STOP = xi_stop
     2.9 @@ -19,29 +20,29 @@ all: $(XI_CREATE).o $(XI_START).o $(XI_S
    2.10  	$(CC) -o $(XI_PHYS_REVOKE) $(XI_PHYS_REVOKE).o
    2.11  	$(CC) -o $(XI_PHYS_PROBE) $(XI_PHYS_PROBE).o
    2.12  
    2.13 -$(XI_CREATE).o: $(XI_CREATE).c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
    2.14 -	$(CC) -c $(XI_CREATE).c 
    2.15 +$(XI_CREATE).o: $(XI_CREATE).c dom0_defs.h dom0_ops.h mem_defs.h
    2.16 +	$(CC) $(CFLAGS) -c $(XI_CREATE).c 
    2.17  
    2.18 -internal_domain_build.o: internal_domain_build.c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
    2.19 -	$(CC) -c internal_domain_build.c 
    2.20 +internal_domain_build.o: internal_domain_build.c dom0_defs.h dom0_ops.h mem_defs.h
    2.21 +	$(CC) $(CFLAGS) -c internal_domain_build.c 
    2.22  
    2.23 -$(XI_START).o: $(XI_START).c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
    2.24 -	$(CC) -c $(XI_START).c 
    2.25 +$(XI_START).o: $(XI_START).c dom0_defs.h dom0_ops.h mem_defs.h
    2.26 +	$(CC) $(CFLAGS) -c $(XI_START).c 
    2.27  
    2.28 -$(XI_STOP).o: $(XI_STOP).c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
    2.29 -	$(CC) -c $(XI_STOP).c 
    2.30 +$(XI_STOP).o: $(XI_STOP).c dom0_defs.h dom0_ops.h mem_defs.h
    2.31 +	$(CC) $(CFLAGS) -c $(XI_STOP).c 
    2.32  
    2.33  $(XI_DESTROY).o: $(XI_DESTROY).c dom0_ops.h dom0_defs.h
    2.34 -	$(CC) -c $(XI_DESTROY).c 
    2.35 +	$(CC) $(CFLAGS) -c $(XI_DESTROY).c 
    2.36  
    2.37 -$(XI_PHYS_GRANT).o: $(XI_PHYS_GRANT).c physdev.h
    2.38 -	$(CC) -c $(XI_PHYS_GRANT).c 
    2.39 +$(XI_PHYS_GRANT).o: $(XI_PHYS_GRANT).c 
    2.40 +	$(CC) $(CFLAGS) -c $(XI_PHYS_GRANT).c 
    2.41  
    2.42 -$(XI_PHYS_REVOKE).o: $(XI_PHYS_REVOKE).c physdev.h
    2.43 -	$(CC) -c $(XI_PHYS_REVOKE).c 
    2.44 +$(XI_PHYS_REVOKE).o: $(XI_PHYS_REVOKE).c
    2.45 +	$(CC) $(CFLAGS) -c $(XI_PHYS_REVOKE).c 
    2.46  
    2.47 -$(XI_PHYS_PROBE).o: $(XI_PHYS_PROBE).c physdev.h
    2.48 -	$(CC) -c $(XI_PHYS_PROBE).c 
    2.49 +$(XI_PHYS_PROBE).o: $(XI_PHYS_PROBE).c
    2.50 +	$(CC) $(CFLAGS) -c $(XI_PHYS_PROBE).c 
    2.51  
    2.52  install: all
    2.53  	cp -a xi_list xi_vifinit xi_helper $(XI_CREATE) $(XI_BUILD) $(XI_START) $(XI_STOP) $(XI_DESTROY) $(XI_PHYSDEV_GRANT) $(XI_PHYS_REVOKE) $(XI_PHYS_PROBE).o../../../install/bin
     3.1 --- a/tools/internal/hypervisor_defs.h	Mon Jul 07 14:45:15 2003 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,36 +0,0 @@
     3.4 -/******************************************************************************
     3.5 - * hypervisor_defs.h
     3.6 - * 
     3.7 - * This needs to be kept in sync with Xen's pagetable update interface!
     3.8 - * 
     3.9 - * Copyright (c) 2002-2003, Keir Fraser & Boris Dragovic 
    3.10 - */
    3.11 -
    3.12 -/* taken from include/hypervisor-ifs/hypervisor-if.h */
    3.13 -typedef struct
    3.14 -{
    3.15 -/*
    3.16 - * PGREQ_XXX: specified in least-significant bits of 'ptr' field. All requests 
    3.17 - * specify relevent PTE or PT address in 'ptr'. Normal requests specify update 
    3.18 - * value in 'value'. Extended requests specify command in least 8 bits of 
    3.19 - * 'value'.
    3.20 - */
    3.21 -    unsigned long ptr, val; /* *ptr = val */
    3.22 -} page_update_request_t;
    3.23 -
    3.24 -/* A normal page-table update request. */
    3.25 -#define PGREQ_NORMAL           0
    3.26 -#define PGREQ_MPT_UPDATE 1
    3.27 -/* An extended command. */
    3.28 -#define PGREQ_EXTENDED_COMMAND 2
    3.29 -/* Announce a new top-level page table. */
    3.30 -#define PGEXT_PIN_L1_TABLE      0
    3.31 -#define PGEXT_PIN_L2_TABLE      1
    3.32 -#define PGEXT_PIN_L3_TABLE      2
    3.33 -#define PGEXT_PIN_L4_TABLE      3
    3.34 -#define PGEXT_UNPIN_TABLE       4
    3.35 -#define PGEXT_NEW_BASEPTR       5
    3.36 -#define PGEXT_TLB_FLUSH         6
    3.37 -#define PGEXT_INVLPG            7
    3.38 -#define PGEXT_CMD_MASK        255
    3.39 -#define PGEXT_CMD_SHIFT         8
     4.1 --- a/tools/internal/physdev.h	Mon Jul 07 14:45:15 2003 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,27 +0,0 @@
     4.4 -#define XEN_BLOCK_PHYSDEV_GRANT 10 /* grant access to range of disk blocks */
     4.5 -#define XEN_BLOCK_PHYSDEV_PROBE 11 /* probe for a domain's physdev
     4.6 -				      accesses */
     4.7 -
     4.8 -#define PHYSDISK_MODE_R 1
     4.9 -#define PHYSDISK_MODE_W 2
    4.10 -typedef struct xp_disk
    4.11 -{
    4.12 -  int mode; /* PHYSDISK_MODEs or 0 for revoke. */
    4.13 -  int domain;
    4.14 -  unsigned short device;
    4.15 -  unsigned long start_sect;
    4.16 -  unsigned long n_sectors;
    4.17 -} xp_disk_t;
    4.18 -
    4.19 -#define PHYSDISK_MAX_ACES_PER_REQUEST 254
    4.20 -typedef struct {
    4.21 -  int n_aces;
    4.22 -  int domain;
    4.23 -  int start_ind;
    4.24 -  struct {
    4.25 -    unsigned short device;
    4.26 -    unsigned long start_sect;
    4.27 -    unsigned long n_sectors;
    4.28 -    unsigned mode;
    4.29 -  } entries[PHYSDISK_MAX_ACES_PER_REQUEST];
    4.30 -} physdisk_probebuf_t;
     5.1 --- a/tools/internal/xi_build.c	Mon Jul 07 14:45:15 2003 +0000
     5.2 +++ b/tools/internal/xi_build.c	Tue Jul 08 08:51:01 2003 +0000
     5.3 @@ -13,7 +13,8 @@
     5.4  #include <sys/stat.h>
     5.5  #include <stdlib.h>
     5.6  
     5.7 -#include "hypervisor_defs.h"
     5.8 +#include "asm-i386/types.h"
     5.9 +#include "hypervisor-ifs/hypervisor-if.h"
    5.10  #include "dom0_ops.h"
    5.11  #include "dom0_defs.h"
    5.12  #include "mem_defs.h"
     6.1 --- a/tools/internal/xi_create.c	Mon Jul 07 14:45:15 2003 +0000
     6.2 +++ b/tools/internal/xi_create.c	Tue Jul 08 08:51:01 2003 +0000
     6.3 @@ -12,8 +12,8 @@
     6.4  #include <sys/types.h>
     6.5  #include <sys/stat.h>
     6.6  #include <stdlib.h>
     6.7 +#include <string.h>
     6.8  
     6.9 -#include "hypervisor_defs.h"
    6.10  #include "dom0_ops.h"
    6.11  #include "dom0_defs.h"
    6.12  #include "mem_defs.h"
     7.1 --- a/tools/internal/xi_phys_grant.c	Mon Jul 07 14:45:15 2003 +0000
     7.2 +++ b/tools/internal/xi_phys_grant.c	Tue Jul 08 08:51:01 2003 +0000
     7.3 @@ -1,9 +1,12 @@
     7.4 +#define _GNU_SOURCE
     7.5  #include <unistd.h>
     7.6  #include <stdio.h>
     7.7  #include <errno.h>
     7.8  #include <sys/fcntl.h>
     7.9 +#include <string.h>
    7.10 +#include <stdlib.h>
    7.11  
    7.12 -#include "physdev.h"
    7.13 +#include "hypervisor-ifs/block.h"
    7.14  
    7.15  int main(int argc, char *argv[])
    7.16  {
     8.1 --- a/tools/internal/xi_phys_probe.c	Mon Jul 07 14:45:15 2003 +0000
     8.2 +++ b/tools/internal/xi_phys_probe.c	Tue Jul 08 08:51:01 2003 +0000
     8.3 @@ -1,10 +1,12 @@
     8.4 +#define _GNU_SOURCE
     8.5  #include <stdio.h>
     8.6  #include <sys/fcntl.h>
     8.7  #include <errno.h>
     8.8  #include <unistd.h>
     8.9  #include <string.h>
    8.10 +#include <stdlib.h>
    8.11  
    8.12 -#include "physdev.h"
    8.13 +#include "hypervisor-ifs/block.h"
    8.14  
    8.15  int main(int argc, char *argv[])
    8.16  {
    8.17 @@ -37,7 +39,7 @@ int main(int argc, char *argv[])
    8.18      for (x = 0; x < buf.n_aces; x++) {
    8.19        char read = ( buf.entries[x].mode & 1 ? 'r' : ' ' );
    8.20        char write = ( buf.entries[x].mode & 2 ? 'w' : ' ' );
    8.21 -      printf("%x %x %x %c%c\n", buf.entries[x].device,
    8.22 +      printf("%x %lx %lx %c%c\n", buf.entries[x].device,
    8.23  	     buf.entries[x].start_sect,
    8.24  	     buf.entries[x].n_sectors,
    8.25  	     read,
     9.1 --- a/tools/internal/xi_phys_revoke.c	Mon Jul 07 14:45:15 2003 +0000
     9.2 +++ b/tools/internal/xi_phys_revoke.c	Tue Jul 08 08:51:01 2003 +0000
     9.3 @@ -1,9 +1,12 @@
     9.4 +#define _GNU_SOURCE
     9.5  #include <unistd.h>
     9.6  #include <errno.h>
     9.7  #include <stdio.h>
     9.8  #include <sys/fcntl.h>
     9.9 +#include <string.h>
    9.10 +#include <stdlib.h>
    9.11  
    9.12 -#include "physdev.h"
    9.13 +#include "hypervisor-ifs/block.h"
    9.14  
    9.15  int main(int argc, char *argv[])
    9.16  {
    10.1 --- a/tools/internal/xi_start.c	Mon Jul 07 14:45:15 2003 +0000
    10.2 +++ b/tools/internal/xi_start.c	Tue Jul 08 08:51:01 2003 +0000
    10.3 @@ -6,8 +6,8 @@
    10.4  #include <sys/types.h>
    10.5  #include <sys/stat.h>
    10.6  #include <stdlib.h>
    10.7 +#include <string.h>
    10.8  
    10.9 -#include "hypervisor_defs.h"
   10.10  #include "dom0_ops.h"
   10.11  #include "dom0_defs.h"
   10.12  #include "mem_defs.h"
   10.13 @@ -32,12 +32,9 @@ static void PERROR (char *message)
   10.14  
   10.15  static int start_domain(int id)
   10.16  {
   10.17 -    dom0_newdomain_t * dom_data;
   10.18      char cmd_path[MAX_PATH];
   10.19 -    char dom_id_path[MAX_PATH];
   10.20      dom0_op_t dop;
   10.21      int cmd_fd;
   10.22 -    int id_fd;
   10.23  
   10.24      /* Set up the DOM0_STARTDOMAIN command */
   10.25      dop.cmd = DOM0_STARTDOMAIN;
    11.1 --- a/tools/internal/xi_stop.c	Mon Jul 07 14:45:15 2003 +0000
    11.2 +++ b/tools/internal/xi_stop.c	Tue Jul 08 08:51:01 2003 +0000
    11.3 @@ -7,7 +7,6 @@
    11.4  #include <sys/stat.h>
    11.5  #include <stdlib.h>
    11.6  
    11.7 -#include "hypervisor_defs.h"
    11.8  #include "dom0_ops.h"
    11.9  #include "dom0_defs.h"
   11.10  #include "mem_defs.h"