Am 23.08.2010 23:31, schrieb Alexander Graf:
> The one big missing feature in s390-virtio was hotplugging. This is no more.
> This patch implements hotplug add support, so you can on the fly add new 
> devices
> in the guest.

Nice :-)


> Keep in mind that this needs a patch for qemu to actually leverage the
> functionality.
> 
> Signed-off-by: Alexander Graf <ag...@suse.de>
With the minor nits below fixed:
Acked-by: Christian Borntraeger <borntrae...@de.ibm.com>

>  #define VIRTIO_PARAM_MASK            0xff
>  #define VIRTIO_PARAM_VRING_INTERRUPT 0x0
>  #define VIRTIO_PARAM_CONFIG_CHANGED  0x1
> +#define VIRTIO_PARAM_DEV_ADD         0x2

See the other patch. This becomes an interface and should go into a header file.
> 
>  /*
>   * The pointer to our (page) of device descriptions.
>   */
>  static void *kvm_devices;
> +struct work_struct hotplug_work;
> 
>  struct kvm_device {
>       struct virtio_device vdev;
> @@ -331,6 +333,47 @@ static void scan_devices(void)
>  }
> 
>  /*
> + * match for a kvm device with a specific desc pointer
> + */
> +static int match_desc(struct device *dev, void *data)
> +{
> +     if ((ulong)to_kvmdev(dev_to_virtio(dev))->desc == (ulong)data)

ulong doesnt look like kernel coding style.

--
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