Re: [Qemu-devel] [PATCH 1/2] Ignore RX tail kicks when RX disabled.

2012-10-18 Thread Alexander Duyck
On 10/18/2012 07:31 AM, Stefan Hajnoczi wrote: > On Thu, Oct 18, 2012 at 10:34 AM, Dmitry Fleytman wrote: >> The real purpose of check_rxov it a bit confusing indeed, mainly >> because of unclear name (rename?), >> however it works as following: >> >> There are 2 possible when RDT == RDH for RX ri

Re: [Qemu-devel] ioh3420: Add a map_irq function

2013-10-02 Thread Alexander Duyck
On 10/02/2013 10:12 AM, Alex Williamson wrote: > On Fri, 2013-09-27 at 15:10 -0700, Alexander Duyck wrote: >> On 02/28/2013 10:49 AM, Alex Williamson wrote: >>> Every bridge needs to know how to map IRQs from it's secondary bus to >>> the primary bus. We seem to be

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-28 Thread Alexander Duyck
On 10/28/2015 11:12 PM, Lan Tianyu wrote: On 2015年10月26日 23:03, Alexander Duyck wrote: No. I think you are missing the fact that there are 256 descriptors per page. As such if you dirty just 1 you will be pulling in 255 more, of which you may or may not have pulled in the receive buffer for

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-29 Thread Alexander Duyck
On 10/29/2015 01:33 AM, Lan Tianyu wrote: On 2015年10月29日 14:58, Alexander Duyck wrote: Your code was having to do a bunch of shuffling in order to get things set up so that you could bring the interface back up. I would argue that it may actually be faster at least on the bring-up to just drop

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-30 Thread Alexander Duyck
On 10/29/2015 07:41 PM, Lan Tianyu wrote: On 2015年10月30日 00:17, Alexander Duyck wrote: On 10/29/2015 01:33 AM, Lan Tianyu wrote: On 2015年10月29日 14:58, Alexander Duyck wrote: Your code was having to do a bunch of shuffling in order to get things set up so that you could bring the interface

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

2015-11-24 Thread Alexander Duyck
On 11/24/2015 05:38 AM, 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 to sync status between two si

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

2015-11-24 Thread Alexander Duyck
On Tue, Nov 24, 2015 at 7:18 PM, Lan Tianyu wrote: > On 2015年11月24日 22:20, Alexander Duyck wrote: >> I'm still not a fan of this approach. I really feel like this is >> something that should be resolved by extending the existing PCI hot-plug >> rather than trying to

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

2015-11-24 Thread Alexander Duyck
On Tue, Nov 24, 2015 at 1:20 PM, Michael S. Tsirkin wrote: > 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 v

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

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 12:21 AM, Lan Tianyu wrote: > On 2015年11月25日 13:30, Alexander Duyck wrote: >> No, what I am getting at is that you can't go around and modify the >> configuration space for every possible device out there. This >> solution won't scale.

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

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 8:02 AM, 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 to notify VF about migration status won't

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

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 8:39 AM, Michael S. Tsirkin wrote: > 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 g

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

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 7:15 PM, Dong, Eddie wrote: >> On Wed, Nov 25, 2015 at 12:21 AM, Lan Tianyu wrote: >> > On 2015年11月25日 13:30, Alexander Duyck wrote: >> >> No, what I am getting at is that you can't go around and modify the >> >> configurati

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

2015-11-30 Thread Alexander Duyck
On Sun, Nov 29, 2015 at 10:53 PM, Lan, Tianyu wrote: > On 11/26/2015 11:56 AM, Alexander Duyck wrote: >> >> > I am not saying you cannot modify the drivers, however what you are >> doing is far too invasive. Do you seriously plan on modifying all of >> the PCI dev

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

2015-12-01 Thread Alexander Duyck
On Tue, Dec 1, 2015 at 7:28 AM, Michael S. Tsirkin wrote: > 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

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

2015-12-01 Thread Alexander Duyck
On Tue, Dec 1, 2015 at 9:37 AM, Michael S. Tsirkin 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 wrote: >> > There are several components to this: >> > - dma_map_* needs to prevent page

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

2015-12-03 Thread Alexander Duyck
On Wed, Dec 2, 2015 at 6:08 AM, 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. >>> From performance side, >>> putting VF and virtio NIC

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

2015-12-04 Thread Alexander Duyck
On 12/04/2015 08:32 AM, Lan, Tianyu wrote: Hi Michael & Alexander: Thanks a lot for your comments and suggestions. We still need to support Windows guest for migration and this is why our patches keep all changes in the driver since it's impossible to change Windows kernel. That is a poor argu

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

2015-12-07 Thread Alexander Duyck
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 keep all changes in the driver since it's impossible to c

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

2015-12-07 Thread Alexander Duyck
On Mon, Dec 7, 2015 at 9:39 AM, Michael S. Tsirkin wrote: > 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: >> > If can't do that, we have to

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

2015-12-09 Thread Alexander Duyck
On Wed, Dec 9, 2015 at 1:28 AM, Lan, Tianyu wrote: > > > On 12/8/2015 1:12 AM, 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: >>>>> >>>>>

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

2015-12-09 Thread Alexander Duyck
On Wed, Dec 9, 2015 at 8:26 AM, Lan, Tianyu wrote: > For other kind of devices, it's hard to work. > We are also adding migration support for QAT(QuickAssist Technology) device. > > QAT device user case introduction. > Server, networking, big data, and storage applications use QuickAssist > Techn

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

2015-12-10 Thread Alexander Duyck
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 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 q

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

2015-12-10 Thread Alexander Duyck
On Thu, Dec 10, 2015 at 8: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: >> >>Ideally, it is able to leave guest driver unmodified but it requires the >> >>>hypervisor or qemu to aware th

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

2015-12-13 Thread Alexander Duyck
On Sun, Dec 13, 2015 at 7:47 AM, 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: &g

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

2015-12-13 Thread Alexander Duyck
On Sun, Dec 13, 2015 at 6:27 PM, Yang Zhang wrote: > On 2015/12/14 5:28, Alexander Duyck wrote: >> >> This patch set is meant to be the guest side code for a proof of concept >> involving leaving pass-through devices in the guest during the warm-up >> phase of guest l

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

2015-12-13 Thread Alexander Duyck
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 >> wrote: >>> >>> On 2015/12/14 5:28, Alexander Duyck wrote: >>>> >>>> >>>&g

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

2015-12-14 Thread Alexander Duyck
sible to modify current migration approaches so that instead of having to hot-remove the device before starting the migration this can instead be delayed until the period before the final stop and copy. Signed-off-by: Alexander Duyck --- arch/arm/include/asm/dma-mapping.h |3 ++- arch/

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

2015-12-14 Thread Alexander Duyck
elect "SWIOTLB page dirtying" from the "Processor type and features" menu. --- Alexander Duyck (3): swiotlb: Fold static unmap and sync calls into calling functions xen/swiotlb: Fold static unmap and sync calls into calling functions x86: Create dma_mark_dirty to di

[Qemu-devel] [RFC PATCH 2/3] xen/swiotlb: Fold static unmap and sync calls into calling functions

2015-12-14 Thread Alexander Duyck
ide the if statement instead of using a return in the case of sync and unmap. By doing this we make it so that we can also add a dma_mark_dirty function later. Signed-off-by: Alexander Duyck --- drivers/xen/swiotlb-xen.c | 90 ++--- 1 file changed, 36 inserti

[Qemu-devel] [RFC PATCH 1/3] swiotlb: Fold static unmap and sync calls into calling functions

2015-12-14 Thread Alexander Duyck
ide the if statement instead of using a return in the case of sync and unmap. By doing this we make it so that we can also add a dma_mark_dirty function later. Signed-off-by: Alexander Duyck --- lib/swiotlb.c | 81 +++-- 1 file changed, 33 inserti

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

2015-12-14 Thread Alexander Duyck
On Mon, Dec 14, 2015 at 6:00 AM, Michael S. Tsirkin wrote: > 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

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

2015-12-14 Thread Alexander Duyck
On Mon, Dec 14, 2015 at 9:20 AM, Michael S. Tsirkin wrote: > 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

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

2015-12-14 Thread Alexander Duyck
On Mon, Dec 14, 2015 at 12:52 PM, Michael S. Tsirkin wrote: > 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 wrote: >> > On Mon, Dec 14, 2015 at 08:34:00AM -0800, Alexander Duyck wrote: >> >&g

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

2015-12-25 Thread Alexander Duyck
On Thu, Dec 24, 2015 at 11:03 PM, 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 i

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

2015-12-27 Thread Alexander Duyck
On Sun, Dec 27, 2015 at 1:21 AM, Michael S. Tsirkin wrote: > 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

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

2015-12-27 Thread Alexander Duyck
On Sun, Dec 27, 2015 at 7:20 PM, 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 hot-plug if we are expe

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

2015-12-29 Thread Alexander Duyck
On Tue, Dec 29, 2015 at 8:46 AM, Michael S. Tsirkin wrote: > 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 mea

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

2015-12-29 Thread Alexander Duyck
On Tue, Dec 29, 2015 at 9:15 AM, Michael S. Tsirkin wrote: > 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 wrote: >> > On Tue, Dec 29, 2015 at 01:42:14AM +0800, Lan, Tianyu wrote: >> >> >

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

2016-01-04 Thread Alexander Duyck
On Mon, Jan 4, 2016 at 12:41 PM, Konrad Rzeszutek Wilk wrote: > On Sun, Dec 13, 2015 at 01:28:09PM -0800, Alexander Duyck wrote: >> This patch set is meant to be the guest side code for a proof of concept >> involving leaving pass-through devices in the guest during the warm-up &g

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

2016-01-05 Thread Alexander Duyck
On Tue, Jan 5, 2016 at 1:40 AM, Michael S. Tsirkin wrote: > 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

Re: [Qemu-devel] ioh3420: Add a map_irq function

2013-09-27 Thread Alexander Duyck
On 02/28/2013 10:49 AM, Alex Williamson wrote: > Every bridge needs to know how to map IRQs from it's secondary bus to > the primary bus. We seem to be direct mapped on ioh3420. This avoids > segfaults when trying to put assigned devices behind root ports. > > Signed-off-by: Alex Williamson >

Re: [Qemu-devel] [RFC Patch 01/12] PCI: Add virtfn_index for struct pci_device

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: Add "virtfn_index" member in the struct pci_device to record VF sequence of PF. This will be used in the VF sysfs node handle. Signed-off-by: Lan Tianyu --- drivers/pci/iov.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+) diff

Re: [Qemu-devel] [RFC Patch 02/12] IXGBE: Add new mail box event to restore VF status in the PF driver

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patch is to restore VF status in the PF driver when get event from VF. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 1 + drivers/net/ethernet/intel/ixgbe/

Re: [Qemu-devel] [RFC Patch 03/12] IXGBE: Add sysfs interface for Qemu to migrate VF status in the PF driver

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patch is to add sysfs interface state_in_pf under sysfs directory of VF PCI device for Qemu to get and put VF status in the PF driver during migration. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 156 +++

Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf"

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patch is to add new sysfs interface of "notify_vf" under sysfs directory of VF PCI device for Qemu to notify VF when migration status is changed. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 30 ++

Re: [Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: In order to restore VF function after migration, add self emulation layer to record regs' values during accessing regs. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbevf/Makefile| 3 ++- drivers/net/ethernet/intel/ixgbevf/ixgb

Re: [Qemu-devel] [RFC Patch 10/12] IXGBEVF: Add lock to protect tx/rx ring operation

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: Ring shifting during restoring VF function maybe race with original ring operation(transmit/receive package). This patch is to add tx/rx lock to protect ring related data. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h

Re: [Qemu-devel] [RFC Patch 08/12] IXGBEVF: Rework code of finding the end transmit desc of package

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: When transmit a package, the end transmit desc of package indicates whether package is sent already. Current code records the end desc's pointer in the next_to_watch of struct tx buffer. This code will be broken if shifting desc ring after migration. The

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-21 Thread Alexander Duyck
On 10/21/2015 12:20 PM, Alex Williamson wrote: On Wed, 2015-10-21 at 21:45 +0300, Or Gerlitz wrote: On Wed, Oct 21, 2015 at 7:37 PM, Lan Tianyu wrote: This patchset is to propose a new solution to add live migration support for 82599 SRIOV network card. In our solution, we prefer to put all

Re: [Qemu-devel] [RFC Patch 09/12] IXGBEVF: Add live migration support for VF driver

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: To let VF driver in the guest to know migration status, Qemu will fake PCI configure reg 0xF0 and 0xF1 to show migrate status and get ack from VF driver. When migration starts, Qemu will set reg "0xF0" to 1, notify VF driver via triggering mail box msg a

Re: [Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer

2015-10-22 Thread Alexander Duyck
On 10/22/2015 05:50 AM, Michael S. Tsirkin wrote: On Wed, Oct 21, 2015 at 01:58:19PM -0700, Alexander Duyck wrote: On 10/21/2015 09:37 AM, Lan Tianyu wrote: In order to restore VF function after migration, add self emulation layer to record regs' values during accessing regs. Signed-o

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-23 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patchset is to propose a new solution to add live migration support for 82599 SRIOV network card. Im our solution, we prefer to put all device specific operation into VF and PF driver and make code in the Qemu more general. VF status migration ==

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-23 Thread Alexander Duyck
On 10/23/2015 12:05 PM, Alex Williamson wrote: On Fri, 2015-10-23 at 11:36 -0700, Alexander Duyck wrote: On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patchset is to propose a new solution to add live migration support for 82599 SRIOV network card. Im our solution, we prefer to put all

Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf"

2015-10-24 Thread Alexander Duyck
On 10/24/2015 08:43 AM, Lan, Tianyu wrote: On 10/22/2015 4:52 AM, Alexander Duyck wrote: Also have you even considered the MSI-X configuration on the VF? I haven't seen anything anywhere that would have migrated the VF's MSI-X configuration from BAR 3 on one system to the new syste

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-26 Thread Alexander Duyck
On 10/25/2015 10:36 PM, Lan Tianyu wrote: On 2015年10月24日 02:36, Alexander Duyck wrote: I was thinking about it and I am pretty sure the dummy write approach is problematic at best. Specifically the issue is that while you are performing a dummy write you risk pulling in descriptors for data

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

2016-06-09 Thread Alexander Duyck
On Thu, Jun 9, 2016 at 3:14 AM, Zhou Jie wrote: > TO Alex > TO Michael > >In your solution you add a emulate PCI bridge to act as >a bridge between direct assigned devices and the host bridge. >Do you mean put all direct assigned devices to >one emulate PCI bridge? >If yes, thi

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

2016-06-12 Thread Alexander Duyck
On Sat, Jun 11, 2016 at 8:03 PM, Zhou Jie wrote: > Hi, Alex > > > On 2016/6/9 23:39, Alexander Duyck wrote: >> >> On Thu, Jun 9, 2016 at 3:14 AM, Zhou Jie >> wrote: >>> >>> TO Alex >>> TO Michael >>> >>>In your sol

Re: [PATCH v10 13/14] vfio-user: handle device interrupts

2022-06-06 Thread Alexander Duyck
On Mon, Jun 6, 2022 at 12:29 PM Jag Raman wrote: > > > > > On Jun 6, 2022, at 2:32 PM, Alexander Duyck > > wrote: > > > > On Tue, May 24, 2022 at 9:11 AM Jagannathan Raman > > wrote: > >> > >> Forward remote device's in

[RFC PATCH] mpqemu: Remove unlock/lock of iothread in mpqemu-link send and recv functions

2022-05-23 Thread Alexander Duyck
From: Alexander Duyck When I run Multi-process QEMU with an e1000 as the remote device and SMP enabled I see the combination lock up and become unresponsive. The QEMU build is a fairly standard x86_64-softmmu setup. After doing some digging I tracked the lockup down to the what appears to be a

Re: [RFC PATCH] mpqemu: Remove unlock/lock of iothread in mpqemu-link send and recv functions

2022-05-24 Thread Alexander Duyck
On Mon, May 23, 2022 at 3:56 PM Jag Raman wrote: > > > > > On May 23, 2022, at 11:09 AM, Alexander Duyck > > wrote: > > > > From: Alexander Duyck > > > > When I run Multi-process QEMU with an e1000 as the remote device and SMP > > enabled I

Re: [PATCH v10 13/14] vfio-user: handle device interrupts

2022-06-06 Thread Alexander Duyck
On Tue, May 24, 2022 at 9:11 AM Jagannathan Raman wrote: > > Forward remote device's interrupts to the guest > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > include/hw/pci/pci.h | 13 > include/hw/remote/vfio-user

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v1 6/6] vhost-user: add VFIO based accelerators support

2018-02-04 Thread Alexander Duyck
On Thu, Jan 25, 2018 at 9:57 PM, Tiwei Bie wrote: > On Fri, Jan 26, 2018 at 11:41:27AM +0800, Jason Wang wrote: >> On 2018年01月26日 07:59, Michael S. Tsirkin wrote: >> > > The virtual IOMMU isn't supported by the accelerators for now. >> > > Because vhost-user currently lacks of an efficient way to

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v1 6/6] vhost-user: add VFIO based accelerators support

2018-02-07 Thread Alexander Duyck
On Wed, Feb 7, 2018 at 8:43 AM, Michael S. Tsirkin wrote: > On Sun, Feb 04, 2018 at 01:49:46PM -0800, Alexander Duyck wrote: >> On Thu, Jan 25, 2018 at 9:57 PM, Tiwei Bie wrote: >> > On Fri, Jan 26, 2018 at 11:41:27AM +0800, Jason Wang wrote: >> >> On 2018年01月26日 0

[PATCH v21 QEMU 0/5] virtio-balloon: add support for free page reporting

2020-04-22 Thread Alexander Duyck
e Updated cover page comments --- Alexander Duyck (5): linux-headers: Update to allow renaming of free_page_report_cmd_id linux-headers: update to contain virito-balloon free page reporting virtio-balloon: Replace free page hinting references to 'report' with 'hint&#x

[PATCH v21 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of &#x

[PATCH v21 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a

[PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. Add a value for tracking the poison value being used if page poisoning is enabled. With this we can determine if we will need to

[PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v21 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

Re: [PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-23 Thread Alexander Duyck
On Thu, Apr 23, 2020 at 1:11 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > We need to make certain to advertise support for page poison tracking if > > we want to actually get data on if the guest will b

Re: [PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-23 Thread Alexander Duyck
On Thu, Apr 23, 2020 at 9:02 AM David Hildenbrand wrote: > > On 23.04.20 16:46, Alexander Duyck wrote: > > On Thu, Apr 23, 2020 at 1:11 AM David Hildenbrand wrote: > >> > >> On 22.04.20 20:21, Alexander Duyck wrote: > >>> From: Alexander Duyck > &

Re: [PATCH v21 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 4:23 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > In an upcoming patch a feature named Free Page Reporting is about to be > > added. In order to avoid any confusion we s

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 4:20 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for free page reporting. The idea is to function very similar > > to how the balloon works in that we basicall

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 8:34 AM David Hildenbrand wrote: > > > >> Also, I do wonder if we want to default-enable it. It can still have a > >> negative performance impact and some people might not want that. > > > > The negative performance impact should be minimal. At this point the > > hinting pr

[PATCH v22 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-24 Thread Alexander Duyck
for patch 3 Rewrote patch description for page poison reporting feature Made page-poison independent property and set to enabled by default Added logic to migrate poison_val Added several comments in code to better explain features Switched free-page-reporting property to disabled by default

[PATCH v22 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v22 QEMU 4/5] virtio-balloon: Implement support for page poison reporting feature

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v22 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a

[PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of &#x

[PATCH v22 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

Re: [PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-27 Thread Alexander Duyck
On Mon, Apr 27, 2020 at 1:15 AM David Hildenbrand wrote: > > There is only one wrong comment remaining I think. Something like > > diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c > index a1d6fb52c8..1b2127c04c 100644 > --- a/hw/virtio/virtio-balloon.c > +++ b/hw/virtio/virtio-

Re: [virtio-dev] Re: [PATCH v22 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-27 Thread Alexander Duyck
On Mon, Apr 27, 2020 at 1:21 AM David Hildenbrand wrote: > > Except one minor nit, looks good to me. We'll have to take care of > compat handling regarding patch #4 as soon as we have 5.0 compat > machines in place. I will clean up the one comment and submit later today if there is no other follo

Re: [PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-27 Thread Alexander Duyck
On Mon, Apr 27, 2020 at 8:11 AM David Hildenbrand wrote: > > On 27.04.20 17:08, Alexander Duyck wrote: > > On Mon, Apr 27, 2020 at 1:15 AM David Hildenbrand wrote: > >> > >> There is only one wrong comment remaining I think. Something like > >> > >&

[PATCH v23 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-27 Thread Alexander Duyck
r patches 4 & 5 Added additional comment fixes in patch 3 to remove "reporting" reference Renamed rvq in patch 5 to reporting_vq to improve readability Moved call adding reporting_vq to after free_page_vq to fix VQ ordering --- Alexander Duyck (5): linux-headers

[PATCH v23 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a

[PATCH v23 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of &#x

[PATCH v23 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v23 QEMU 4/5] virtio-balloon: Implement support for page poison reporting feature

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v23 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread Alexander Duyck
On Thu, Jun 18, 2020 at 5:54 AM David Hildenbrand wrote: > > On 13.06.20 22:07, Alexander Duyck wrote: > > On Tue, May 26, 2020 at 9:14 PM Alexander Duyck > > wrote: > >> > >> From: Alexander Duyck > >> > >> In an upcoming patch a feature n

Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread Alexander Duyck
On Thu, Jun 18, 2020 at 10:10 AM David Hildenbrand wrote: > > >> > >> Ugh, ... > >> > >> @MST, you might have missed that in another discussion, what's your > >> general opinion about removing free page hinting in QEMU (and Linux)? We > >> keep finding issues in the QEMU implementation, including

[PATCH 1/2] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-06-19 Thread Alexander Duyck
From: Alexander Duyck Based on code review it appears possible for the driver to force the device out of a stopped state when hinting by repeating the last ID it was provided. Prevent this by only allowing a transition to the start state when we are in the requested state. This way the driver

[PATCH 0/2] virtio-balloon: Free page hinting clean-ups

2020-06-19 Thread Alexander Duyck
containing the same ID it had submitted earlier. The second patch takes care of renaming various hinting objects that were using "reporting" in the name to try and clarify which objects are for free page reporting and which are for free page hinting. --- Alexander Duyck (2): virt

[PATCH 2/2] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-19 Thread Alexander Duyck
From: Alexander Duyck Recently a feature named Free Page Reporting was added to the virtio balloon. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of &#x

Re: [PATCH 1/2] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-06-22 Thread Alexander Duyck
On Mon, Jun 22, 2020 at 1:10 AM David Hildenbrand wrote: > > On 19.06.20 23:53, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Based on code review it appears possible for the driver to force the device > > out of a stopped state when hinting b

[PATCH v3 QEMU 0/3] virtio-balloon: Free page hinting clean-ups

2020-07-20 Thread Alexander Duyck
g Coverity issue Rebased on latest pull of QEMU --- Alexander Duyck (3): virtio-balloon: Prevent guest from starting a report when we didn't request one virtio-balloon: Add locking to prevent possible race when starting hinting virtio-balloon: Replace free page hinting refere

[PATCH v3 QEMU 1/3] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-07-20 Thread Alexander Duyck
From: Alexander Duyck Based on code review it appears possible for the driver to force the device out of a stopped state when hinting by repeating the last ID it was provided. Prevent this by only allowing a transition to the start state when we are in the requested state. This way the driver

[PATCH v3 QEMU 2/3] virtio-balloon: Add locking to prevent possible race when starting hinting

2020-07-20 Thread Alexander Duyck
From: Alexander Duyck There is already locking in place when we are stopping free page hinting but there is not similar protections in place when we start. I can only assume this was overlooked as in most cases the page hinting should not be occurring when we are starting the hinting, however

[PATCH v3 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-07-20 Thread Alexander Duyck
From: Alexander Duyck Recently a feature named Free Page Reporting was added to the virtio balloon. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of &#x

Re: [PATCH v2] virtio-balloon: always indicate S_DONE when migration fails

2020-07-22 Thread Alexander Duyck
;>> > >>> While at it, add similar locking to virtio_balloon_free_page_done() as > >>> done in virtio_balloon_free_page_stop. Locking is still weird, but that > >>> has to be sorted out separately. > >>> > >>> There is nothing to do in

  1   2   >