Re: [PATCH v2 1/2] virtio-balloon spec: rewrite description of VIRTIO_BALLOON_F_MUST_TELL_HOST

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 20:15, Michael S. Tsirkin ha scritto: > What you write in spec below and what you write above seems to > contradict. > > Look, how about the simpler patch that I sent: > "[PATCH] virtio-spec: balloon: MUST_TELL_HOST is optional" > > does it functionally do everything you want in thi

Re: [Qemu-devel] [PATCH v2 00/11] qemu: use virtio linux headers in portable code

2013-05-28 Thread Rusty Russell
Anthony Liguori writes: > The headers say they are BSD licensed... but they include a GPLv2+ > header. Doesn't make a lot of sense, does it? It makes perfect sense: you're overthinking it. It just means that copying the BSD headers outside Linux is encouraged. And it's clearly nonsensical to c

Re: updated: kvm networking todo wiki

2013-05-28 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Fri, May 24, 2013 at 08:47:58AM -0500, Anthony Liguori wrote: >> "Michael S. Tsirkin" writes: >> >> > On Fri, May 24, 2013 at 05:41:11PM +0800, Jason Wang wrote: >> >> On 05/23/2013 04:50 PM, Michael S. Tsirkin wrote: >> >> > Hey guys, >> >> > I've updated the k

Re: [RFC 7/11] virtio_pci: new, capability-aware driver.

2013-05-28 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Mon, Dec 12, 2011 at 01:49:13PM +0200, Michael S. Tsirkin wrote: >> On Mon, Dec 12, 2011 at 09:15:03AM +1030, Rusty Russell wrote: >> > On Sun, 11 Dec 2011 11:42:56 +0200, "Michael S. Tsirkin" >> > wrote: >> > > On Thu, Dec 08, 2011 at 09:09:33PM +1030, Rusty R

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Rusty Russell
Anthony Liguori writes: > "Michael S. Tsirkin" writes: >> +case offsetof(struct virtio_pci_common_cfg, device_feature_select): >> +return proxy->device_feature_select; > > Oh dear no... Please use defines like the rest of QEMU. It is pretty ugly. Yet the structure definitions are d

Re: [Qemu-devel] [PATCH v2 00/11] qemu: use virtio linux headers in portable code

2013-05-28 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: > >> Anthony Liguori writes: >>> Paolo Bonzini writes: >>> Il 26/05/2013 22:02, Michael S. Tsirkin ha scritto: > > My fault. I should have looked at linux/types.h (actually > > asm-generic/). > > Not really, __uX appear in

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Rusty Russell
Paolo Bonzini writes: > Il 28/05/2013 19:32, Michael S. Tsirkin ha scritto: > > + > > +switch (addr) { > > +case offsetof(struct virtio_pci_common_cfg, > > device_feature_select): > > +return proxy->device_feature_select; >>> > >>> > Oh dear no... Please

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Laszlo Ersek
On 05/28/13 19:43, Paolo Bonzini wrote: > Il 28/05/2013 19:32, Michael S. Tsirkin ha scritto: >> + >> +switch (addr) { >> +case offsetof(struct virtio_pci_common_cfg, device_feature_select): >> +return proxy->device_feature_select; Oh dear no... Please use

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 01:53:35PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Tue, May 28, 2013 at 12:15:16PM -0500, Anthony Liguori wrote: > >> > @@ -455,6 +462,226 @@ static void virtio_pci_config_write(void *opaque, > >> > hwaddr addr, > >> > } > >> > } > >> >

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Tue, May 28, 2013 at 12:15:16PM -0500, Anthony Liguori wrote: >> > @@ -455,6 +462,226 @@ static void virtio_pci_config_write(void *opaque, >> > hwaddr addr, >> > } >> > } >> > >> > +static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr,

Re: [PATCH v2 1/2] virtio-balloon spec: rewrite description of VIRTIO_BALLOON_F_MUST_TELL_HOST

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 07:40:17PM +0200, Paolo Bonzini wrote: > The idea of the VIRTIO_BALLOON_F_MUST_TELL_HOST feature was to let drivers > skip usage of the deflate queue when leaking the balloon ("silent > deflation"). Guests may benefit from silent deflate by aggressively > inflating the ball

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 19:32, Michael S. Tsirkin ha scritto: >>> > > + >>> > > +switch (addr) { >>> > > +case offsetof(struct virtio_pci_common_cfg, device_feature_select): >>> > > +return proxy->device_feature_select; >> > >> > Oh dear no... Please use defines like the rest of QEMU. > Any

[PATCH v2 2/2] virtio-balloon spec: reintroduce "silent deflation" feature

2013-05-28 Thread Paolo Bonzini
The original idea of the VIRTIO_BALLOON_F_MUST_TELL_HOST feature was to let drivers skip usage of the deflate queue when leaking the balloon ("silent deflation"). Guests may benefit from silent deflate by aggressively inflating the balloon; they know that they will be able to use ballooned pages w

[PATCH v2 1/2] virtio-balloon spec: rewrite description of VIRTIO_BALLOON_F_MUST_TELL_HOST

2013-05-28 Thread Paolo Bonzini
The idea of the VIRTIO_BALLOON_F_MUST_TELL_HOST feature was to let drivers skip usage of the deflate queue when leaking the balloon ("silent deflation"). Guests may benefit from silent deflate by aggressively inflating the balloon; they know that they will be able to use ballooned pages without is

[PATCH v2 0/2] virtio-balloon spec: silent deflation

2013-05-28 Thread Paolo Bonzini
Here is the series, split in two patches, with small edits and new commit messages. Paolo Bonzini (2): virtio-balloon spec: rewrite description of VIRTIO_BALLOON_F_MUST_TELL_HOST virtio-balloon spec: reintroduce "silent deflation" feature virtio-spec.lyx | 238 +++

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 12:15:16PM -0500, Anthony Liguori wrote: > > @@ -455,6 +462,226 @@ static void virtio_pci_config_write(void *opaque, > > hwaddr addr, > > } > > } > > > > +static uint64_t virtio_pci_config_common_read(void *opaque, hwaddr addr, > > +

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > This adds support for new config, and is designed to work with > the new layout code in Rusty's new layout branch. > > At the moment all fields are in the same memory BAR (bar 2). > This will be used to test performance and compare > memory, io and hypercall latency

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 18:50, Michael S. Tsirkin ha scritto: >>> Both your code and what you say here about the new bit seem to break >>> compatibility with old hosts and guests. >> >> What is the exact scenario that you have in mind? > > Existing host follows spec, advertises MUST_TELL_HOST (only) > guest

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 06:23:19PM +0200, Paolo Bonzini wrote: > Il 28/05/2013 17:09, Michael S. Tsirkin ha scritto: > > On Tue, May 28, 2013 at 04:32:44PM +0200, Paolo Bonzini wrote: > >> Il 28/05/2013 16:29, Michael S. Tsirkin ha scritto: > >>> On Tue, May 28, 2013 at 04:06:02PM +0200, Paolo Bonz

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 17:09, Michael S. Tsirkin ha scritto: > On Tue, May 28, 2013 at 04:32:44PM +0200, Paolo Bonzini wrote: >> Il 28/05/2013 16:29, Michael S. Tsirkin ha scritto: >>> On Tue, May 28, 2013 at 04:06:02PM +0200, Paolo Bonzini wrote: Il 28/05/2013 15:32, Michael S. Tsirkin ha scritto: >>>

[PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Michael S. Tsirkin
This adds support for new config, and is designed to work with the new layout code in Rusty's new layout branch. At the moment all fields are in the same memory BAR (bar 2). This will be used to test performance and compare memory, io and hypercall latency. Compiles but does not work yet. Migrati

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 04:32:44PM +0200, Paolo Bonzini wrote: > Il 28/05/2013 16:29, Michael S. Tsirkin ha scritto: > > On Tue, May 28, 2013 at 04:06:02PM +0200, Paolo Bonzini wrote: > >> Il 28/05/2013 15:32, Michael S. Tsirkin ha scritto: > >>> At this point I am confused. I think there are two c

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 16:29, Michael S. Tsirkin ha scritto: > On Tue, May 28, 2013 at 04:06:02PM +0200, Paolo Bonzini wrote: >> Il 28/05/2013 15:32, Michael S. Tsirkin ha scritto: >>> At this point I am confused. I think there are two changes in your patch: >>> >>> 1. Handling of VIRTIO_F_GUEST_MUST_TELL_H

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 04:06:02PM +0200, Paolo Bonzini wrote: > Il 28/05/2013 15:32, Michael S. Tsirkin ha scritto: > > At this point I am confused. I think there are two changes in your patch: > > > > 1. Handling of VIRTIO_F_GUEST_MUST_TELL_HOST > > Is this functionally identical to what I prop

Re: [PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages

2013-05-28 Thread Liu Jiang
Hi Sergei, Thanks for review! On 05/27/2013 09:57 PM, Sergei Shtylyov wrote: > On 26-05-2013 17:38, Jiang Liu wrote: > >Typo in the subject: s/mamaged_pages/managed_pages/. Will fix it in next version. > >> Enhance adjust_managed_page_count() to adjust totalhigh_pages for >> highmem

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 15:32, Michael S. Tsirkin ha scritto: > At this point I am confused. I think there are two changes in your patch: > > 1. Handling of VIRTIO_F_GUEST_MUST_TELL_HOST > Is this functionally identical to what I proposed? > If yes, I am fine with either change being applied. Yes. > 2.

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 02:04:03PM +0200, Paolo Bonzini wrote: > Il 28/05/2013 13:44, Michael S. Tsirkin ha scritto: > > negotiated in spec means "present and acked by guest". > > We can try and replace "negotiated" by "present and acked by guest" > > everywhere - think it will be clearer? > > No,

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 13:44, Michael S. Tsirkin ha scritto: > negotiated in spec means "present and acked by guest". > We can try and replace "negotiated" by "present and acked by guest" > everywhere - think it will be clearer? No, I understand what negotiated means. But in this case, "negotiated" is not

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 01:13:03PM +0200, Paolo Bonzini wrote: > Il 28/05/2013 12:45, Michael S. Tsirkin ha scritto: > > On Tue, May 28, 2013 at 10:38:35AM +0200, Paolo Bonzini wrote: > >> Il 27/05/2013 19:02, Michael S. Tsirkin ha scritto: > > So if we don't want to require all guests to tell

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 28/05/2013 12:45, Michael S. Tsirkin ha scritto: > On Tue, May 28, 2013 at 10:38:35AM +0200, Paolo Bonzini wrote: >> Il 27/05/2013 19:02, Michael S. Tsirkin ha scritto: > So if we don't want to require all guests to tell host > first, all we need to do is admit it's not a bug.

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 10:38:35AM +0200, Paolo Bonzini wrote: > Il 27/05/2013 19:02, Michael S. Tsirkin ha scritto: > >>> So if we don't want to require all guests to tell host > >>> first, all we need to do is admit it's not a bug. > >> > >> I think we want the possibility for the host to require

Re: [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found

2013-05-28 Thread Asias He
On Tue, May 28, 2013 at 04:54:44PM +0800, Wenchao Xia wrote: > ioctl for VHOST_SCSI_SET_ENDPOINT report file exist errori, when I forget > to set it correctly in configfs, make user confused. Actually it fail > to find a matching one, so change the error value. > > Signed-off-by: Wenchao Xia Ack

Re: [PATCH] virtio-balloon spec: rework VIRTIO_BALLOON_F_MUST_TELL_HOST feature, support silent deflation

2013-05-28 Thread Paolo Bonzini
Il 27/05/2013 19:02, Michael S. Tsirkin ha scritto: >>> So if we don't want to require all guests to tell host >>> first, all we need to do is admit it's not a bug. >> >> I think we want the possibility for the host to require that. > > But why? TELL_HOST makes some optimizations possible, but if

[PATCH] virtio_pci: fix capability format, comments

2013-05-28 Thread Michael S. Tsirkin
- queue size can actually be 0 which is not a power of 2 - fix capability format. PCI spec says: The layout of the information is vendor specific, except that the byte immediately following the “Next” pointer in the capability structure is defined to be a length field.

Re: [RFC 7/11] virtio_pci: new, capability-aware driver.

2013-05-28 Thread Michael S. Tsirkin
On Mon, Dec 12, 2011 at 01:49:13PM +0200, Michael S. Tsirkin wrote: > On Mon, Dec 12, 2011 at 09:15:03AM +1030, Rusty Russell wrote: > > On Sun, 11 Dec 2011 11:42:56 +0200, "Michael S. Tsirkin" > > wrote: > > > On Thu, Dec 08, 2011 at 09:09:33PM +1030, Rusty Russell wrote: > > > > +/* There is no