Re: [Qemu-devel] About hotplug multifunction

2011-11-23 Thread Amos Kong
On 09/09/11 15:08, Amos Kong wrote: Hello all, I'm working on hotplug pci multifunction. 1. qemu cmdline: ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 /home/kvm_autotest_root/images/rhel61-64-virtio.qcow2 -vnc :0 -monitor unix:/tmp/a,server,nowait --enable-kvm -net none 2. script to

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Amos Kong
- Original Message - > Hi all, I've tested with WinXp guest, the multifunction hotplug works. > After reading the pci driver code, I found a problem. > > There is a list for each slot, (slot->funcs) > it will be inited in acpiphp_glue.c:register_slot() before hotpluging > device, > and o

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Amos Kong
Hi all, After reading the pci driver code, I found a problem. There is a list for each slot, (slot->funcs) it will be inited in acpiphp_glue.c:register_slot() before hotpluging device, and only one entry(func 0) will be added to it, no new entry will be added to the list when hotpluging devices t

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Gleb Natapov
On Tue, Sep 13, 2011 at 01:05:00PM +0300, Michael S. Tsirkin wrote: > On Tue, Sep 13, 2011 at 09:52:49AM +0300, Gleb Natapov wrote: > > On Tue, Sep 13, 2011 at 02:57:20PM +0900, Isaku Yamahata wrote: > > > On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > > > > On Sat, Sep 10, 2

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Michael S. Tsirkin
On Tue, Sep 13, 2011 at 09:52:49AM +0300, Gleb Natapov wrote: > On Tue, Sep 13, 2011 at 02:57:20PM +0900, Isaku Yamahata wrote: > > On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > > > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > > > > pci/pcie hot plug nee

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Michael S. Tsirkin
On Tue, Sep 13, 2011 at 09:52:49AM +0300, Gleb Natapov wrote: > On Tue, Sep 13, 2011 at 02:57:20PM +0900, Isaku Yamahata wrote: > > On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > > > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > > > > pci/pcie hot plug nee

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Isaku Yamahata
On Tue, Sep 13, 2011 at 09:52:49AM +0300, Gleb Natapov wrote: > On Tue, Sep 13, 2011 at 02:57:20PM +0900, Isaku Yamahata wrote: > > On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > > > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > > > > pci/pcie hot plug nee

Re: [Qemu-devel] About hotplug multifunction

2011-09-12 Thread Gleb Natapov
On Tue, Sep 13, 2011 at 02:57:20PM +0900, Isaku Yamahata wrote: > On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > > > pci/pcie hot plug needs clean up for multifunction hotplug in long term. > > > Only single

Re: [Qemu-devel] About hotplug multifunction

2011-09-12 Thread Isaku Yamahata
On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > > pci/pcie hot plug needs clean up for multifunction hotplug in long term. > > Only single function device case works. Multifunction case is broken > > somwehat.

Re: [Qemu-devel] About hotplug multifunction

2011-09-12 Thread Michael S. Tsirkin
On Mon, Sep 12, 2011 at 07:56:07AM -0300, Marcelo Tosatti wrote: > On Mon, Sep 12, 2011 at 07:21:48AM -0300, Marcelo Tosatti wrote: > > > We could, for example, keep a stub function 0 around. > > > > I suppose the guest will remove all functions of a device once you > > attempt to hot-unplug a fun

Re: [Qemu-devel] About hotplug multifunction

2011-09-12 Thread Marcelo Tosatti
On Mon, Sep 12, 2011 at 07:21:48AM -0300, Marcelo Tosatti wrote: > > We could, for example, keep a stub function 0 around. > > I suppose the guest will remove all functions of a device once you > attempt to hot-unplug a function. > > What is the problem with adding more PCI buses, instead of mult

Re: [Qemu-devel] About hotplug multifunction

2011-09-12 Thread Marcelo Tosatti
On Sun, Sep 11, 2011 at 09:51:06PM +0300, Michael S. Tsirkin wrote: > On Sun, Sep 11, 2011 at 12:01:49PM -0300, Marcelo Tosatti wrote: > > On Sun, Sep 11, 2011 at 12:23:57PM +0300, Michael S. Tsirkin wrote: > > > On Fri, Sep 09, 2011 at 03:34:26PM -0300, Marcelo Tosatti wrote: > > > > > > something

