From 98a31bbfdb9c4667ccb015faafd18453dde55800 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 26 Apr 2023 11:38:35 +0200 Subject: [PATCH] platform/x86: exclude special range from device_pd Issue #4820 --- repos/os/src/drivers/platform/device_pd.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repos/os/src/drivers/platform/device_pd.cc b/repos/os/src/drivers/platform/device_pd.cc index 84b62e859c..bffec91759 100644 --- a/repos/os/src/drivers/platform/device_pd.cc +++ b/repos/os/src/drivers/platform/device_pd.cc @@ -197,5 +197,14 @@ Device_pd::Device_pd(Env & env, enum { DMA_SIZE = 0xffffe000 }; _dma_alloc.add_range(0x1000, DMA_SIZE); + /* + * Interrupt address range is special handled and in general not + * usable for normal DMA translations, see chapter 3.15 + * of "Intel Virtualization Technology for Directed I/O" + * (March 2023, Revision 4.1) + */ + enum { IRQ_RANGE_BASE = 0xfee00000u, IRQ_RANGE_SIZE = 0x100000 }; + _dma_alloc.remove_range(IRQ_RANGE_BASE, IRQ_RANGE_SIZE); + _pd.ref_account(env.pd_session_cap()); }