# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ff95b53bd39a74e17fd3c08f6b50a0c43794ec7c
# Parent 37c09b20a89678e3b3aed292fc0be10ed44bac44
Public interface cleanups. Widen some fields in public
interface defintions for future extensibility. In particular,
grant references are now 32 bits and this has some knock-on
effects on split-driver interfaces.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r 37c09b20a896 -r ff95b53bd39a
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c Wed Nov 30
11:51:24 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c Wed Nov 30
15:03:05 2005
@@ -335,7 +335,6 @@
{
extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]);
int operation = (req->operation == BLKIF_OP_WRITE) ? WRITE : READ;
- unsigned long fas = 0;
int i, pending_idx = pending_ring[MASK_PEND_IDX(pending_cons)];
pending_req_t *pending_req;
struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST];
@@ -362,16 +361,17 @@
preq.nr_sects = 0;
for (i = 0; i < nseg; i++) {
- fas = req->frame_and_sects[i];
- seg[i].nsec = blkif_last_sect(fas) - blkif_first_sect(fas) + 1;
-
- if (seg[i].nsec <= 0)
+ seg[i].nsec = req->seg[i].last_sect -
+ req->seg[i].first_sect + 1;
+
+ if ((req->seg[i].last_sect >= (PAGE_SIZE >> 9)) ||
+ (seg[i].nsec <= 0))
goto bad_descriptor;
preq.nr_sects += seg[i].nsec;
map[i].host_addr = MMAP_VADDR(pending_idx, i);
map[i].dom = blkif->domid;
- map[i].ref = blkif_gref_from_fas(fas);
+ map[i].ref = req->seg[i].gref;
map[i].flags = GNTMAP_host_map;
if ( operation == WRITE )
map[i].flags |= GNTMAP_readonly;
@@ -390,9 +390,8 @@
pending_idx, i)) >> PAGE_SHIFT,
FOREIGN_FRAME(map[i].dev_bus_addr>>PAGE_SHIFT));
#endif
- fas = req->frame_and_sects[i];
- seg[i].buf = map[i].dev_bus_addr |
- (blkif_first_sect(fas) << 9);
+ seg[i].buf = map[i].dev_bus_addr |
+ (req->seg[i].first_sect << 9);
} else {
errors++;
}
diff -r 37c09b20a896 -r ff95b53bd39a
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Nov 30
11:51:24 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Nov 30
15:03:05 2005
@@ -32,7 +32,6 @@
* IN THE SOFTWARE.
*/
-
#if 1
#define ASSERT(p) \
if (!(p)) { printk("Assertion '%s' failed, line %d, file %s", #p , \
@@ -40,7 +39,6 @@
#else
#define ASSERT(_p)
#endif
-
#include <linux/version.h>
#include "block.h"
@@ -54,15 +52,13 @@
#include <asm-xen/gnttab.h>
#include <asm/hypervisor.h>
-
#define BLKIF_STATE_DISCONNECTED 0
#define BLKIF_STATE_CONNECTED 1
#define BLKIF_STATE_SUSPENDED 2
#define MAXIMUM_OUTSTANDING_BLOCK_REQS \
- (BLKIF_MAX_SEGMENTS_PER_REQUEST * BLKIF_RING_SIZE)
+ (BLKIF_MAX_SEGMENTS_PER_REQUEST * BLK_RING_SIZE)
#define GRANT_INVALID_REF 0
-
static void connect(struct blkfront_info *);
static void blkfront_closing(struct xenbus_device *);
@@ -551,8 +547,11 @@
info->shadow[id].frame[ring_req->nr_segments] =
mfn_to_pfn(buffer_mfn);
- ring_req->frame_and_sects[ring_req->nr_segments] =
- blkif_fas_from_gref(ref, fsect, lsect);
+ ring_req->seg[ring_req->nr_segments] =
+ (struct blkif_request_segment) {
+ .gref = ref,
+ .first_sect = fsect,
+ .last_sect = lsect };
ring_req->nr_segments++;
}
@@ -699,8 +698,7 @@
{
int i;
for (i = 0; i < s->req.nr_segments; i++)
- gnttab_end_foreign_access(
- blkif_gref_from_fas(s->req.frame_and_sects[i]), 0, 0UL);
+ gnttab_end_foreign_access(s->req.seg[i].gref, 0, 0UL);
}
static void blkif_recover(struct blkfront_info *info)
@@ -740,7 +738,7 @@
/* Rewrite any grant references invalidated by susp/resume. */
for (j = 0; j < req->nr_segments; j++)
gnttab_grant_foreign_access_ref(
- blkif_gref_from_fas(req->frame_and_sects[j]),
+ req->seg[j].gref,
info->xbdev->otherend_id,
pfn_to_mfn(info->shadow[req->id].frame[j]),
rq_data_dir(
diff -r 37c09b20a896 -r ff95b53bd39a
linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c Wed Nov 30 11:51:24 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c Wed Nov 30 15:03:05 2005
@@ -32,6 +32,9 @@
#include "block.h"
#include <linux/blkdev.h>
#include <linux/list.h>
+
+#define BLKIF_MAJOR(dev) ((dev)>>8)
+#define BLKIF_MINOR(dev) ((dev) & 0xff)
/*
* For convenience we distinguish between ide, scsi and 'other' (i.e.,
diff -r 37c09b20a896 -r ff95b53bd39a
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c Wed Nov 30 11:51:24 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c Wed Nov 30 15:03:05 2005
@@ -713,7 +713,7 @@
/* Map the remote page to kernel. */
map[op].host_addr = kvaddr;
map[op].dom = blkif->domid;
- map[op].ref = blkif_gref_from_fas(req->frame_and_sects[i]);
+ map[op].ref = req->seg[i].gref;
map[op].flags = GNTMAP_host_map;
/* This needs a bit more thought in terms of interposition:
* If we want to be able to modify pages during write using
@@ -733,7 +733,7 @@
map[op].host_addr = ptep;
map[op].dom = blkif->domid;
- map[op].ref =
blkif_gref_from_fas(req->frame_and_sects[i]);
+ map[op].ref = req->seg[i].gref;
map[op].flags = GNTMAP_host_map | GNTMAP_application_map
| GNTMAP_contains_pte;
/* Above interposition comment applies here as well. */
diff -r 37c09b20a896 -r ff95b53bd39a tools/blktap/blkdump.c
--- a/tools/blktap/blkdump.c Wed Nov 30 11:51:24 2005
+++ b/tools/blktap/blkdump.c Wed Nov 30 15:03:05 2005
@@ -11,7 +11,6 @@
int request_print(blkif_request_t *req)
{
int i;
- unsigned long fas;
if ( (req->operation == BLKIF_OP_READ) ||
(req->operation == BLKIF_OP_WRITE) )
@@ -24,12 +23,10 @@
for (i=0; i < req->nr_segments; i++) {
- fas = req->frame_and_sects[i];
- printf(" (pf: 0x%8lx start: %lu stop: %lu)\n",
- (fas & PAGE_MASK),
- blkif_first_sect(fas),
- blkif_last_sect(fas)
- );
+ printf(" (gref: 0x%8x start: %u stop: %u)\n",
+ req->seg[i].gref,
+ req->seg[i].first_sect,
+ req->seg[i].last_sect);
}
} else {
diff -r 37c09b20a896 -r ff95b53bd39a tools/blktap/blktaplib.c
--- a/tools/blktap/blktaplib.c Wed Nov 30 11:51:24 2005
+++ b/tools/blktap/blktaplib.c Wed Nov 30 15:03:05 2005
@@ -244,8 +244,8 @@
RING_IDX rp, i, pfd_count;
/* pending rings */
- blkif_request_t req_pending[BLKIF_RING_SIZE];
- /* blkif_response_t rsp_pending[BLKIF_RING_SIZE] */;
+ blkif_request_t req_pending[BLK_RING_SIZE];
+ /* blkif_response_t rsp_pending[BLK_RING_SIZE] */;
/* handler hooks: */
request_hook_t *req_hook;
diff -r 37c09b20a896 -r ff95b53bd39a tools/blktap/blktaplib.h
--- a/tools/blktap/blktaplib.h Wed Nov 30 11:51:24 2005
+++ b/tools/blktap/blktaplib.h Wed Nov 30 15:03:05 2005
@@ -18,11 +18,13 @@
#include <xen/io/domain_controller.h>
#include <xs.h>
+#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, PAGE_SIZE)
+
/* /dev/xen/blktap resides at device number major=10, minor=202 */
#define BLKTAP_MINOR 202
/* size of the extra VMA area to map in attached pages. */
-#define BLKTAP_VMA_PAGES BLKIF_RING_SIZE
+#define BLKTAP_VMA_PAGES BLK_RING_SIZE
/* blktap IOCTLs: */
#define BLKTAP_IOCTL_KICK_FE 1
diff -r 37c09b20a896 -r ff95b53bd39a tools/blktap/parallax/parallax.c
--- a/tools/blktap/parallax/parallax.c Wed Nov 30 11:51:24 2005
+++ b/tools/blktap/parallax/parallax.c Wed Nov 30 15:03:05 2005
@@ -280,8 +280,7 @@
goto err;
/* Make sure the buffer is page-sized. */
- if ( (blkif_first_sect(req->frame_and_sects[0]) != 0) ||
- (blkif_last_sect (req->frame_and_sects[0]) != 7) )
+ if ( (req->seg[0].first_sect != 0) || (req->seg[0].last_sect != 7) )
goto err;
/* fill the list of devices */
@@ -350,17 +349,16 @@
/* Calculate read size and offset within the read block. */
offset = (param->sector << SECTOR_SHIFT) % BLOCK_SIZE;
- size = ( blkif_last_sect (req->frame_and_sects[segment]) -
- blkif_first_sect(req->frame_and_sects[segment]) + 1
- ) << SECTOR_SHIFT;
- start = blkif_first_sect(req->frame_and_sects[segment])
- << SECTOR_SHIFT;
+ size = (req->seg[segment].last_sect - req->seg[segment].first_sect + 1) <<
+ SECTOR_SHIFT;
+ start = req->seg[segment].first_sect << SECTOR_SHIFT;
DPRINTF("ParallaxRead: sect: %lld (%ld,%ld), "
"vblock %llx, "
"size %lx\n",
- param->sector, blkif_first_sect(p->req->frame_and_sects[segment]),
- blkif_last_sect (p->req->frame_and_sects[segment]),
+ param->sector,
+ p->req->seg[segment].first_sect,
+ p->req->seg[segment].last_sect,
param->vblock, size);
memcpy(dpage + start, spage + offset, size);
@@ -506,16 +504,15 @@
/* Calculate read size and offset within the read block. */
offset = (sector << SECTOR_SHIFT) % BLOCK_SIZE;
- size = ( blkif_last_sect (req->frame_and_sects[i]) -
- blkif_first_sect(req->frame_and_sects[i]) + 1
- ) << SECTOR_SHIFT;
- start = blkif_first_sect(req->frame_and_sects[i]) << SECTOR_SHIFT;
+ size = (req->seg[i].last_sect - req->seg[i].first_sect + 1) <<
+ SECTOR_SHIFT;
+ start = req->seg[i].first_sect << SECTOR_SHIFT;
DPRINTF("ParallaxWrite: sect: %lld (%ld,%ld), "
"vblock %llx, gblock %llx, "
"size %lx\n",
- sector, blkif_first_sect(req->frame_and_sects[i]),
- blkif_last_sect (req->frame_and_sects[i]),
+ sector,
+ req->seg[i].first_sect, req->seg[i].last_sect,
vblock, gblock, size);
/* XXX: For now we just freak out if they try to write a */
diff -r 37c09b20a896 -r ff95b53bd39a tools/blktap/ublkback/ublkbacklib.c
--- a/tools/blktap/ublkback/ublkbacklib.c Wed Nov 30 11:51:24 2005
+++ b/tools/blktap/ublkback/ublkbacklib.c Wed Nov 30 15:03:05 2005
@@ -233,8 +233,7 @@
case BLKIF_OP_WRITE:
{
unsigned long size;
-
-
+
batch_count++;
idx = ID_TO_IDX(req->id);
@@ -247,18 +246,17 @@
sector = req->sector_number + (8*i);
- size = blkif_last_sect (req->frame_and_sects[i]) -
- blkif_first_sect(req->frame_and_sects[i]) + 1;
-
- if (blkif_first_sect(req->frame_and_sects[i]) != 0)
- DPRINTF("iWR: sec_nr: %10llu sec: %10llu (%1lu,%1lu) pos: %15lu\n",
- req->sector_number, sector,
- blkif_first_sect(req->frame_and_sects[i]),
- blkif_last_sect (req->frame_and_sects[i]),
- (long)(sector << SECTOR_SHIFT));
+ size = req->seg[i].last_sect - req->seg[i].first_sect + 1;
+
+ if (req->seg[i].first_sect != 0)
+ DPRINTF("iWR: sec_nr: %10llu sec: %10llu (%1lu,%1lu) "
+ "pos: %15lu\n",
+ req->sector_number, sector,
+ req->seg[i].first_sect, req->seg[i].last_sect,
+ (long)(sector << SECTOR_SHIFT));
spage = (char *)MMAP_VADDR(ID_TO_IDX(req->id), i);
- spage += blkif_first_sect(req->frame_and_sects[i]) << SECTOR_SHIFT;
+ spage += req->seg[i].first_sect << SECTOR_SHIFT;
/*convert size and sector to byte offsets */
size <<= SECTOR_SHIFT;
@@ -297,19 +295,17 @@
sector = req->sector_number + (8*i);
- size = blkif_last_sect (req->frame_and_sects[i]) -
- blkif_first_sect(req->frame_and_sects[i]) + 1;
-
+ size = req->seg[i].last_sect - req->seg[i].first_sect + 1;
+
dpage = (char *)MMAP_VADDR(ID_TO_IDX(req->id), i);
- dpage += blkif_first_sect(req->frame_and_sects[i]) << SECTOR_SHIFT;
-
- if (blkif_first_sect(req->frame_and_sects[i]) != 0)
- DPRINTF("iRD : sec_nr: %10llu sec: %10llu (%1lu,%1lu) "
- "pos: %15lu dpage: %p\n",
- req->sector_number, sector,
- blkif_first_sect(req->frame_and_sects[i]),
- blkif_last_sect (req->frame_and_sects[i]),
- (long)(sector << SECTOR_SHIFT), dpage);
+ dpage += req->seg[i].first_sect << SECTOR_SHIFT;
+
+ if (req->seg[i].first_sect != 0)
+ DPRINTF("iRD : sec_nr: %10llu sec: %10llu (%1lu,%1lu) "
+ "pos: %15lu dpage: %p\n",
+ req->sector_number, sector,
+ req->seg[i].first_sect, req->seg[i].last_sect,
+ (long)(sector << SECTOR_SHIFT), dpage);
/*convert size and sector to byte offsets */
size <<= SECTOR_SHIFT;
diff -r 37c09b20a896 -r ff95b53bd39a xen/arch/x86/dom0_ops.c
--- a/xen/arch/x86/dom0_ops.c Wed Nov 30 11:51:24 2005
+++ b/xen/arch/x86/dom0_ops.c Wed Nov 30 15:03:05 2005
@@ -144,7 +144,7 @@
unsigned int p;
ret = -EINVAL;
- if ( (fp + np) >= 65536 )
+ if ( (fp + np) > 65536 )
break;
ret = -ESRCH;
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/acm_ops.h
--- a/xen/include/public/acm_ops.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/acm_ops.h Wed Nov 30 15:03:05 2005
@@ -63,7 +63,7 @@
ssidref_t ssidref;
} id;
void *ssidbuf;
- uint16_t ssidbuf_size;
+ uint32_t ssidbuf_size;
};
#define ACM_GETDECISION 8
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/dom0_ops.h Wed Nov 30 15:03:05 2005
@@ -19,7 +19,7 @@
* This makes sure that old versions of dom0 tools will stop working in a
* well-defined way (rather than crashing the machine, for instance).
*/
-#define DOM0_INTERFACE_VERSION 0xAAAA1012
+#define DOM0_INTERFACE_VERSION 0xAAAA1013
/************************************************************************/
@@ -98,7 +98,7 @@
typedef struct {
/* IN variables. */
domid_t domain;
- uint16_t vcpu;
+ uint32_t vcpu;
/* IN/OUT parameters */
vcpu_guest_context_t *ctxt;
} dom0_setdomaininfo_t;
@@ -107,7 +107,7 @@
typedef struct {
/* IN variables. */
uint32_t write;
- uint32_t cpu_mask;
+ cpumap_t cpu_mask;
uint32_t msr;
uint32_t in1;
uint32_t in2;
@@ -115,21 +115,6 @@
uint32_t out1;
uint32_t out2;
} dom0_msr_t;
-
-#define DOM0_DEBUG 16
-typedef struct {
- /* IN variables. */
- domid_t domain;
- uint8_t opcode;
- uint32_t in1;
- uint32_t in2;
- uint32_t in3;
- uint32_t in4;
- /* OUT variables. */
- uint32_t status;
- uint32_t out1;
- uint32_t out2;
-} dom0_debug_t;
/*
* Set clock such that it would read <secs,nsecs> after 00:00:00 UTC,
@@ -182,8 +167,8 @@
typedef struct {
/* IN variables. */
domid_t domain;
- uint16_t vcpu;
- cpumap_t cpumap;
+ uint32_t vcpu;
+ cpumap_t cpumap;
} dom0_pincpudomain_t;
/* Get trace buffers machine base address */
@@ -196,9 +181,9 @@
#define DOM0_TBUF_SET_SIZE 3
#define DOM0_TBUF_ENABLE 4
#define DOM0_TBUF_DISABLE 5
- uint8_t op;
+ uint32_t op;
/* IN/OUT variables */
- unsigned long cpu_mask;
+ cpumap_t cpu_mask;
uint32_t evt_mask;
/* OUT variables */
unsigned long buffer_mfn;
@@ -327,7 +312,7 @@
#define DOM0_PERFCCONTROL_OP_RESET 1 /* Reset all counters to zero. */
#define DOM0_PERFCCONTROL_OP_QUERY 2 /* Get perfctr information. */
typedef struct {
- uint8_t name[80]; /* name of perf counter */
+ uint8_t name[80]; /* name of perf counter */
uint32_t nr_vals; /* number of values for this counter */
uint32_t vals[64]; /* array of values */
} dom0_perfc_desc_t;
@@ -349,16 +334,16 @@
#define DOM0_IOPORT_PERMISSION 36
typedef struct {
domid_t domain; /* domain to be affected */
- uint16_t first_port; /* first port int range */
- uint16_t nr_ports; /* size of port range */
- uint16_t allow_access; /* allow or deny access to range? */
+ uint32_t first_port; /* first port int range */
+ uint32_t nr_ports; /* size of port range */
+ uint8_t allow_access; /* allow or deny access to range? */
} dom0_ioport_permission_t;
#define DOM0_GETVCPUCONTEXT 37
typedef struct {
/* IN variables. */
domid_t domain; /* domain to be affected */
- uint16_t vcpu; /* vcpu # */
+ uint32_t vcpu; /* vcpu # */
/* OUT variables. */
vcpu_guest_context_t *ctxt;
} dom0_getvcpucontext_t;
@@ -367,7 +352,7 @@
typedef struct {
/* IN variables. */
domid_t domain; /* domain to be affected */
- uint16_t vcpu; /* vcpu # */
+ uint32_t vcpu; /* vcpu # */
/* OUT variables. */
uint8_t online; /* currently online (not hotplugged)? */
uint8_t blocked; /* blocked waiting for an event? */
@@ -381,35 +366,36 @@
typedef struct {
/* IN variables. */
domid_t first_domain;
- unsigned int max_domains;
+ uint32_t max_domains;
dom0_getdomaininfo_t *buffer;
/* OUT variables. */
- unsigned int num_domains;
+ uint32_t num_domains;
} dom0_getdomaininfolist_t;
#define DOM0_PLATFORM_QUIRK 39
#define QUIRK_NOIRQBALANCING 1
typedef struct {
/* IN variables. */
- int quirk_id;
+ uint32_t quirk_id;
} dom0_platform_quirk_t;
#define DOM0_PHYSICAL_MEMORY_MAP 40
typedef struct {
/* IN variables. */
- int max_map_entries;
- /* OUT variables. */
- int nr_map_entries;
+ uint32_t max_map_entries;
+ /* OUT variables. */
+ uint32_t nr_map_entries;
struct dom0_memory_map_entry {
uint64_t start, end;
- int is_ram;
+ uint32_t flags; /* reserved */
+ uint8_t is_ram;
} *memory_map;
} dom0_physical_memory_map_t;
#define DOM0_MAX_VCPUS 41
typedef struct {
- domid_t domain; /* domain to be affected */
- unsigned int max; /* maximum number of vcpus */
+ domid_t domain; /* domain to be affected */
+ uint32_t max; /* maximum number of vcpus */
} dom0_max_vcpus_t;
#define DOM0_SETDOMAINHANDLE 44
@@ -433,7 +419,6 @@
dom0_getdomaininfo_t getdomaininfo;
dom0_getpageframeinfo_t getpageframeinfo;
dom0_msr_t msr;
- dom0_debug_t debug;
dom0_settime_t settime;
dom0_readconsole_t readconsole;
dom0_pincpudomain_t pincpudomain;
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/grant_table.h
--- a/xen/include/public/grant_table.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/grant_table.h Wed Nov 30 15:03:05 2005
@@ -73,14 +73,14 @@
*/
typedef struct grant_entry {
/* GTF_xxx: various type and flag information. [XEN,GST] */
- uint16_t flags;
+ uint16_t flags;
/* The domain being granted foreign privileges. [GST] */
- domid_t domid;
+ domid_t domid;
/*
* GTF_permit_access: Frame that @domid is allowed to map and access. [GST]
* GTF_accept_transfer: Frame whose ownership transferred by @domid. [XEN]
*/
- uint32_t frame;
+ uint32_t frame;
} grant_entry_t;
/*
@@ -131,7 +131,7 @@
/*
* Reference to a grant entry in a specified domain's grant table.
*/
-typedef uint16_t grant_ref_t;
+typedef uint32_t grant_ref_t;
/*
* GNTTABOP_map_grant_ref: Map the grant entry (<dom>,<ref>) for access
@@ -156,9 +156,9 @@
uint64_t host_addr;
domid_t dom;
grant_ref_t ref;
- uint16_t flags; /* GNTMAP_* */
- /* OUT parameters. */
- int16_t handle; /* +ve: handle; -ve: GNTST_* */
+ uint32_t flags; /* GNTMAP_* */
+ /* OUT parameters. */
+ int32_t handle; /* +ve: handle; -ve: GNTST_* */
uint64_t dev_bus_addr;
} gnttab_map_grant_ref_t;
@@ -178,9 +178,9 @@
/* IN parameters. */
uint64_t host_addr;
uint64_t dev_bus_addr;
- uint16_t handle;
- /* OUT parameters. */
- int16_t status; /* GNTST_* */
+ uint32_t handle;
+ /* OUT parameters. */
+ int32_t status; /* GNTST_* */
} gnttab_unmap_grant_ref_t;
/*
@@ -196,9 +196,9 @@
typedef struct gnttab_setup_table {
/* IN parameters. */
domid_t dom;
- uint16_t nr_frames;
- /* OUT parameters. */
- int16_t status; /* GNTST_* */
+ uint32_t nr_frames;
+ /* OUT parameters. */
+ int32_t status; /* GNTST_* */
unsigned long *frame_list;
} gnttab_setup_table_t;
@@ -211,7 +211,7 @@
/* IN parameters. */
domid_t dom;
/* OUT parameters. */
- int16_t status; /* GNTST_* */
+ int32_t status; /* GNTST_* */
} gnttab_dump_table_t;
/*
@@ -229,7 +229,7 @@
domid_t domid;
grant_ref_t ref;
/* OUT parameters. */
- int16_t status;
+ int32_t status;
} gnttab_transfer_t;
/*
@@ -283,7 +283,8 @@
"invalid virtual address", \
"invalid device address", \
"no spare translation slot in the I/O MMU", \
- "permission denied" \
+ "permission denied", \
+ "bad page" \
}
#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/io/blkif.h
--- a/xen/include/public/io/blkif.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/io/blkif.h Wed Nov 30 15:03:05 2005
@@ -19,9 +19,6 @@
#define BLKIF_OP_READ 0
#define BLKIF_OP_WRITE 1
-/* NB. Ring size must be small enough for sizeof(blkif_ring_t) <= PAGE_SIZE. */
-#define BLKIF_RING_SIZE 64
-
/*
* Maximum scatter/gather segments per request.
* This is carefully chosen so that sizeof(blkif_ring_t) <= PAGE_SIZE.
@@ -33,33 +30,24 @@
uint8_t operation; /* BLKIF_OP_??? */
uint8_t nr_segments; /* number of segments */
blkif_vdev_t handle; /* only for read/write requests */
- unsigned long id; /* private guest value, echoed in resp */
+ uint64_t id; /* private guest value, echoed in resp */
blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */
- /* @f_a_s[4:0]=last_sect ; @f_a_s[9:5]=first_sect */
- /* @f_a_s[:16]= grant reference (16 bits) */
- /* @first_sect: first sector in frame to transfer (inclusive). */
- /* @last_sect: last sector in frame to transfer (inclusive). */
- unsigned long frame_and_sects[BLKIF_MAX_SEGMENTS_PER_REQUEST];
+ struct blkif_request_segment {
+ grant_ref_t gref; /* reference to I/O buffer frame */
+ /* @first_sect: first sector in frame to transfer (inclusive). */
+ /* @last_sect: last sector in frame to transfer (inclusive). */
+ uint8_t first_sect, last_sect;
+ } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
} blkif_request_t;
-#define blkif_fas(_addr, _fs, _ls) ((_addr)|((_fs)<<5)|(_ls))
-#define blkif_first_sect(_fas) (((_fas)>>5)&31)
-#define blkif_last_sect(_fas) ((_fas)&31)
-
-#define blkif_fas_from_gref(_gref, _fs, _ls) (((_gref)<<16)|((_fs)<<5)|(_ls))
-#define blkif_gref_from_fas(_fas) ((_fas)>>16)
-
typedef struct blkif_response {
- unsigned long id; /* copied from request */
+ uint64_t id; /* copied from request */
uint8_t operation; /* copied from request */
- int16_t status; /* BLKIF_RSP_??? */
+ int32_t status; /* BLKIF_RSP_??? */
} blkif_response_t;
#define BLKIF_RSP_ERROR -1 /* non-specific 'error' */
#define BLKIF_RSP_OKAY 0 /* non-specific 'okay' */
-
-#define BLKIF_MAJOR(dev) ((dev)>>8)
-#define BLKIF_MINOR(dev) ((dev) & 0xff)
/*
* Generate blkif ring structures and types.
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/io/tpmif.h
--- a/xen/include/public/io/tpmif.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/io/tpmif.h Wed Nov 30 15:03:05 2005
@@ -18,7 +18,7 @@
typedef struct {
unsigned long addr; /* Machine address of packet. */
- int ref; /* grant table access reference */
+ grant_ref_t ref; /* grant table access reference */
uint16_t id; /* Echoed in response message. */
uint16_t size; /* Packet size in bytes. */
} tpmif_tx_request_t;
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/sched_ctl.h
--- a/xen/include/public/sched_ctl.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/sched_ctl.h Wed Nov 30 15:03:05 2005
@@ -48,8 +48,8 @@
uint64_t period;
uint64_t slice;
uint64_t latency;
- uint16_t extratime;
- uint16_t weight;
+ uint32_t extratime;
+ uint32_t weight;
} sedf;
} u;
diff -r 37c09b20a896 -r ff95b53bd39a xen/include/public/xen.h
--- a/xen/include/public/xen.h Wed Nov 30 11:51:24 2005
+++ b/xen/include/public/xen.h Wed Nov 30 15:03:05 2005
@@ -410,9 +410,9 @@
unsigned long shared_info; /* MACHINE address of shared info struct. */
uint32_t flags; /* SIF_xxx flags. */
unsigned long store_mfn; /* MACHINE page number of shared page. */
- uint16_t store_evtchn; /* Event channel for store communication. */
+ uint32_t store_evtchn; /* Event channel for store communication. */
unsigned long console_mfn; /* MACHINE address of console page. */
- uint16_t console_evtchn; /* Event channel for console messages. */
+ uint32_t console_evtchn; /* Event channel for console messages. */
/* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */
unsigned long pt_base; /* VIRTUAL address of page directory. */
unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames. */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|