Re: [Qemu-devel] About hotplug multifunction

2011-09-11 Thread Michael S. Tsirkin
On Sun, Sep 11, 2011 at 12:01:49PM -0300, Marcelo Tosatti wrote: > On Sun, Sep 11, 2011 at 12:23:57PM +0300, Michael S. Tsirkin wrote: > > On Fri, Sep 09, 2011 at 03:34:26PM -0300, Marcelo Tosatti wrote: > > > > > something I noted when readin our acpi code: > > > > > we currently pass eject reques

Re: [Qemu-devel] About hotplug multifunction

2011-09-11 Thread Marcelo Tosatti
On Sun, Sep 11, 2011 at 12:23:57PM +0300, Michael S. Tsirkin wrote: > On Fri, Sep 09, 2011 at 03:34:26PM -0300, Marcelo Tosatti wrote: > > > > something I noted when readin our acpi code: > > > > we currently pass eject request for function 0 only: > > > >Name (_ADR, nr##) > > >

Re: [Qemu-devel] About hotplug multifunction

2011-09-11 Thread Michael S. Tsirkin
On Fri, Sep 09, 2011 at 03:34:26PM -0300, Marcelo Tosatti wrote: > > > something I noted when readin our acpi code: > > > we currently pass eject request for function 0 only: > > >Name (_ADR, nr##) > > > We either need a device per function there (acpi 1.0), > > > send eject req

Re: [Qemu-devel] About hotplug multifunction

2011-09-11 Thread Michael S. Tsirkin
On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > pci/pcie hot plug needs clean up for multifunction hotplug in long term. > Only single function device case works. Multifunction case is broken somwehat. > Especially the current acpi based hotplug should be replaced by > the standar

Re: [Qemu-devel] About hotplug multifunction

2011-09-09 Thread Marcelo Tosatti
On Fri, Sep 09, 2011 at 10:05:01AM -0700, Alex Williamson wrote: > On Fri, 2011-09-09 at 10:32 +0300, Michael S. Tsirkin wrote: > > On Fri, Sep 09, 2011 at 03:08:21AM -0400, Amos Kong wrote: > > > Hello all, > > > > > > I'm working on hotplug pci multifunction. > > > > > > 1. qemu cmdline: > >

Re: [Qemu-devel] About hotplug multifunction

2011-09-09 Thread Isaku Yamahata
pci/pcie hot plug needs clean up for multifunction hotplug in long term. Only single function device case works. Multifunction case is broken somwehat. Especially the current acpi based hotplug should be replaced by the standardized hot plug controller in long term. On Fri, Sep 09, 2011 at 03:08:2

Re: [Qemu-devel] About hotplug multifunction

2011-09-09 Thread Alex Williamson
On Fri, 2011-09-09 at 10:32 +0300, Michael S. Tsirkin wrote: > On Fri, Sep 09, 2011 at 03:08:21AM -0400, Amos Kong wrote: > > Hello all, > > > > I'm working on hotplug pci multifunction. > > > > 1. qemu cmdline: > > ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 > > /home/kvm_autotest_r

Re: [Qemu-devel] About hotplug multifunction

2011-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2011 at 03:08:21AM -0400, Amos Kong wrote: > Hello all, > > I'm working on hotplug pci multifunction. > > 1. qemu cmdline: > ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 > /home/kvm_autotest_root/images/rhel61-64-virtio.qcow2 -vnc :0 -monitor > unix:/tmp/a,server,nowa

[Qemu-devel] About hotplug multifunction

2011-09-09 Thread Amos Kong
Hello all, I'm working on hotplug pci multifunction. 1. qemu cmdline: ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 /home/kvm_autotest_root/images/rhel61-64-virtio.qcow2 -vnc :0 -monitor unix:/tmp/a,server,nowait --enable-kvm -net none 2. script to add virtio-blk devices: for i in `s