@@ -109,27 +109,6 @@ impl ResourceAllocator {
109109 allocate_many_ids ( & mut self . gsi_msi_allocator , gsi_count)
110110 }
111111
112- /// Allocate a memory range in 64-bit MMIO address space
113- ///
114- /// If it succeeds, it returns the first address of the allocated range
115- ///
116- /// # Arguments
117- ///
118- /// * `size` - The size in bytes of the memory to allocate
119- /// * `alignment` - The alignment of the address of the first byte
120- /// * `policy` - A [`vm_allocator::AllocPolicy`] variant for determining the allocation policy
121- pub fn allocate_64bit_mmio_memory (
122- & mut self ,
123- size : u64 ,
124- alignment : u64 ,
125- policy : AllocPolicy ,
126- ) -> Result < u64 , vm_allocator:: Error > {
127- Ok ( self
128- . mmio64_memory
129- . allocate ( size, alignment, policy) ?
130- . start ( ) )
131- }
132-
133112 /// Allocate a memory range for system data
134113 ///
135114 /// If it succeeds, it returns the first address of the allocated range
@@ -284,19 +263,12 @@ mod tests {
284263 assert_eq ! ( irq_1, GSI_LEGACY_START + 1 ) ;
285264 let gsi_1 = allocator1. allocate_gsi_msi ( 1 ) . unwrap ( ) [ 0 ] ;
286265 assert_eq ! ( gsi_1, GSI_MSI_START + 1 ) ;
287- let mmio64_mem = allocator1
288- . allocate_64bit_mmio_memory ( 0x42 , 1 , AllocPolicy :: FirstMatch )
289- . unwrap ( ) ;
290- assert_eq ! ( mmio64_mem, arch:: MEM_64BIT_DEVICES_START ) ;
291266 let system_mem = allocator1
292267 . allocate_system_memory ( 0x42 , 1 , AllocPolicy :: FirstMatch )
293268 . unwrap ( ) ;
294269 assert_eq ! ( system_mem, arch:: SYSTEM_MEM_START ) ;
295270
296271 let mut allocator2 = clone_allocator ( & allocator1) ;
297- allocator2
298- . allocate_64bit_mmio_memory ( 0x42 , 1 , AllocPolicy :: ExactMatch ( mmio64_mem) )
299- . unwrap_err ( ) ;
300272 allocator2
301273 . allocate_system_memory ( 0x42 , 1 , AllocPolicy :: ExactMatch ( system_mem) )
302274 . unwrap_err ( ) ;
@@ -305,10 +277,6 @@ mod tests {
305277 assert_eq ! ( irq_2, GSI_LEGACY_START + 2 ) ;
306278 let gsi_2 = allocator2. allocate_gsi_msi ( 1 ) . unwrap ( ) [ 0 ] ;
307279 assert_eq ! ( gsi_2, GSI_MSI_START + 2 ) ;
308- let mmio64_mem = allocator1
309- . allocate_64bit_mmio_memory ( 0x42 , 1 , AllocPolicy :: FirstMatch )
310- . unwrap ( ) ;
311- assert_eq ! ( mmio64_mem, arch:: MEM_64BIT_DEVICES_START + 0x42 ) ;
312280 let system_mem = allocator1
313281 . allocate_system_memory ( 0x42 , 1 , AllocPolicy :: FirstMatch )
314282 . unwrap ( ) ;
0 commit comments