Pull KVM updates from Paolo Bonzini: "ARM: - More progress on the protected VM front, now with the full fixed feature set as well as the limitation of some hypercalls after initialisation. - Cleanup of the RAZ/WI sysreg handling, which was pointlessly complicated - Fixes for the vgic placement in the IPA space, together with a bunch of selftests - More memcg accounting of the memory allocated on behalf of a guest - Timer and vgic selftests - Workarounds for the Apple M1 broken vgic implementation - KConfig cleanups - New kvmarm.mode=none option, for those who really dislike us RISC-V: - New KVM port. x86: - New API to control TSC offset from userspace - TSC scaling for nested hypervisors on SVM - Switch masterclock protection from raw_spin_lock to seqcount - Clean up function prototypes in the page fault code and avoid repeated memslot lookups - Convey the exit reason to userspace on emulation failure - Configure time between NX page recovery iterations - Expose Predictive Store Forwarding Disable CPUID leaf - Allocate page tracking data structures lazily (if the i915 KVM-GT functionality is not compiled in) - Cleanups, fixes and optimizations for the shadow MMU code s390: - SIGP Fixes - initial preparations for lazy destroy of secure VMs - storage key improvements/fixes - Log the guest CPNC Starting from this release, KVM-PPC patches will come from Michael Ellerman's PPC tree" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (227 commits) RISC-V: KVM: fix boolreturn.cocci warnings RISC-V: KVM: remove unneeded semicolon RISC-V: KVM: Fix GPA passed to __kvm_riscv_hfence_gvma_xyz() functions RISC-V: KVM: Factor-out FP virtualization into separate sources KVM: s390: add debug statement for diag 318 CPNC data KVM: s390: pv: properly handle page flags for protected guests KVM: s390: Fix handle_sske page fault handling KVM: x86: SGX must obey the KVM_INTERNAL_ERROR_EMULATION protocol KVM: x86: On emulation failure, convey the exit reason, etc. to userspace KVM: x86: Get exit_reason as part of kvm_x86_ops.get_exit_info KVM: x86: Clarify the kvm_run.emulation_failure structure layout KVM: s390: Add a routine for setting userspace CPU state KVM: s390: Simplify SIGP Set Arch handling KVM: s390: pv: avoid stalls when making pages secure KVM: s390: pv: avoid stalls for kvm_s390_pv_init_vm KVM: s390: pv: avoid double free of sida page KVM: s390: pv: add macros for UVC CC values s390/mm: optimize reset_guest_reference_bit() s390/mm: optimize set_guest_storage_key() s390/mm: no need for pte_alloc_map_lock() if we know the pmd is present ...
Showing the changes to include/uapi/linux (1 of 152 files). Show all
Unified · Split
| @@ -269,6 +269,7 @@ struct kvm_xen_exit { · 268 unmodified lines | ||
| 269 | 269 | #define KVM_EXIT_AP_RESET_HOLD 32 |
| 270 | 270 | #define KVM_EXIT_X86_BUS_LOCK 33 |
| 271 | 271 | #define KVM_EXIT_XEN 34 |
| 272 | +#define KVM_EXIT_RISCV_SBI 35 | |
| 272 | 273 | |
| 273 | 274 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 274 | 275 | /* Emulate instruction failed. */ |
| @@ -397,13 +398,23 @@ struct kvm_run { · 122 unmodified lines | ||
| 397 | 398 | * "ndata" is correct, that new fields are enumerated in "flags", |
| 398 | 399 | * and that each flag enumerates fields that are 64-bit aligned |
| 399 | 400 | * and sized (so that ndata+internal.data[] is valid/accurate). |
| 401 | + * | |
| 402 | + * Space beyond the defined fields may be used to store arbitrary | |
| 403 | + * debug information relating to the emulation failure. It is | |
| 404 | + * accounted for in "ndata" but the format is unspecified and is | |
| 405 | + * not represented in "flags". Any such information is *not* ABI! | |
| 400 | 406 | */ |
| 401 | 407 | struct { |
| 402 | 408 | __u32 suberror; |
| 403 | 409 | __u32 ndata; |
| 404 | 410 | __u64 flags; |
| 405 | − __u8 insn_size; | |
| 406 | − __u8 insn_bytes[15]; | |
| 411 | + union { | |
| 412 | + struct { | |
| 413 | + __u8 insn_size; | |
| 414 | + __u8 insn_bytes[15]; | |
| 415 | + }; | |
| 416 | + }; | |
| 417 | + /* Arbitrary debug data may follow. */ | |
| 407 | 418 | } emulation_failure; |
| 408 | 419 | /* KVM_EXIT_OSI */ |
| 409 | 420 | struct { |
| @@ -469,6 +480,13 @@ struct kvm_run { · 59 unmodified lines | ||
| 469 | 480 | } msr; |
| 470 | 481 | /* KVM_EXIT_XEN */ |
| 471 | 482 | struct kvm_xen_exit xen; |
| 483 | + /* KVM_EXIT_RISCV_SBI */ | |
| 484 | + struct { | |
| 485 | + unsigned long extension_id; | |
| 486 | + unsigned long function_id; | |
| 487 | + unsigned long args[6]; | |
| 488 | + unsigned long ret[2]; | |
| 489 | + } riscv_sbi; | |
| 472 | 490 | /* Fix the size of the union. */ |
| 473 | 491 | char padding[256]; |
| 474 | 492 | }; |
| @@ -1223,11 +1241,16 @@ struct kvm_irqfd { · 748 unmodified lines | ||
| 1223 | 1241 | |
| 1224 | 1242 | /* Do not use 1, KVM_CHECK_EXTENSION returned it before we had flags. */ |
| 1225 | 1243 | #define KVM_CLOCK_TSC_STABLE 2 |
| 1244 | +#define KVM_CLOCK_REALTIME (1 << 2) | |
| 1245 | +#define KVM_CLOCK_HOST_TSC (1 << 3) | |
| 1226 | 1246 | |
| 1227 | 1247 | struct kvm_clock_data { |
| 1228 | 1248 | __u64 clock; |
| 1229 | 1249 | __u32 flags; |
| 1230 | − __u32 pad[9]; | |
| 1250 | + __u32 pad0; | |
| 1251 | + __u64 realtime; | |
| 1252 | + __u64 host_tsc; | |
| 1253 | + __u32 pad[4]; | |
| 1231 | 1254 | }; |
| 1232 | 1255 | |
| 1233 | 1256 | /* For KVM_CAP_SW_TLB */ |