@@ -67,6 +67,7 @@ pub fn capability(cap: Capability) -> Result<u64, Error> {
6767}
6868
6969/// Creates an additional guest address space for the current task.
70+ #[ cfg( feature = "hv_10_15" ) ]
7071pub fn vm_space_create ( ) -> Result < Space , Error > {
7172 let mut space: Space = 0 ;
7273 call ! ( sys:: hv_vm_space_create( & mut space) ) ?;
@@ -77,6 +78,7 @@ pub fn vm_space_create() -> Result<Space, Error> {
7778///
7879/// # Arguments
7980/// * `asid` - Address space ID
81+ #[ cfg( feature = "hv_10_15" ) ]
8082pub fn vm_space_destroy ( asid : Space ) -> Result < ( ) , Error > {
8183 call ! ( sys:: hv_vm_space_destroy( asid) )
8284}
@@ -130,6 +132,7 @@ pub fn vm_protect(gpa: GPAddr, size: u64, flags: Memory) -> Result<(), Error> {
130132/// * `gpa` - Page aligned address in the guest physical address space.
131133/// * `size` - Size in bytes of the region to be mapped.
132134/// * `flags` - READ, WRITE and EXECUTE permissions of the region.
135+ #[ cfg( feature = "hv_10_15" ) ]
133136pub fn vm_map_space (
134137 asid : Space ,
135138 uva : UVAddr ,
@@ -152,6 +155,7 @@ pub fn vm_map_space(
152155/// * `asid` - Address space ID.
153156/// * `gpa` - Page aligned address in the guest physical address space.
154157/// * `size` - Size in bytes of the region to be unmapped.
158+ #[ cfg( feature = "hv_10_15" ) ]
155159pub fn vm_unmap_space ( asid : Space , gpa : GPAddr , size : u64 ) -> Result < ( ) , Error > {
156160 call ! ( sys:: hv_vm_unmap_space( asid, gpa, size) )
157161}
@@ -163,6 +167,7 @@ pub fn vm_unmap_space(asid: Space, gpa: GPAddr, size: u64) -> Result<(), Error>
163167/// * `gpa` - Page aligned address in the guest physical address space.
164168/// * `size` - Size in bytes of the region to be modified.
165169/// * `flags` - New READ, WRITE and EXECUTE permissions of the region.
170+ #[ cfg( feature = "hv_10_15" ) ]
166171pub fn vm_protect_space ( asid : Space , gpa : GPAddr , size : u64 , flags : Memory ) -> Result < ( ) , Error > {
167172 call ! ( sys:: hv_vm_protect_space(
168173 asid,
0 commit comments