[virtio-dev] Re: [PATCH 1/4] eth: add speed and duplex definitions

2018-03-07 Thread Jason Baron
On 03/06/2018 01:15 PM, Michael S. Tsirkin wrote: > On Tue, Mar 06, 2018 at 12:53:14PM -0500, Jason Baron wrote: >> >> >> On 03/02/2018 12:54 PM, Michael S. Tsirkin wrote: >>> On Thu, Mar 01, 2018 at 10:46:33PM -0500, Jason Baron wrote: Pull in definitions for SPEED_UNKNOWN, DUPLEX_UNKNOWN,

[virtio-dev] [PATCH v2 1/3] scripts/update-linux-headers: add ethtool.h and update to 4.16.0-rc4

2018-03-07 Thread Jason Baron
A subsequent patch to add support for setting linkspeed/duplex in virtio-net, requires a few definitions from ethtool.h, which ends up pulling in kernel.h and sysinfo.h as well. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-dev@lists.oasis-open.org --- include/s

[virtio-dev] [PATCH v2 0/3] virtio-net: allow linkspeed and duplex setting

2018-03-07 Thread Jason Baron
Hi, Linux can now read linkspeed and duplex settings as set by the hypervisor: faa9b39 virtio_net: propagate linkspeed/duplex settings from the hypervisor This series thus adds qemu support. Also, this patchset depends on this header sync: https://lists.gnu.org/archive/html/qemu-devel/2018-02/

[virtio-dev] [PATCH v2 2/3] virtio-net: use 64-bit values for feature flags

2018-03-07 Thread Jason Baron
In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-dev@lists.oasis-open.org --- hw/net/virtio-net.c| 55 +

[virtio-dev] [PATCH v2 3/3] virtio-net: add linkspeed and duplex settings to virtio-net

2018-03-07 Thread Jason Baron
Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', this requires custom ethtool commands for virtio-net by default. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user can subsequently over

RE: [virtio-dev] [PATCH v3] virtio-blk: add discard and write zeroes features to specification

2018-03-07 Thread Liu, Changpeng
> -Original Message- > From: virtio-dev@lists.oasis-open.org > [mailto:virtio-dev@lists.oasis-open.org] On > Behalf Of Stefan Hajnoczi > Sent: Wednesday, March 7, 2018 7:29 PM > To: Liu, Changpeng > Cc: virtio-dev@lists.oasis-open.org; virtio-comm...@lists.oasis-open.org; > cav...@redha

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-07 Thread Michael S. Tsirkin
On Wed, Mar 07, 2018 at 10:06:30AM -0800, Stephen Hemminger wrote: > On Wed, 7 Mar 2018 09:50:50 -0800 > Alexander Duyck wrote: > > > On Tue, Mar 6, 2018 at 6:38 PM, Michael S. Tsirkin wrote: > > > On Tue, Mar 06, 2018 at 03:27:46PM -0800, Alexander Duyck wrote: > > >> > I definitelly vote for

[virtio-dev] Re: [virtio] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Michael S. Tsirkin
On Wed, Mar 07, 2018 at 05:14:27PM +0100, Cornelia Huck wrote: > On Wed, 7 Mar 2018 17:05:24 +0100 > Halil Pasic wrote: > > > On 03/07/2018 03:49 PM, Cornelia Huck wrote: > > +When VIRTIO_F_NOTIFICATION_DATA has been negotiated, > > +the driver notifies the device by writing the followi

[virtio-dev] Re: [virtio] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Michael S. Tsirkin
On Wed, Mar 07, 2018 at 05:05:24PM +0100, Halil Pasic wrote: > > > On 03/07/2018 03:49 PM, Cornelia Huck wrote: > +When VIRTIO_F_NOTIFICATION_DATA has been negotiated, > +the driver notifies the device by writing the following > +32-bit value to the Queue Notify address: > +\b

[virtio-dev] Re: [pci PATCH v3 0/3] Add support for unmanaged SR-IOV

2018-03-07 Thread Alexander Duyck
On Tue, Mar 6, 2018 at 10:46 PM, Christoph Hellwig wrote: > On Tue, Mar 06, 2018 at 11:29:08AM -0800, Alexander Duyck wrote: >> This series is meant to add support for SR-IOV on devices when the VFs are >> not managed by the kernel. Examples of recent patches attempting to do this >> include: >> v

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-07 Thread Alexander Duyck
On Wed, Mar 7, 2018 at 10:06 AM, Stephen Hemminger wrote: > On Wed, 7 Mar 2018 09:50:50 -0800 > Alexander Duyck wrote: > >> On Tue, Mar 6, 2018 at 6:38 PM, Michael S. Tsirkin wrote: >> > On Tue, Mar 06, 2018 at 03:27:46PM -0800, Alexander Duyck wrote: >> >> > I definitelly vote for a separate co

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-07 Thread Alexander Duyck
On Tue, Mar 6, 2018 at 6:38 PM, Michael S. Tsirkin wrote: > On Tue, Mar 06, 2018 at 03:27:46PM -0800, Alexander Duyck wrote: >> > I definitelly vote for a separate common shared code for both netvsc and >> > virtio_net - even if you use 2 and 3 netdev model, you could share the >> > common code. S

[virtio-dev] Re: [virtio] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Cornelia Huck
On Wed, 7 Mar 2018 17:05:24 +0100 Halil Pasic wrote: > On 03/07/2018 03:49 PM, Cornelia Huck wrote: > +When VIRTIO_F_NOTIFICATION_DATA has been negotiated, > +the driver notifies the device by writing the following > +32-bit value to the Queue Notify address: > +\begin{lstlist

[virtio-dev] Re: [virtio] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Halil Pasic
On 03/07/2018 03:49 PM, Cornelia Huck wrote: +When VIRTIO_F_NOTIFICATION_DATA has been negotiated, +the driver notifies the device by writing the following +32-bit value to the Queue Notify address: +\begin{lstlisting} +le32 vqn : 16, + next_off : 15, +

[virtio-dev] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Cornelia Huck
On Wed, 7 Mar 2018 17:10:21 +0200 "Michael S. Tsirkin" wrote: > On Wed, Mar 07, 2018 at 03:49:41PM +0100, Cornelia Huck wrote: > > On Wed, 7 Mar 2018 16:09:33 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Mar 07, 2018 at 12:11:58PM +0100, Cornelia Huck wrote: > > > > On Thu, 1 Mar

[virtio-dev] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Michael S. Tsirkin
On Wed, Mar 07, 2018 at 03:49:41PM +0100, Cornelia Huck wrote: > On Wed, 7 Mar 2018 16:09:33 +0200 > "Michael S. Tsirkin" wrote: > > > On Wed, Mar 07, 2018 at 12:11:58PM +0100, Cornelia Huck wrote: > > > On Thu, 1 Mar 2018 01:31:37 +0200 > > > "Michael S. Tsirkin" wrote: > > > > > +When VIRTIO_

[virtio-dev] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Cornelia Huck
On Wed, 7 Mar 2018 16:09:33 +0200 "Michael S. Tsirkin" wrote: > On Wed, Mar 07, 2018 at 12:11:58PM +0100, Cornelia Huck wrote: > > On Thu, 1 Mar 2018 01:31:37 +0200 > > "Michael S. Tsirkin" wrote: > > > +When VIRTIO_F_NOTIFICATION_DATA has been negotiated, > > > +the driver notifies the device

[virtio-dev] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Michael S. Tsirkin
On Wed, Mar 07, 2018 at 12:11:58PM +0100, Cornelia Huck wrote: > On Thu, 1 Mar 2018 01:31:37 +0200 > "Michael S. Tsirkin" wrote: > > > Motivation for the new feature is included in the text. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > content.tex | 141 > > +

[virtio-dev] Re: [PATCH v9 10/16] packed virtqueues: more efficient virtqueue layout

2018-03-07 Thread Michael S. Tsirkin
On Thu, Mar 01, 2018 at 01:31:34AM +0200, Michael S. Tsirkin wrote: > Performance analysis of this is in my kvm forum 2016 presentation. The > idea is to have a r/w descriptor in a ring structure, replacing the used > and available ring, index and descriptor buffer. > > This is also easier for de

[virtio-dev] Re: [PATCH v3 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-07 Thread Wei Wang
On 03/06/2018 10:38 AM, Michael S. Tsirkin wrote: On Tue, Mar 06, 2018 at 09:54:49AM +0800, Wei Wang wrote: On 03/05/2018 10:09 PM, Michael S. Tsirkin wrote: On Mon, Mar 05, 2018 at 11:36:15AM +0800, Wei Wang wrote: On 03/03/2018 02:37 AM, Michael S. Tsirkin wrote: On Fri, Mar 02, 2018 at 04:

[virtio-dev] Re: [PATCH v3 3/3] migration: use the free page hint feature from balloon

2018-03-07 Thread Wei Wang
On 03/07/2018 08:32 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: Start the free page optimization when the bulk stage starts. In case the guest is slow in reporting, actively stops it when the bulk stage ends. The optimization avoids sending guest free pages during

[virtio-dev] [PATCH v4 3/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-07 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. balloon_free_page_start - start guest free page hint reporting. balloon_free_page_stop - stop guest free page hint reporting. Note: balloon will report pages which were free at the time o

[virtio-dev] Re: [PATCH v3 1/3] migration: API to clear bits of guest free pages from the dirty bitmap

2018-03-07 Thread Wei Wang
On 03/07/2018 08:23 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David

[virtio-dev] [PATCH v4 4/4] migration: use the free page hint feature from balloon

2018-03-07 Thread Wei Wang
Start the free page optimization after the migration bitmap is synchronized. This can't be used in the stopĀ© phase since the guest is paused. Make sure the guest reporting has stopped before synchronizing the migration dirty bitmap. Currently, the optimization is added to precopy only. Signed-off-

[virtio-dev] [PATCH v4 2/4] migration: API to clear bits of guest free pages from the dirty bitmap

2018-03-07 Thread Wei Wang
This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin --- include/migration/misc.h | 2 ++ m

[virtio-dev] [PATCH v4 0/4] virtio-balloon: free page hint reporting support

2018-03-07 Thread Wei Wang
This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not transferred by the migrati

[virtio-dev] [PATCH v4 1/4] bitmap: bitmap_count_one_with_offset

2018-03-07 Thread Wei Wang
Count the number of 1s in a bitmap starting from an offset. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin --- include/qemu/bitmap.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h in

Re: [virtio-dev] [PATCH v3] virtio-blk: add discard and write zeroes features to specification

2018-03-07 Thread Stefan Hajnoczi
On Tue, Mar 06, 2018 at 10:50:20AM +0800, Changpeng Liu wrote: > +The \field{data} used for discard or write zeroes command is described > +by one or more virtio_blk_discard_write_zeroes structs. \field{sector} > +indicates the starting offset (multiplied by 512) of the segment, while Did you mean

[virtio-dev] Re: [PATCH v9 14/16] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-03-07 Thread Cornelia Huck
On Thu, 1 Mar 2018 01:31:37 +0200 "Michael S. Tsirkin" wrote: > Motivation for the new feature is included in the text. > > Signed-off-by: Michael S. Tsirkin > --- > content.tex | 141 > --- > introduction.tex | 4 +- > notifications.

[virtio-dev] Re: [PATCH v9 08/16] split-ring: generalize text

2018-03-07 Thread Cornelia Huck
On Thu, 1 Mar 2018 01:31:33 +0200 "Michael S. Tsirkin" wrote: > Update generic text to talk about available/used buffers, not rings. > Move some split-ring specific text to the correct section. > > Update conformance section with link to the new conformance clause. > > Signed-off-by: Michael S.

[virtio-dev] Re: [PATCH v9 09/16] split-ring: typo: aligment

2018-03-07 Thread Cornelia Huck
On Thu, 1 Mar 2018 01:31:34 +0200 "Michael S. Tsirkin" wrote: > --- > split-ring.tex | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/split-ring.tex b/split-ring.tex > index a594d41..87ecee2 100644 > --- a/split-ring.tex > +++ b/split-ring.tex > @@ -23,7 +23,7 @@ Each vi