RE: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-08-05 Thread Ben-Ami Yassour
On Fri, 2008-08-01 at 11:09 +0800, Han, Weidong wrote: Ben-Ami Yassour wrote: +#define assigned_dev_ioport_write(suffix) \ +static void assigned_dev_ioport_write##suffix(void *opaque, \ + uint32_t addr, \ +

RE: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-07-31 Thread Han, Weidong
Ben-Ami Yassour wrote: +#define assigned_dev_ioport_write(suffix) \ +static void assigned_dev_ioport_write##suffix(void *opaque, \ + uint32_t addr, \ + uint32_t value) \ +{ \ +

Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-06-04 Thread Avi Kivity
Amit Shah wrote: The first option can be enforced by calls to pci_enable_device() and pci_request_regions(). This can solve the problem of assigning multiple devices of the same guest as well. Yes, that sounds good. Dynamically unbinding devices is prone to a lot of errors and assumptions

Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-06-04 Thread Amit Shah
On Wednesday 04 June 2008 19:49:21 Avi Kivity wrote: Amit Shah wrote: Dynamically unbinding devices is prone to a lot of errors and assumptions and such policy shouldn't be enforced. We should either fail the assignment and let the administrator take care of doing the right thing and

Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-06-04 Thread Avi Kivity
Amit Shah wrote: I was thinking of putting the device in suspend state. However, I checked a few drivers and not all release resources during suspend. However, even if this is possible, it becomes an enforced policy that a user may not like. What happens if there is a real suspend? The

Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-06-04 Thread Amit Shah
On Wednesday 04 June 2008 20:23:53 Avi Kivity wrote: Amit Shah wrote: I was thinking of putting the device in suspend state. However, I checked a few drivers and not all release resources during suspend. However, even if this is possible, it becomes an enforced policy that a user may not

RE: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-06-02 Thread Han, Weidong
Amit Shah wrote: From: Or Sagi [EMAIL PROTECTED] From: Nir Peleg [EMAIL PROTECTED] From: Amit Shah [EMAIL PROTECTED] From: Glauber de Oliveira Costa [EMAIL PROTECTED] We can assign a device from the host machine to a guest. The original code comes from Neocleus. A new command-line

Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-06-02 Thread Amit Shah
On Monday 02 June 2008 19:27:31 Anthony Liguori wrote: Amit Shah wrote: We can assign a device from the host machine to a guest. The original code comes from Neocleus. A new command-line option, -pcidevice is added. For example, to invoke it for an Ethernet device sitting at PCI