2 * (C) Copyright 2007-2011 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
12 void queue_prog_exception(struct virt_sys
*sys
, enum PROG_EXCEPTION type
, u64 param
)
14 FIXME("supposed to inject a %d program exception", type
);
15 con_printf(sys
->con
, "FIXME: supposed to inject a %d program exception\n", type
);
16 sys
->cpu
->state
= GUEST_STOPPED
;
19 void queue_io_interrupt(struct virt_sys
*sys
, u32 ssid
, u32 param
, u32 a
, u32 isc
)
21 struct vio_int
*ioint
;
24 BUG_ON((a
!= 0) && (a
!= 1));
26 ioint
= malloc(sizeof(struct vio_int
), ZONE_NORMAL
);
31 ioint
->intid
= (a
<< 31) | (isc
<< 27);
33 mutex_lock(&sys
->cpu
->int_lock
);
34 list_add_tail(&ioint
->list
, &sys
->cpu
->int_io
[isc
]);
36 con_printf(sys
->con
, "queued I/O int %d %08x.%08x.%08x\n", isc
,
37 ioint
->ssid
, ioint
->param
, ioint
->intid
);
38 mutex_unlock(&sys
->cpu
->int_lock
);