Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

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

 



On 07/23/2012 11:04 AM, Bhushan Bharat-R65777 wrote:
> 
> 
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Monday, July 23, 2012 9:31 PM
>> To: Bhushan Bharat-R65777
>> Cc: Wood Scott-B07421; kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx;
>> agraf@xxxxxxx
>> Subject: Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation
>>
>> On 07/23/2012 10:43 AM, Bhushan Bharat-R65777 wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Wood Scott-B07421
>>>> Sent: Monday, July 23, 2012 9:02 PM
>>>> To: Bhushan Bharat-R65777
>>>> Cc: Wood Scott-B07421; kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx;
>>>> agraf@xxxxxxx
>>>> Subject: Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation
>>>>
>>>> On 07/22/2012 11:10 PM, Bhushan Bharat-R65777 wrote:
>>>>>>> @@ -386,13 +387,23 @@ int kvm_arch_vcpu_init(struct kvm_vcpu
>>>>>>> *vcpu) #ifdef CONFIG_KVM_EXIT_TIMING
>>>>>>>  	mutex_init(&vcpu->arch.exit_timing_lock);
>>>>>>>  #endif
>>>>>>> -
>>>>>>> +#ifdef CONFIG_BOOKE
>>>>>>> +	spin_lock_init(&vcpu->arch.wdt_lock);
>>>>>>> +	/* setup watchdog timer once */
>>>>>>> +	setup_timer(&vcpu->arch.wdt_timer, kvmppc_watchdog_func,
>>>>>>> +		    (unsigned long)vcpu);
>>>>>>> +#endif
>>>>>>>  	return 0;
>>>>>>>  }
>>>>>>
>>>>>> Can you do this in kvmppc_booke_init()?
>>>>>
>>>>> I do not think we can do this in kvmppc_booke_init(). Watchdog have
>>>>> association with vcpu, while there is no vcpu at kvmppc_booke_init().
>>>>
>>>> Sorry, I meant kvm_arch_vcpu_setup() in booke.c.
>>>
>>> Any specific reason to move this in above mentioned function? Want to avoid
>> #ifdef config_booke ?
>>
>> Yes, to avoid the ifdef.  We already have a (poorly named) place for booke-
>> specific vcpu init.
> 
> Where we want to delete watchdog timer? 
> 
> Kvm_arch_vcpu_setup() is in flow of CREATE_VCPU ioctl, I do not see DESTROY_VCPU type of code?
> 
> So is it ok to let del_timer_sync() as is with #ifdef config_booke ?

You could add such a function.  I suggest correcting the naming issue at
the same time -- have kvm_subarch_vcpu_init() and kvm_subarch_vcpu_free().

-Scott


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux