mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/vPCI: check address in vpci_msi_update()
If the upper address bits don't match the interrupt delivery address space window, entirely different behavior would need to be implemented. Refuse such requests for the time being. Replace adjacent hard tabs while introducing MSI_ADDR_BASE_MASK. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
1 parent
04b090366c
commit
0f7bcaf19f
2 files changed
+10
-2
No files matched your search
@@ -682,6 +682,13 @@ static int vpci_msi_update(const struct pci_dev *pdev, uint32_t data,
|
||||
|
||||
ASSERT(pcidevs_locked());
|
||||
|
||||
if ( (address & MSI_ADDR_BASE_MASK) != MSI_ADDR_HEADER )
|
||||
{
|
||||
gdprintk(XENLOG_ERR, "%pp: PIRQ %u: unsupported address %lx\n",
|
||||
&pdev->sbdf, pirq, address);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
for ( i = 0; i < vectors; i++ )
|
||||
{
|
||||
uint8_t vector = MASK_EXTR(data, MSI_DATA_VECTOR_MASK);
|
||||
|
||||
@@ -36,8 +36,9 @@
|
||||
* Shift/mask fields for msi address
|
||||
*/
|
||||
|
||||
#define MSI_ADDR_BASE_HI 0
|
||||
#define MSI_ADDR_BASE_LO 0xfee00000
|
||||
#define MSI_ADDR_BASE_HI 0
|
||||
#define MSI_ADDR_BASE_LO 0xfee00000
|
||||
#define MSI_ADDR_BASE_MASK (~0xfffff)
|
||||
#define MSI_ADDR_HEADER MSI_ADDR_BASE_LO
|
||||
|
||||
#define MSI_ADDR_DESTMODE_SHIFT 2
|
||||
|
||||