Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-07 Thread Michael S. Tsirkin
On Thu, Jan 07, 2016 at 11:30:25AM +0100, Igor Mammedov wrote: > On Tue, 5 Jan 2016 18:43:02 +0200 > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > On Tue, Jan 05, 2016 at 05:30:25PM +0100, Igor Mammedov wrote: > > > > > bios-linker-loa

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: > >> The two mechanisms referenced above would likely require coordination with > >> QEMU and as such are open to discussion. I haven't attempted to address > >> them as I am not sure there is a consensus as of yet. My personal >

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: > > > >> The two mechanisms referenced above would likely require coordination >

[PATCH] kvm/s390: drop unpaired smp_mb

2016-01-05 Thread Michael S. Tsirkin
smp_mb on vcpu destroy isn't paired with anything, violating pairing rules, and seems to be useless. Drop it. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- Untested. arch/s390/kvm/kvm-s390.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s3

Re: How to reserve guest physical region for ACPI

2016-01-05 Thread Michael S. Tsirkin
thing about DataTableRegion is that ACPI tables are > > > supposed to have static content which matches checksum in > > > table the header while you are trying to use it for dynamic > > > data. It would be cleaner/more compatible to teach > > > bios-linker-loader to just

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Mon, Ja

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:59:54PM +0200, Michael S. Tsirkin wrote: > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > >

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Mon, Ja

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 11:03:38AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Ja

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:43:03PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Ja

Re: [PATCH RFC] vhost: basic device IOTLB support

2015-12-31 Thread Michael S. Tsirkin
On Thu, Dec 31, 2015 at 03:13:45PM +0800, Jason Wang wrote: > This patch tries to implement an device IOTLB for vhost. This could be > used with for co-operation with userspace(qemu) implementation of > iommu for a secure DMA environment in guest. > > The idea is simple. When vhost meets an IOTLB

Re: How to reserve guest physical region for ACPI

2015-12-30 Thread Michael S. Tsirkin
On Wed, Dec 30, 2015 at 04:55:54PM +0100, Igor Mammedov wrote: > On Mon, 28 Dec 2015 14:50:15 +0200 > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > On Mon, Dec 28, 2015 at 10:39:04AM +0800, Xiao Guangrong wrote: > > > > > > Hi Michael,

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-29 Thread Michael S. Tsirkin
On Tue, Dec 29, 2015 at 01:42:14AM +0800, Lan, Tianyu wrote: > > > On 12/25/2015 8:11 PM, Michael S. Tsirkin wrote: > >As long as you keep up this vague talk about performance during > >migration, without even bothering with any measurements, this patchset > >will kee

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-29 Thread Michael S. Tsirkin
On Tue, Dec 29, 2015 at 09:04:51AM -0800, Alexander Duyck wrote: > On Tue, Dec 29, 2015 at 8:46 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Tue, Dec 29, 2015 at 01:42:14AM +0800, Lan, Tianyu wrote: > >> > >> > >> On 12/25/2015 8:11 PM, Michael S

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-28 Thread Michael S. Tsirkin
On Mon, Dec 28, 2015 at 03:20:10AM +, Dong, Eddie wrote: > > > > > > Even if the device driver doesn't support migration, you still want to > > > migrate VM? That maybe risk and we should add the "bad path" for the > > > driver at least. > > > > At a minimum we should have support for

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-28 Thread Michael S. Tsirkin
On Sun, Dec 27, 2015 at 01:45:15PM -0800, Alexander Duyck wrote: > On Sun, Dec 27, 2015 at 1:21 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Fri, Dec 25, 2015 at 02:31:14PM -0800, Alexander Duyck wrote: > >> The PCI hot-plug specification calls out th

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-28 Thread Michael S. Tsirkin
On Mon, Dec 28, 2015 at 11:52:43AM +0300, Pavel Fedin wrote: > Hello! > > > A dedicated IRQ per device for something that is a system wide event > > sounds like a waste. I don't understand why a spec change is strictly > > required, we only need to support this with the specific virtual bridge

