On 12/14/20 2:58 PM, David Woodhouse wrote: > On Mon, 2020-12-14 at 13:29 +0000, Joao Martins wrote: >> We might be missing the case where only shared_info is registered. Something like: >> >> if (vcpu->xen.shinfo_set && !vcpu->xen.vcpu_info_set) { >> offset = offsetof(struct compat_vcpu_info, time); >> offset += offsetof(struct shared_info, vcpu_info); >> offset += (v - kvm_get_vcpu_by_id(0)) * sizeof(struct compat_vcpu_info); >> >> kvm_setup_pvclock_page(v, &vcpu->xen.shinfo_cache, offset); >> } >> >> Part of the reason I had a kvm_xen_setup_pvclock_page() was to handle this all these >> combinations i.e. 1) shared_info && !vcpu_info 2) vcpu_info and unilaterially updating >> secondary time info. >> >> But maybe introducing this xen_vcpu_info() helper to accommodate all this. > > There was complexity. > > I don't like complexity. > > I made it go away. > Considering what you said earlier, yes, it would be unnecessary complexity. Joao