Mercurial > hvf > hvf-old
view cp/guest/exception.c @ 618:535aec703236
cp: define a FIXME macro that leaves a sclp message
There are far too many fixmes in the code. Sadly, the compiler simply
discards them. This usually isn't an issue until one accidentally hits a
"weird" bug which just turns out to be an unhandled (but documented) case in
another part of the code. Using a macro instead of a comment will let the
compiler string-ify the text, and then at runtime use SCLP to print it out.
This will immediatelly point at problem areas. So, keep an eye on SCLP from
now on :)
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Tue, 13 Dec 2011 22:20:50 -0500 |
parents | 31525cf0c76b |
children |
line wrap: on
line source
/* * (C) Copyright 2007-2011 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * * This file is released under the GPLv2. See the COPYING file for more * details. */ #include <sched.h> #include <vcpu.h> #include <slab.h> void queue_prog_exception(struct virt_sys *sys, enum PROG_EXCEPTION type, u64 param) { FIXME("supposed to inject a %d program exception", type); con_printf(sys->con, "FIXME: supposed to inject a %d program exception\n", type); sys->cpu->state = GUEST_STOPPED; } void queue_io_interrupt(struct virt_sys *sys, u32 ssid, u32 param, u32 a, u32 isc) { struct vio_int *ioint; BUG_ON(isc >= 8); BUG_ON((a != 0) && (a != 1)); ioint = malloc(sizeof(struct vio_int), ZONE_NORMAL); BUG_ON(!ioint); ioint->ssid = ssid; ioint->param = param; ioint->intid = (a << 31) | (isc << 27); mutex_lock(&sys->cpu->int_lock); list_add_tail(&ioint->list, &sys->cpu->int_io[isc]); con_printf(sys->con, "queued I/O int %d %08x.%08x.%08x\n", isc, ioint->ssid, ioint->param, ioint->intid); mutex_unlock(&sys->cpu->int_lock); }