Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-25 Thread David Hildenbrand
>>> So this happens before any hotplug handler is called. Everything works >>> just fine. What you don't like about this is the qdev_get_machine(). I >>> also don't like it but in the short term I don't see any problem with >>> it. It is resource allocation and not a "device plug" in the typical

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-25 Thread David Hildenbrand
For first phase we are using 'virtio-pmem' as cold added devices. AFAIU 'VirtioDeviceClass' being parent class and 'hotplug/unplug' methods implemented for virtio-pmem device. So, pci bus hotplug/unplug should call the corresponding functions? >>> the problem is

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-25 Thread Igor Mammedov
On Tue, 24 Apr 2018 17:42:44 +0200 David Hildenbrand wrote: > On 24.04.2018 16:00, Igor Mammedov wrote: > > On Mon, 23 Apr 2018 11:32:25 -0400 (EDT) > > Pankaj Gupta wrote: > > > >> Hi Igor, > >> > >>> > Right now we can only map

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-24 Thread David Hildenbrand
On 24.04.2018 16:00, Igor Mammedov wrote: > On Mon, 23 Apr 2018 11:32:25 -0400 (EDT) > Pankaj Gupta wrote: > >> Hi Igor, >> >>> Right now we can only map PCDIMM/NVDIMM into guest address space. In the future, we might want to do the same for virtio devices - e.g.

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-24 Thread Igor Mammedov
On Mon, 23 Apr 2018 11:32:25 -0400 (EDT) Pankaj Gupta wrote: > Hi Igor, > > > > > > Right now we can only map PCDIMM/NVDIMM into guest address space. In the > > > future, we might want to do the same for virtio devices - e.g. > > > virtio-pmem or virtio-mem. Especially,

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-23 Thread David Hildenbrand
On 23.04.2018 17:32, Pankaj Gupta wrote: > > Hi Igor, > >> >>> Right now we can only map PCDIMM/NVDIMM into guest address space. In the >>> future, we might want to do the same for virtio devices - e.g. >>> virtio-pmem or virtio-mem. Especially, they should be able to live side >>> by side to

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-23 Thread Pankaj Gupta
Hi Igor, > > > Right now we can only map PCDIMM/NVDIMM into guest address space. In the > > future, we might want to do the same for virtio devices - e.g. > > virtio-pmem or virtio-mem. Especially, they should be able to live side > > by side to each other. > > > > E.g. the virto based memory

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-23 Thread David Hildenbrand
On 23.04.2018 14:31, Igor Mammedov wrote: > On Fri, 20 Apr 2018 14:34:53 +0200 > David Hildenbrand wrote: > >> Right now we can only map PCDIMM/NVDIMM into guest address space. In the >> future, we might want to do the same for virtio devices - e.g. >> virtio-pmem or

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-23 Thread Igor Mammedov
On Fri, 20 Apr 2018 14:34:53 +0200 David Hildenbrand wrote: > Right now we can only map PCDIMM/NVDIMM into guest address space. In the > future, we might want to do the same for virtio devices - e.g. > virtio-pmem or virtio-mem. Especially, they should be able to live side > by

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-22 Thread Pankaj Gupta
> > > > Hello, > > > > This is good re-factoring and needed for 'virtio-pmem' as well to > > reserve memory region in system address space. > > > > I have tested this code with virtio-pmem and its working fine. Thank you > > for the work. > > > > I just have a small suggestion : when

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-22 Thread David Hildenbrand
On 22.04.2018 06:58, Pankaj Gupta wrote: > > Hello, > > This is good re-factoring and needed for 'virtio-pmem' as well to > reserve memory region in system address space. > > I have tested this code with virtio-pmem and its working fine. Thank you > for the work. > > I just have a small

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-21 Thread Pankaj Gupta
Hello, This is good re-factoring and needed for 'virtio-pmem' as well to reserve memory region in system address space. I have tested this code with virtio-pmem and its working fine. Thank you for the work. I just have a small suggestion : when functions like(get_addr(), get_plugged_size etc)

[Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-20 Thread David Hildenbrand
Right now we can only map PCDIMM/NVDIMM into guest address space. In the future, we might want to do the same for virtio devices - e.g. virtio-pmem or virtio-mem. Especially, they should be able to live side by side to each other. E.g. the virto based memory devices regions will not be exposed