KVM generic changes for 7.0 - Remove a subtle pseudo-overlay of kvm_stats_desc, which, aside from being unnecessary and confusing, triggered compiler warnings due to -Wflex-array-member-not-at-end. - Document that vcpu->mutex is take outside of kvm->slots_lock and kvm->slots_arch_lock, which is intentional and desirable despite being rather unintuitive.
Unified · Split
| @@ -17,6 +17,8 @@ The acquisition orders for mutexes are as follows: · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | - kvm->lock is taken outside kvm->slots_lock and kvm->irq_lock |
| 19 | 19 | |
| 20 | +- vcpu->mutex is taken outside kvm->slots_lock and kvm->slots_arch_lock | |
| 21 | + | |
| 20 | 22 | - kvm->slots_lock is taken outside kvm->irq_lock, though acquiring |
| 21 | 23 | them together is quite rare. |
| 22 | 24 | |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | #include "trace.h" |
| 31 | 31 | |
| 32 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 32 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 33 | 33 | KVM_GENERIC_VM_STATS() |
| 34 | 34 | }; |
| 35 | 35 | |
| @@ -42,7 +42,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 6 unmodified lines | ||
| 42 | 42 | sizeof(kvm_vm_stats_desc), |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 45 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 46 | 46 | KVM_GENERIC_VCPU_STATS(), |
| 47 | 47 | STATS_DESC_COUNTER(VCPU, hvc_exit_stat), |
| 48 | 48 | STATS_DESC_COUNTER(VCPU, wfe_exit_stat), |
| @@ -14,7 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | #define CREATE_TRACE_POINTS |
| 15 | 15 | #include "trace.h" |
| 16 | 16 | |
| 17 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 17 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 18 | 18 | KVM_GENERIC_VCPU_STATS(), |
| 19 | 19 | STATS_DESC_COUNTER(VCPU, int_exits), |
| 20 | 20 | STATS_DESC_COUNTER(VCPU, idle_exits), |
| @@ -10,7 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | #include <asm/kvm_eiointc.h> |
| 11 | 11 | #include <asm/kvm_pch_pic.h> |
| 12 | 12 | |
| 13 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 13 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 14 | 14 | KVM_GENERIC_VM_STATS(), |
| 15 | 15 | STATS_DESC_ICOUNTER(VM, pages), |
| 16 | 16 | STATS_DESC_ICOUNTER(VM, hugepages), |
| @@ -38,7 +38,7 @@ · 37 unmodified lines | ||
| 38 | 38 | #define VECTORSPACING 0x100 /* for EI/VI mode */ |
| 39 | 39 | #endif |
| 40 | 40 | |
| 41 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 41 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 42 | 42 | KVM_GENERIC_VM_STATS() |
| 43 | 43 | }; |
| 44 | 44 | |
| @@ -51,7 +51,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 6 unmodified lines | ||
| 51 | 51 | sizeof(kvm_vm_stats_desc), |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 54 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 55 | 55 | KVM_GENERIC_VCPU_STATS(), |
| 56 | 56 | STATS_DESC_COUNTER(VCPU, wait_exits), |
| 57 | 57 | STATS_DESC_COUNTER(VCPU, cache_exits), |
| @@ -38,7 +38,7 @@ · 37 unmodified lines | ||
| 38 | 38 | |
| 39 | 39 | /* #define EXIT_DEBUG */ |
| 40 | 40 | |
| 41 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 41 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 42 | 42 | KVM_GENERIC_VM_STATS(), |
| 43 | 43 | STATS_DESC_ICOUNTER(VM, num_2M_pages), |
| 44 | 44 | STATS_DESC_ICOUNTER(VM, num_1G_pages) |
| @@ -53,7 +53,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 8 unmodified lines | ||
| 53 | 53 | sizeof(kvm_vm_stats_desc), |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 56 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 57 | 57 | KVM_GENERIC_VCPU_STATS(), |
| 58 | 58 | STATS_DESC_COUNTER(VCPU, sum_exits), |
| 59 | 59 | STATS_DESC_COUNTER(VCPU, mmio_exits), |
| @@ -36,7 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | unsigned long kvmppc_booke_handlers; |
| 38 | 38 | |
| 39 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 39 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 40 | 40 | KVM_GENERIC_VM_STATS(), |
| 41 | 41 | STATS_DESC_ICOUNTER(VM, num_2M_pages), |
| 42 | 42 | STATS_DESC_ICOUNTER(VM, num_1G_pages) |
| @@ -51,7 +51,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 8 unmodified lines | ||
| 51 | 51 | sizeof(kvm_vm_stats_desc), |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 54 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 55 | 55 | KVM_GENERIC_VCPU_STATS(), |
| 56 | 56 | STATS_DESC_COUNTER(VCPU, sum_exits), |
| 57 | 57 | STATS_DESC_COUNTER(VCPU, mmio_exits), |
| @@ -24,7 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | #define CREATE_TRACE_POINTS |
| 25 | 25 | #include "trace.h" |
| 26 | 26 | |
| 27 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 27 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 28 | 28 | KVM_GENERIC_VCPU_STATS(), |
| 29 | 29 | STATS_DESC_COUNTER(VCPU, ecall_exit_stat), |
| 30 | 30 | STATS_DESC_COUNTER(VCPU, wfi_exit_stat), |
| @@ -13,7 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <linux/kvm_host.h> |
| 14 | 14 | #include <asm/kvm_mmu.h> |
| 15 | 15 | |
| 16 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 16 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 17 | 17 | KVM_GENERIC_VM_STATS() |
| 18 | 18 | }; |
| 19 | 19 | static_assert(ARRAY_SIZE(kvm_vm_stats_desc) == |
| @@ -65,7 +65,7 @@ · 64 unmodified lines | ||
| 65 | 65 | #define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \ |
| 66 | 66 | (KVM_MAX_VCPUS + LOCAL_IRQS)) |
| 67 | 67 | |
| 68 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 68 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 69 | 69 | KVM_GENERIC_VM_STATS(), |
| 70 | 70 | STATS_DESC_COUNTER(VM, inject_io), |
| 71 | 71 | STATS_DESC_COUNTER(VM, inject_float_mchk), |
| @@ -91,7 +91,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 19 unmodified lines | ||
| 91 | 91 | sizeof(kvm_vm_stats_desc), |
| 92 | 92 | }; |
| 93 | 93 | |
| 94 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 94 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 95 | 95 | KVM_GENERIC_VCPU_STATS(), |
| 96 | 96 | STATS_DESC_COUNTER(VCPU, exit_userspace), |
| 97 | 97 | STATS_DESC_COUNTER(VCPU, exit_null), |
| @@ -243,7 +243,7 @@ EXPORT_SYMBOL_FOR_KVM_INTERNAL(enable_ipiv); · 242 unmodified lines | ||
| 243 | 243 | bool __read_mostly enable_device_posted_irqs = true; |
| 244 | 244 | EXPORT_SYMBOL_FOR_KVM_INTERNAL(enable_device_posted_irqs); |
| 245 | 245 | |
| 246 | −const struct _kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 246 | +const struct kvm_stats_desc kvm_vm_stats_desc[] = { | |
| 247 | 247 | KVM_GENERIC_VM_STATS(), |
| 248 | 248 | STATS_DESC_COUNTER(VM, mmu_shadow_zapped), |
| 249 | 249 | STATS_DESC_COUNTER(VM, mmu_pte_write), |
| @@ -269,7 +269,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { · 19 unmodified lines | ||
| 269 | 269 | sizeof(kvm_vm_stats_desc), |
| 270 | 270 | }; |
| 271 | 271 | |
| 272 | −const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 272 | +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = { | |
| 273 | 273 | KVM_GENERIC_VCPU_STATS(), |
| 274 | 274 | STATS_DESC_COUNTER(VCPU, pf_taken), |
| 275 | 275 | STATS_DESC_COUNTER(VCPU, pf_fixed), |
| @@ -1940,56 +1940,43 @@ enum kvm_stat_kind { · 1939 unmodified lines | ||
| 1940 | 1940 | |
| 1941 | 1941 | struct kvm_stat_data { |
| 1942 | 1942 | struct kvm *kvm; |
| 1943 | − const struct _kvm_stats_desc *desc; | |
| 1943 | + const struct kvm_stats_desc *desc; | |
| 1944 | 1944 | enum kvm_stat_kind kind; |
| 1945 | 1945 | }; |
| 1946 | 1946 | |
| 1947 | −struct _kvm_stats_desc { | |
| 1948 | − struct kvm_stats_desc desc; | |
| 1949 | − char name[KVM_STATS_NAME_SIZE]; | |
| 1950 | −}; | |
| 1951 | − | |
| 1952 | −#define STATS_DESC_COMMON(type, unit, base, exp, sz, bsz) \ | |
| 1953 | − .flags = type | unit | base | \ | |
| 1954 | − BUILD_BUG_ON_ZERO(type & ~KVM_STATS_TYPE_MASK) | \ | |
| 1955 | − BUILD_BUG_ON_ZERO(unit & ~KVM_STATS_UNIT_MASK) | \ | |
| 1956 | − BUILD_BUG_ON_ZERO(base & ~KVM_STATS_BASE_MASK), \ | |
| 1957 | − .exponent = exp, \ | |
| 1958 | − .size = sz, \ | |
| 1947 | +#define STATS_DESC_COMMON(type, unit, base, exp, sz, bsz) \ | |
| 1948 | + .flags = type | unit | base | \ | |
| 1949 | + BUILD_BUG_ON_ZERO(type & ~KVM_STATS_TYPE_MASK) | \ | |
| 1950 | + BUILD_BUG_ON_ZERO(unit & ~KVM_STATS_UNIT_MASK) | \ | |
| 1951 | + BUILD_BUG_ON_ZERO(base & ~KVM_STATS_BASE_MASK), \ | |
| 1952 | + .exponent = exp, \ | |
| 1953 | + .size = sz, \ | |
| 1959 | 1954 | .bucket_size = bsz |
| 1960 | 1955 | |
| 1961 | −#define VM_GENERIC_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1962 | − { \ | |
| 1963 | − { \ | |
| 1964 | − STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1965 | − .offset = offsetof(struct kvm_vm_stat, generic.stat) \ | |
| 1966 | − }, \ | |
| 1967 | − .name = #stat, \ | |
| 1968 | − } | |
| 1969 | −#define VCPU_GENERIC_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1970 | − { \ | |
| 1971 | − { \ | |
| 1972 | − STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1973 | − .offset = offsetof(struct kvm_vcpu_stat, generic.stat) \ | |
| 1974 | − }, \ | |
| 1975 | − .name = #stat, \ | |
| 1976 | − } | |
| 1977 | −#define VM_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1978 | − { \ | |
| 1979 | − { \ | |
| 1980 | − STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1981 | − .offset = offsetof(struct kvm_vm_stat, stat) \ | |
| 1982 | − }, \ | |
| 1983 | − .name = #stat, \ | |
| 1984 | − } | |
| 1985 | −#define VCPU_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1986 | − { \ | |
| 1987 | − { \ | |
| 1988 | − STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1989 | − .offset = offsetof(struct kvm_vcpu_stat, stat) \ | |
| 1990 | − }, \ | |
| 1991 | − .name = #stat, \ | |
| 1992 | − } | |
| 1956 | +#define VM_GENERIC_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1957 | +{ \ | |
| 1958 | + STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1959 | + .offset = offsetof(struct kvm_vm_stat, generic.stat), \ | |
| 1960 | + .name = #stat, \ | |
| 1961 | +} | |
| 1962 | +#define VCPU_GENERIC_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1963 | +{ \ | |
| 1964 | + STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1965 | + .offset = offsetof(struct kvm_vcpu_stat, generic.stat), \ | |
| 1966 | + .name = #stat, \ | |
| 1967 | +} | |
| 1968 | +#define VM_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1969 | +{ \ | |
| 1970 | + STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1971 | + .offset = offsetof(struct kvm_vm_stat, stat), \ | |
| 1972 | + .name = #stat, \ | |
| 1973 | +} | |
| 1974 | +#define VCPU_STATS_DESC(stat, type, unit, base, exp, sz, bsz) \ | |
| 1975 | +{ \ | |
| 1976 | + STATS_DESC_COMMON(type, unit, base, exp, sz, bsz), \ | |
| 1977 | + .offset = offsetof(struct kvm_vcpu_stat, stat), \ | |
| 1978 | + .name = #stat, \ | |
| 1979 | +} | |
| 1993 | 1980 | /* SCOPE: VM, VM_GENERIC, VCPU, VCPU_GENERIC */ |
| 1994 | 1981 | #define STATS_DESC(SCOPE, stat, type, unit, base, exp, sz, bsz) \ |
| 1995 | 1982 | SCOPE##_STATS_DESC(stat, type, unit, base, exp, sz, bsz) |
| @@ -2066,7 +2053,7 @@ struct _kvm_stats_desc { · 70 unmodified lines | ||
| 2066 | 2053 | STATS_DESC_IBOOLEAN(VCPU_GENERIC, blocking) |
| 2067 | 2054 | |
| 2068 | 2055 | ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header, |
| 2069 | − const struct _kvm_stats_desc *desc, | |
| 2056 | + const struct kvm_stats_desc *desc, | |
| 2070 | 2057 | void *stats, size_t size_stats, |
| 2071 | 2058 | char __user *user_buffer, size_t size, loff_t *offset); |
| 2072 | 2059 | |
| @@ -2111,9 +2098,9 @@ static inline void kvm_stats_log_hist_update(u64 *data, size_t size, u64 value) · 38 unmodified lines | ||
| 2111 | 2098 | |
| 2112 | 2099 | |
| 2113 | 2100 | extern const struct kvm_stats_header kvm_vm_stats_header; |
| 2114 | −extern const struct _kvm_stats_desc kvm_vm_stats_desc[]; | |
| 2101 | +extern const struct kvm_stats_desc kvm_vm_stats_desc[]; | |
| 2115 | 2102 | extern const struct kvm_stats_header kvm_vcpu_stats_header; |
| 2116 | −extern const struct _kvm_stats_desc kvm_vcpu_stats_desc[]; | |
| 2103 | +extern const struct kvm_stats_desc kvm_vcpu_stats_desc[]; | |
| 2117 | 2104 | |
| 2118 | 2105 | static inline int mmu_invalidate_retry(struct kvm *kvm, unsigned long mmu_seq) |
| 2119 | 2106 | { |
| @@ -14,6 +14,10 @@ · 13 unmodified lines | ||
| 14 | 14 | #include <linux/ioctl.h> |
| 15 | 15 | #include <asm/kvm.h> |
| 16 | 16 | |
| 17 | +#ifdef __KERNEL__ | |
| 18 | +#include <linux/kvm_types.h> | |
| 19 | +#endif | |
| 20 | + | |
| 17 | 21 | #define KVM_API_VERSION 12 |
| 18 | 22 | |
| 19 | 23 | /* |
| @@ -1601,7 +1605,11 @@ struct kvm_stats_desc { · 1581 unmodified lines | ||
| 1601 | 1605 | __u16 size; |
| 1602 | 1606 | __u32 offset; |
| 1603 | 1607 | __u32 bucket_size; |
| 1608 | +#ifdef __KERNEL__ | |
| 1609 | + char name[KVM_STATS_NAME_SIZE]; | |
| 1610 | +#else | |
| 1604 | 1611 | char name[]; |
| 1612 | +#endif | |
| 1605 | 1613 | }; |
| 1606 | 1614 | |
| 1607 | 1615 | #define KVM_GET_STATS_FD _IO(KVMIO, 0xce) |
| @@ -50,7 +50,7 @@ · 49 unmodified lines | ||
| 50 | 50 | * Return: the number of bytes that has been successfully read |
| 51 | 51 | */ |
| 52 | 52 | ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header, |
| 53 | − const struct _kvm_stats_desc *desc, | |
| 53 | + const struct kvm_stats_desc *desc, | |
| 54 | 54 | void *stats, size_t size_stats, |
| 55 | 55 | char __user *user_buffer, size_t size, loff_t *offset) |
| 56 | 56 | { |
| @@ -973,9 +973,9 @@ static void kvm_free_memslots(struct kvm *kvm, struct kvm_memslots *slots) · 972 unmodified lines | ||
| 973 | 973 | kvm_free_memslot(kvm, memslot); |
| 974 | 974 | } |
| 975 | 975 | |
| 976 | −static umode_t kvm_stats_debugfs_mode(const struct _kvm_stats_desc *pdesc) | |
| 976 | +static umode_t kvm_stats_debugfs_mode(const struct kvm_stats_desc *desc) | |
| 977 | 977 | { |
| 978 | − switch (pdesc->desc.flags & KVM_STATS_TYPE_MASK) { | |
| 978 | + switch (desc->flags & KVM_STATS_TYPE_MASK) { | |
| 979 | 979 | case KVM_STATS_TYPE_INSTANT: |
| 980 | 980 | return 0444; |
| 981 | 981 | case KVM_STATS_TYPE_CUMULATIVE: |
| @@ -1010,7 +1010,7 @@ static int kvm_create_vm_debugfs(struct kvm *kvm, const char *fdname) · 28 unmodified lines | ||
| 1010 | 1010 | struct dentry *dent; |
| 1011 | 1011 | char dir_name[ITOA_MAX_LEN * 2]; |
| 1012 | 1012 | struct kvm_stat_data *stat_data; |
| 1013 | − const struct _kvm_stats_desc *pdesc; | |
| 1013 | + const struct kvm_stats_desc *pdesc; | |
| 1014 | 1014 | int i, ret = -ENOMEM; |
| 1015 | 1015 | int kvm_debugfs_num_entries = kvm_vm_stats_header.num_desc + |
| 1016 | 1016 | kvm_vcpu_stats_header.num_desc; |
| @@ -6171,11 +6171,11 @@ static int kvm_stat_data_get(void *data, u64 *val) · 5154 unmodified lines | ||
| 6171 | 6171 | switch (stat_data->kind) { |
| 6172 | 6172 | case KVM_STAT_VM: |
| 6173 | 6173 | r = kvm_get_stat_per_vm(stat_data->kvm, |
| 6174 | − stat_data->desc->desc.offset, val); | |
| 6174 | + stat_data->desc->offset, val); | |
| 6175 | 6175 | break; |
| 6176 | 6176 | case KVM_STAT_VCPU: |
| 6177 | 6177 | r = kvm_get_stat_per_vcpu(stat_data->kvm, |
| 6178 | − stat_data->desc->desc.offset, val); | |
| 6178 | + stat_data->desc->offset, val); | |
| 6179 | 6179 | break; |
| 6180 | 6180 | } |
| 6181 | 6181 | |
| @@ -6193,11 +6193,11 @@ static int kvm_stat_data_clear(void *data, u64 val) · 11 unmodified lines | ||
| 6193 | 6193 | switch (stat_data->kind) { |
| 6194 | 6194 | case KVM_STAT_VM: |
| 6195 | 6195 | r = kvm_clear_stat_per_vm(stat_data->kvm, |
| 6196 | − stat_data->desc->desc.offset); | |
| 6196 | + stat_data->desc->offset); | |
| 6197 | 6197 | break; |
| 6198 | 6198 | case KVM_STAT_VCPU: |
| 6199 | 6199 | r = kvm_clear_stat_per_vcpu(stat_data->kvm, |
| 6200 | − stat_data->desc->desc.offset); | |
| 6200 | + stat_data->desc->offset); | |
| 6201 | 6201 | break; |
| 6202 | 6202 | } |
| 6203 | 6203 | |
| @@ -6345,7 +6345,7 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm) · 141 unmodified lines | ||
| 6345 | 6345 | static void kvm_init_debug(void) |
| 6346 | 6346 | { |
| 6347 | 6347 | const struct file_operations *fops; |
| 6348 | − const struct _kvm_stats_desc *pdesc; | |
| 6348 | + const struct kvm_stats_desc *pdesc; | |
| 6349 | 6349 | int i; |
| 6350 | 6350 | |
| 6351 | 6351 | kvm_debugfs_dir = debugfs_create_dir("kvm", NULL); |
| @@ -6358,7 +6358,7 @@ static void kvm_init_debug(void) · 6 unmodified lines | ||
| 6358 | 6358 | fops = &vm_stat_readonly_fops; |
| 6359 | 6359 | debugfs_create_file(pdesc->name, kvm_stats_debugfs_mode(pdesc), |
| 6360 | 6360 | kvm_debugfs_dir, |
| 6361 | − (void *)(long)pdesc->desc.offset, fops); | |
| 6361 | + (void *)(long)pdesc->offset, fops); | |
| 6362 | 6362 | } |
| 6363 | 6363 | |
| 6364 | 6364 | for (i = 0; i < kvm_vcpu_stats_header.num_desc; ++i) { |
| @@ -6369,7 +6369,7 @@ static void kvm_init_debug(void) · 4 unmodified lines | ||
| 6369 | 6369 | fops = &vcpu_stat_readonly_fops; |
| 6370 | 6370 | debugfs_create_file(pdesc->name, kvm_stats_debugfs_mode(pdesc), |
| 6371 | 6371 | kvm_debugfs_dir, |
| 6372 | − (void *)(long)pdesc->desc.offset, fops); | |
| 6372 | + (void *)(long)pdesc->offset, fops); | |
| 6373 | 6373 | } |
| 6374 | 6374 | } |
| 6375 | 6375 | |