* ========== Copyright Header Begin ==========================================
* Hypervisor Software File: md_impl.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* - Do no alter or remove copyright notices
* - Redistribution and use of this software in source and binary forms, with
* or without modification, are permitted provided that the following
* - Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistribution in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of Sun Microsystems, Inc. or the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* This software is provided "AS IS," without a warranty of any kind.
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
* MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
* OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
* FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
* DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
* SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* You acknowledge that this software is not designed, licensed or
* intended for use in the design, construction, operation or maintenance of
* ========== Copyright Header End ============================================
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
#pragma ident "@(#)md_impl.h 1.5 06/10/26 SMI"
* Each logical domain is detailed via a (Virtual) Machine Description
* available to each guest Operating System courtesy of a
* A complete Machine Description (MD) is built from a very
* simple list of descriptor table (DT) elements.
#define MD_TRANSPORT_VERSION 0x10000 /* the version this library generates */
#define MD_ILLEGAL_NODEIDX (-1)
#define MDET_NULL DT_NULL
#define MDET_NODE DT_NODE
#define MDET_NODE_END DT_NODE_END
#define MDET_PROP_ARC DT_PROP_ARC
#define MDET_PROP_VAL DT_PROP_VAL
#define MDET_PROP_STR DT_PROP_STR
#define MDET_PROP_DAT DT_PROP_DAT
#define MDET_LIST_END DT_LIST_END
typedef struct md_header md_hdr_t
;
typedef struct md_header md_header_t
;
/* FIXME: dtnode_t to be renamed as md_element_t */
typedef struct md_element dtnode_t
;
typedef struct md_element md_element_t
;
* Each MD has the following header to
* provide information about each section of the MD.
* The header fields are actually written in network
uint32_t transport_version
;
uint32_t node_blk_sz
; /* size in bytes of the node block */
uint32_t name_blk_sz
; /* size in bytes of the name block */
uint32_t data_blk_sz
; /* size in bytes of the data block */
* This is the handle that represents the description
* While we are building the nodes the data and name tags in the nodes
* are in fact indexes into the table arrays.
* When we 'end nodes' the dtheader is added, and the data rewritten
typedef struct dthandle dthandle_t
;
* With this model there are 3 sections
* the description, the name table and the data blocks.
* the name and data entries are offsets from the
* base of their blocks, this makes it possible to extend the segments.
* For 'node' tags, the data is the index to the next node, not a data
* All values are stored in network byte order.
* The namelen field holds the storage length of a ASCIIZ name, NOT the strlen.
} prop_data
; /* for PROP_DATA and PROP_STR */
uint64_t prop_val
; /* for PROP_VAL */
uint64_t prop_idx
; /* for PROP_ARC and NODE */
#define MD_ELEMENT_SIZE 16
#endif /* _MD_MD_IMPL_H */