@@ -77,19 +77,19 @@ impl VcpuExt for Vcpu {
7777 /// Returns the current value of a vCPU register.
7878 fn get_reg ( & self , reg : regs:: Reg ) -> Result < u64 , Error > {
7979 let mut out = 0_u64 ;
80- call ! ( sys:: hv_vcpu_get_reg( self . cpu , reg as _, & mut out) ) ?;
80+ call ! ( sys:: hv_vcpu_get_reg( self . id , reg as _, & mut out) ) ?;
8181 Ok ( out)
8282 }
8383
8484 /// Sets the value of a vCPU register.
8585 fn set_reg ( & self , reg : regs:: Reg , value : u64 ) -> Result < ( ) , Error > {
86- call ! ( sys:: hv_vcpu_set_reg( self . cpu , reg as _, value) )
86+ call ! ( sys:: hv_vcpu_set_reg( self . id , reg as _, value) )
8787 }
8888
8989 /// Returns the current value of a vCPU SIMD & FP register.
9090 fn get_simd_fp_reg ( & self , reg : regs:: SimdFpReg ) -> Result < regs:: SimdFpUchar16 , Error > {
9191 let mut out = 0_u128 ;
92- call ! ( sys:: hv_vcpu_get_simd_fp_reg( self . cpu , reg as _, & mut out) ) ?;
92+ call ! ( sys:: hv_vcpu_get_simd_fp_reg( self . id , reg as _, & mut out) ) ?;
9393 Ok ( out)
9494 }
9595
@@ -99,35 +99,35 @@ impl VcpuExt for Vcpu {
9999 reg : regs:: SimdFpReg ,
100100 value : regs:: SimdFpUchar16 ,
101101 ) -> Result < ( ) , Error > {
102- call ! ( sys:: hv_vcpu_set_simd_fp_reg( self . cpu , reg as _, value) ) ?;
102+ call ! ( sys:: hv_vcpu_set_simd_fp_reg( self . id , reg as _, value) ) ?;
103103 Ok ( ( ) )
104104 }
105105
106106 /// Returns the current value of a vCPU system register.
107107 fn get_sys_reg ( & self , reg : regs:: SysReg ) -> Result < u64 , Error > {
108108 let mut out = 0_u64 ;
109- call ! ( sys:: hv_vcpu_get_sys_reg( self . cpu , reg as _, & mut out) ) ?;
109+ call ! ( sys:: hv_vcpu_get_sys_reg( self . id , reg as _, & mut out) ) ?;
110110 Ok ( out)
111111 }
112112
113113 /// Sets the value of a vCPU system register.
114114 fn set_sys_reg ( & self , reg : regs:: SysReg , value : u64 ) -> Result < ( ) , Error > {
115- call ! ( sys:: hv_vcpu_set_sys_reg( self . cpu , reg as _, value) )
115+ call ! ( sys:: hv_vcpu_set_sys_reg( self . id , reg as _, value) )
116116 }
117117
118118 /// Gets pending interrupts for a vcpu.
119119 fn pending_interrupt ( & self , ty : InterruptType ) -> Result < bool , Error > {
120120 let mut out = false ;
121121 call ! ( sys:: hv_vcpu_get_pending_interrupt(
122- self . cpu , ty as u32 , & mut out
122+ self . id , ty as u32 , & mut out
123123 ) ) ?;
124124 Ok ( out)
125125 }
126126
127127 /// Sets pending interrupts for a vcpu.
128128 fn set_pending_interrupt ( & self , ty : InterruptType , mut pending : bool ) -> Result < ( ) , Error > {
129129 call ! ( sys:: hv_vcpu_get_pending_interrupt(
130- self . cpu ,
130+ self . id ,
131131 ty as u32 ,
132132 & mut pending
133133 ) )
@@ -136,49 +136,49 @@ impl VcpuExt for Vcpu {
136136 /// Get whether debug exceptions in the guest are trapped to the host.
137137 fn trap_debug_exceptions ( & self ) -> Result < bool , Error > {
138138 let mut out = false ;
139- call ! ( sys:: hv_vcpu_get_trap_debug_exceptions( self . cpu , & mut out) ) ?;
139+ call ! ( sys:: hv_vcpu_get_trap_debug_exceptions( self . id , & mut out) ) ?;
140140 Ok ( out)
141141 }
142142
143143 /// Set whether debug exceptions in the guest are trapped to the host.
144144 fn set_trap_debug_exceptions ( & self , enable : bool ) -> Result < ( ) , Error > {
145- call ! ( sys:: hv_vcpu_set_trap_debug_exceptions( self . cpu , enable) )
145+ call ! ( sys:: hv_vcpu_set_trap_debug_exceptions( self . id , enable) )
146146 }
147147
148148 /// Get whether debug register accesses in the guest are trapped to the host.
149149 fn trap_debug_reg_accesses ( & self ) -> Result < bool , Error > {
150150 let mut out = false ;
151- call ! ( sys:: hv_vcpu_get_trap_debug_reg_accesses( self . cpu , & mut out) ) ?;
151+ call ! ( sys:: hv_vcpu_get_trap_debug_reg_accesses( self . id , & mut out) ) ?;
152152 Ok ( out)
153153 }
154154
155155 /// Set whether debug register accesses in the guest are trapped to the host.
156156 fn set_trap_debug_reg_accesses ( & self , enable : bool ) -> Result < ( ) , Error > {
157- call ! ( sys:: hv_vcpu_set_trap_debug_reg_accesses( self . cpu , enable) )
157+ call ! ( sys:: hv_vcpu_set_trap_debug_reg_accesses( self . id , enable) )
158158 }
159159
160160 /// Gets the VTimer mask.
161161 fn vtimer_mask ( & self ) -> Result < bool , Error > {
162162 let mut out = false ;
163- call ! ( sys:: hv_vcpu_get_vtimer_mask( self . cpu , & mut out) ) ?;
163+ call ! ( sys:: hv_vcpu_get_vtimer_mask( self . id , & mut out) ) ?;
164164 Ok ( out)
165165 }
166166
167167 /// Sets the VTimer mask.
168168 fn set_vtimer_mask ( & self , vtimer_is_masked : bool ) -> Result < ( ) , Error > {
169- call ! ( sys:: hv_vcpu_set_vtimer_mask( self . cpu , vtimer_is_masked) )
169+ call ! ( sys:: hv_vcpu_set_vtimer_mask( self . id , vtimer_is_masked) )
170170 }
171171
172172 /// Gets the VTimer offset.
173173 fn vtimer_offset ( & self ) -> Result < u64 , Error > {
174174 let mut out = 0_u64 ;
175- call ! ( sys:: hv_vcpu_get_vtimer_offset( self . cpu , & mut out) ) ?;
175+ call ! ( sys:: hv_vcpu_get_vtimer_offset( self . id , & mut out) ) ?;
176176 Ok ( out)
177177 }
178178
179179 /// Sets the VTimer offset.
180180 fn set_vtimer_offset ( & self , vtimer_offset : u64 ) -> Result < ( ) , Error > {
181- call ! ( sys:: hv_vcpu_set_vtimer_offset( self . cpu , vtimer_offset) )
181+ call ! ( sys:: hv_vcpu_set_vtimer_offset( self . id , vtimer_offset) )
182182 }
183183
184184 /// Returns the underlying `hv_vcpu_exit_t` structure.
0 commit comments