File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1255,6 +1255,22 @@ impl VcpuFd {
1255
1255
self . set_reg ( & reg_assocs) ?;
1256
1256
Ok ( ( ) )
1257
1257
}
1258
+
1259
+ /// X86 specific call that returns the vcpu's current "xcrs" using VP register page
1260
+ /// This is a private API for internal use, not publicly available
1261
+ #[ cfg( not( target_arch = "aarch64" ) ) ]
1262
+ fn get_xcrs_vp_page ( & self ) -> Result < Xcrs > {
1263
+ let vp_reg_page = self . get_vp_reg_page ( ) . unwrap ( ) . 0 ;
1264
+ // SAFETY: access union fields
1265
+ let ret_regs = unsafe {
1266
+ Xcrs {
1267
+ xcr0 : ( * vp_reg_page) . xfem ,
1268
+ }
1269
+ } ;
1270
+
1271
+ Ok ( ret_regs)
1272
+ }
1273
+
1258
1274
/// X86 specific call that returns the vcpu's current "xcrs".
1259
1275
#[ cfg( not( target_arch = "aarch64" ) ) ]
1260
1276
pub fn get_xcrs ( & self ) -> Result < Xcrs > {
You can’t perform that action at this time.
0 commit comments