ia64/xen-unstable

view tools/blktap/blkdump.c @ 9488:0a6f5527ca4b

[IA64] set itv handoff as masked and enable reading irr[0-3]

Set initial vcpu itv handoff state to mask the timer vector.
This seems to match hardware and makes logical sense from a
spurious interrupt perspective. Enable vcpu_get_irr[0-3]
functions as they seem to work and have the proper backing.
This enables the check_sal_cache_flush() in arch/ia64/kernel.sal.c
to work unmodified, allowing us to remove the Xen changes from
the file (and thus the file from the sparse tree).

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Apr 04 09:39:45 2006 -0600 (2006-04-04)
parents ff95b53bd39a
children
line source
1 /* blkdump.c
2 *
3 * show a running trace of block requests as they fly by.
4 *
5 * (c) 2004 Andrew Warfield.
6 */
8 #include <stdio.h>
9 #include "blktaplib.h"
11 int request_print(blkif_request_t *req)
12 {
13 int i;
15 if ( (req->operation == BLKIF_OP_READ) ||
16 (req->operation == BLKIF_OP_WRITE) )
17 {
18 printf("[%2u:%2u<%5s] (nr_segs: %03u, dev: %03u, %010llu)\n",
19 ID_TO_DOM(req->id), ID_TO_IDX(req->id),
20 blkif_op_name[req->operation],
21 req->nr_segments, req->handle,
22 req->sector_number);
25 for (i=0; i < req->nr_segments; i++) {
26 printf(" (gref: 0x%8x start: %u stop: %u)\n",
27 req->seg[i].gref,
28 req->seg[i].first_sect,
29 req->seg[i].last_sect);
30 }
32 } else {
33 printf("Unknown request message type.\n");
34 }
36 return BLKTAP_PASS;
37 }
39 int response_print(blkif_response_t *rsp)
40 {
41 if ( (rsp->operation == BLKIF_OP_READ) ||
42 (rsp->operation == BLKIF_OP_WRITE) )
43 {
44 printf("[%2u:%2u>%5s] (status: %d)\n",
45 ID_TO_DOM(rsp->id), ID_TO_IDX(rsp->id),
46 blkif_op_name[rsp->operation],
47 rsp->status);
49 } else {
50 printf("Unknown request message type.\n");
51 }
52 return BLKTAP_PASS;
53 }
55 int main(int argc, char *argv[])
56 {
57 blktap_register_request_hook("request_print", request_print);
58 blktap_register_response_hook("response_print", response_print);
59 blktap_listen();
61 return 0;
62 }