ia64/xen-unstable
changeset 17946:dd3b693dd39a
ioemu: Add check for mapping MSI pirqs.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Wed Jul 02 09:45:18 2008 +0100 (2008-07-02) |
parents | 0076f6691b09 |
children | 6cac9c3ee2aa |
files | tools/ioemu/hw/pt-msi.c |
line diff
1.1 --- a/tools/ioemu/hw/pt-msi.c Wed Jul 02 09:44:09 2008 +0100 1.2 +++ b/tools/ioemu/hw/pt-msi.c Wed Jul 02 09:45:18 2008 +0100 1.3 @@ -94,6 +94,13 @@ static int pt_msi_setup(struct pt_dev *d 1.4 PT_LOG("error map msi\n"); 1.5 return -1; 1.6 } 1.7 + 1.8 + if ( pirq < 0 ) 1.9 + { 1.10 + PT_LOG("invalid pirq number\n"); 1.11 + return -1; 1.12 + } 1.13 + 1.14 dev->msi->pirq = pirq; 1.15 PT_LOG("msi mapped with pirq %x\n", pirq); 1.16