mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-04 05:31:32 +00:00
implement initialization of start info for x86
This commit is contained in:
@ -12,7 +12,7 @@ pub struct PhysicalPage {
|
||||
|
||||
pub struct PhysicalPages<'a> {
|
||||
domid: u32,
|
||||
p2m: Vec<u64>,
|
||||
pub(crate) p2m: Vec<u64>,
|
||||
call: &'a XenCall,
|
||||
pages: Vec<PhysicalPage>,
|
||||
}
|
||||
@ -31,6 +31,10 @@ impl PhysicalPages<'_> {
|
||||
self.p2m = p2m;
|
||||
}
|
||||
|
||||
pub fn p2m_size(&mut self) -> u64 {
|
||||
self.p2m.len() as u64
|
||||
}
|
||||
|
||||
pub fn pfn_to_ptr(&mut self, pfn: u64, count: u64) -> Result<u64, XenClientError> {
|
||||
for page in &self.pages {
|
||||
if pfn >= page.pfn + page.count {
|
||||
|
Reference in New Issue
Block a user