Re: How to reserve guest physical region for ACPI

2015-12-28 Thread Michael S. Tsirkin
y to what we can do with ACPI_EXTRACT macros in python, but implemented in C. This is to allow ACPI code direct access to data tables - which is exactly what DataTableRegion is there for, except no known windows release so far implements DataTableRegion. Signed-off-by: Michael S. Tsirkin <m...@redhat.com>

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-27 Thread Michael S. Tsirkin
On Fri, Dec 25, 2015 at 02:31:14PM -0800, Alexander Duyck wrote: > The PCI hot-plug specification calls out that the OS can optionally > implement a "pause" mechanism which is meant to be used for high > availability type environments. What I am proposing is basically > extending the standard

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-25 Thread Michael S. Tsirkin
On Fri, Dec 25, 2015 at 03:03:47PM +0800, Lan Tianyu wrote: > Merry Christmas. > Sorry for later response due to personal affair. > > On 2015年12月14日 03:30, Alexander Duyck wrote: > >> > These sounds we need to add a faked bridge for migration and adding a > >> > driver in the guest for it. It

[PULL] vhost: cleanups and fixes

2015-12-20 Thread Michael S. Tsirkin
to 74a599f09bec7419b2490039f0fb33bc8581ef7c: virtio/s390: handle error values in irb (2015-12-17 10:37:33 +0200) virtio: fixes on top of 4.4-rc5 This includes a single fix for virtio ccw error handling. Signed-off-by: Michael S. Tsirkin <m...@redhat.

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-14 Thread Michael S. Tsirkin
On Sun, Dec 13, 2015 at 11:47:44PM +0800, Lan, Tianyu wrote: > > > On 12/11/2015 1:16 AM, Alexander Duyck wrote: > >On Thu, Dec 10, 2015 at 6:38 AM, Lan, Tianyu wrote: > >> > >> > >>On 12/10/2015 7:41 PM, Dr. David Alan Gilbert wrote: > > Ideally, it is able to

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-14 Thread Michael S. Tsirkin
On Fri, Dec 11, 2015 at 03:32:04PM +0800, Lan, Tianyu wrote: > > > On 12/11/2015 12:11 AM, Michael S. Tsirkin wrote: > >On Thu, Dec 10, 2015 at 10:38:32PM +0800, Lan, Tianyu wrote: > >> > >> > >>On 12/10/2015 7:41 PM, Dr. David Alan Gilbert wrote: >

Re: [PATCH 0/1] virtio/s390: one fix

2015-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2015 at 04:02:33PM +0100, Cornelia Huck wrote: > On Thu, 3 Dec 2015 17:23:59 +0100 > Cornelia Huck wrote: > > > Michael, > > > > here's one fix for the virtio-ccw driver. > > > > Patch is against master, as your git branches on mst/vhost.git seem > >

Re: [RFC PATCH 3/3] x86: Create dma_mark_dirty to dirty pages used for DMA by VM guest

2015-12-14 Thread Michael S. Tsirkin
On Sun, Dec 13, 2015 at 01:28:31PM -0800, Alexander Duyck wrote: > This patch is meant to provide the guest with a way of flagging DMA pages > as being dirty to the host when using a direct-assign device within a > guest. The advantage to this approach is that it is fairly simple, however > It

