diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-07-02 09:45:18 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-07-02 09:45:18 +0100 |
commit | badc969545cf31f77a1a57ea97ad0863ded592f5 (patch) | |
tree | 16a5ca025c20d2f8e626099c35a6462f6080ac5b /tools/ioemu | |
parent | 94ab7ad96bfeb557b8e9f66e400ffc4a5ee1a345 (diff) | |
download | xen-badc969545cf31f77a1a57ea97ad0863ded592f5.tar.gz xen-badc969545cf31f77a1a57ea97ad0863ded592f5.tar.bz2 xen-badc969545cf31f77a1a57ea97ad0863ded592f5.zip |
ioemu: Add check for mapping MSI pirqs.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools/ioemu')
-rw-r--r-- | tools/ioemu/hw/pt-msi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/ioemu/hw/pt-msi.c b/tools/ioemu/hw/pt-msi.c index 0af05e788f..5e7c479551 100644 --- a/tools/ioemu/hw/pt-msi.c +++ b/tools/ioemu/hw/pt-msi.c @@ -94,6 +94,13 @@ static int pt_msi_setup(struct pt_dev *dev) 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); |