Re: [PATCH v2 4/7] x86/hyper-v: redirect reenlightment notifications on CPU offlining

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Dec 2017, Vitaly Kuznetsov wrote:
> +static int hv_cpu_die(unsigned int cpu)
> +{
> +	struct hv_reenlightenment_control re_ctrl;
> +	int i;
> +	static DEFINE_SPINLOCK(lock);
> +
> +	if (hv_reenlightenment_cb == NULL)
> +		return 0;
> +
> +	/* Make sure the CPU we migrate to is not going away too */
> +	spin_lock(&lock);

What kind of voodoo is this? CPU hotplug is serialized already...

> +	rdmsrl(HV_X64_MSR_REENLIGHTENMENT_CONTROL, *((u64 *)&re_ctrl));
> +	if (re_ctrl.target_vp == hv_vp_index[cpu]) {
> +		/* Find some other online CPU */
> +		for_each_online_cpu(i) {


  		cpu = cpumask_any_but(cpu_online_mask);

Hmm?

Thanks,

	tglx
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux