mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1159.32.2 (4120c2f7sV0HlymoiDxvLZkiP1uL_Q)
Simplify start_info_t definition.
This commit is contained in:
1 parent
992c4d6f0b
commit
f5cb371891
6 files changed
+28
-55
No files matched your search
@@ -21,7 +21,7 @@
|
||||
/* arch/xen/i386/kernel/setup.c */
|
||||
union start_info_union
|
||||
{
|
||||
extended_start_info_t start_info;
|
||||
start_info_t start_info;
|
||||
char padding[512];
|
||||
};
|
||||
extern union start_info_union start_info_union;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
typedef struct suspend_record_st {
|
||||
/* To be filled in before resume. */
|
||||
extended_start_info_t resume_info;
|
||||
start_info_t resume_info;
|
||||
/*
|
||||
* The number of a machine frame containing, in sequence, the number of
|
||||
* each machine frame that contains PFN -> MFN translation table data.
|
||||
|
||||
@@ -85,7 +85,7 @@ static int setup_guestos(int xc_handle,
|
||||
unsigned long l2tab;
|
||||
unsigned long l1tab;
|
||||
unsigned long count, i;
|
||||
extended_start_info_t *start_info;
|
||||
start_info_t *start_info;
|
||||
shared_info_t *shared_info;
|
||||
mmu_t *mmu = NULL;
|
||||
void *pm_handle=NULL;
|
||||
|
||||
@@ -73,7 +73,7 @@ static int setup_guestos(int xc_handle,
|
||||
unsigned long l1tab;
|
||||
unsigned long count, pt_start;
|
||||
unsigned long symtab_addr = 0, symtab_len = 0;
|
||||
extended_start_info_t *start_info;
|
||||
start_info_t *start_info;
|
||||
shared_info_t *shared_info;
|
||||
unsigned long ksize;
|
||||
mmu_t *mmu = NULL;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
* hypervisor-if.h
|
||||
*
|
||||
* Guest OS interface to Xen.
|
||||
*
|
||||
* Copyright (c) 2004, K A Fraser
|
||||
*/
|
||||
|
||||
#ifndef __HYPERVISOR_IF_H__
|
||||
@@ -360,47 +362,35 @@ typedef struct shared_info_st
|
||||
* extended by an extra 4MB to ensure this.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is the basic bootstrap information structure as passed by Xen to the
|
||||
* initial controller domain. We want this structure to be easily extended by
|
||||
* more sophisticated domain builders and controllers, so we make the basic
|
||||
* fields of this structure available via a BASIC_START_INFO macro.
|
||||
*
|
||||
* Extended version of start_info_t should be defined as:
|
||||
* typedef struct {
|
||||
* BASIC_START_INFO;
|
||||
* <...extra fields...>
|
||||
* } extended_start_info_t;
|
||||
*/
|
||||
#define MAX_CMDLINE 256
|
||||
#define BASIC_START_INFO \
|
||||
/* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ \
|
||||
memory_t nr_pages; /* 0: Total pages allocated to this domain. */ \
|
||||
_MEMORY_PADDING(A); \
|
||||
memory_t shared_info; /* 8: MACHINE address of shared info struct.*/ \
|
||||
_MEMORY_PADDING(B); \
|
||||
u32 flags; /* 16: SIF_xxx flags. */ \
|
||||
u32 __pad; \
|
||||
/* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ \
|
||||
memory_t pt_base; /* 24: VIRTUAL address of page directory. */ \
|
||||
_MEMORY_PADDING(C); \
|
||||
memory_t nr_pt_frames; /* 32: Number of bootstrap p.t. frames. */ \
|
||||
_MEMORY_PADDING(D); \
|
||||
memory_t mfn_list; /* 40: VIRTUAL address of page-frame list. */ \
|
||||
_MEMORY_PADDING(E); \
|
||||
memory_t mod_start; /* 48: VIRTUAL address of pre-loaded module. */ \
|
||||
_MEMORY_PADDING(F); \
|
||||
memory_t mod_len; /* 56: Size (bytes) of pre-loaded module. */ \
|
||||
_MEMORY_PADDING(G); \
|
||||
u8 cmd_line[MAX_CMDLINE] /* 64 */
|
||||
|
||||
typedef struct {
|
||||
BASIC_START_INFO;
|
||||
/* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
|
||||
memory_t nr_pages; /* 0: Total pages allocated to this domain. */
|
||||
_MEMORY_PADDING(A);
|
||||
memory_t shared_info; /* 8: MACHINE address of shared info struct.*/
|
||||
_MEMORY_PADDING(B);
|
||||
u32 flags; /* 16: SIF_xxx flags. */
|
||||
u16 domain_controller_evtchn; /* 20 */
|
||||
u16 __pad;
|
||||
/* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */
|
||||
memory_t pt_base; /* 24: VIRTUAL address of page directory. */
|
||||
_MEMORY_PADDING(C);
|
||||
memory_t nr_pt_frames; /* 32: Number of bootstrap p.t. frames. */
|
||||
_MEMORY_PADDING(D);
|
||||
memory_t mfn_list; /* 40: VIRTUAL address of page-frame list. */
|
||||
_MEMORY_PADDING(E);
|
||||
memory_t mod_start; /* 48: VIRTUAL address of pre-loaded module. */
|
||||
_MEMORY_PADDING(F);
|
||||
memory_t mod_len; /* 56: Size (bytes) of pre-loaded module. */
|
||||
_MEMORY_PADDING(G);
|
||||
u8 cmd_line[MAX_CMDLINE]; /* 64 */
|
||||
} PACKED start_info_t; /* 320 bytes */
|
||||
|
||||
/* These flags are passed in the 'flags' field of start_info_t. */
|
||||
#define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */
|
||||
#define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain? */
|
||||
#define SIF_BLK_BE_DOMAIN (1<<4) /* Is this a block backend domain? */
|
||||
#define SIF_NET_BE_DOMAIN (1<<5) /* Is this a net backend domain? */
|
||||
|
||||
/* For use in guest OSes. */
|
||||
extern shared_info_t *HYPERVISOR_shared_info;
|
||||
|
||||
@@ -11,23 +11,6 @@
|
||||
#define __DOMAIN_CONTROLLER_H__
|
||||
|
||||
|
||||
#ifndef BASIC_START_INFO
|
||||
#error "Xen header file hypervisor-if.h must already be included here."
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* EXTENDED BOOTSTRAP STRUCTURE FOR NEW DOMAINS.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
BASIC_START_INFO;
|
||||
u16 domain_controller_evtchn; /* 320 */
|
||||
} PACKED extended_start_info_t; /* 322 bytes */
|
||||
#define SIF_BLK_BE_DOMAIN (1<<4) /* Is this a block backend domain? */
|
||||
#define SIF_NET_BE_DOMAIN (1<<5) /* Is this a net backend domain? */
|
||||
|
||||
|
||||
/*
|
||||
* Reason codes for SCHEDOP_shutdown. These are opaque to Xen but may be
|
||||
* interpreted by control software to determine the appropriate action. These
|
||||
|
||||