On Fri 2019-09-13 14:04:57, Greg Kroah-Hartman wrote:
> [ Upstream commit 87ee613d076351950b74383215437f841ebbeb75 ]
> 
> In most common cases VP index of a vcpu matches its vcpu index. Userspace is, 
> however, 
> free to set any mapping it wishes and we need to account for that when we 
> need to find a 
> vCPU with a particular VP index. To keep search algorithms optimal in both 
> cases 
> introduce 'num_mismatched_vp_indexes' counter showing how many vCPUs with 
> mismatching VP 
> index we have. In case the counter is zero we can assume vp_index == vcpu_idx.

I don't see why this is stable material.

>       u64 hv_reenlightenment_control;
>       u64 hv_tsc_emulation_control;
>       u64 hv_tsc_emulation_status;
> +
> +     /* How many vCPUs have VP index != vCPU index */
> +     atomic_t num_mismatched_vp_indexes;
>  };
>  

It adds a write-only variable ...

Best regards,
                                                                        Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Reply via email to