History

KVM: arm64: Support stolen time reporting via shared structure

Implement the service call for configuring a shared structure between a VCPU and the hypervisor in which the hypervisor can write the time stolen from the VCPU's execution time by other tasks on the host. User space allocates memory which is placed at an IPA also chosen by user space. The hypervisor then updates the shared structure using kvm_put_guest() to ensure single copy atomicity of the 64-bit value reporting the stolen time in nanoseconds. Whenever stolen time is enabled by the guest, the stolen time counter is reset. The stolen time itself is retrieved from the sched_info structure maintained by the Linux scheduler code. We enable SCHEDSTATS when selecting KVM Kconfig to ensure this value is meaningful.

Steven Price committed 7 years ago

Commit 8564d631 parent cac0f1b7 files · +111 −0Browse files

Showing the changes to include/linux (1 of 7 files). Show all

Unified · Split

include/linux/kvm_types.h+2−0
@@ -35,6 +35,8 @@ typedef unsigned long gva_t; · 34 unmodified lines
35typedef u64 gpa_t;35typedef u64 gpa_t;
36typedef u64 gfn_t;36typedef u64 gfn_t;
37 37
38#define GPA_INVALID (~(gpa_t)0)
39
38typedef unsigned long hva_t;40typedef unsigned long hva_t;
39typedef u64 hpa_t;41typedef u64 hpa_t;
40typedef u64 hfn_t;42typedef u64 hfn_t;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t