Re: [PATCH -v2 2/2] x86: Make Linux guest support optional

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

 



Hi Borislav,

On Fri, Jan 25, 2013 at 06:59:37PM +0100, Borislav Petkov wrote:
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 8e1a9ec53003..cb467656e684 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -724,7 +724,7 @@ static int __init hv_acpi_init(void)
>  {
>  	int ret, t;
>  
> -	if (x86_hyper != &x86_hyper_ms_hyperv)
> +	if (!x86_hyper || strncmp(x86_hyper->name, "VMware", 6))
>  		return -ENODEV;

I assume this is a typo as I doubt MS is using the same signature as we
do.

>  
>  	init_completion(&probe_event);
> diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
> index cb56e270da11..85f15a6d8798 100644
> --- a/drivers/misc/vmw_balloon.c
> +++ b/drivers/misc/vmw_balloon.c
> @@ -786,7 +786,7 @@ static int __init vmballoon_init(void)
>  	 * Check if we are running on VMware's hypervisor and bail out
>  	 * if we are not.
>  	 */
> -	if (x86_hyper != &x86_hyper_vmware)
> +	if (!x86_hyper || strncmp(x86_hyper->name, "VMware", 6))
>  		return -ENODEV;
>

I wonder why you decided to switch from address matching (which is quite
precise and would potentially allow adding signatures without needing
to change the drivers) to string matching?

Thanks,
Dmitry
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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