Re: [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2015-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2015 at 03:20:26PM +0800, Yang Zhang wrote: > On 2015/12/14 13:46, Alexander Duyck wrote: > >On Sun, Dec 13, 2015 at 9:22 PM, Yang Zhang wrote: > >>On 2015/12/14 12:54, Alexander Duyck wrote: > >>> > >>>On Sun, Dec 13, 2015 at 6:27 PM, Yang Zhang

Re: [RFC PATCH 3/3] x86: Create dma_mark_dirty to dirty pages used for DMA by VM guest

2015-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2015 at 08:34:00AM -0800, Alexander Duyck wrote: > > This way distro can use a guest agent to disable > > dirtying until before migration starts. > > Right. For a v2 version I would definitely want to have some way to > limit the scope of this. My main reason for putting this

Re: [RFC PATCH 3/3] x86: Create dma_mark_dirty to dirty pages used for DMA by VM guest

2015-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2015 at 09:59:13AM -0800, Alexander Duyck wrote: > On Mon, Dec 14, 2015 at 9:20 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Mon, Dec 14, 2015 at 08:34:00AM -0800, Alexander Duyck wrote: > >> > This way distro can use a guest agent to disable &

Re: live migration vs device assignment (motivation)

2015-12-10 Thread Michael S. Tsirkin
On Thu, Dec 10, 2015 at 11:04:54AM +0800, Lan, Tianyu wrote: > > On 12/10/2015 4:07 AM, Michael S. Tsirkin wrote: > >On Thu, Dec 10, 2015 at 12:26:25AM +0800, Lan, Tianyu wrote: > >>On 12/8/2015 12:50 AM, Michael S. Tsirkin wrote: > >>>I thought about what this

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-10 Thread Michael S. Tsirkin
On Thu, Dec 10, 2015 at 10:38:32PM +0800, Lan, Tianyu wrote: > > > On 12/10/2015 7:41 PM, Dr. David Alan Gilbert wrote: > >>Ideally, it is able to leave guest driver unmodified but it requires the > >>>hypervisor or qemu to aware the device which means we may need a driver in > >>>hypervisor or

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-09 Thread Michael S. Tsirkin
On Sat, Dec 05, 2015 at 12:32:00AM +0800, Lan, Tianyu wrote: > Hi Michael & Alexander: > Thanks a lot for your comments and suggestions. It's nice that it's appreciated, but you then go on and ignore all that I have written here: https://www.mail-archive.com/kvm@vger.kernel.org/msg123826.html >

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-09 Thread Michael S. Tsirkin
On Wed, Dec 09, 2015 at 07:19:15PM +0800, Lan, Tianyu wrote: > On 12/9/2015 6:37 PM, Michael S. Tsirkin wrote: > >On Sat, Dec 05, 2015 at 12:32:00AM +0800, Lan, Tianyu wrote: > >>Hi Michael & Alexander: > >>Thanks a lot for your comments and suggestions. > &g

Re: [PATCH v3 0/4] Add virtio transport for AF_VSOCK

2015-12-09 Thread Michael S. Tsirkin
On Wed, Dec 09, 2015 at 08:03:49PM +0800, Stefan Hajnoczi wrote: > Note: the virtio-vsock device specification is currently under review but not > yet finalized. Please review this code but don't merge until I send an update > when the spec is finalized. Thanks! Yes, this should have RFC in the

Re: live migration vs device assignment (motivation)

2015-12-09 Thread Michael S. Tsirkin
On Thu, Dec 10, 2015 at 12:26:25AM +0800, Lan, Tianyu wrote: > On 12/8/2015 12:50 AM, Michael S. Tsirkin wrote: > >I thought about what this is doing at the high level, and I do have some > >value in what you are trying to do, but I also think we need to clarify > >the motivat

Re: [PATCH] vhost: vsock: select CONFIG_VHOST

2015-12-08 Thread Michael S. Tsirkin
icit 'select' like we have for the other vhost > drivers. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> This will need to be done eventually, so Acked-by: Michael S. Tsirkin <m...@redhat.com> but I really think the right thing for now is to revert current vsock code,

live migration vs device assignment (was Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC)

2015-12-07 Thread Michael S. Tsirkin
On Tue, Nov 24, 2015 at 09:35:17PM +0800, Lan Tianyu wrote: > This patchset is to propose a solution of adding live migration > support for SRIOV NIC. I thought about what this is doing at the high level, and I do have some value in what you are trying to do, but I also think we need to clarify

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-07 Thread Michael S. Tsirkin
On Mon, Dec 07, 2015 at 09:12:08AM -0800, Alexander Duyck wrote: > On Mon, Dec 7, 2015 at 7:40 AM, Lan, Tianyu wrote: > > On 12/5/2015 1:07 AM, Alexander Duyck wrote: > >>> > >>> > >>> We still need to support Windows guest for migration and this is why our > >>> patches

Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-12-04 Thread Michael S. Tsirkin
On Fri, Dec 04, 2015 at 02:42:36PM +0800, Lan, Tianyu wrote: > > On 12/2/2015 10:31 PM, Michael S. Tsirkin wrote: > >>>We hope > >>>to find a better way to make SRIOV NIC work in these cases and this is > >>>worth to do since SRIOV NIC provides better net

Re: [PATCH] VSOCK: mark virtio_transport.ko experimental

2015-12-04 Thread Michael S. Tsirkin
On Fri, Dec 04, 2015 at 11:49:18AM +0800, Stefan Hajnoczi wrote: > Be explicit that the virtio_transport.ko code implements a draft virtio > specification that is still subject to change. > > Signed-off-by: Stefan Hajnoczi > --- > If you'd rather wait until the device

Re: [PATCH v2 0/5] Add virtio transport for AF_VSOCK

2015-12-03 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 02:43:58PM +0800, Stefan Hajnoczi wrote: > v2: > * Rebased onto Linux v4.4-rc2 > * vhost: Refuse to assign reserved CIDs > * vhost: Refuse guest CID if already in use > * vhost: Only accept correctly addressed packets (no spoofing!) > * vhost: Support flexible rx/tx

Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 10:08:25PM +0800, Lan, Tianyu wrote: > On 12/1/2015 11:02 PM, Michael S. Tsirkin wrote: > >>But > >>it requires guest OS to do specific configurations inside and rely on > >>bonding driver which blocks it work on Windows. > >>

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-02 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 10:36:33AM -0800, Alexander Duyck wrote: > On Tue, Dec 1, 2015 at 9:37 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Tue, Dec 01, 2015 at 09:04:32AM -0800, Alexander Duyck wrote: > >> On Tue, Dec 1, 2015 at 7:28 AM, Michael S. Tsirkin

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 01:04:03PM +0800, Jason Wang wrote: > > > On 12/01/2015 10:43 PM, Michael S. Tsirkin wrote: > > On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote: > >> > >> On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: > >>> On

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-01 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 09:04:32AM -0800, Alexander Duyck wrote: > On Tue, Dec 1, 2015 at 7:28 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Tue, Dec 01, 2015 at 11:04:31PM +0800, Lan, Tianyu wrote: > >> > >> > >> On 12/1/2015 12:07 AM,

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-01 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 11:04:31PM +0800, Lan, Tianyu wrote: > > > On 12/1/2015 12:07 AM, Alexander Duyck wrote: > >They can only be corrected if the underlying assumptions are correct > >and they aren't. Your solution would have never worked correctly. > >The problem is you assume you can keep

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-12-01 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote: > > > On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: > > On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: > >> > This patch tries to poll for new added tx buffer or socket receive > >>

Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-12-01 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 02:26:57PM +0800, Lan, Tianyu wrote: > > > On 11/30/2015 4:01 PM, Michael S. Tsirkin wrote: > >It is still not very clear what it is you are trying to achieve, and > >whether your patchset achieves it. You merely say "adding live > >migr

Re: [PATCH] vhost: replace % with & on data path

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 30, 2015 at 10:34:07AM +0200, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > --- > drivers/vhost/vhost.c | 8 +--- > 1 file change

Re: [PATCH] vhost: replace % with & on data path

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 30, 2015 at 12:42:49AM -0800, Joe Perches wrote: > On Mon, 2015-11-30 at 10:34 +0200, Michael S. Tsirkin wrote: > > We know vring num is a power of 2, so use & > > to mask the high bits. > [] > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c &

Re: [PATCH v8 3/5] nvdimm acpi: build ACPI NFIT table

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:51:01PM +0800, Xiao Guangrong wrote: > NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) > > Currently, we only support PMEM mode. Each device has 3 structures: > - SPA structure, defines the PMEM region info > > - MEM DEV structure, it has the

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: > NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices > > There is a root device under \_SB and specified NVDIMM devices are under the > root device. Each NVDIMM device has _ADR which returns its handle used to > associate

