Commit e65faf7
committed
KVM: selftests: Add struct and helpers to wrap binary stats cache
Add a struct and helpers to manage the binary stats cache, which is
currently used only for VM-scoped stats. This will allow expanding the
selftests infrastructure to provide support for vCPU-scoped binary stats,
which, except for the ioctl to get the stats FD are identical to VM-scoped
stats.
Defer converting __vm_get_stat() to a scope-agnostic helper to a future
patch, as getting the stats FD from KVM needs to be moved elsewhere
before it can be made completely scope-agnostic.
Link: https://lore.kernel.org/r/20250111005049.1247555-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent b0c3f5d commit e65faf7
2 files changed
Lines changed: 34 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
660 | 674 | | |
661 | 675 | | |
662 | 676 | | |
| |||
711 | 725 | | |
712 | 726 | | |
713 | 727 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
| 728 | + | |
721 | 729 | | |
722 | 730 | | |
723 | 731 | | |
| |||
2214 | 2222 | | |
2215 | 2223 | | |
2216 | 2224 | | |
2217 | | - | |
| 2225 | + | |
2218 | 2226 | | |
2219 | 2227 | | |
| 2228 | + | |
2220 | 2229 | | |
2221 | 2230 | | |
2222 | 2231 | | |
2223 | 2232 | | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
2228 | | - | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
2229 | 2237 | | |
2230 | 2238 | | |
2231 | | - | |
| 2239 | + | |
2232 | 2240 | | |
2233 | | - | |
2234 | | - | |
| 2241 | + | |
| 2242 | + | |
2235 | 2243 | | |
2236 | | - | |
| 2244 | + | |
2237 | 2245 | | |
2238 | 2246 | | |
2239 | | - | |
2240 | | - | |
| 2247 | + | |
2241 | 2248 | | |
2242 | 2249 | | |
2243 | 2250 | | |
2244 | | - | |
| 2251 | + | |
2245 | 2252 | | |
2246 | 2253 | | |
2247 | 2254 | | |
| |||
0 commit comments