This will be useful when invoking hypercall that targets specific
vcpu(s).
Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
struct ms_hyperv_info __read_mostly ms_hyperv;
DEFINE_PER_CPU_READ_MOSTLY(void *, hv_input_page);
+DEFINE_PER_CPU_READ_MOSTLY(unsigned int, hv_vp_index);
static uint64_t generate_guest_id(void)
{
static int setup_hypercall_pcpu_arg(void)
{
+ uint64_t vp_index_msr;
+
if ( this_cpu(hv_input_page) )
return 0;
return -ENOMEM;
}
+ rdmsrl(HV_X64_MSR_VP_INDEX, vp_index_msr);
+ this_cpu(hv_vp_index) = vp_index_msr;
+
return 0;
}
#include <xen/percpu.h>
DECLARE_PER_CPU(void *, hv_input_page);
+DECLARE_PER_CPU(unsigned int, hv_vp_index);
#endif /* __XEN_HYPERV_PRIVIATE_H__ */