diff -r 72111d70c348 tools/ioemu/hw/pt-msi.c --- a/tools/ioemu/hw/pt-msi.c Mon Jun 30 20:07:53 2008 +0800 +++ b/tools/ioemu/hw/pt-msi.c Mon Jun 30 20:11:08 2008 +0800 @@ -94,6 +94,13 @@ PT_LOG("error map msi\n"); return -1; } + + if ( pirq < 0 ) + { + PT_LOG("invalid pirq number\n"); + return -1; + } + dev->msi->pirq = pirq; PT_LOG("msi mapped with pirq %x\n", pirq);