The main use of {LD,ST}64B* is to talk to a device, which is hopefully directly assigned to the guest and requires no additional handling. However, this does not preclude a VMM from exposing a virtual device to the guest, and to allow 64 byte accesses as part of the programming interface. A direct consequence of this is that we need to be able to forward such access to userspace. Given that such a contraption is very unlikely to ever exist, we choose to offer a limited service: userspace gets (as part of a new exit reason) the ESR, the IPA, and that's it. It is fully expected to handle the full semantics of the instructions, deal with ACCDATA, the return values and increment PC. Much fun. A canonical implementation can also simply inject an abort and be done with it. Frankly, don't try to do anything else unless you have time to waste.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -180,6 +180,7 @@ struct kvm_xen_exit { · 179 unmodified lines | ||
| 180 | 180 | #define KVM_EXIT_MEMORY_FAULT 39 |
| 181 | 181 | #define KVM_EXIT_TDX 40 |
| 182 | 182 | #define KVM_EXIT_ARM_SEA 41 |
| 183 | +#define KVM_EXIT_ARM_LDST64B 42 | |
| 183 | 184 | |
| 184 | 185 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 185 | 186 | /* Emulate instruction failed. */ |
| @@ -402,7 +403,7 @@ struct kvm_run { · 216 unmodified lines | ||
| 402 | 403 | } eoi; |
| 403 | 404 | /* KVM_EXIT_HYPERV */ |
| 404 | 405 | struct kvm_hyperv_exit hyperv; |
| 405 | − /* KVM_EXIT_ARM_NISV */ | |
| 406 | + /* KVM_EXIT_ARM_NISV / KVM_EXIT_ARM_LDST64B */ | |
| 406 | 407 | struct { |
| 407 | 408 | __u64 esr_iss; |
| 408 | 409 | __u64 fault_ipa; |