Re: [PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 03:11:28PM +0800, Jason Wang wrote: > Signed-off-by: Jason Wang > --- > drivers/vhost/vhost.c | 26 +- > drivers/vhost/vhost.h | 1 + > 2 files changed, 18 insertions(+), 9 deletions(-) > > diff --git a/drivers/vhost/vhost.c

Re: [PATCH net-next 0/3] basic busy polling support for vhost_net

2015-11-30 Thread Michael S. Tsirkin
On Sun, Nov 29, 2015 at 10:31:10PM -0500, David Miller wrote: > From: Jason Wang > Date: Wed, 25 Nov 2015 15:11:26 +0800 > > > This series tries to add basic busy polling for vhost net. The idea is > > simple: at the end of tx/rx processing, busy polling for new tx added > >

Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-11-30 Thread Michael S. Tsirkin
On Tue, Nov 24, 2015 at 09:35:17PM +0800, Lan Tianyu wrote: > This patchset is to propose a solution of adding live migration > support for SRIOV NIC. > > During migration, Qemu needs to let VF driver in the VM to know > migration start and end. Qemu adds faked PCI migration capability > to help

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: > NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices Forgot to mention: Pls put spec info in code comments near relevant functions, not just the log. > > There is a root device under \_SB and specified NVDIMM devices are

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-11-30 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: > This patch tries to poll for new added tx buffer or socket receive > queue for a while at the end of tx/rx processing. The maximum time > spent on polling were specified through a new kind of vring ioctl. > > Signed-off-by: Jason Wang

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:50:58PM +0800, Xiao Guangrong wrote: > This patchset can be found at: > https://github.com/xiaogr/qemu.git nvdimm-v8 > > It is based on pci branch on Michael's tree and the top commit is: > commit e3a4e177d9 (migration/ram: fix build on 32 bit hosts). > >

[PATCH] vhost: replace % with & on data path

2015-11-30 Thread Michael S. Tsirkin
We know vring num is a power of 2, so use & to mask the high bits. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- drivers/vhost/vhost.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 080422f..85f0

[PATCH v2] vhost: replace % with & on data path

2015-11-30 Thread Michael S. Tsirkin
We know vring num is a power of 2, so use & to mask the high bits. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- Changes from v1: drop an unrelated chunk drivers/vhost/vhost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c

[PATCH RFC v2] virtio: skip avail/used index reads

2015-11-30 Thread Michael S. Tsirkin
tools/virtio: move list macro stubs Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- Changes from v1: add a missing chunk in vhost_get_vq_desc drivers/vhost/vhost.h| 3 +- include/linux/vringh.h | 3 + include/uapi/linux/virtio_ring.h | 3 +

[PATCH RFC] virtio: skip avail/used index reads

2015-11-30 Thread Michael S. Tsirkin
tools/virtio: fix byteswap logic tools/virtio: move list macro stubs Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- drivers/vhost/vhost.h| 3 +- include/linux/vringh.h | 3 + include/uapi/linux/virtio_ring.h | 3 + drivers/vhost/vhost.c

Re: [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 11:32:23PM +0800, Lan, Tianyu wrote: > > On 11/25/2015 5:03 AM, Michael S. Tsirkin wrote: > >>>+void vfio_migration_cap_handle(PCIDevice *pdev, uint32_t addr, > >>>+ uint32_t val, int len) > >>>+{

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Thu, Nov 26, 2015 at 12:02:33AM +0800, Lan, Tianyu wrote: > On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: > >Frankly, I don't really see what this short term hack buys us, > >and if it goes in, we'll have to maintain it forever. > > > > The framework of how t

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 08:24:38AM -0800, Alexander Duyck wrote: > >> Also, assuming you just want to do ifdown/ifup for some reason, it's > >> easy enough to do using a guest agent, in a completely generic way. > >> > > > > Just ifdown/ifup is not enough for migration. It needs to restore some

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 01:39:32PM +0800, Lan Tianyu wrote: > On 2015年11月25日 05:20, Michael S. Tsirkin wrote: > > I have to say, I was much more interested in the idea > > of tracking dirty memory. I have some thoughts about > > that one - did you give up on it then? >

Re: [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-24 Thread Michael S. Tsirkin
On Tue, Nov 24, 2015 at 09:35:26PM +0800, Lan Tianyu wrote: > This patch is to add SRIOV VF migration support. > Create new device type "vfio-sriov" and add faked PCI migration capability > to the type device. > > The purpose of the new capability > 1) sync migration status with VF driver in the

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-24 Thread Michael S. Tsirkin
On Tue, Nov 24, 2015 at 09:38:18PM +0800, Lan Tianyu wrote: > This patch is to add migration support for ixgbevf driver. Using > faked PCI migration capability table communicates with Qemu to > share migration status and mailbox irq vector index. > > Qemu will notify VF via sending MSIX msg to

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-22 Thread Michael S. Tsirkin
On Sun, Nov 22, 2015 at 10:21:34PM -, David Woodhouse wrote: > > > > There's that, and there's an "I care about security, but > > do not want to burn up cycles on fake protections that > > do not work" case. > > It would seem to make most sense for this use case simply *not* to expose >

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-22 Thread Michael S. Tsirkin
On Sun, Nov 22, 2015 at 03:58:28PM +, David Woodhouse wrote: > On Fri, 2015-11-20 at 10:21 +0200, Michael S. Tsirkin wrote: > > > > David, there are two things a hypervisor needs to tell the guest. > > 1. The actual device is behind an IOMMU. This is what you > >   

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-22 Thread Michael S. Tsirkin
On Sun, Nov 22, 2015 at 03:54:21PM +, David Woodhouse wrote: > On Sun, 2015-11-22 at 15:06 +0200, Marcel Apfelbaum wrote: > > > > > > I tried to generate a DMAR table that excludes some devices from > > IOMMU translation, however it does not help. > > > > The reason is, as far as I

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-20 Thread Michael S. Tsirkin
On Thu, Nov 19, 2015 at 11:38:06PM +, David Woodhouse wrote: > On Thu, 2015-11-19 at 13:59 -0800, Andy Lutomirski wrote: > > > > > > > > So thinking hard about it, I don't see any real drawbacks to making this > > > conditional on a new feature bit, that Xen can then set.. > > > > Can you

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-20 Thread Michael S. Tsirkin
On Fri, Nov 20, 2015 at 01:56:39PM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2015-11-19 at 23:38 +, David Woodhouse wrote: > > > > I understand that POWER and other platforms don't currently have a > > clean way to indicate that certain device don't have translation. And I > > understand

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-19 Thread Michael S. Tsirkin
On Thu, Nov 19, 2015 at 10:39:05AM +0800, Xiao Guangrong wrote: > > > On 11/19/2015 04:44 AM, Michael S. Tsirkin wrote: > >On Wed, Nov 18, 2015 at 05:18:17PM -0200, Eduardo Habkost wrote: > >>On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote: > >>

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Michael S. Tsirkin
On Fri, Nov 20, 2015 at 08:56:46AM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 19, 2015 at 01:59:05PM -0800, Andy Lutomirski wrote: > > On Nov 19, 2015 5:45 AM, "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > > > > On Tue, Oct 27, 2015

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Michael S. Tsirkin
On Thu, Nov 19, 2015 at 01:59:05PM -0800, Andy Lutomirski wrote: > On Nov 19, 2015 5:45 AM, "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > > On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > > > This switches virtio to us

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Michael S. Tsirkin
On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > This switches virtio to use the DMA API unconditionally. I'm sure > it breaks things, but it seems to work on x86 using virtio-pci, with > and without Xen, and using both the modern 1.0 variant and the > legacy variant. So

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-18 Thread Michael S. Tsirkin
On Wed, Nov 18, 2015 at 05:18:17PM -0200, Eduardo Habkost wrote: > On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote: > > > > Ping... > > > > Do you have any comment on this patchset? Could it be applied to somewhere > > if it is okay for you? > > I have no additional comments, as

[PATCH] vhost: relax log address alignment

2015-11-16 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index eec2f11..080422f 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -819,

Re: [PATCH] kvm/vmx: EPTP switching test

2015-11-16 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:51:06PM +0100, =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= wrote: > 2015-11-15 18:00+0200, Michael S. Tsirkin: > > This patch adds a new parameter: eptp_switching_test, which enables > > > > testing EPT switching on VMX if supported by hardw

[PATCH] kvm/vmx: EPTP switching test

2015-11-15 Thread Michael S. Tsirkin
oving the need for writing the bytecode manually). Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- I think I'd like to put this upstream so future eptp switching work can be implemented on top. Comments? arch/x86/include/asm/vmx.h | 7 arch/x86/kvm/vmx.c | 84 +

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-12 Thread Michael S. Tsirkin
On Wed, Nov 11, 2015 at 11:30:27PM +0100, David Woodhouse wrote: > On Wed, 2015-11-11 at 07:56 -0800, Andy Lutomirski wrote: > > > > Can you flesh out this trick? > > > > On x86 IIUC the IOMMU more-or-less defaults to passthrough. If the > > kernel wants, it can switch it to a non-passthrough

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > The vq->is_le field is used to fix endianness when accessing the vring via > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: > > 1) host is big endian and device is modern virtio > > 2) host has cross-endian

[PULL 03/11] KVM: add support for any length io eventfd

2015-11-12 Thread Michael S. Tsirkin
From: Jason Wang <jasow...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> --- include/sysemu

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-11 Thread Michael S. Tsirkin
On Sat, Oct 31, 2015 at 12:16:12AM +0900, Joerg Roedel wrote: > On Thu, Oct 29, 2015 at 11:01:41AM +0200, Michael S. Tsirkin wrote: > > Example: you have a mix of assigned devices and virtio devices. You > > don't trust your assigned device vendor not to corrupt your memory

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-11 Thread Michael S. Tsirkin
On Tue, Nov 10, 2015 at 10:54:21AM -0800, Andy Lutomirski wrote: > On Nov 10, 2015 7:02 AM, "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > > On Sun, Nov 08, 2015 at 12:49:46PM +0100, Joerg Roedel wrote: > > > On Sun, Nov 08, 2015 at 12:37:47PM +0200,

Re: [PATCH] virtio_ring: Shadow available ring flags & index

2015-11-11 Thread Michael S. Tsirkin
On Tue, Nov 10, 2015 at 04:21:07PM -0800, Venkatesh Srinivas wrote: > Improves cacheline transfer flow of available ring header. > > Virtqueues are implemented as a pair of rings, one producer->consumer > avail ring and one consumer->producer used ring; preceding the > avail ring in memory are

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-10 Thread Michael S. Tsirkin
On Sun, Nov 08, 2015 at 12:49:46PM +0100, Joerg Roedel wrote: > On Sun, Nov 08, 2015 at 12:37:47PM +0200, Michael S. Tsirkin wrote: > > I have no problem with that. For example, can we teach > > the DMA API on intel x86 to use PT for virtio by default? > > That would allow m

