nova: kernel patch for assign_pci

Apply lookup of pci config memory address to target pd.
This commit is contained in:
Alexander Boettcher 2013-01-30 16:29:09 +01:00 committed by Norman Feske
parent 467eec731f
commit c114014c1c
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff --git a/src/syscall.cpp b/src/syscall.cpp
index ee6dc42..9d5eba3 100644
--- a/src/syscall.cpp
+++ b/src/syscall.cpp
@@ -462,8 +487,10 @@ void Ec::sys_assign_pci()
sys_finish<Sys_regs::BAD_CAP>();
}
+ Pd * pd = static_cast<Pd *>(obj);
+
Paddr phys; unsigned rid;
- if (EXPECT_FALSE (!Pd::current->Space_mem::lookup (r->dev(), phys) || (rid = Pci::phys_to_rid (phys)) == ~0U)) {
+ if (EXPECT_FALSE (!pd->Space_mem::lookup (r->dev(), phys) || (rid = Pci::phys_to_rid (phys)) == ~0U)) {
trace (TRACE_ERROR, "%s: Non-DEV CAP (%#lx)", __func__, r->dev());
sys_finish<Sys_regs::BAD_DEV>();
}