@@ -1373,6 +1373,42 @@ int _vcpu_sregs_set(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_sregs *sregs)
1373
1373
return ioctl (vcpu -> fd , KVM_SET_SREGS , sregs );
1374
1374
}
1375
1375
1376
+ void vcpu_fpu_get (struct kvm_vm * vm , uint32_t vcpuid , struct kvm_fpu * fpu )
1377
+ {
1378
+ int ret ;
1379
+
1380
+ ret = _vcpu_ioctl (vm , vcpuid , KVM_GET_FPU , fpu );
1381
+ TEST_ASSERT (ret == 0 , "KVM_GET_FPU failed, rc: %i errno: %i (%s)" ,
1382
+ ret , errno , strerror (errno ));
1383
+ }
1384
+
1385
+ void vcpu_fpu_set (struct kvm_vm * vm , uint32_t vcpuid , struct kvm_fpu * fpu )
1386
+ {
1387
+ int ret ;
1388
+
1389
+ ret = _vcpu_ioctl (vm , vcpuid , KVM_SET_FPU , fpu );
1390
+ TEST_ASSERT (ret == 0 , "KVM_SET_FPU failed, rc: %i errno: %i (%s)" ,
1391
+ ret , errno , strerror (errno ));
1392
+ }
1393
+
1394
+ void vcpu_get_reg (struct kvm_vm * vm , uint32_t vcpuid , struct kvm_one_reg * reg )
1395
+ {
1396
+ int ret ;
1397
+
1398
+ ret = _vcpu_ioctl (vm , vcpuid , KVM_GET_ONE_REG , reg );
1399
+ TEST_ASSERT (ret == 0 , "KVM_GET_ONE_REG failed, rc: %i errno: %i (%s)" ,
1400
+ ret , errno , strerror (errno ));
1401
+ }
1402
+
1403
+ void vcpu_set_reg (struct kvm_vm * vm , uint32_t vcpuid , struct kvm_one_reg * reg )
1404
+ {
1405
+ int ret ;
1406
+
1407
+ ret = _vcpu_ioctl (vm , vcpuid , KVM_SET_ONE_REG , reg );
1408
+ TEST_ASSERT (ret == 0 , "KVM_SET_ONE_REG failed, rc: %i errno: %i (%s)" ,
1409
+ ret , errno , strerror (errno ));
1410
+ }
1411
+
1376
1412
/*
1377
1413
* VCPU Ioctl
1378
1414
*
0 commit comments