Re: [PATCH v4 0/6] virtio core DMA API conversion

2015-11-10 Thread Michael S. Tsirkin
On Tue, Nov 10, 2015 at 09:37:54PM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2015-11-09 at 21:35 -0800, Andy Lutomirski wrote: > > > > We could do it the other way around: on powerpc, if a PCI device is in > > that range and doesn't have the "bypass" property at all, then it's > > assumed to

Re: [PATCH v4 0/6] virtio core DMA API conversion

2015-11-09 Thread Michael S. Tsirkin
Fix a DMA ordering issue (swiotlb=force works now). > - Minor cleanups. > > Andy Lutomirski (5): > virtio_ring: Support DMA APIs > virtio_pci: Use the DMA API > virtio: Add improved queue allocation API > virtio_mmio: Use the DMA API > virtio_pci: Use the D

Re: [PATCH v6 07/33] util: introduce qemu_file_get_page_size()

2015-11-09 Thread Michael S. Tsirkin
On Sat, Oct 31, 2015 at 04:09:56PM +0800, Xiao Guangrong wrote: > > > On 10/30/2015 11:54 PM, Eduardo Habkost wrote: > >On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > >>There are three places use the some logic to get the page size on > >>the file path or file fd > >> > >>This

Re: [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:08PM +0800, Xiao Guangrong wrote: > This patch is generated by this script: > > find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ > | xargs sed -i "s/PC_DIMM/DIMM/g" > > find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type

Re: [PATCH V6 0/6] Fast mmio eventfd fixes

2015-11-09 Thread Michael S. Tsirkin
On Mon, Nov 09, 2015 at 12:35:45PM +0800, Jason Wang wrote: > > > On 11/09/2015 01:11 AM, Michael S. Tsirkin wrote: > > On Tue, Sep 15, 2015 at 02:41:53PM +0800, Jason Wang wrote: > >> Hi: > >> > >> This series fixes two issues of fast mmio eventfd:

Re: [PATCH v6 19/33] dimm: keep the state of the whole backend memory

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:13PM +0800, Xiao Guangrong wrote: > QEMU keeps the state of memory of dimm device during live migration, > however, it is not enough for nvdimm device as its memory does not > contain its label data, so that we should protect the whole backend > memory instead > >

Re: [PATCH v6 06/33] acpi: add aml_method_serialized

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:00PM +0800, Xiao Guangrong wrote: > It avoid explicit Mutex and will be used by NVDIMM ACPI > > Signed-off-by: Xiao Guangrong I'd rather you squashed these utility patches in with where the code is used. This is just making it harder

Re: [PATCH v6 07/33] util: introduce qemu_file_get_page_size()

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > There are three places use the some logic to get the page size on > the file path or file fd > > This patch introduces qemu_file_get_page_size() to unify the code > > Signed-off-by: Xiao Guangrong

Re: [PATCH v6 08/33] exec: allow memory to be allocated from any kind of path

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:02PM +0800, Xiao Guangrong wrote: > Currently file_ram_alloc() is designed for hugetlbfs, however, the memory > of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file > locates at DAX enabled filesystem > > So this patch let it work on any kind of

Re: [PATCH v6 12/33] pc-dimm: remove DEFAULT_PC_DIMMSIZE

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:06PM +0800, Xiao Guangrong wrote: > It's not used any more > > Signed-off-by: Xiao Guangrong You should leave the renames and cleanups off for later. This patchset is large enough as it is. > --- > include/hw/mem/pc-dimm.h | 2 -- >

Re: [PATCH v6 09/33] exec: allow file_ram_alloc to work on file

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:03PM +0800, Xiao Guangrong wrote: > Currently, file_ram_alloc() only works on directory - it creates a file > under @path and do mmap on it > > This patch tries to allow it to work on file directly, if @path is a > directory it works as before, otherwise it treats

Re: [PATCH v6 11/33] hostmem-file: use whole file size if possible

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote: > Use the whole file size if @size is not specified which is useful > if we want to directly pass a file to guest > > Signed-off-by: Xiao Guangrong Better split these simplifications off from the

Re: [PATCH v6 05/33] acpi: add aml_object_type

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:55:59PM +0800, Xiao Guangrong wrote: > Implement ObjectType which is used by NVDIMM _DSM method in > later patch > > Signed-off-by: Xiao Guangrong I had to go dig in the _DSM patch to see how it's used. And sure enough, callers have to

  1   2   3   4   5   6   7   8   9   10   >