On Mon, Feb 08, 2010 at 05:01:15PM +0800, Wei Yongjun wrote:
> kvm->arch.vpit will be set to the return value of kvm_create_pit(),
> so we do not need to set kvm->arch.vpit in kvm_create_pit(). This
> patch remove the useless code.
> 
> Signed-off-by: Wei Yongjun <yj...@cn.fujitsu.com>

The device could be accessed between kvm_io_bus_register_dev and
kvm->arch.vpit assignment in the ioctl handler.

> ---
>  arch/x86/kvm/i8254.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
> index 6a74246..6c90091 100644
> --- a/arch/x86/kvm/i8254.c
> +++ b/arch/x86/kvm/i8254.c
> @@ -626,7 +626,6 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
>       mutex_lock(&pit->pit_state.lock);
>       spin_lock_init(&pit->pit_state.inject_lock);
>  
> -     kvm->arch.vpit = pit;
>       pit->kvm = kvm;
>  
>       pit_state = &pit->pit_state;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to