[virtio-dev] Re: [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-04-03 Thread Wei Wang
On 04/04/2018 02:47 AM, Michael S. Tsirkin wrote: On Wed, Apr 04, 2018 at 12:10:03AM +0800, Wei Wang wrote: +static int add_one_sg(struct virtqueue *vq, unsigned long pfn, uint32_t len) +{ + struct scatterlist sg; + unsigned int unused; + + sg_init_table(&sg, 1); + sg_set

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Rustad, Mark D
On Apr 3, 2018, at 11:27 AM, Michael S. Tsirkin wrote: I'm not sure why you would need a feature bit. The capability is controlled via PCI configuration space. If it is present the device has the capability. If it is not then it does not. Basically if the PCI configuration space is not present

[virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-03 Thread Siwei Liu
On Tue, Apr 3, 2018 at 8:42 AM, Jiri Pirko wrote: > Sun, Apr 01, 2018 at 06:11:29PM CEST, dsah...@gmail.com wrote: >>On 4/1/18 3:13 AM, Si-Wei Liu wrote: >>> Hidden netdevice is not visible to userspace such that >>> typical network utilites e.g. ip, ifconfig and et al, >>> cannot sense its existe

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Alexander Duyck
On Tue, Apr 3, 2018 at 11:27 AM, Michael S. Tsirkin wrote: > On Tue, Apr 03, 2018 at 10:32:00AM -0700, Alexander Duyck wrote: >> On Tue, Apr 3, 2018 at 6:12 AM, Michael S. Tsirkin wrote: >> > On Fri, Mar 16, 2018 at 09:40:34AM -0700, Alexander Duyck wrote: >> >> On Fri, Mar 16, 2018 at 9:34 AM, M

[virtio-dev] Re: [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-04-03 Thread Michael S. Tsirkin
On Wed, Apr 04, 2018 at 12:10:03AM +0800, Wei Wang wrote: > Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the > support of reporting hints of guest free pages to host via virtio-balloon. > > Host requests the guest to report free page hints by sending a new cmd > id to the g

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Michael S. Tsirkin
On Tue, Apr 03, 2018 at 10:32:00AM -0700, Alexander Duyck wrote: > On Tue, Apr 3, 2018 at 6:12 AM, Michael S. Tsirkin wrote: > > On Fri, Mar 16, 2018 at 09:40:34AM -0700, Alexander Duyck wrote: > >> On Fri, Mar 16, 2018 at 9:34 AM, Michael S. Tsirkin > >> wrote: > >> > On Thu, Mar 15, 2018 at 11

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Alexander Duyck
On Tue, Apr 3, 2018 at 6:12 AM, Michael S. Tsirkin wrote: > On Fri, Mar 16, 2018 at 09:40:34AM -0700, Alexander Duyck wrote: >> On Fri, Mar 16, 2018 at 9:34 AM, Michael S. Tsirkin wrote: >> > On Thu, Mar 15, 2018 at 11:42:41AM -0700, Alexander Duyck wrote: >> >> From: Alexander Duyck >> >> >> >>

Re: [virtio-dev] Re: [virtio] [PATCH v12] VIRTIO_F_NOTIFICATION_DATA: extra data to devices

2018-04-03 Thread Cornelia Huck
On Mon, 2 Apr 2018 17:34:50 +0200 Halil Pasic wrote: > On 03/29/2018 04:30 PM, Michael S. Tsirkin wrote: > > On Thu, Mar 29, 2018 at 04:15:19PM +0200, Halil Pasic wrote: > >> > [..] > >> > >> I don't have a good solution, otherwise I would have proposed already. > >> Maybe something like 'ava

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Michael S. Tsirkin
On Fri, Mar 16, 2018 at 09:40:34AM -0700, Alexander Duyck wrote: > On Fri, Mar 16, 2018 at 9:34 AM, Michael S. Tsirkin wrote: > > On Thu, Mar 15, 2018 at 11:42:41AM -0700, Alexander Duyck wrote: > >> From: Alexander Duyck > >> > >> Hardware-realized virtio_pci devices can implement SR-IOV, so thi

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Michael S. Tsirkin
On Thu, Mar 15, 2018 at 11:42:41AM -0700, Alexander Duyck wrote: > From: Alexander Duyck > > Hardware-realized virtio_pci devices can implement SR-IOV, so this > patch enables its use. The device in question is an upcoming Intel > NIC that implements both a virtio_net PF and virtio_net VFs. These

[virtio-dev] Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-03 Thread Michael S. Tsirkin
On Sun, Apr 01, 2018 at 05:13:08AM -0400, Si-Wei Liu wrote: > @@ -896,6 +898,68 @@ void qmp_device_del(const char *id, Error **errp) > } > } > > +int pci_get_busdevfn_by_id(const char *id, uint16_t *busnr, > + uint16_t *devfn, Error **errp) > +{ > +uint16_t bus

[virtio-dev] Re: [RFC PATCH 3/3] virtio_net: make lower netdevs for virtio_bypass hidden

2018-04-03 Thread Michael S. Tsirkin
On Sun, Apr 01, 2018 at 05:13:10AM -0400, Si-Wei Liu wrote: > diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h > index aa40664..0827b7e 100644 > --- a/include/uapi/linux/virtio_net.h > +++ b/include/uapi/linux/virtio_net.h > @@ -80,6 +80,8 @@ struct virtio_net_config {

Re: [virtio-dev] [PATCH v10 13/13] split-ring: in order feature

2018-04-03 Thread Michael S. Tsirkin
On Tue, Apr 03, 2018 at 07:19:47AM +, Lars Ganrot wrote: > > From: virtio-dev@lists.oasis-open.org On > > Behalf Of Michael S. Tsirkin > > Sent: 29. marts 2018 21:13 > > > > On Thu, Mar 29, 2018 at 06:23:28PM +, Lars Ganrot wrote: > > > > > > > > > > From: Michael S. Tsirkin > > > > Sent:

[virtio-dev] [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-04-03 Thread Wei Wang
Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the support of reporting hints of guest free pages to host via virtio-balloon. Host requests the guest to report free page hints by sending a new cmd id to the guest via the free_page_report_cmd_id configuration register. When t

[virtio-dev] [PATCH v30 0/4] Virtio-balloon: support free page reporting

2018-04-03 Thread Wei Wang
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs.

[virtio-dev] [PATCH v30 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

2018-04-03 Thread Wei Wang
The VIRTIO_BALLOON_F_PAGE_POISON feature bit is used to indicate if the guest is using page poisoning. Guest writes to the poison_val config field to tell host about the page poisoning value in use. Signed-off-by: Wei Wang Suggested-by: Michael S. Tsirkin Cc: Michael S. Tsirkin Cc: Michal Hocko

[virtio-dev] [PATCH v30 1/4] mm: support reporting free page blocks

2018-04-03 Thread Wei Wang
This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is released, so it is the caller's responsibility to either detect or prevent the use of such pages. One use example of this

[virtio-dev] [PATCH v30 3/4] mm/page_poison: expose page_poisoning_enabled to kernel modules

2018-04-03 Thread Wei Wang
In some usages, e.g. virtio-balloon, a kernel module needs to know if page poisoning is in use. This patch exposes the page_poisoning_enabled function to kernel modules. Signed-off-by: Wei Wang Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Andrew Morton --- mm/page_pois

[virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-03 Thread Siwei Liu
On Sun, Apr 1, 2018 at 9:11 AM, David Ahern wrote: > On 4/1/18 3:13 AM, Si-Wei Liu wrote: >> Hidden netdevice is not visible to userspace such that >> typical network utilities e.g. ip, ifconfig and et al, >> cannot sense its existence or configure it. Internally >> hidden netdev may associate wit

RE: [virtio-dev] [PATCH v10 13/13] split-ring: in order feature

2018-04-03 Thread Lars Ganrot
> From: virtio-dev@lists.oasis-open.org On > Behalf Of Michael S. Tsirkin > Sent: 29. marts 2018 21:13 > > On Thu, Mar 29, 2018 at 06:23:28PM +, Lars Ganrot wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: 29. marts 2018 16:42 > > > > > > On Wed, Mar 28, 2018 at 04:12:10PM +, La