Re: [PATCH v2 1/8] kvm tools: Add optional parameter used in ioport callbacks

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

 



On Thu, 2011-05-26 at 09:42 +0300, Sasha Levin wrote:
> Allow specifying an optional parameter when registering an
> ioport range. The callback functions provided by the registering
> module will be called with the same parameter.
> 
> This may be used to keep context during callbacks on IO operations.
> 
> Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
> ---
>  tools/kvm/include/kvm/ioport.h |    3 ++
>  tools/kvm/ioport.c             |   54 +++++++++++++++++++++++++++++----------
>  2 files changed, 43 insertions(+), 14 deletions(-)
> 
> diff --git a/tools/kvm/include/kvm/ioport.h b/tools/kvm/include/kvm/ioport.h
> index 8253938..2a8d74d 100644
> --- a/tools/kvm/include/kvm/ioport.h
> +++ b/tools/kvm/include/kvm/ioport.h
> @@ -25,11 +25,14 @@ struct kvm;
>  struct ioport_operations {
>  	bool (*io_in)(struct kvm *kvm, u16 port, void *data, int size, u32 count);
>  	bool (*io_out)(struct kvm *kvm, u16 port, void *data, int size, u32 count);
> +	bool (*io_in_param)(struct kvm *kvm, u16 port, void *data, int size, u32 count, void *param);
> +	bool (*io_out_param)(struct kvm *kvm, u16 port, void *data, int size, u32 count, void *param);

So why not make that 'param' unconditional for io_in and io_out and just
pass NULL if it's not needed?

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux