Commit f6e1276
KVM: x86/xen: Initialize hrtimer in kvm_xen_init_vcpu()
The hrtimer is initialized in the KVM_XEN_VCPU_SET_ATTR ioctl. That caused
problem in the past, because the hrtimer can be initialized multiple times,
which was fixed by commit af735db ("KVM: x86/xen: Initialize Xen timer
only once"). This commit avoids initializing the timer multiple times by
checking the field 'function' of struct hrtimer to determine if it has
already been initialized.
This is not required and in the way to make the function field private.
Move the hrtimer initialization into kvm_xen_init_vcpu() so that it will
only be initialized once.
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/all/9c33c7224d97d08f4fa30d3cc8687981c1d3e953.1730386209.git.namcao@linutronix.de1 parent 482a483 commit f6e1276
1 file changed
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | 266 | | |
274 | 267 | | |
275 | 268 | | |
| |||
1070 | 1063 | | |
1071 | 1064 | | |
1072 | 1065 | | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | 1066 | | |
1077 | 1067 | | |
1078 | 1068 | | |
| |||
2235 | 2225 | | |
2236 | 2226 | | |
2237 | 2227 | | |
| 2228 | + | |
| 2229 | + | |
2238 | 2230 | | |
2239 | 2231 | | |
2240 | 2232 | | |
| |||
0 commit comments