netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PULL] vhost: cleanups and fixes
@ 2018-06-11 16:23 Michael S. Tsirkin
  2018-06-11 18:32 ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-06-11 16:23 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: ohad, kevin, kvm, mst, netdev, liang.z.li, linux-remoteproc,
	linux-kernel, stable, bjorn.andersson, mhocko, mhocko,
	syzbot+87cfa083e727a224754b, akpm, virtualization

The following changes since commit 29dcea88779c856c7dc92040a0c01233263101d4:

  Linux 4.17 (2018-06-03 14:15:21 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to aa15783ee62d57d69433101ede3e3ed11e48161d:

  virtio: update the comments for transport features (2018-06-07 22:17:40 +0300)

----------------------------------------------------------------
virtio, vhost: features, fixes

VF support for virtio.
Free page hint request support for VM migration.
DMA barriers for virtio strong barriers.
Bugfixes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (2):
      virtio_ring: switch to dma_XX barriers for rpmsg
      vhost: fix info leak due to uninitialized memory

Tiwei Bie (2):
      virtio_pci: support enabling VFs
      virtio: update the comments for transport features

Wei Wang (4):
      mm: support reporting free page blocks
      virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
      mm/page_poison: expose page_poisoning_enabled to kernel modules
      virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

 drivers/vhost/vhost.c               |   3 +
 drivers/virtio/virtio_balloon.c     | 298 +++++++++++++++++++++++++++++++-----
 drivers/virtio/virtio_pci_common.c  |  30 ++++
 drivers/virtio/virtio_pci_modern.c  |  14 ++
 include/linux/mm.h                  |   6 +
 include/linux/virtio_ring.h         |   4 +-
 include/uapi/linux/virtio_balloon.h |   7 +
 include/uapi/linux/virtio_config.h  |  16 +-
 mm/page_alloc.c                     |  97 ++++++++++++
 mm/page_poison.c                    |   6 +
 10 files changed, 439 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-11 16:23 [PULL] vhost: cleanups and fixes Michael S. Tsirkin
@ 2018-06-11 18:32 ` Linus Torvalds
  2018-06-11 18:44   ` Linus Torvalds
  2018-06-12  1:57   ` Michael S. Tsirkin
  0 siblings, 2 replies; 65+ messages in thread
From: Linus Torvalds @ 2018-06-11 18:32 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On Mon, Jun 11, 2018 at 9:24 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
>       virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

Is this really a good idea?

Plus it seems entirely broken.

The report_pfn_range() callback is done under the zone lock, but
virtio_balloon_send_free_pages() (which is the only callback used that
I can find) does add_one_sg(), which does virtqueue_add_inbuf(vq, &sg,
1, vq, GFP_KERNEL);

So now we apparently do a GFP_KERNEL allocation insider the mm zone
lock, which is broken on just _so_ many levels.

Pulled and then unpulled again.

Either somebody needs to explain why I'm wrong and you can re-submit
this, or this kind of garbage needs to go away.

I do *not* want to be in the situation where I pull stuff from the
virtio people that adds completely broken core VM functionality.

Because if I'm in that situation, I will stop pulling from you guys.
Seriously. You have *no* place sending me broken shit that is outside
the virtio layer.

Subsystems that break code MM will get shunned. You just aren't
important enough to allow you breaking code VM.

                Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-11 18:32 ` Linus Torvalds
@ 2018-06-11 18:44   ` Linus Torvalds
  2018-06-12  1:36     ` Michael S. Tsirkin
  2018-06-12  1:57   ` Michael S. Tsirkin
  1 sibling, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2018-06-11 18:44 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On Mon, Jun 11, 2018 at 11:32 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> So now we apparently do a GFP_KERNEL allocation insider the mm zone
> lock, which is broken on just _so_ many levels.

Oh, I see the comment about how it doesn't actually do an allocation
at all because it's a single-entry.

Still too damn ugly to live, and much too fragile. No way in hell do
we even _hint_ at a GFP_KERNEL when we're inside a context that can't
do any memory allocation at all.

Plus I'm not convinced it's a "no allocation" path even despite that
comment, because it also does a "dma_map_page()" etc, which can cause
allocations to do the dma mapping thing afaik. No?

Maybe there's some reason why that doesn't happen either, but
basically this whole callchain looks *way* to complicated to be used
under a core VM spinlock.

                Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-11 18:44   ` Linus Torvalds
@ 2018-06-12  1:36     ` Michael S. Tsirkin
  2018-06-12  1:59       ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-06-12  1:36 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On Mon, Jun 11, 2018 at 11:44:05AM -0700, Linus Torvalds wrote:
> On Mon, Jun 11, 2018 at 11:32 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > So now we apparently do a GFP_KERNEL allocation insider the mm zone
> > lock, which is broken on just _so_ many levels.
> 
> Oh, I see the comment about how it doesn't actually do an allocation
> at all because it's a single-entry.
> 
> Still too damn ugly to live, and much too fragile. No way in hell do
> we even _hint_ at a GFP_KERNEL when we're inside a context that can't
> do any memory allocation at all.
> 
> Plus I'm not convinced it's a "no allocation" path even despite that
> comment, because it also does a "dma_map_page()" etc, which can cause
> allocations to do the dma mapping thing afaik. No?

Well no because DMA is triggered by the IOMMU flag and
that is always off for the balloon. But I hear what you
are saying about it being fragile.

> Maybe there's some reason why that doesn't happen either, but
> basically this whole callchain looks *way* to complicated to be used
> under a core VM spinlock.
> 
>                 Linus

Maybe it will help to have GFP_NONE which will make any allocation
fail if attempted. Linus, would this address your comment?
-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-11 18:32 ` Linus Torvalds
  2018-06-11 18:44   ` Linus Torvalds
@ 2018-06-12  1:57   ` Michael S. Tsirkin
  1 sibling, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-06-12  1:57 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: nilal, KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On Mon, Jun 11, 2018 at 11:32:41AM -0700, Linus Torvalds wrote:
> On Mon, Jun 11, 2018 at 9:24 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> >       virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
> 
> Is this really a good idea?

Well knowing which pages are unused does seem to be useful.  Do you
refer to this generally or to the idea of scanning the free list,
or to the specific implementation issues you listed below?


> Plus it seems entirely broken.
> 
> The report_pfn_range() callback is done under the zone lock, but
> virtio_balloon_send_free_pages() (which is the only callback used that
> I can find) does add_one_sg(), which does virtqueue_add_inbuf(vq, &sg,
> 1, vq, GFP_KERNEL);
> 
> So now we apparently do a GFP_KERNEL allocation insider the mm zone
> lock, which is broken on just _so_ many levels.
> 
> Pulled and then unpulled again.
> 
> Either somebody needs to explain why I'm wrong and you can re-submit
> this, or this kind of garbage needs to go away.
> 
> I do *not* want to be in the situation where I pull stuff from the
> virtio people that adds completely broken core VM functionality.
> 
> Because if I'm in that situation, I will stop pulling from you guys.
> Seriously. You have *no* place sending me broken shit that is outside
> the virtio layer.
> 
> Subsystems that break code MM will get shunned. You just aren't
> important enough to allow you breaking code VM.
> 
>                 Linus

So no, it doesn't do any allocations - GFP_KERNEL or otherwise, but I
agree how it might be confusing.

So I'll drop this for now, but it would be nice if there is a bit more
direction on this feature since I know several people are trying to work
on this.


-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-12  1:36     ` Michael S. Tsirkin
@ 2018-06-12  1:59       ` Linus Torvalds
  2018-06-12 11:05         ` Wei Wang
  0 siblings, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2018-06-12  1:59 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> Maybe it will help to have GFP_NONE which will make any allocation
> fail if attempted. Linus, would this address your comment?

It would definitely have helped me initially overlook that call chain.

But then when I started looking at the whole dma_map_page() thing, it
just raised my hackles again.

I would seriously suggest having a much simpler version for the "no
allocation, no dma mapping" case, so that it's *obvious* that that
never happens.

So instead of having virtio_balloon_send_free_pages() call a really
generic complex chain of functions that in _some_ cases can do memory
allocation, why isn't there a short-circuited "vitruque_add_datum()"
that is guaranteed to never do anything like that?

Honestly, I look at "add_one_sg()" and it really doesn't make me
happy. It looks hacky as hell. If I read the code right, you're really
trying to just queue up a simple tuple of <pfn,len>, except you encode
it as a page pointer in order to play games with the SG logic, and
then you hmap that to the ring, except in this case it's all a fake
ring that just adds the cpu-physical address instead.

And to figuer that out, it's like five layers of indirection through
different helper functions that *can* do more generic things but in
this case don't.

And you do all of this from a core VM callback function with some
_really_ core VM locks held.

That makes no sense to me.

How about this:

 - get rid of all that code

 - make the core VM callback save the "these are the free memory
regions" in a fixed and limited array. One that DOES JUST THAT. No
crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
size, pre-allocated for that virtio instance.

 - make it obvious that what you do in that sequence is ten
instructions and no allocations ("Look ma, I wrote a value to an array
and incremented the array idex, and I'M DONE")

 - then in that workqueue entry that you start *anyway*, you empty the
array and do all the crazy virtio stuff.

In fact, while at it, just simplify the VM interface too. Instead of
traversing a random number of buddy lists, just trraverse *one* - the
top-level one. Are you seriously ever going to shrink or mark
read-only anythin *but* something big enough to be in the maximum
order?

MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
want the balloon code to work on smaller things, particularly since
the whole interface is fundamentally racy and opportunistic to begin
with?

The whole sequence of events really looks "this is too much
complexity, and way too fragile" to me at so many levels.

                 Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-12  1:59       ` Linus Torvalds
@ 2018-06-12 11:05         ` Wei Wang
  2018-06-14 15:01           ` Nitesh Narayan Lal
  0 siblings, 1 reply; 65+ messages in thread
From: Wei Wang @ 2018-06-12 11:05 UTC (permalink / raw)
  To: Linus Torvalds, Michael S. Tsirkin
  Cc: KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On 06/12/2018 09:59 AM, Linus Torvalds wrote:
> On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>> Maybe it will help to have GFP_NONE which will make any allocation
>> fail if attempted. Linus, would this address your comment?
> It would definitely have helped me initially overlook that call chain.
>
> But then when I started looking at the whole dma_map_page() thing, it
> just raised my hackles again.
>
> I would seriously suggest having a much simpler version for the "no
> allocation, no dma mapping" case, so that it's *obvious* that that
> never happens.
>
> So instead of having virtio_balloon_send_free_pages() call a really
> generic complex chain of functions that in _some_ cases can do memory
> allocation, why isn't there a short-circuited "vitruque_add_datum()"
> that is guaranteed to never do anything like that?
>
> Honestly, I look at "add_one_sg()" and it really doesn't make me
> happy. It looks hacky as hell. If I read the code right, you're really
> trying to just queue up a simple tuple of <pfn,len>, except you encode
> it as a page pointer in order to play games with the SG logic, and
> then you hmap that to the ring, except in this case it's all a fake
> ring that just adds the cpu-physical address instead.
>
> And to figuer that out, it's like five layers of indirection through
> different helper functions that *can* do more generic things but in
> this case don't.
>
> And you do all of this from a core VM callback function with some
> _really_ core VM locks held.
>
> That makes no sense to me.
>
> How about this:
>
>   - get rid of all that code
>
>   - make the core VM callback save the "these are the free memory
> regions" in a fixed and limited array. One that DOES JUST THAT. No
> crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
> size, pre-allocated for that virtio instance.
>
>   - make it obvious that what you do in that sequence is ten
> instructions and no allocations ("Look ma, I wrote a value to an array
> and incremented the array idex, and I'M DONE")
>
>   - then in that workqueue entry that you start *anyway*, you empty the
> array and do all the crazy virtio stuff.
>
> In fact, while at it, just simplify the VM interface too. Instead of
> traversing a random number of buddy lists, just trraverse *one* - the
> top-level one. Are you seriously ever going to shrink or mark
> read-only anythin *but* something big enough to be in the maximum
> order?
>
> MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
> want the balloon code to work on smaller things, particularly since
> the whole interface is fundamentally racy and opportunistic to begin
> with?

OK, I will implement a new version based on the suggestions. Thanks.

Best,
Wei

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-12 11:05         ` Wei Wang
@ 2018-06-14 15:01           ` Nitesh Narayan Lal
  2018-06-15  3:53             ` Wei Wang
  0 siblings, 1 reply; 65+ messages in thread
From: Nitesh Narayan Lal @ 2018-06-14 15:01 UTC (permalink / raw)
  To: Wei Wang, Linus Torvalds, Michael S. Tsirkin
  Cc: KVM list, virtualization, Network Development,
	Linux Kernel Mailing List, Andrew Morton, Bjorn Andersson


[-- Attachment #1.1: Type: text/plain, Size: 3316 bytes --]

Hi Wei,


On 06/12/2018 07:05 AM, Wei Wang wrote:
> On 06/12/2018 09:59 AM, Linus Torvalds wrote:
>> On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin <mst@redhat.com>
>> wrote:
>>> Maybe it will help to have GFP_NONE which will make any allocation
>>> fail if attempted. Linus, would this address your comment?
>> It would definitely have helped me initially overlook that call chain.
>>
>> But then when I started looking at the whole dma_map_page() thing, it
>> just raised my hackles again.
>>
>> I would seriously suggest having a much simpler version for the "no
>> allocation, no dma mapping" case, so that it's *obvious* that that
>> never happens.
>>
>> So instead of having virtio_balloon_send_free_pages() call a really
>> generic complex chain of functions that in _some_ cases can do memory
>> allocation, why isn't there a short-circuited "vitruque_add_datum()"
>> that is guaranteed to never do anything like that?
>>
>> Honestly, I look at "add_one_sg()" and it really doesn't make me
>> happy. It looks hacky as hell. If I read the code right, you're really
>> trying to just queue up a simple tuple of <pfn,len>, except you encode
>> it as a page pointer in order to play games with the SG logic, and
>> then you hmap that to the ring, except in this case it's all a fake
>> ring that just adds the cpu-physical address instead.
>>
>> And to figuer that out, it's like five layers of indirection through
>> different helper functions that *can* do more generic things but in
>> this case don't.
>>
>> And you do all of this from a core VM callback function with some
>> _really_ core VM locks held.
>>
>> That makes no sense to me.
>>
>> How about this:
>>
>>   - get rid of all that code
>>
>>   - make the core VM callback save the "these are the free memory
>> regions" in a fixed and limited array. One that DOES JUST THAT. No
>> crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
>> size, pre-allocated for that virtio instance.
>>
>>   - make it obvious that what you do in that sequence is ten
>> instructions and no allocations ("Look ma, I wrote a value to an array
>> and incremented the array idex, and I'M DONE")
>>
>>   - then in that workqueue entry that you start *anyway*, you empty the
>> array and do all the crazy virtio stuff.
>>
>> In fact, while at it, just simplify the VM interface too. Instead of
>> traversing a random number of buddy lists, just trraverse *one* - the
>> top-level one. Are you seriously ever going to shrink or mark
>> read-only anythin *but* something big enough to be in the maximum
>> order?
>>
>> MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
>> want the balloon code to work on smaller things, particularly since
>> the whole interface is fundamentally racy and opportunistic to begin
>> with?
>
> OK, I will implement a new version based on the suggestions. Thanks.

I have been working on a similar series [1] that is more generic, which
solves the problem of giving unused memory back to the host and could be
used to solve the migration problem as well. Can you take a look and see
if you can use my series in some way?

[1] https://www.spinics.net/lists/kvm/msg170113.html

>
> Best,
> Wei
>

-- 
Regards
Nitesh


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-06-14 15:01           ` Nitesh Narayan Lal
@ 2018-06-15  3:53             ` Wei Wang
  0 siblings, 0 replies; 65+ messages in thread
From: Wei Wang @ 2018-06-15  3:53 UTC (permalink / raw)
  To: Nitesh Narayan Lal, Linus Torvalds, Michael S. Tsirkin
  Cc: KVM list, Network Development, Linux Kernel Mailing List,
	Bjorn Andersson, Andrew Morton, virtualization

On 06/14/2018 11:01 PM, Nitesh Narayan Lal wrote:
> Hi Wei,
>
>
> On 06/12/2018 07:05 AM, Wei Wang wrote:
>> On 06/12/2018 09:59 AM, Linus Torvalds wrote:
>>> On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin <mst@redhat.com>
>>> wrote:
>>>> Maybe it will help to have GFP_NONE which will make any allocation
>>>> fail if attempted. Linus, would this address your comment?
>>> It would definitely have helped me initially overlook that call chain.
>>>
>>> But then when I started looking at the whole dma_map_page() thing, it
>>> just raised my hackles again.
>>>
>>> I would seriously suggest having a much simpler version for the "no
>>> allocation, no dma mapping" case, so that it's *obvious* that that
>>> never happens.
>>>
>>> So instead of having virtio_balloon_send_free_pages() call a really
>>> generic complex chain of functions that in _some_ cases can do memory
>>> allocation, why isn't there a short-circuited "vitruque_add_datum()"
>>> that is guaranteed to never do anything like that?
>>>
>>> Honestly, I look at "add_one_sg()" and it really doesn't make me
>>> happy. It looks hacky as hell. If I read the code right, you're really
>>> trying to just queue up a simple tuple of <pfn,len>, except you encode
>>> it as a page pointer in order to play games with the SG logic, and
>>> then you hmap that to the ring, except in this case it's all a fake
>>> ring that just adds the cpu-physical address instead.
>>>
>>> And to figuer that out, it's like five layers of indirection through
>>> different helper functions that *can* do more generic things but in
>>> this case don't.
>>>
>>> And you do all of this from a core VM callback function with some
>>> _really_ core VM locks held.
>>>
>>> That makes no sense to me.
>>>
>>> How about this:
>>>
>>>    - get rid of all that code
>>>
>>>    - make the core VM callback save the "these are the free memory
>>> regions" in a fixed and limited array. One that DOES JUST THAT. No
>>> crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
>>> size, pre-allocated for that virtio instance.
>>>
>>>    - make it obvious that what you do in that sequence is ten
>>> instructions and no allocations ("Look ma, I wrote a value to an array
>>> and incremented the array idex, and I'M DONE")
>>>
>>>    - then in that workqueue entry that you start *anyway*, you empty the
>>> array and do all the crazy virtio stuff.
>>>
>>> In fact, while at it, just simplify the VM interface too. Instead of
>>> traversing a random number of buddy lists, just trraverse *one* - the
>>> top-level one. Are you seriously ever going to shrink or mark
>>> read-only anythin *but* something big enough to be in the maximum
>>> order?
>>>
>>> MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
>>> want the balloon code to work on smaller things, particularly since
>>> the whole interface is fundamentally racy and opportunistic to begin
>>> with?
>> OK, I will implement a new version based on the suggestions. Thanks.
> I have been working on a similar series [1] that is more generic, which
> solves the problem of giving unused memory back to the host and could be
> used to solve the migration problem as well. Can you take a look and see
> if you can use my series in some way?

Hi Nitesh,

I actually checked the last version, which dates back to last year. It 
seems the new version does not have fundamental differences.

Actually there are obvious differences between the two series. This 
series provides a simple lightweight method (will continue to post out a 
new version with simpler interfaces based on the above suggestions) to 
offer free pages hints, and the hints are quit helpful for usages like 
accelerating live migration and guest snapshot. If I read that 
correctly, that series seems to provide true (guaranteed) free pages 
with much more heavyweight logics, but true free pages are not necessary 
for the live migration optimization, which is the goal and motivation of 
this work. And from my point of view, that series seems more like an 
alternative function to ballooning, which takes out free pages (or say 
guest unused pages) via allocation.

I will join the discussion in that thread. Probably we would need to 
think about other new usages for that series.

Best,
Wei

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
       [not found] <20200210010252-mutt-send-email-mst@kernel.org>
@ 2020-02-11  2:07 ` Linus Torvalds
  0 siblings, 0 replies; 65+ messages in thread
From: Linus Torvalds @ 2020-02-11  2:07 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: KVM list, virtualization, Netdev, Linux Kernel Mailing List,
	Cc: stable@vger.kernel.org, david@redhat.com,
	dverkamp@chromium.org, hch@lst.de, jasowang@redhat.com,
	liang.z.li@intel.com, mst@redhat.com, tiny.windzz@gmail.com,

On Sun, Feb 9, 2020 at 10:03 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

Hmm? Pull request re-send? This already got merged on Friday as commit
e0f121c5cc2c, as far as I can tell.

It looks like the pr-tracker-bot didn't reply to that old email. Maybe
because the subject line only says "PULL", not "GIT PULL". But more
likely because it looks like lore.kernel.org doesn't have a record of
that email at all.

You might want to check your email settings. You have some odd headers
(including a completely broken name that has "Cc:" in it in the "To:"
field).

               Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2019-10-15 21:19 Michael S. Tsirkin
@ 2019-10-15 22:25 ` pr-tracker-bot
  0 siblings, 0 replies; 65+ messages in thread
From: pr-tracker-bot @ 2019-10-15 22:25 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Linus Torvalds, kvm, virtualization, netdev, linux-kernel,
	jan.kiszka, mst

The pull request you sent on Tue, 15 Oct 2019 17:19:08 -0400:

> https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3b1f00aceb7a67bf079a5a64aa5c6baf78a8f442

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2019-10-15 21:19 Michael S. Tsirkin
  2019-10-15 22:25 ` pr-tracker-bot
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2019-10-15 21:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, virtualization, netdev, linux-kernel, jan.kiszka, mst

The following changes since commit da0c9ea146cbe92b832f1b0f694840ea8eb33cce:

  Linux 5.4-rc2 (2019-10-06 14:27:30 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 245cdd9fbd396483d501db83047116e2530f245f:

  vhost/test: stop device before reset (2019-10-13 09:38:27 -0400)

----------------------------------------------------------------
virtio: fixes

Some minor bugfixes

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (3):
      tools/virtio: more stubs
      tools/virtio: xen stub
      vhost/test: stop device before reset

 drivers/vhost/test.c             | 2 ++
 tools/virtio/crypto/hash.h       | 0
 tools/virtio/linux/dma-mapping.h | 2 ++
 tools/virtio/xen/xen.h           | 6 ++++++
 4 files changed, 10 insertions(+)
 create mode 100644 tools/virtio/crypto/hash.h
 create mode 100644 tools/virtio/xen/xen.h

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2019-05-14 21:11 Michael S. Tsirkin
@ 2019-05-14 21:20 ` pr-tracker-bot
  0 siblings, 0 replies; 65+ messages in thread
From: pr-tracker-bot @ 2019-05-14 21:20 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Linus Torvalds, kvm, virtualization, netdev, linux-kernel,
	andrea.parri, benbjiang, jasowang, j.neuschaefer, mst, pasic,
	pbonzini, yuehaibing

The pull request you sent on Tue, 14 May 2019 17:11:47 -0400:

> git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/35c99ffa20edd3c24be352d28a63cd3a23121282

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2019-05-14 21:11 Michael S. Tsirkin
  2019-05-14 21:20 ` pr-tracker-bot
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2019-05-14 21:11 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, virtualization, netdev, linux-kernel, andrea.parri,
	benbjiang, jasowang, j.neuschaefer, mst, pasic, pbonzini,
	yuehaibing

The following changes since commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd:

  Linux 5.1 (2019-05-05 17:42:58 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 050f4c4d2fbbd8217d94dc21051cc597d2a6848b:

  virtio/s390: enable packed ring (2019-05-12 13:11:36 -0400)

----------------------------------------------------------------
virtio: fixes, features

s390 has packed ring support.
several fixes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Halil Pasic (3):
      virtio/s390: use vring_create_virtqueue
      virtio/s390: DMA support for virtio-ccw
      virtio/s390: enable packed ring

Jiang Biao (1):
      virtio/virtio_ring: do some comment fixes

Jonathan Neuschäfer (1):
      tools/virtio/ringtest: Remove bogus definition of BUG_ON()

Paolo Bonzini (1):
      vhost-scsi: remove incorrect memory barrier

YueHaibing (1):
      virtio_ring: Fix potential mem leak in virtqueue_add_indirect_packed

 drivers/s390/virtio/virtio_ccw.c | 52 +++++++++++++++++++---------------------
 drivers/vhost/scsi.c             |  1 -
 drivers/virtio/virtio_ring.c     | 28 ++++++++++++----------
 include/linux/virtio.h           | 17 -------------
 tools/virtio/ringtest/ptr_ring.c |  1 -
 5 files changed, 40 insertions(+), 59 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-30 19:01       ` Bijan Mottahedeh
@ 2018-11-30 19:55         ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-30 19:55 UTC (permalink / raw)
  To: Bijan Mottahedeh
  Cc: Linus Torvalds, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, gedwards, joe, lenaic,
	liang.z.li, mhocko, mhocko, stefanha, wei.w.wang

On Fri, Nov 30, 2018 at 11:01:03AM -0800, Bijan Mottahedeh wrote:
> On 11/30/2018 5:44 AM, Michael S. Tsirkin wrote:
> > On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> > > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
> > > > +       memset(&rsp, 0, sizeof(rsp));
> > > > +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > > > +       resp = vq->iov[out].iov_base;
> > > > +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
> > > > 
> > > > Is it actually safe to trust that iov_base has passed an earlier
> > > > access_ok() check here? Why not just use copy_to_user() instead?
> > > Good point.
> > > 
> > > We really should have removed those double-underscore things ages ago.
> > > 
> > > Also, apart from the address, what about the size? Wouldn't it be
> > > better to use copy_to_iter() rather than implement it badly by hand?
> > > 
> > >                 Linus
> > Bijan can you respond please?
> > Are you going to look into this and convert code to copy_to_iter?
> > I don't think we should release Linux like this, so if you don't
> > have the time I'd rather revert for now and you can look
> > into reposting for the next release.
> > 
> > Thanks,
> > 
> 
> Sure, will do.  Can I send an individual patch for the fix to
> vhost_scsi_send_tmf_reject()?
> 
> Thanks.
> 
> --bijan

Please go ahead.

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-30 13:44     ` Michael S. Tsirkin
@ 2018-11-30 19:01       ` Bijan Mottahedeh
  2018-11-30 19:55         ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Bijan Mottahedeh @ 2018-11-30 19:01 UTC (permalink / raw)
  To: Michael S. Tsirkin, Linus Torvalds
  Cc: Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, gedwards, joe, lenaic,
	liang.z.li, mhocko, mhocko, stefanha, wei.w.wang

On 11/30/2018 5:44 AM, Michael S. Tsirkin wrote:
> On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
>> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
>>> +       memset(&rsp, 0, sizeof(rsp));
>>> +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
>>> +       resp = vq->iov[out].iov_base;
>>> +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
>>>
>>> Is it actually safe to trust that iov_base has passed an earlier
>>> access_ok() check here? Why not just use copy_to_user() instead?
>> Good point.
>>
>> We really should have removed those double-underscore things ages ago.
>>
>> Also, apart from the address, what about the size? Wouldn't it be
>> better to use copy_to_iter() rather than implement it badly by hand?
>>
>>                 Linus
> Bijan can you respond please?
> Are you going to look into this and convert code to copy_to_iter?
> I don't think we should release Linux like this, so if you don't
> have the time I'd rather revert for now and you can look
> into reposting for the next release.
>
> Thanks,
>

Sure, will do.  Can I send an individual patch for the fix to 
vhost_scsi_send_tmf_reject()?

Thanks.

--bijan

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 23:06   ` Linus Torvalds
  2018-11-01 23:55     ` Michael S. Tsirkin
  2018-11-02 11:46     ` Mark Rutland
@ 2018-11-30 13:44     ` Michael S. Tsirkin
  2018-11-30 19:01       ` Bijan Mottahedeh
  2 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-30 13:44 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: lenaic, mhocko, Kees Cook, kvm, netdev, liang.z.li,
	Linux Kernel Mailing List, virtualization, stefanha, joe,
	Andrew Morton, mhocko, bijan.mottahedeh

On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > +       memset(&rsp, 0, sizeof(rsp));
> > +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > +       resp = vq->iov[out].iov_base;
> > +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
> >
> > Is it actually safe to trust that iov_base has passed an earlier
> > access_ok() check here? Why not just use copy_to_user() instead?
> 
> Good point.
> 
> We really should have removed those double-underscore things ages ago.
> 
> Also, apart from the address, what about the size? Wouldn't it be
> better to use copy_to_iter() rather than implement it badly by hand?
> 
>                Linus

Bijan can you respond please?
Are you going to look into this and convert code to copy_to_iter?
I don't think we should release Linux like this, so if you don't
have the time I'd rather revert for now and you can look
into reposting for the next release.

Thanks,

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 17:15               ` Linus Torvalds
@ 2018-11-02 19:01                 ` Al Viro
  0 siblings, 0 replies; 65+ messages in thread
From: Al Viro @ 2018-11-02 19:01 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mst, mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang, jasowang

On Fri, Nov 02, 2018 at 10:15:56AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 10:10 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Don't you take over the VM with "use_mm()" when you do the copies? So
> > yes, it's a kernel thread, but it has a user VM, and though that
> > should have the user limits.
> 
> Oooh. *Just* as I sent this, I realized that "use_mm()" doesn't update
> the thread addr_limit.
> 
> That actually looks like a bug to me - although one that you've
> apparently been aware of and worked around.
> 
> Wouldn't it be nicer to just make "use_mm()" do
> 
>         set_fs(USER_DS);
> 
> instead? And undo it on unuse_mm()?
> 
> And, in fact, maybe we should default kernel threads to have a zero
> address limit, so that they can't do any user accesses at all without
> doing this?

Try it and watch it fail to set initramfs up, let alone exec the init...

> Adding Al to the cc, because I think he's been looking at set_fs() in general.

It would be the right thing (with return to KERNEL_DS), but I'm not certain
if GPU users will survive - these two
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h:157:                         use_mm(mmptr);                          \
drivers/gpu/drm/i915/gvt/kvmgt.c:1799:          use_mm(kvm->mm);
I don't understand the call chains there (especially for the first one) well
enough to tell.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 18:02                 ` Linus Torvalds
@ 2018-11-02 18:12                   ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-02 18:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang, jasowang

On Fri, Nov 02, 2018 at 11:02:35AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 10:21 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > it seems that it depends on current not on the active mm.
> 
> Yes, see my other suggestion to just fix "use_mm()" to update the address range.
> 
> Would you mind testing that?

Sure, I'll test it.

> Because that would seem to be the *much* less error-prone model..
> 
>            Linus

I agree, it's always been bothering me.

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 17:21               ` Michael S. Tsirkin
@ 2018-11-02 18:02                 ` Linus Torvalds
  2018-11-02 18:12                   ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2018-11-02 18:02 UTC (permalink / raw)
  To: mst
  Cc: mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang, jasowang

On Fri, Nov 2, 2018 at 10:21 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> it seems that it depends on current not on the active mm.

Yes, see my other suggestion to just fix "use_mm()" to update the address range.

Would you mind testing that?

Because that would seem to be the *much* less error-prone model..

           Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 17:10             ` Linus Torvalds
  2018-11-02 17:15               ` Linus Torvalds
@ 2018-11-02 17:21               ` Michael S. Tsirkin
  2018-11-02 18:02                 ` Linus Torvalds
  1 sibling, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-02 17:21 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang, jasowang

On Fri, Nov 02, 2018 at 10:10:45AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 9:59 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > Just for completeness I'd like to point out for vhost the copies are
> > done from the kernel thread.  So yes we can switch to copy_to/from_user
> > but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
> > IIUC not sufficient - we must *also* do access_ok checks on control path
> > when addresses are passed to the kernel and when current points to the
> > correct task struct.
> 
> Don't you take over the VM with "use_mm()" when you do the copies?

Yes we do.

> So
> yes, it's a kernel thread, but it has a user VM, and though that
> should have the user limits.
> 
> No?
> 
>           Linus

Here's what I meant: we have

#define access_ok(type, addr, size)                                     \
({                                                                      \
        WARN_ON_IN_IRQ();                                               \
        likely(!__range_not_ok(addr, size, user_addr_max()));           \
})

and

#define user_addr_max() (current->thread.addr_limit.seg)

it seems that it depends on current not on the active mm.

get_user and friends are similar:

ENTRY(__get_user_1)
        mov PER_CPU_VAR(current_task), %_ASM_DX
        cmp TASK_addr_limit(%_ASM_DX),%_ASM_AX
        jae bad_get_user
        sbb %_ASM_DX, %_ASM_DX          /* array_index_mask_nospec() */
        and %_ASM_DX, %_ASM_AX
        ASM_STAC
1:      movzbl (%_ASM_AX),%edx
        xor %eax,%eax
        ASM_CLAC
        ret
ENDPROC(__get_user_1)
EXPORT_SYMBOL(__get_user_1)

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 17:10             ` Linus Torvalds
@ 2018-11-02 17:15               ` Linus Torvalds
  2018-11-02 19:01                 ` Al Viro
  2018-11-02 17:21               ` Michael S. Tsirkin
  1 sibling, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2018-11-02 17:15 UTC (permalink / raw)
  To: mst, Al Viro
  Cc: mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang, jasowang

On Fri, Nov 2, 2018 at 10:10 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Don't you take over the VM with "use_mm()" when you do the copies? So
> yes, it's a kernel thread, but it has a user VM, and though that
> should have the user limits.

Oooh. *Just* as I sent this, I realized that "use_mm()" doesn't update
the thread addr_limit.

That actually looks like a bug to me - although one that you've
apparently been aware of and worked around.

Wouldn't it be nicer to just make "use_mm()" do

        set_fs(USER_DS);

instead? And undo it on unuse_mm()?

And, in fact, maybe we should default kernel threads to have a zero
address limit, so that they can't do any user accesses at all without
doing this?

Adding Al to the cc, because I think he's been looking at set_fs() in general.

                  Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 16:59           ` Michael S. Tsirkin
@ 2018-11-02 17:10             ` Linus Torvalds
  2018-11-02 17:15               ` Linus Torvalds
  2018-11-02 17:21               ` Michael S. Tsirkin
  0 siblings, 2 replies; 65+ messages in thread
From: Linus Torvalds @ 2018-11-02 17:10 UTC (permalink / raw)
  To: mst
  Cc: mark.rutland, lenaic, mhocko, Kees Cook, kvm, netdev, liang.z.li,
	Linux Kernel Mailing List, virtualization, stefanha, joe,
	Andrew Morton, mhocko, bijan.mottahedeh

On Fri, Nov 2, 2018 at 9:59 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> Just for completeness I'd like to point out for vhost the copies are
> done from the kernel thread.  So yes we can switch to copy_to/from_user
> but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
> IIUC not sufficient - we must *also* do access_ok checks on control path
> when addresses are passed to the kernel and when current points to the
> correct task struct.

Don't you take over the VM with "use_mm()" when you do the copies? So
yes, it's a kernel thread, but it has a user VM, and though that
should have the user limits.

No?

          Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 16:14         ` Linus Torvalds
@ 2018-11-02 16:59           ` Michael S. Tsirkin
  2018-11-02 17:10             ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-02 16:59 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang, Jason Wang

On Fri, Nov 02, 2018 at 09:14:51AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 6:04 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > I've tried making access_ok mask the parameter it gets.
> 
> PLEASE don't do this.

Okay.

> Just use "copy_to/from_user()".

Just for completeness I'd like to point out for vhost the copies are
done from the kernel thread.  So yes we can switch to copy_to/from_user
but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
IIUC not sufficient - we must *also* do access_ok checks on control path
when addresses are passed to the kernel and when current points to the
correct task struct.

> We have had lots of bugs because code bitrots.

Yes, I wish we did not need these access_ok checks and could just rely
on copy_to/from_user.

> And no, the access_ok() checks aren't expensive, not even in a loop.
> They *used* to be somewhat expensive compared to the access, but that
> simply isn't true any more. The real expense in copy_to_user and
> friends are in the user access bit setting (STAC and CLAC on x86),
> which easily an order of magnitude more expensive than access_ok().
> 
> So just get rid of the double-underscore version. It's basically
> always a mis-optimization due to entirely historical reasons. I can
> pretty much guarantee that it's not visible in profiles.
> 
>                   Linus

OK. So maybe we should focus on switching to user_access_begin/end +
unsafe_get_user/unsafe_put_user in a loop which does seem to be
measureable.  That moves the barrier out of the loop, which seems to be
consistent with what you would expect.

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 13:04       ` Michael S. Tsirkin
@ 2018-11-02 16:14         ` Linus Torvalds
  2018-11-02 16:59           ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2018-11-02 16:14 UTC (permalink / raw)
  To: mst
  Cc: mark.rutland, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang

On Fri, Nov 2, 2018 at 6:04 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> I've tried making access_ok mask the parameter it gets.

PLEASE don't do this.

Just use "copy_to/from_user()".

We have had lots of bugs because code bitrots.

And no, the access_ok() checks aren't expensive, not even in a loop.
They *used* to be somewhat expensive compared to the access, but that
simply isn't true any more. The real expense in copy_to_user and
friends are in the user access bit setting (STAC and CLAC on x86),
which easily an order of magnitude more expensive than access_ok().

So just get rid of the double-underscore version. It's basically
always a mis-optimization due to entirely historical reasons. I can
pretty much guarantee that it's not visible in profiles.

                  Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-02 11:46     ` Mark Rutland
@ 2018-11-02 13:04       ` Michael S. Tsirkin
  2018-11-02 16:14         ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-02 13:04 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Linus Torvalds, Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang

On Fri, Nov 02, 2018 at 11:46:36AM +0000, Mark Rutland wrote:
> On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
> > >
> > > +       memset(&rsp, 0, sizeof(rsp));
> > > +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > > +       resp = vq->iov[out].iov_base;
> > > +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
> > >
> > > Is it actually safe to trust that iov_base has passed an earlier
> > > access_ok() check here? Why not just use copy_to_user() instead?
> > 
> > Good point.
> > 
> > We really should have removed those double-underscore things ages ago.
> 
> FWIW, on arm64 we always check/sanitize the user address as a result of
> our sanitization of speculated values. Almost all of our uaccess
> routines have an explicit access_ok().
> 
> All our uaccess routines mask the user pointer based on addr_limit,
> which prevents speculative or architectural uaccess to kernel addresses
> when addr_limit it USER_DS:
> 
>     4d8efc2d5ee4c9cc ("arm64: Use pointer masking to limit uaccess speculation")
> 
> We also inhibit speculative stores to addr_limit being forwarded under
> speculation:
> 
>     c2f0ad4fc089cff8 ("arm64: uaccess: Prevent speculative use of the current addr_limit")
> 
> ... and given all that, we folded explicit access_ok() checks into
> __{get,put}_user():
> 
>     84624087dd7e3b48 ("arm64: uaccess: Don't bother eliding access_ok checks in __{get, put}_user")
> 
> IMO we could/should do the same for __copy_{to,from}_user().
> 
> Thanks,
> Mark.

I've tried making access_ok mask the parameter it gets.  Works because
access_ok is a macro. Most users pass in a variable so that will block
attempts to use speculation to bypass the access_ok checks.

Not 100% as someone can copy the value before access_ok, but
then it's all mitigation anyway.

Places which call access_ok on a non-lvalue need to be fixed then but
there are not too many of these.

The advantage here is that a code like this:

access_ok
for(...)
	__get_user

isn't slowed down as the masking is outside the loop.

OTOH macros changing their arguments are kind of ugly.
What do others think?

Just to show what I mean:

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index aae77eb8491c..c4d12c8f47d7 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -7,6 +7,7 @@
 #include <linux/compiler.h>
 #include <linux/kasan-checks.h>
 #include <linux/string.h>
+#include <linux/nospec.h>
 #include <asm/asm.h>
 #include <asm/page.h>
 #include <asm/smap.h>
@@ -69,6 +70,33 @@ static inline bool __chk_range_not_ok(unsigned long addr, unsigned long size, un
 	__chk_range_not_ok((unsigned long __force)(addr), size, limit); \
 })
 
+/*
+ * Test whether a block of memory is a valid user space address.
+ * Returns 0 if the range is valid, address itself otherwise.
+ */
+static inline unsigned long __verify_range_nospec(unsigned long addr,
+						  unsigned long size,
+						  unsigned long limit)
+{
+	/* Be careful about overflow */
+	limit = array_index_nospec(limit, size);
+
+	/*
+	 * If we have used "sizeof()" for the size,
+	 * we know it won't overflow the limit (but
+	 * it might overflow the 'addr', so it's
+	 * important to subtract the size from the
+	 * limit, not add it to the address).
+	 */
+	if (__builtin_constant_p(size)) {
+		return array_index_nospec(addr, limit - size + 1);
+	}
+
+	/* Arbitrary sizes? Be careful about overflow */
+	return array_index_mask_nospec(limit, size) &
+		array_index_nospec(addr, limit - size + 1);
+}
+
 #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
 # define WARN_ON_IN_IRQ()	WARN_ON_ONCE(!in_task())
 #else
@@ -95,12 +123,46 @@ static inline bool __chk_range_not_ok(unsigned long addr, unsigned long size, un
  * checks that the pointer is in the user space range - after calling
  * this function, memory access functions may still return -EFAULT.
  */
-#define access_ok(type, addr, size)					\
+#define unsafe_access_ok(type, addr, size)					\
 ({									\
 	WARN_ON_IN_IRQ();						\
 	likely(!__range_not_ok(addr, size, user_addr_max()));		\
 })
 
+/**
+ * access_ok_nospec: - Checks if a user space pointer is valid
+ * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE.  Note that
+ *        %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe
+ *        to write to a block, it is always safe to read from it.
+ * @addr: User space pointer to start of block to check
+ * @size: Size of block to check
+ *
+ * Context: User context only. This function may sleep if pagefaults are
+ *          enabled.
+ *
+ * Checks if a pointer to a block of memory in user space is valid.
+ *
+ * Returns address itself (nonzero) if the memory block may be valid,
+ * zero if it is definitely invalid.
+ *
+ * To prevent speculation, the returned value must then be used
+ * for accesses.
+ *
+ * Note that, depending on architecture, this function probably just
+ * checks that the pointer is in the user space range - after calling
+ * this function, memory access functions may still return -EFAULT.
+ */
+#define access_ok_nospec(type, addr, size)			\
+({								\
+	WARN_ON_IN_IRQ();					\
+	__chk_user_ptr(addr);					\
+	addr = (typeof(addr) __force)				\
+	__verify_range_nospec((unsigned long __force)(addr),	\
+			       size, user_addr_max());		\
+})
+
+#define access_ok(type, addr, size) access_ok_nospec(type, addr, size)
+
 /*
  * These are the main single-value transfer routines.  They automatically
  * use the right size if we just have the right pointer type.
-- 
MST

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 23:06   ` Linus Torvalds
  2018-11-01 23:55     ` Michael S. Tsirkin
@ 2018-11-02 11:46     ` Mark Rutland
  2018-11-02 13:04       ` Michael S. Tsirkin
  2018-11-30 13:44     ` Michael S. Tsirkin
  2 siblings, 1 reply; 65+ messages in thread
From: Mark Rutland @ 2018-11-02 11:46 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Kees Cook, mst, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang

On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > +       memset(&rsp, 0, sizeof(rsp));
> > +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > +       resp = vq->iov[out].iov_base;
> > +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
> >
> > Is it actually safe to trust that iov_base has passed an earlier
> > access_ok() check here? Why not just use copy_to_user() instead?
> 
> Good point.
> 
> We really should have removed those double-underscore things ages ago.

FWIW, on arm64 we always check/sanitize the user address as a result of
our sanitization of speculated values. Almost all of our uaccess
routines have an explicit access_ok().

All our uaccess routines mask the user pointer based on addr_limit,
which prevents speculative or architectural uaccess to kernel addresses
when addr_limit it USER_DS:

    4d8efc2d5ee4c9cc ("arm64: Use pointer masking to limit uaccess speculation")

We also inhibit speculative stores to addr_limit being forwarded under
speculation:

    c2f0ad4fc089cff8 ("arm64: uaccess: Prevent speculative use of the current addr_limit")

... and given all that, we folded explicit access_ok() checks into
__{get,put}_user():

    84624087dd7e3b48 ("arm64: uaccess: Don't bother eliding access_ok checks in __{get, put}_user")

IMO we could/should do the same for __copy_{to,from}_user().

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 23:06   ` Linus Torvalds
@ 2018-11-01 23:55     ` Michael S. Tsirkin
  2018-11-02 11:46     ` Mark Rutland
  2018-11-30 13:44     ` Michael S. Tsirkin
  2 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-01 23:55 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Kees Cook, kvm, virtualization, netdev,
	Linux Kernel Mailing List, Andrew Morton, bijan.mottahedeh,
	gedwards, joe, lenaic, liang.z.li, mhocko, mhocko, stefanha,
	wei.w.wang

On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > +       memset(&rsp, 0, sizeof(rsp));
> > +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > +       resp = vq->iov[out].iov_base;
> > +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
> >
> > Is it actually safe to trust that iov_base has passed an earlier
> > access_ok() check here? Why not just use copy_to_user() instead?
> 
> Good point.
> 
> We really should have removed those double-underscore things ages ago.

Well in case of vhost there are a bunch of reasons to keep them.

One is that all access_ok checks take place
way earlier in context of the owner task. Result is saved
and then used for access repeatedly. Skipping reding access_ok twice
did seem to give a small speedup in the past.
In fact I am looking
into switching some of the uses to unsafe_put_user/unsafe_get_user
after doing something like barrier_nospec after the
access_ok checks. Seems to give a measureable speedup.


Another is that the double underscore things actually can be done
in softirq context if you do preempt_disable/preempt_enable.
IIUC Jason's looking into using that to cut down the latency
for when the access is very small.

> Also, apart from the address, what about the size? Wouldn't it be
> better to use copy_to_iter() rather than implement it badly by hand?
> 
>                Linus

Generally size is checked when we retrieve the iov but I will recheck
this case and reply here.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 23:00 ` Kees Cook
  2018-11-01 23:06   ` Linus Torvalds
@ 2018-11-01 23:38   ` Michael S. Tsirkin
  1 sibling, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-01 23:38 UTC (permalink / raw)
  To: Kees Cook
  Cc: lenaic, Michal Hocko, bijan.mottahedeh, KVM, Network Development,
	liang.z.li, LKML, virtualization, Stefan Hajnoczi, Joe Perches,
	Andrew Morton, Michal Hocko, Linus Torvalds

On Thu, Nov 01, 2018 at 04:00:23PM -0700, Kees Cook wrote:
> On Thu, Nov 1, 2018 at 2:19 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:
> >
> >   Linux 4.19 (2018-10-22 07:37:37 +0100)
> >
> > are available in the Git repository at:
> >
> >   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> >
> > for you to fetch changes up to 79f800b2e76923cd8ce0aa659cb5c019d9643bc9:
> >
> >   MAINTAINERS: remove reference to bogus vsock file (2018-10-24 21:16:14 -0400)
> >
> > ----------------------------------------------------------------
> > virtio, vhost: fixes, tweaks
> >
> > virtio balloon page hinting support
> > vhost scsi control queue
> >
> > misc fixes.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > ----------------------------------------------------------------
> > Bijan Mottahedeh (3):
> >       vhost/scsi: Respond to control queue operations
> 
> +static void
> +vhost_scsi_send_tmf_resp(struct vhost_scsi *vs,
> +                          struct vhost_virtqueue *vq,
> +                          int head, unsigned int out)
> +{
> +       struct virtio_scsi_ctrl_tmf_resp __user *resp;
> +       struct virtio_scsi_ctrl_tmf_resp rsp;
> +       int ret;
> +
> +       pr_debug("%s\n", __func__);
> +       memset(&rsp, 0, sizeof(rsp));
> +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> +       resp = vq->iov[out].iov_base;
> +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
> 
> Is it actually safe to trust that iov_base has passed an earlier
> access_ok() check here? Why not just use copy_to_user() instead?
> 
> -Kees

I am not sure copy_to_user will do the right thing here, because all
this runs in context of a kernel thread.  We do need access_ok which
takes place way earlier in context of the task.

Another reason it is safe is because the address is not
coming from userspace at all.




> >       vhost/scsi: Extract common handling code from control queue handler
> >       vhost/scsi: Use common handling code in request queue handler
> >
> > Greg Edwards (1):
> >       vhost/scsi: truncate T10 PI iov_iter to prot_bytes
> >
> > Lénaïc Huard (1):
> >       kvm_config: add CONFIG_VIRTIO_MENU
> >
> > Stefan Hajnoczi (1):
> >       MAINTAINERS: remove reference to bogus vsock file
> >
> > Wei Wang (3):
> >       virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
> >       mm/page_poison: expose page_poisoning_enabled to kernel modules
> >       virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
> >
> >  MAINTAINERS                         |   1 -
> >  drivers/vhost/scsi.c                | 426 ++++++++++++++++++++++++++++--------
> >  drivers/virtio/virtio_balloon.c     | 380 +++++++++++++++++++++++++++++---
> >  include/uapi/linux/virtio_balloon.h |   8 +
> >  kernel/configs/kvm_guest.config     |   1 +
> >  mm/page_poison.c                    |   6 +
> >  6 files changed, 688 insertions(+), 134 deletions(-)
> 
> 
> 
> -- 
> Kees Cook

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 23:00 ` Kees Cook
@ 2018-11-01 23:06   ` Linus Torvalds
  2018-11-01 23:55     ` Michael S. Tsirkin
                       ` (2 more replies)
  2018-11-01 23:38   ` Michael S. Tsirkin
  1 sibling, 3 replies; 65+ messages in thread
From: Linus Torvalds @ 2018-11-01 23:06 UTC (permalink / raw)
  To: Kees Cook
  Cc: mst, kvm, virtualization, netdev, Linux Kernel Mailing List,
	Andrew Morton, bijan.mottahedeh, gedwards, joe, lenaic,
	liang.z.li, mhocko, mhocko, stefanha, wei.w.wang

On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook@chromium.org> wrote:
>
> +       memset(&rsp, 0, sizeof(rsp));
> +       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> +       resp = vq->iov[out].iov_base;
> +       ret = __copy_to_user(resp, &rsp, sizeof(rsp));
>
> Is it actually safe to trust that iov_base has passed an earlier
> access_ok() check here? Why not just use copy_to_user() instead?

Good point.

We really should have removed those double-underscore things ages ago.

Also, apart from the address, what about the size? Wouldn't it be
better to use copy_to_iter() rather than implement it badly by hand?

               Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 21:19 Michael S. Tsirkin
  2018-11-01 21:44 ` Linus Torvalds
@ 2018-11-01 23:00 ` Kees Cook
  2018-11-01 23:06   ` Linus Torvalds
  2018-11-01 23:38   ` Michael S. Tsirkin
  1 sibling, 2 replies; 65+ messages in thread
From: Kees Cook @ 2018-11-01 23:00 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Linus Torvalds, KVM, virtualization, Network Development, LKML,
	Andrew Morton, bijan.mottahedeh, gedwards, Joe Perches, lenaic,
	liang.z.li, Michal Hocko, Michal Hocko, Stefan Hajnoczi,
	wei.w.wang

On Thu, Nov 1, 2018 at 2:19 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:
>
>   Linux 4.19 (2018-10-22 07:37:37 +0100)
>
> are available in the Git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
>
> for you to fetch changes up to 79f800b2e76923cd8ce0aa659cb5c019d9643bc9:
>
>   MAINTAINERS: remove reference to bogus vsock file (2018-10-24 21:16:14 -0400)
>
> ----------------------------------------------------------------
> virtio, vhost: fixes, tweaks
>
> virtio balloon page hinting support
> vhost scsi control queue
>
> misc fixes.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> ----------------------------------------------------------------
> Bijan Mottahedeh (3):
>       vhost/scsi: Respond to control queue operations

+static void
+vhost_scsi_send_tmf_resp(struct vhost_scsi *vs,
+                          struct vhost_virtqueue *vq,
+                          int head, unsigned int out)
+{
+       struct virtio_scsi_ctrl_tmf_resp __user *resp;
+       struct virtio_scsi_ctrl_tmf_resp rsp;
+       int ret;
+
+       pr_debug("%s\n", __func__);
+       memset(&rsp, 0, sizeof(rsp));
+       rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
+       resp = vq->iov[out].iov_base;
+       ret = __copy_to_user(resp, &rsp, sizeof(rsp));

Is it actually safe to trust that iov_base has passed an earlier
access_ok() check here? Why not just use copy_to_user() instead?

-Kees

>       vhost/scsi: Extract common handling code from control queue handler
>       vhost/scsi: Use common handling code in request queue handler
>
> Greg Edwards (1):
>       vhost/scsi: truncate T10 PI iov_iter to prot_bytes
>
> Lénaïc Huard (1):
>       kvm_config: add CONFIG_VIRTIO_MENU
>
> Stefan Hajnoczi (1):
>       MAINTAINERS: remove reference to bogus vsock file
>
> Wei Wang (3):
>       virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
>       mm/page_poison: expose page_poisoning_enabled to kernel modules
>       virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
>
>  MAINTAINERS                         |   1 -
>  drivers/vhost/scsi.c                | 426 ++++++++++++++++++++++++++++--------
>  drivers/virtio/virtio_balloon.c     | 380 +++++++++++++++++++++++++++++-

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2018-11-01 21:19 Michael S. Tsirkin
@ 2018-11-01 21:44 ` Linus Torvalds
  2018-11-01 23:00 ` Kees Cook
  1 sibling, 0 replies; 65+ messages in thread
From: Linus Torvalds @ 2018-11-01 21:44 UTC (permalink / raw)
  To: mst
  Cc: kvm, virtualization, netdev, Linux Kernel Mailing List,
	Andrew Morton, bijan.mottahedeh, gedwards, joe, lenaic,
	liang.z.li, mhocko, mhocko, stefanha, wei.w.wang

On Thu, Nov 1, 2018 at 2:19 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> virtio, vhost: fixes, tweaks

Pulled.

                   Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2018-11-01 21:19 Michael S. Tsirkin
  2018-11-01 21:44 ` Linus Torvalds
  2018-11-01 23:00 ` Kees Cook
  0 siblings, 2 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2018-11-01 21:19 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: lenaic, mhocko, bijan.mottahedeh, kvm, mst, netdev, liang.z.li,
	linux-kernel, virtualization, stefanha, joe, akpm, mhocko,
	torvalds

The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:

  Linux 4.19 (2018-10-22 07:37:37 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 79f800b2e76923cd8ce0aa659cb5c019d9643bc9:

  MAINTAINERS: remove reference to bogus vsock file (2018-10-24 21:16:14 -0400)

----------------------------------------------------------------
virtio, vhost: fixes, tweaks

virtio balloon page hinting support
vhost scsi control queue

misc fixes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Bijan Mottahedeh (3):
      vhost/scsi: Respond to control queue operations
      vhost/scsi: Extract common handling code from control queue handler
      vhost/scsi: Use common handling code in request queue handler

Greg Edwards (1):
      vhost/scsi: truncate T10 PI iov_iter to prot_bytes

Lénaïc Huard (1):
      kvm_config: add CONFIG_VIRTIO_MENU

Stefan Hajnoczi (1):
      MAINTAINERS: remove reference to bogus vsock file

Wei Wang (3):
      virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
      mm/page_poison: expose page_poisoning_enabled to kernel modules
      virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

 MAINTAINERS                         |   1 -
 drivers/vhost/scsi.c                | 426 ++++++++++++++++++++++++++++--------
 drivers/virtio/virtio_balloon.c     | 380 +++++++++++++++++++++++++++++---
 include/uapi/linux/virtio_balloon.h |   8 +
 kernel/configs/kvm_guest.config     |   1 +
 mm/page_poison.c                    |   6 +
 6 files changed, 688 insertions(+), 134 deletions(-)
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-12-08 15:47 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-12-08 15:47 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, virtualization, netdev, linux-kernel, mst, wangyunjian,
	zhangweiping

The following changes since commit d9e427f6ab8142d6868eb719e6a7851aafea56b6:

  virtio_balloon: fix increment of vb->num_pfns in fill_balloon() (2017-12-01 16:55:45 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 03e9f8a05bce7330bcd9c5cc54c8e42d0fcbf993:

  virtio_net: fix return value check in receive_mergeable() (2017-12-07 18:34:52 +0200)

----------------------------------------------------------------
virtio: bugfixes

A couple of minor bugfixes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Yunjian Wang (1):
      virtio_net: fix return value check in receive_mergeable()

weiping zhang (2):
      virtio_mmio: add cleanup for virtio_mmio_probe
      virtio_mmio: add cleanup for virtio_mmio_remove

 drivers/net/virtio_net.c     |  2 +-
 drivers/virtio/virtio_mmio.c | 57 ++++++++++++++++++++++++++++++++++++--------
 2 files changed, 48 insertions(+), 11 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-12-04 13:25 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-12-04 13:25 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mhocko, kvm, mst, penguin-kernel, netdev, linux-kernel, stable,
	virtualization, zhangweiping, marcandre.lureau, jstancek

The following changes since commit c1d0c3f623ada808904dec676da0126f5b800630:

  fw_cfg: fix the command line module name (2017-11-14 23:57:40 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to d9e427f6ab8142d6868eb719e6a7851aafea56b6:

  virtio_balloon: fix increment of vb->num_pfns in fill_balloon() (2017-12-01 16:55:45 +0200)

----------------------------------------------------------------
virtio,qemu: bugfixes

A couple of bugfixes that just became ready.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Jan Stancek (1):
      virtio_balloon: fix increment of vb->num_pfns in fill_balloon()

Marc-André Lureau (1):
      fw_cfg: fix driver remove

weiping zhang (1):
      virtio: release virtio index when fail to device_register

 drivers/firmware/qemu_fw_cfg.c  | 3 ++-
 drivers/virtio/virtio.c         | 2 ++
 drivers/virtio/virtio_balloon.c | 3 +--
 3 files changed, 5 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-08-25 18:47 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-08-25 18:47 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, mst, netdev, linux-kernel, stable, virtualization, stefanha,
	yasu.isimatu, hch

The following changes since commit 14ccee78fc82f5512908f4424f541549a5705b89:

  Linux 4.13-rc6 (2017-08-20 14:13:52 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to ba74b6f7fcc07355d087af6939712eed4a454821:

  virtio_pci: fix cpu affinity support (2017-08-25 21:38:26 +0300)

----------------------------------------------------------------
virtio: bugfix

Fixes two obvious bugs in virtio pci.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Christoph Hellwig (1):
      virtio_pci: fix cpu affinity support

Stefan Hajnoczi (1):
      virtio_blk: fix incorrect message when disk is resized

 drivers/block/virtio_blk.c         | 16 ++++++++++------
 drivers/virtio/virtio_pci_common.c | 10 +++++++---
 2 files changed, 17 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-04-10 21:36 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-04-10 21:36 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, mst, marc.zyngier, netdev, efault, linux-kernel,
	virtualization, cornelia.huck

These changes were as in linux-next as e1c287efcd4cf688564ed1112d032b5dac29b159 -
I tweaked the commit log slightly.

Too many people were complaining of warnings and errors in virtio
so I decided revert is the safest path forward right now.

The following changes since commit a71c9a1c779f2499fb2afc0553e543f18aff6edf:

  Linux 4.11-rc5 (2017-04-02 17:23:54 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 2f8dc3a01f1cf8ed17b1e295812ad12b688be5d3:

  virtio-pci: Remove affinity hint before freeing the interrupt (2017-04-11 00:30:20 +0300)

----------------------------------------------------------------
virtio: oops fixes

virtio pci rework using shared interrupts caused a lot of issues. We
tried to fix them but run out of time. Revert for now, and revisit the
issue for the next kernel.

Luckily we are able to do this without loosing automatic
interrupt NUMA affinity which was the main motivator for the
rework.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Cornelia Huck (1):
      MAINTAINERS: fix virtio file pattern

Marc Zyngier (1):
      virtio-pci: Remove affinity hint before freeing the interrupt

Michael S. Tsirkin (9):
      virtio_net: enable big packets for large MTU values
      virtio: allow drivers to validate features
      virtio_net: clear MTU when out of range
      virtio_console: fix uninitialized variable use
      Revert "virtio_pci: fix out of bound access for msix_names"
      Revert "virtio_pci: simplify MSI-X setup"
      Revert "virtio_pci: don't duplicate the msix_enable flag in struct pci_dev"
      Revert "virtio_pci: use shared interrupts for virtqueues"
      Revert "virtio_pci: remove struct virtio_pci_vq_info"

 MAINTAINERS                        |   2 +-
 drivers/char/virtio_console.c      |   6 +-
 drivers/net/virtio_net.c           |  45 +++--
 drivers/virtio/virtio.c            |   6 +
 drivers/virtio/virtio_pci_common.c | 375 ++++++++++++++++++++++---------------
 drivers/virtio/virtio_pci_common.h |  43 ++++-
 drivers/virtio/virtio_pci_legacy.c |   8 +-
 drivers/virtio/virtio_pci_modern.c |   8 +-
 include/linux/virtio.h             |   1 +
 include/uapi/linux/virtio_pci.h    |   2 +-
 10 files changed, 323 insertions(+), 173 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-03-02  5:49 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-03-02  5:49 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: osandov, kvm, mst, netdev, linux-kernel, virtualization, hch

The following changes since commit c470abd4fde40ea6a0846a2beab642a578c0b8cd:

  Linux 4.10 (2017-02-19 14:34:00 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to c4baad50297d84bde1a7ad45e50c73adae4a2192:

  virtio-console: avoid DMA from stack (2017-03-02 01:35:06 +0200)

----------------------------------------------------------------
virtio, vhost: optimizations, fixes

Looks like a quiet cycle for vhost/virtio, just a couple of minor
tweaks. Most notable is automatic interrupt affinity for blk and scsi.
Hopefully other devices are not far behind.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Christoph Hellwig (9):
      virtio_pci: remove struct virtio_pci_vq_info
      virtio_pci: use shared interrupts for virtqueues
      virtio_pci: don't duplicate the msix_enable flag in struct pci_dev
      virtio_pci: simplify MSI-X setup
      virtio: allow drivers to request IRQ affinity when creating VQs
      virtio: provide a method to get the IRQ affinity mask for a virtqueue
      blk-mq: provide a default queue mapping for virtio device
      virtio_blk: use virtio IRQ affinity
      virtio_scsi: use virtio IRQ affinity

Jason Wang (2):
      vhost: try avoiding avail index access when getting descriptor
      vhost: introduce O(1) vq metadata cache

Michael S. Tsirkin (1):
      virtio_mmio: expose header to userspace

Omar Sandoval (1):
      virtio-console: avoid DMA from stack

 block/Kconfig                              |   5 +
 block/Makefile                             |   1 +
 block/blk-mq-virtio.c                      |  54 +++++
 drivers/block/virtio_blk.c                 |  14 +-
 drivers/char/virtio_console.c              |  14 +-
 drivers/crypto/virtio/virtio_crypto_core.c |   2 +-
 drivers/gpu/drm/virtio/virtgpu_kms.c       |   2 +-
 drivers/misc/mic/vop/vop_main.c            |   2 +-
 drivers/net/caif/caif_virtio.c             |   3 +-
 drivers/net/virtio_net.c                   |   2 +-
 drivers/remoteproc/remoteproc_virtio.c     |   3 +-
 drivers/rpmsg/virtio_rpmsg_bus.c           |   2 +-
 drivers/s390/virtio/kvm_virtio.c           |   3 +-
 drivers/s390/virtio/virtio_ccw.c           |   3 +-
 drivers/scsi/virtio_scsi.c                 | 127 +---------
 drivers/vhost/vhost.c                      | 173 +++++++++----
 drivers/vhost/vhost.h                      |   8 +
 drivers/virtio/virtio_balloon.c            |   3 +-
 drivers/virtio/virtio_input.c              |   3 +-
 drivers/virtio/virtio_mmio.c               |   5 +-
 drivers/virtio/virtio_pci_common.c         | 376 ++++++++++++-----------------
 drivers/virtio/virtio_pci_common.h         |  50 +---
 drivers/virtio/virtio_pci_legacy.c         |   9 +-
 drivers/virtio/virtio_pci_modern.c         |  17 +-
 include/linux/blk-mq-virtio.h              |  10 +
 include/linux/cpuhotplug.h                 |   1 -
 include/linux/virtio_config.h              |  12 +-
 include/uapi/linux/Kbuild                  |   1 +
 include/{ => uapi}/linux/virtio_mmio.h     |   0
 include/uapi/linux/virtio_pci.h            |   2 +-
 net/vmw_vsock/virtio_transport.c           |   3 +-
 31 files changed, 456 insertions(+), 454 deletions(-)
 create mode 100644 block/blk-mq-virtio.c
 create mode 100644 include/linux/blk-mq-virtio.h
 rename include/{ => uapi}/linux/virtio_mmio.h (100%)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-02-03 21:43 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-02-03 21:43 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: miket, kvm, mst, marc.zyngier, netdev, will.deacon, dgilbert,
	stable, linux-kernel, amit.shah, virtualization, robin.murphy

The following changes since commit 566cf877a1fcb6d6dc0126b076aad062054c2637:

  Linux 4.10-rc6 (2017-01-29 14:25:17 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 79134d11d030b886106bf45a5638c1ccb1f0856c:

  MAINTAINERS: update email address for Amit Shah (2017-02-03 23:40:36 +0200)

----------------------------------------------------------------
virtio, vhost: last minute fixes

ARM DMA fix revert
vhost endian-ness fix
MAINTAINERS: email address change for Amit

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Amit Shah (1):
      MAINTAINERS: update email address for Amit Shah

Halil Pasic (1):
      vhost: fix initialization for vq->is_le

Michael S. Tsirkin (1):
      Revert "vring: Force use of DMA API for ARM-based systems with legacy devices"

 MAINTAINERS                  |  2 +-
 drivers/vhost/vhost.c        | 10 ++++------
 drivers/virtio/virtio_ring.c |  7 -------
 3 files changed, 5 insertions(+), 14 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2017-01-23 21:50 ` Linus Torvalds
@ 2017-01-24  2:45   ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-01-24  2:45 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: gcampana, KVM list, Network Development, pmorel,
	Linux Kernel Mailing List, virtualization, Dan Carpenter,
	Colin Ian King, bhumirks, silbe

On Mon, Jan 23, 2017 at 01:50:32PM -0800, Linus Torvalds wrote:
> On Mon, Jan 23, 2017 at 7:05 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > virtio, vhost: fixes, cleanups
> 
> Was there a reason why you sent this twice?
> 
> Or was this *supposed* to be the ARM DMA fix pull request? Because it wasn't.
> 
>                   Linus

Ouch sorry. Was tired and forgot I already sent it.  Should have
checked.

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2017-01-23 15:05 Michael S. Tsirkin
@ 2017-01-23 21:50 ` Linus Torvalds
  2017-01-24  2:45   ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2017-01-23 21:50 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: KVM list, virtualization, Network Development,
	Linux Kernel Mailing List, bhumirks, Christian Borntraeger,
	Colin Ian King, Cornelia Huck, Dan Carpenter, gcampana,
	Jason Wang, pasic, pmorel, silbe

On Mon, Jan 23, 2017 at 7:05 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> virtio, vhost: fixes, cleanups

Was there a reason why you sent this twice?

Or was this *supposed* to be the ARM DMA fix pull request? Because it wasn't.

                  Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2017-01-23 15:05 Michael S. Tsirkin
  2017-01-23 21:50 ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2017-01-23 15:05 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: gcampana, kvm, mst, netdev, pmorel, linux-kernel, virtualization,
	dan.carpenter, colin.king, bhumirks, silbe

The following changes since commit 49def1853334396f948dcb4cedb9347abb318df5:

  Linux 4.10-rc4 (2017-01-15 16:21:59 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 0db1dba5dfaf70fb3baf07973996db2078528cde:

  virtio/s390: virtio: constify virtio_config_ops structures (2017-01-19 23:46:34 +0200)

Note: ARM DMA fixes missed this pull, will be in the next one.

----------------------------------------------------------------
virtio, vhost: fixes, cleanups

Random fixes and cleanups that accumulated over the time.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Bhumika Goyal (2):
      vhost: scsi: constify target_core_fabric_ops structures
      virtio/s390: virtio: constify virtio_config_ops structures

Colin Ian King (1):
      virtio/s390: add missing \n to end of dev_err message

Dan Carpenter (1):
      vhost/scsi: silence uninitialized variable warning

G. Campana (1):
      virtio_console: fix a crash in config_work_handler

Halil Pasic (2):
      tools/virtio/ringtest: fix run-on-all.sh for offline cpus
      tools/virtio/ringtest: tweaks for s390

Pierre Morel (1):
      virtio/s390: support READ_STATUS command for virtio-ccw

 drivers/char/virtio_console.c       |  2 +-
 drivers/s390/virtio/virtio_ccw.c    | 29 +++++++++++++++++++++++++++--
 drivers/vhost/scsi.c                |  4 ++--
 tools/virtio/ringtest/main.h        | 12 ++++++++++++
 tools/virtio/ringtest/run-on-all.sh |  5 +++--
 5 files changed, 45 insertions(+), 7 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2016-05-24 11:57 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2016-05-24 11:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, mst, netdev, linux-kernel, virtualization

The following changes since commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a:

  Linux 4.6 (2016-05-15 15:43:13 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to bb991288728e6a47a6f0fac6a4e9dfaeecc27956:

  ringtest: pass buf != NULL (2016-05-22 19:44:14 +0300)

----------------------------------------------------------------
virtio: patches for 4.7

Looks like a quiet cycle for virtio.  There's a new inorder option for the
ringtest tool, and a bugfix for balloon for ppc platforms when using virtio 1
mode.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (3):
      virtio: add inorder option
      virtio_balloon: fix PFN format for virtio-1
      ringtest: pass buf != NULL

 drivers/virtio/virtio_balloon.c             | 20 +++++++-----
 tools/virtio/ringtest/main.c                |  2 +-
 tools/virtio/ringtest/virtio_ring_0_9.c     | 49 ++++++++++++++++++++++++++++-
 tools/virtio/ringtest/virtio_ring_inorder.c |  2 ++
 tools/virtio/ringtest/Makefile              |  5 ++-
 5 files changed, 67 insertions(+), 11 deletions(-)
 create mode 100644 tools/virtio/ringtest/virtio_ring_inorder.c

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-12-21  7:58 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-12-21  7:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, mst, netdev, linux-kernel, virtualization

The following changes since commit 9f9499ae8e6415cefc4fe0a96ad0e27864353c89:

  Linux 4.4-rc5 (2015-12-13 17:42:58 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up 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 <mst@redhat.com>

----------------------------------------------------------------
Cornelia Huck (1):
      virtio/s390: handle error values in irb

 drivers/s390/virtio/virtio_ccw.c | 62 ++++++++++++++++++++++++----------------
 1 file changed, 37 insertions(+), 25 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-12-07 17:07 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-12-07 17:07 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mhocko, kvm, mst, netdev, will.deacon, linux-kernel, stable,
	virtualization, luto, s-anna

The following changes since commit 527e9316f8ec44bd53d90fb9f611fa7ffff52bb9:

  Linux 4.4-rc4 (2015-12-06 15:43:12 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to f277ec42f38f406ed073569b24b04f1c291fec0f:

  virtio_ring: shadow available ring flags & index (2015-12-07 17:28:11 +0200)

----------------------------------------------------------------
virtio: fixes on top of 4.4-rc4

This includes some fixes and cleanups in virtio and vhost code. Most notably,
shadowing the index fixes the excessive cacheline bouncing observed on AMD
platforms.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (5):
      virtio-net: Stop doing DMA from the stack
      vhost: relax log address alignment
      tools/virtio: move list macro stubs
      tools/virtio: fix byteswap logic
      vhost: replace % with & on data path

Michal Hocko (1):
      virtio: Do not drop __GFP_HIGH in alloc_indirect

Suman Anna (1):
      virtio: fix memory leak of virtio ida cache layers

Venkatesh Srinivas (1):
      virtio_ring: shadow available ring flags & index

 tools/virtio/linux/kernel.h        |  6 +++++
 tools/virtio/linux/virtio.h        |  6 -----
 tools/virtio/linux/virtio_config.h | 20 ++++++++++------
 drivers/net/virtio_net.c           | 34 +++++++++++++++------------
 drivers/vhost/vhost.c              |  8 +++----
 drivers/virtio/virtio.c            |  1 +
 drivers/virtio/virtio_ring.c       | 48 +++++++++++++++++++++++++++-----------
 7 files changed, 78 insertions(+), 45 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-09-18 10:42 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-09-18 10:42 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, virtualization, netdev, linux-kernel, cornelia.huck, mst, pmorel

The following changes since commit 997e120843e82609c8d99a9d5714e6cf91e14cbe:

  virtio_balloon: do not change memory amount visible via /proc/meminfo (2015-09-08 13:32:11 +0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to ad2aa04218de9bd734d593adb0ac59854ec0cb68:

  virtio/s390: handle failures of READ_VQ_CONF ccw (2015-09-16 12:48:08 +0300)

----------------------------------------------------------------
virtio: fixes on top of 4.3-rc1

This fixes the virtio-test tool, and improves
the error handling for virtio-ccw.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (3):
      tools/virtio: fix build after 4.2 changes
      vhost: move features to core
      tools/virtio: propagate V=X to kernel build

Pierre Morel (1):
      virtio/s390: handle failures of READ_VQ_CONF ccw

 drivers/vhost/vhost.h            |  4 +++-
 tools/virtio/asm/barrier.h       |  2 ++
 tools/virtio/linux/export.h      |  3 +++
 tools/virtio/linux/kernel.h      |  8 ++++++++
 drivers/s390/virtio/virtio_ccw.c | 10 +++++++++-
 drivers/vhost/net.c              |  3 +--
 drivers/vhost/scsi.c             |  4 +---
 drivers/vhost/test.c             |  3 +++
 tools/virtio/Makefile            |  2 +-
 9 files changed, 31 insertions(+), 8 deletions(-)
 create mode 100644 tools/virtio/linux/export.h

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-09-09  9:15 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-09-09  9:15 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, virtualization, netdev, linux-kernel, den, famz,
	graeme.gregory, mst, pbonzini

The following changes since commit 64291f7db5bd8150a74ad2036f1037e6a0428df2:

  Linux 4.2 (2015-08-30 11:34:09 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 997e120843e82609c8d99a9d5714e6cf91e14cbe:

  virtio_balloon: do not change memory amount visible via /proc/meminfo (2015-09-08 13:32:11 +0300)

----------------------------------------------------------------
virtio: fixes and features 4.3

virtio-mmio can now be auto-loaded through acpi.
virtio blk supports extended partitions.
total memory is better reported when using virtio balloon with auto-deflate.
cache control is re-enabled when using virtio-blk in modern mode.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Denis V. Lunev (2):
      virtio_ballon: change stub of release_pages_by_pfn
      virtio_balloon: do not change memory amount visible via /proc/meminfo

Fam Zheng (1):
      virtio-blk: Allow extended partitions

Graeme Gregory (1):
      virtio_mmio: add ACPI probing

Paolo Bonzini (1):
      virtio-blk: use VIRTIO_BLK_F_WCE and VIRTIO_BLK_F_CONFIG_WCE in virtio1

 drivers/block/virtio_blk.c      |  6 +++---
 drivers/virtio/virtio_balloon.c | 16 ++++++++++------
 drivers/virtio/virtio_mmio.c    | 10 ++++++++++
 3 files changed, 23 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-07-28 10:00 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-07-28 10:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, mst, netdev, linux-kernel, stable, virtualization,
	marcandre.lureau, imammedo

The following changes since commit cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f:

  Linux 4.2-rc4 (2015-07-26 12:26:21 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 1e0994730f772580ff98754eb5595190cdf371ef:

  vhost: fix error handling for memory region alloc (2015-07-27 18:05:05 +0300)

----------------------------------------------------------------
vhost: fixes for 4.2

Two bugfixes only here.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Igor Mammedov (1):
      vhost: fix error handling for memory region alloc

Marc-André Lureau (1):
      vhost: actually track log eventfd file

 drivers/vhost/vhost.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2015-07-15 10:50 Michael S. Tsirkin
@ 2015-07-15 11:26 ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-07-15 11:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: sfr, thuth, kvm, netdev, pmorel, linux-kernel, virtualization,
	borntraeger, yan, imammedo

On Wed, Jul 15, 2015 at 01:50:24PM +0300, Michael S. Tsirkin wrote:
> The following changes since commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee:
> 
>   virtio-pci: alloc only resources actually used. (2015-06-24 08:15:09 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> 
> for you to fetch changes up to c9ce42f72fd0ba180fd35539829e4139dca31494:
> 
>   vhost: add max_mem_regions module parameter (2015-07-13 23:17:19 +0300)
> 
> ----------------------------------------------------------------
> virtio/vhost: fixes for 4.2
> 
> Bugfixes and documentation fixes. Igor's patch that allows
> users to tweak memory table size is borderline,
> but it does fix known crashes, so I merged it.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Ouch.  Turns out there was a bug in error handling here.
Linus, please don't pull this one yet, I will fix it up and
resend. I've deleted the tag for now so it won't get pulled
by mistake.

> ----------------------------------------------------------------
> Cornelia Huck (2):
>       MAINTAINERS: separate section for s390 virtio drivers
>       virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio
> 
> Igor Mammedov (3):
>       vhost: use binary search instead of linear in find_region()
>       vhost: extend memory regions allocation to vmalloc
>       vhost: add max_mem_regions module parameter
> 
> Michael S. Tsirkin (2):
>       virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
>       virtio: define virtio_pci_cfg_cap in header.
> 
> Pierre Morel (1):
>       9p/trans_virtio: reset virtio device on remove
> 
> Stephen Rothwell (1):
>       virtio scsi: fix unused variable warning
> 
> Thomas Huth (1):
>       virtio: Fix typecast of pointer in vring_init()
> 
>  include/uapi/linux/virtio_net.h           | 16 ++++++++
>  include/uapi/linux/virtio_pci.h           |  6 +++
>  include/uapi/linux/virtio_ring.h          |  5 ++-
>  drivers/s390/{kvm => virtio}/kvm_virtio.c |  0
>  drivers/s390/{kvm => virtio}/virtio_ccw.c |  0
>  drivers/scsi/virtio_scsi.c                |  4 +-
>  drivers/vhost/vhost.c                     | 67 +++++++++++++++++++++++--------
>  net/9p/trans_virtio.c                     |  1 +
>  MAINTAINERS                               | 10 ++++-
>  drivers/s390/Makefile                     |  2 +-
>  drivers/s390/{kvm => virtio}/Makefile     |  0
>  11 files changed, 91 insertions(+), 20 deletions(-)
>  rename drivers/s390/{kvm => virtio}/kvm_virtio.c (100%)
>  rename drivers/s390/{kvm => virtio}/virtio_ccw.c (100%)
>  rename drivers/s390/{kvm => virtio}/Makefile (100%)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-07-15 10:50 Michael S. Tsirkin
  2015-07-15 11:26 ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-07-15 10:50 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: sfr, thuth, kvm, mst, netdev, pmorel, linux-kernel,
	virtualization, borntraeger, yan, imammedo

The following changes since commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee:

  virtio-pci: alloc only resources actually used. (2015-06-24 08:15:09 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to c9ce42f72fd0ba180fd35539829e4139dca31494:

  vhost: add max_mem_regions module parameter (2015-07-13 23:17:19 +0300)

----------------------------------------------------------------
virtio/vhost: fixes for 4.2

Bugfixes and documentation fixes. Igor's patch that allows
users to tweak memory table size is borderline,
but it does fix known crashes, so I merged it.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Cornelia Huck (2):
      MAINTAINERS: separate section for s390 virtio drivers
      virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio

Igor Mammedov (3):
      vhost: use binary search instead of linear in find_region()
      vhost: extend memory regions allocation to vmalloc
      vhost: add max_mem_regions module parameter

Michael S. Tsirkin (2):
      virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
      virtio: define virtio_pci_cfg_cap in header.

Pierre Morel (1):
      9p/trans_virtio: reset virtio device on remove

Stephen Rothwell (1):
      virtio scsi: fix unused variable warning

Thomas Huth (1):
      virtio: Fix typecast of pointer in vring_init()

 include/uapi/linux/virtio_net.h           | 16 ++++++++
 include/uapi/linux/virtio_pci.h           |  6 +++
 include/uapi/linux/virtio_ring.h          |  5 ++-
 drivers/s390/{kvm => virtio}/kvm_virtio.c |  0
 drivers/s390/{kvm => virtio}/virtio_ccw.c |  0
 drivers/scsi/virtio_scsi.c                |  4 +-
 drivers/vhost/vhost.c                     | 67 +++++++++++++++++++++++--------
 net/9p/trans_virtio.c                     |  1 +
 MAINTAINERS                               | 10 ++++-
 drivers/s390/Makefile                     |  2 +-
 drivers/s390/{kvm => virtio}/Makefile     |  0
 11 files changed, 91 insertions(+), 20 deletions(-)
 rename drivers/s390/{kvm => virtio}/kvm_virtio.c (100%)
 rename drivers/s390/{kvm => virtio}/virtio_ccw.c (100%)
 rename drivers/s390/{kvm => virtio}/Makefile (100%)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2015-06-01 19:18 Michael S. Tsirkin
@ 2015-06-01 19:45 ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-06-01 19:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: netdev, mikko.rapeli, linux-kernel, kvm, virtualization

The mail subject is wrong or course - the one in
the pull request is correct.
Sorry about that - this shouldn't interfere with merging it, I'll
correct it for future requests.

-- 
MST

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-06-01 19:18 Michael S. Tsirkin
  2015-06-01 19:45 ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-06-01 19:18 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, virtualization, netdev, linux-kernel, mikko.rapeli, mst

The following changes since commit c65b99f046843d2455aa231747b5a07a999a9f3d:

  Linux 4.1-rc6 (2015-05-31 19:01:07 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 8a7b19d8b542b87bccc3eaaf81dcc90a5ca48aea:

  include/uapi/linux/virtio_balloon.h: include linux/virtio_types.h (2015-06-01 15:46:54 +0200)

----------------------------------------------------------------
virtio: last-minute fix for 4.1

This tweaks an exported user-space header to fix
build breakage for userspace using it.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Mikko Rapeli (1):
      include/uapi/linux/virtio_balloon.h: include linux/virtio_types.h

 include/uapi/linux/virtio_balloon.h | 1 +
 1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-01-08  7:51 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-01-08  7:51 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: kvm, mst, netdev, linux-kernel, stable, virtualization, sasha.levin

The following changes since commit b1940cd21c0f4abdce101253e860feff547291b0:

  Linux 3.19-rc3 (2015-01-05 17:05:20 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 99975cc6ada0d5f2675e83abecae05aba5f437d2:

  vhost/net: length miscalculation (2015-01-07 12:22:00 +0200)

----------------------------------------------------------------
virtio, vhost fixes for 3.19

This fixes a couple of bugs triggered by hot-unplug
of virtio devices, as well as a regression in vhost-net.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (4):
      virtio: make del_vqs idempotent
      virtio_pci: device-specific release callback
      virtio_pci: document why we defer kfree
      vhost/net: length miscalculation

Sasha Levin (1):
      virtio_pci: defer kfree until release callback

 drivers/virtio/virtio_pci_common.h |  1 -
 drivers/vhost/net.c                |  2 +-
 drivers/virtio/virtio_pci_common.c | 10 +---------
 drivers/virtio/virtio_pci_legacy.c | 12 +++++++++++-
 4 files changed, 13 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2015-01-01 12:26 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2015-01-01 12:26 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, virtualization, netdev, linux-kernel, mst, rusty

The following changes since commit b7392d2247cfe6771f95d256374f1a8e6a6f48d6:

  Linux 3.19-rc2 (2014-12-28 16:49:37 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 5d9a07b0de512b77bf28d2401e5fe3351f00a240:

  vhost: relax used address alignment (2014-12-29 10:55:06 +0200)

----------------------------------------------------------------
vhost: virtio 1.0 bugfix

There's a single change here, fixing a vhost bug where vhost initialization
fails due to used ring alignment check being too strict.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (2):
      virtio_ring: document alignment requirements
      vhost: relax used address alignment

 include/uapi/linux/virtio_ring.h |  7 +++++++
 drivers/vhost/vhost.c            | 10 +++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2014-12-18 10:46 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2014-12-18 10:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: herbert, kvm, mst, netdev, linux-kernel, virtualization

The following changes since commit f01a2a811ae04124fc9382925038fcbbd2f0b7c8:

  virtio_ccw: finalize_features error handling (2014-12-09 21:42:06 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 5ff16110c637726111662c1df41afd9df7ef36bd:

  virtio_pci: restore module attributes (2014-12-17 00:59:40 +0200)

----------------------------------------------------------------
vhost/virtio: virtio 1.0 related fixes

Most importantly, this fixes using virtio_pci as a module.

Further, the big virtio 1.0 conversion missed a couple of places. This fixes
them up.

This isn't 100% sparse-clean yet because on many architectures get_user
triggers sparse warnings when used with __bitwise tag (when same tag is on both
pointer and value read).

I posted a patchset to fix it up by adding __force on all
arches that don't already have it (many do), when that's
merged these warnings will go away.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Herbert Xu (1):
      virtio_pci: restore module attributes

Michael S. Tsirkin (15):
      virtio: set VIRTIO_CONFIG_S_FEATURES_OK on restore
      virtio_config: fix virtio_cread_bytes
      virtio_pci_common.h: drop VIRTIO_PCI_NO_LEGACY
      virtio_pci: move probe to common file
      virtio_pci: add VIRTIO_PCI_NO_LEGACY
      virtio: core support for config generation
      tools/virtio: more stubs
      tools/virtio: fix vringh test
      tools/virtio: 64 bit features
      tools/virtio: enable -Werror
      tools/virtio: add virtio 1.0 in virtio_test
      tools/virtio: add virtio 1.0 in vringh_test
      vringh: 64 bit features
      vringh: update for virtio 1.0 APIs
      mic/host: fix up virtio 1.0 APIs

 drivers/virtio/virtio_pci_common.h     |   7 +-
 include/linux/virtio_config.h          |  29 +++++++-
 include/linux/vringh.h                 |  37 +++++++++-
 include/uapi/linux/virtio_pci.h        |  15 ++--
 tools/virtio/linux/virtio.h            |   1 +
 tools/virtio/linux/virtio_byteorder.h  |   8 +++
 tools/virtio/linux/virtio_config.h     |  70 +++++++++++++++++-
 tools/virtio/uapi/linux/virtio_types.h |   1 +
 drivers/misc/mic/host/mic_debugfs.c    |  18 +++--
 drivers/vhost/vringh.c                 | 125 ++++++++++++++++++++-------------
 drivers/virtio/virtio.c                |  37 ++++++----
 drivers/virtio/virtio_pci_common.c     |  39 +++++++++-
 drivers/virtio/virtio_pci_legacy.c     |  24 +------
 tools/virtio/virtio_test.c             |  15 +++-
 tools/virtio/vringh_test.c             |   5 +-
 tools/virtio/Makefile                  |   2 +-
 16 files changed, 324 insertions(+), 109 deletions(-)
 create mode 100644 tools/virtio/linux/virtio_byteorder.h
 create mode 100644 tools/virtio/uapi/linux/virtio_types.h

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2014-11-13 21:22 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2014-11-13 21:22 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, mst, netdev, linux-kernel, virtualization, tgraf

The following changes since commit 206c5f60a3d902bc4b56dab2de3e88de5eb06108:

  Linux 3.18-rc4 (2014-11-09 14:55:29 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 65eca3a20264a8999570c269406196bd1ae23be7:

  virtio_console: move early VQ enablement (2014-11-13 09:53:26 +0200)

It seems like a good idea to merge this bugfix now, as it's clearly
a regression and several people complained.

----------------------------------------------------------------
virtio: bugfix for 3.18

This fixes a crash in virtio console
multi-channel mode that got introduced in -rc1.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Cornelia Huck (1):
      virtio_console: move early VQ enablement

 drivers/char/virtio_console.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2014-06-25 11:05 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2014-06-25 11:05 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, mst, netdev, romain, linux-kernel, virtualization

The following changes since commit a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee:

  Linux 3.16-rc2 (2014-06-21 19:02:54 -1000)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 68404441557d8db5ac853379a4fb9c1adedea4fd:

  vhost-scsi: don't open-code kvfree (2014-06-23 09:22:48 +0300)

----------------------------------------------------------------
vhost: infrastructure fixes for 3.16

Two cleanup patches removing code duplication that got introduced by changes in
rc1.  Not fixing crashes, but I'd rather not carry the duplicate code until the
next merge window.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Michael S. Tsirkin (1):
      vhost-scsi: don't open-code kvfree

Romain Francoise (1):
      vhost-net: don't open-code kvfree

 drivers/vhost/net.c  | 12 ++----------
 drivers/vhost/scsi.c | 12 ++----------
 2 files changed, 4 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2013-07-15 18:31 Michael S. Tsirkin
@ 2013-07-22  8:07 ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2013-07-22  8:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: netdev, linux-kernel, kvm, virtualization

On Mon, Jul 15, 2013 at 09:31:49PM +0300, Michael S. Tsirkin wrote:
> The following changes since commit 09a34c8404c1d4c5782de319c02e1d742c57875c:
> 
>   vhost/test: update test after vhost cleanups (2013-07-07 18:02:25 +0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> 
> for you to fetch changes up to 22fa90c7fb479694d6affebc049d21f06b714be6:
> 
>   vhost: Remove custom vhost rcu usage (2013-07-11 15:38:40 +0300)
> 
> ----------------------------------------------------------------
> vhost: more fixes for 3.11
> 
> This includes some fixes for vhost net and scsi drivers.
> The test module has already been reworked to avoid rcu
> usage, but the necessary core changes are missing,
> we fixed this.
> Unlikely to affect any real-world users, but it's
> early in the cycle so, let's merge them.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> ----------------------------------------------------------------
> Asias He (3):
>       vhost-net: Always access vq->private_data under vq mutex
>       vhost-scsi: Always access vq->private_data under vq mutex
>       vhost: Remove custom vhost rcu usage


Hi Linus,
Just checking that all's well with this PULL request.
If it's not merged, we'll have to revert the relevant change
in the test module.
Either way, need to keep them in sync.

Pls let me know,
Thanks

>  drivers/vhost/net.c   | 37 ++++++++++++++++---------------------
>  drivers/vhost/scsi.c  | 17 ++++++-----------
>  drivers/vhost/test.c  |  6 ++----
>  drivers/vhost/vhost.h | 10 ++--------
>  4 files changed, 26 insertions(+), 44 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2013-07-15 18:31 Michael S. Tsirkin
  2013-07-22  8:07 ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2013-07-15 18:31 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, mst, netdev, linux-kernel, virtualization

The following changes since commit 09a34c8404c1d4c5782de319c02e1d742c57875c:

  vhost/test: update test after vhost cleanups (2013-07-07 18:02:25 +0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 22fa90c7fb479694d6affebc049d21f06b714be6:

  vhost: Remove custom vhost rcu usage (2013-07-11 15:38:40 +0300)

----------------------------------------------------------------
vhost: more fixes for 3.11

This includes some fixes for vhost net and scsi drivers.
The test module has already been reworked to avoid rcu
usage, but the necessary core changes are missing,
we fixed this.
Unlikely to affect any real-world users, but it's
early in the cycle so, let's merge them.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Asias He (3):
      vhost-net: Always access vq->private_data under vq mutex
      vhost-scsi: Always access vq->private_data under vq mutex
      vhost: Remove custom vhost rcu usage

 drivers/vhost/net.c   | 37 ++++++++++++++++---------------------
 drivers/vhost/scsi.c  | 17 ++++++-----------
 drivers/vhost/test.c  |  6 ++----
 drivers/vhost/vhost.h | 10 ++--------
 4 files changed, 26 insertions(+), 44 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2013-07-08 11:45 Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2013-07-08 11:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: kvm, mst, netdev, linux-kernel, virtualization

The following changes since commit 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376:

  Linux 3.10 (2013-06-30 15:13:29 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 09a34c8404c1d4c5782de319c02e1d742c57875c:

  vhost/test: update test after vhost cleanups (2013-07-07 18:02:25 +0300)

----------------------------------------------------------------
vhost: fixes and cleanups 3.11

This includes some fixes and cleanups for vhost net and scsi drivers.
The scsi driver changes will cause a conflict with  Nicholas Bellinger's scsi
target changes, but the conflicting commit in my tree simply renames some
variables so it's trivial to resolve.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Asias He (8):
      vhost: Simplify dev->vqs[i] access
      vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
      vhost-scsi: Rename struct vhost_scsi *s to *vs
      vhost-scsi: Make func indention more consistent
      vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg
      vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd
      vhost: Make vhost a separate module
      vhost: Make local function static

Michael S. Tsirkin (2):
      vhost-net: fix use-after-free in vhost_net_flush
      vhost/test: update test after vhost cleanups

 drivers/vhost/Kconfig  |   8 +
 drivers/vhost/Makefile |   3 +-
 drivers/vhost/net.c    |  13 +-
 drivers/vhost/scsi.c   | 472 ++++++++++++++++++++++++++-----------------------
 drivers/vhost/test.c   |  33 ++--
 drivers/vhost/vhost.c  |  86 +++++++--
 drivers/vhost/vhost.h  |   2 +
 7 files changed, 356 insertions(+), 261 deletions(-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2013-05-02 19:49     ` Linus Torvalds
@ 2013-06-05 15:53       ` Michael S. Tsirkin
  0 siblings, 0 replies; 65+ messages in thread
From: Michael S. Tsirkin @ 2013-06-05 15:53 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Nicholas A. Bellinger, KVM list, virtualization,
	Network Development, Linux Kernel Mailing List, Asias He,
	target-devel

On Thu, May 02, 2013 at 12:49:42PM -0700, Linus Torvalds wrote:
> On Thu, May 2, 2013 at 12:33 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > I prefer not rebasing,
> 
> Good.
> 
> >                   will play with git to see why
> > does request-pull get me a wrong diffstat and how
> > to trick it into doing the right thing.
> > Maybe merging my branch into master will do this.
> 
> No, don't do an unnecessary merge just to get the diffstat right.
> 
> git pull-request ends up assuming that there are no back-merges, and
> that you have a uniquely defined single shared merge base. That allows
> pull-request to just generate the diff directly from that merge base,
> without actually trying to do the merge itself (which may have
> conflicts etc).
> 
> But because git pull-request doesn't actually *do* the merge, it means
> that it will fail to give the correct diffstat if the tree is
> complicated and has multiple merge bases, and it can't really figure
> what the original shared state was before the development.
> 
> This is just one reason I do *not* want to see back-merges. They make
> history harder to read not just for humans.
> 
> You can either ignore the problem (I'll see the real diffstat when I
> actually do the merge), or you can do a test-merge yourself (that you
> do *not* then push out in the development branch - keep it in a
> temporary branch for your own edification or just delete it after
> doing the merge, and don't do development on it!)
> 
> In this case, it's an indirect back-merge: you back-merged a commit
> from the target tree that I have now merged, so it has become a
> back-merge. I'm not sure why you did that - if you needed to start
> from that state, it would actually have been better to just start at
> that state instead of merging it.

OK I'm in that situation again. I have some vhost-net patches that depend on
changes in tip.
But I also have a vhost-next branch with unrelated changes, that
I started from -rc3.

Previously I would just merge tip into vhost-next, then everyone's
happy, but it will create an implicit back-merge again, won't it?

So what should I do?

Sorry about being dense.

> But whatever. You can get the
> diffstat by using your merge as the base, so
> 
>     git diff -M --stat --summary bc7562355fda..
> 
> in your branch should get the right result without any merges etc..
> But please do send me a proper pull request.
> 
>               Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2013-05-02 19:33   ` Michael S. Tsirkin
@ 2013-05-02 19:49     ` Linus Torvalds
  2013-06-05 15:53       ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Linus Torvalds @ 2013-05-02 19:49 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Nicholas A. Bellinger, KVM list, virtualization,
	Network Development, Linux Kernel Mailing List, Asias He,
	target-devel

On Thu, May 2, 2013 at 12:33 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> I prefer not rebasing,

Good.

>                   will play with git to see why
> does request-pull get me a wrong diffstat and how
> to trick it into doing the right thing.
> Maybe merging my branch into master will do this.

No, don't do an unnecessary merge just to get the diffstat right.

git pull-request ends up assuming that there are no back-merges, and
that you have a uniquely defined single shared merge base. That allows
pull-request to just generate the diff directly from that merge base,
without actually trying to do the merge itself (which may have
conflicts etc).

But because git pull-request doesn't actually *do* the merge, it means
that it will fail to give the correct diffstat if the tree is
complicated and has multiple merge bases, and it can't really figure
what the original shared state was before the development.

This is just one reason I do *not* want to see back-merges. They make
history harder to read not just for humans.

You can either ignore the problem (I'll see the real diffstat when I
actually do the merge), or you can do a test-merge yourself (that you
do *not* then push out in the development branch - keep it in a
temporary branch for your own edification or just delete it after
doing the merge, and don't do development on it!)

In this case, it's an indirect back-merge: you back-merged a commit
from the target tree that I have now merged, so it has become a
back-merge. I'm not sure why you did that - if you needed to start
from that state, it would actually have been better to just start at
that state instead of merging it. But whatever. You can get the
diffstat by using your merge as the base, so

    git diff -M --stat --summary bc7562355fda..

in your branch should get the right result without any merges etc..
But please do send me a proper pull request.

              Linus

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2013-05-02 18:55 ` Nicholas A. Bellinger
@ 2013-05-02 19:33   ` Michael S. Tsirkin
  2013-05-02 19:49     ` Linus Torvalds
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2013-05-02 19:33 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: kvm, virtualization, netdev, linux-kernel, asias, target-devel, torvalds

On Thu, May 02, 2013 at 11:55:29AM -0700, Nicholas A. Bellinger wrote:
> On Thu, 2013-05-02 at 13:53 +0300, Michael S. Tsirkin wrote:
> > The following changes since commit c39904a0ac22cf05f5f44226457f6da0fe65457e:
> > 
> >   Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next (2013-04-26 23:33:41 -0400)
> > 
> > are available in the git repository at:
> > 
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> > 
> > for you to fetch changes up to 181c04a357bb791587c55a99362c2fdde2c64f18:
> > 
> >   vhost_scsi: module rename (2013-05-02 13:40:22 +0300)
> > 
> > ----------------------------------------------------------------
> > vhost: cleanups and fixes for 3.10
> > 
> > Here are vhost cleanups and fixes by Asias He and myself.
> > They affect both vhost-net and vhost-scsi devices.
> > They also *depend* on both net-next and target-pending,
> > where the net and target commits these changes depend on
> > are already merged.
> > So merging through the common vhost tree.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > 
> 
> Just FYI, if this PULL request is going to Linus directly, you'll
> probably want to rebase a branch atop a more recent mainline HEAD in
> order to produce a correct diffstat, instead of the one including the
> target-pending/for-next-merge merge commit below..
> 
> Then again, asking Linus what he prefers for this type of scenario never
> hurt anyone either.  ;)
> 
> --nab


Oops I did something wrong and Linus was not on the To list at all :(
I'll have to repost.
I prefer not rebasing, will play with git to see why
does request-pull get me a wrong diffstat and how
to trick it into doing the right thing.
Maybe merging my branch into master will do this.


> > ----------------------------------------------------------------
> > Asias He (3):
> >       vhost: Allow device specific fields per vq
> >       tcm_vhost: Wait for pending requests in vhost_scsi_flush()
> >       vhost: move vhost-net zerocopy fields to net.c
> > 
> > Michael S. Tsirkin (8):
> >       Merge branch 'for-next-merge' of git://git.kernel.org/.../nab/target-pending into vhost-net-next
> >       tcm_vhost: document inflight ref-counting use
> >       vhost: move per-vq net specific fields out to net
> >       tcm_vhost: remove virtio-net.h dependency
> >       vhost: fix error handling in RESET_OWNER ioctl
> >       vhost: src file renames
> >       tcm_vhost: header split up
> >       vhost_scsi: module rename
> > 
> >  drivers/infiniband/Kconfig                     |    1 +
> >  drivers/infiniband/Makefile                    |    1 +
> >  drivers/infiniband/ulp/isert/Kconfig           |    5 +
> >  drivers/infiniband/ulp/isert/Makefile          |    2 +
> >  drivers/infiniband/ulp/isert/ib_isert.c        | 2281 ++++++++++++++++++++++++
> >  drivers/infiniband/ulp/isert/ib_isert.h        |  138 ++
> >  drivers/infiniband/ulp/isert/isert_proto.h     |   47 +
> >  drivers/scsi/qla2xxx/qla_target.c              |   19 -
> >  drivers/scsi/qla2xxx/qla_target.h              |    1 -
> >  drivers/target/iscsi/Makefile                  |    3 +-
> >  drivers/target/iscsi/iscsi_target.c            | 1184 +++++++-----
> >  drivers/target/iscsi/iscsi_target.h            |    3 +-
> >  drivers/target/iscsi/iscsi_target_auth.c       |   28 +-
> >  drivers/target/iscsi/iscsi_target_configfs.c   |   98 +-
> >  drivers/target/iscsi/iscsi_target_core.h       |   26 +-
> >  drivers/target/iscsi/iscsi_target_device.c     |    7 +-
> >  drivers/target/iscsi/iscsi_target_erl1.c       |   13 +-
> >  drivers/target/iscsi/iscsi_target_login.c      |  472 +++--
> >  drivers/target/iscsi/iscsi_target_login.h      |    6 +
> >  drivers/target/iscsi/iscsi_target_nego.c       |  194 +-
> >  drivers/target/iscsi/iscsi_target_nego.h       |   11 +-
> >  drivers/target/iscsi/iscsi_target_parameters.c |   87 +-
> >  drivers/target/iscsi/iscsi_target_parameters.h |   16 +-
> >  drivers/target/iscsi/iscsi_target_tmr.c        |    4 +-
> >  drivers/target/iscsi/iscsi_target_tpg.c        |    6 +-
> >  drivers/target/iscsi/iscsi_target_transport.c  |   55 +
> >  drivers/target/iscsi/iscsi_target_util.c       |   53 +-
> >  drivers/target/iscsi/iscsi_target_util.h       |    1 +
> >  drivers/target/target_core_file.c              |  122 +-
> >  drivers/target/target_core_iblock.c            |  108 +-
> >  drivers/target/target_core_sbc.c               |   85 +
> >  drivers/target/target_core_transport.c         |   13 +-
> >  drivers/target/tcm_fc/tfc_io.c                 |    9 +-
> >  drivers/target/tcm_fc/tfc_sess.c               |    9 +-
> >  drivers/vhost/Kconfig                          |   10 +-
> >  drivers/vhost/Kconfig.tcm                      |    6 -
> >  drivers/vhost/Makefile                         |    3 +-
> >  drivers/vhost/net.c                            |  255 ++-
> >  drivers/vhost/{tcm_vhost.c => scsi.c}          |  507 +++++-
> >  drivers/vhost/tcm_vhost.h                      |  115 --
> >  drivers/vhost/test.c                           |    9 +-
> >  drivers/vhost/vhost.c                          |  153 +-
> >  drivers/vhost/vhost.h                          |   32 +-
> >  include/target/iscsi/iscsi_transport.h         |   83 +
> >  include/target/target_core_backend.h           |    4 +
> >  include/target/target_core_fabric.h            |    2 +-
> >  include/uapi/linux/vhost.h                     |   28 +
> >  47 files changed, 4985 insertions(+), 1330 deletions(-)
> >  create mode 100644 drivers/infiniband/ulp/isert/Kconfig
> >  create mode 100644 drivers/infiniband/ulp/isert/Makefile
> >  create mode 100644 drivers/infiniband/ulp/isert/ib_isert.c
> >  create mode 100644 drivers/infiniband/ulp/isert/ib_isert.h
> >  create mode 100644 drivers/infiniband/ulp/isert/isert_proto.h
> >  create mode 100644 drivers/target/iscsi/iscsi_target_transport.c
> >  delete mode 100644 drivers/vhost/Kconfig.tcm
> >  rename drivers/vhost/{tcm_vhost.c => scsi.c} (76%)
> >  delete mode 100644 drivers/vhost/tcm_vhost.h
> >  create mode 100644 include/target/iscsi/iscsi_transport.h
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PULL] vhost: cleanups and fixes
  2013-05-02 10:53 Michael S. Tsirkin
@ 2013-05-02 18:55 ` Nicholas A. Bellinger
  2013-05-02 19:33   ` Michael S. Tsirkin
  0 siblings, 1 reply; 65+ messages in thread
From: Nicholas A. Bellinger @ 2013-05-02 18:55 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: kvm, virtualization, netdev, linux-kernel, asias, target-devel

On Thu, 2013-05-02 at 13:53 +0300, Michael S. Tsirkin wrote:
> The following changes since commit c39904a0ac22cf05f5f44226457f6da0fe65457e:
> 
>   Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next (2013-04-26 23:33:41 -0400)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> 
> for you to fetch changes up to 181c04a357bb791587c55a99362c2fdde2c64f18:
> 
>   vhost_scsi: module rename (2013-05-02 13:40:22 +0300)
> 
> ----------------------------------------------------------------
> vhost: cleanups and fixes for 3.10
> 
> Here are vhost cleanups and fixes by Asias He and myself.
> They affect both vhost-net and vhost-scsi devices.
> They also *depend* on both net-next and target-pending,
> where the net and target commits these changes depend on
> are already merged.
> So merging through the common vhost tree.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 

Just FYI, if this PULL request is going to Linus directly, you'll
probably want to rebase a branch atop a more recent mainline HEAD in
order to produce a correct diffstat, instead of the one including the
target-pending/for-next-merge merge commit below..

Then again, asking Linus what he prefers for this type of scenario never
hurt anyone either.  ;)

--nab

> ----------------------------------------------------------------
> Asias He (3):
>       vhost: Allow device specific fields per vq
>       tcm_vhost: Wait for pending requests in vhost_scsi_flush()
>       vhost: move vhost-net zerocopy fields to net.c
> 
> Michael S. Tsirkin (8):
>       Merge branch 'for-next-merge' of git://git.kernel.org/.../nab/target-pending into vhost-net-next
>       tcm_vhost: document inflight ref-counting use
>       vhost: move per-vq net specific fields out to net
>       tcm_vhost: remove virtio-net.h dependency
>       vhost: fix error handling in RESET_OWNER ioctl
>       vhost: src file renames
>       tcm_vhost: header split up
>       vhost_scsi: module rename
> 
>  drivers/infiniband/Kconfig                     |    1 +
>  drivers/infiniband/Makefile                    |    1 +
>  drivers/infiniband/ulp/isert/Kconfig           |    5 +
>  drivers/infiniband/ulp/isert/Makefile          |    2 +
>  drivers/infiniband/ulp/isert/ib_isert.c        | 2281 ++++++++++++++++++++++++
>  drivers/infiniband/ulp/isert/ib_isert.h        |  138 ++
>  drivers/infiniband/ulp/isert/isert_proto.h     |   47 +
>  drivers/scsi/qla2xxx/qla_target.c              |   19 -
>  drivers/scsi/qla2xxx/qla_target.h              |    1 -
>  drivers/target/iscsi/Makefile                  |    3 +-
>  drivers/target/iscsi/iscsi_target.c            | 1184 +++++++-----
>  drivers/target/iscsi/iscsi_target.h            |    3 +-
>  drivers/target/iscsi/iscsi_target_auth.c       |   28 +-
>  drivers/target/iscsi/iscsi_target_configfs.c   |   98 +-
>  drivers/target/iscsi/iscsi_target_core.h       |   26 +-
>  drivers/target/iscsi/iscsi_target_device.c     |    7 +-
>  drivers/target/iscsi/iscsi_target_erl1.c       |   13 +-
>  drivers/target/iscsi/iscsi_target_login.c      |  472 +++--
>  drivers/target/iscsi/iscsi_target_login.h      |    6 +
>  drivers/target/iscsi/iscsi_target_nego.c       |  194 +-
>  drivers/target/iscsi/iscsi_target_nego.h       |   11 +-
>  drivers/target/iscsi/iscsi_target_parameters.c |   87 +-
>  drivers/target/iscsi/iscsi_target_parameters.h |   16 +-
>  drivers/target/iscsi/iscsi_target_tmr.c        |    4 +-
>  drivers/target/iscsi/iscsi_target_tpg.c        |    6 +-
>  drivers/target/iscsi/iscsi_target_transport.c  |   55 +
>  drivers/target/iscsi/iscsi_target_util.c       |   53 +-
>  drivers/target/iscsi/iscsi_target_util.h       |    1 +
>  drivers/target/target_core_file.c              |  122 +-
>  drivers/target/target_core_iblock.c            |  108 +-
>  drivers/target/target_core_sbc.c               |   85 +
>  drivers/target/target_core_transport.c         |   13 +-
>  drivers/target/tcm_fc/tfc_io.c                 |    9 +-
>  drivers/target/tcm_fc/tfc_sess.c               |    9 +-
>  drivers/vhost/Kconfig                          |   10 +-
>  drivers/vhost/Kconfig.tcm                      |    6 -
>  drivers/vhost/Makefile                         |    3 +-
>  drivers/vhost/net.c                            |  255 ++-
>  drivers/vhost/{tcm_vhost.c => scsi.c}          |  507 +++++-
>  drivers/vhost/tcm_vhost.h                      |  115 --
>  drivers/vhost/test.c                           |    9 +-
>  drivers/vhost/vhost.c                          |  153 +-
>  drivers/vhost/vhost.h                          |   32 +-
>  include/target/iscsi/iscsi_transport.h         |   83 +
>  include/target/target_core_backend.h           |    4 +
>  include/target/target_core_fabric.h            |    2 +-
>  include/uapi/linux/vhost.h                     |   28 +
>  47 files changed, 4985 insertions(+), 1330 deletions(-)
>  create mode 100644 drivers/infiniband/ulp/isert/Kconfig
>  create mode 100644 drivers/infiniband/ulp/isert/Makefile
>  create mode 100644 drivers/infiniband/ulp/isert/ib_isert.c
>  create mode 100644 drivers/infiniband/ulp/isert/ib_isert.h
>  create mode 100644 drivers/infiniband/ulp/isert/isert_proto.h
>  create mode 100644 drivers/target/iscsi/iscsi_target_transport.c
>  delete mode 100644 drivers/vhost/Kconfig.tcm
>  rename drivers/vhost/{tcm_vhost.c => scsi.c} (76%)
>  delete mode 100644 drivers/vhost/tcm_vhost.h
>  create mode 100644 include/target/iscsi/iscsi_transport.h

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PULL] vhost: cleanups and fixes
@ 2013-05-02 10:53 Michael S. Tsirkin
  2013-05-02 18:55 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 65+ messages in thread
From: Michael S. Tsirkin @ 2013-05-02 10:53 UTC (permalink / raw)
  Cc: kvm, virtualization, netdev, linux-kernel, asias, mst, nab

The following changes since commit c39904a0ac22cf05f5f44226457f6da0fe65457e:

  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next (2013-04-26 23:33:41 -0400)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 181c04a357bb791587c55a99362c2fdde2c64f18:

  vhost_scsi: module rename (2013-05-02 13:40:22 +0300)

----------------------------------------------------------------
vhost: cleanups and fixes for 3.10

Here are vhost cleanups and fixes by Asias He and myself.
They affect both vhost-net and vhost-scsi devices.
They also *depend* on both net-next and target-pending,
where the net and target commits these changes depend on
are already merged.
So merging through the common vhost tree.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Asias He (3):
      vhost: Allow device specific fields per vq
      tcm_vhost: Wait for pending requests in vhost_scsi_flush()
      vhost: move vhost-net zerocopy fields to net.c

Michael S. Tsirkin (8):
      Merge branch 'for-next-merge' of git://git.kernel.org/.../nab/target-pending into vhost-net-next
      tcm_vhost: document inflight ref-counting use
      vhost: move per-vq net specific fields out to net
      tcm_vhost: remove virtio-net.h dependency
      vhost: fix error handling in RESET_OWNER ioctl
      vhost: src file renames
      tcm_vhost: header split up
      vhost_scsi: module rename

 drivers/infiniband/Kconfig                     |    1 +
 drivers/infiniband/Makefile                    |    1 +
 drivers/infiniband/ulp/isert/Kconfig           |    5 +
 drivers/infiniband/ulp/isert/Makefile          |    2 +
 drivers/infiniband/ulp/isert/ib_isert.c        | 2281 ++++++++++++++++++++++++
 drivers/infiniband/ulp/isert/ib_isert.h        |  138 ++
 drivers/infiniband/ulp/isert/isert_proto.h     |   47 +
 drivers/scsi/qla2xxx/qla_target.c              |   19 -
 drivers/scsi/qla2xxx/qla_target.h              |    1 -
 drivers/target/iscsi/Makefile                  |    3 +-
 drivers/target/iscsi/iscsi_target.c            | 1184 +++++++-----
 drivers/target/iscsi/iscsi_target.h            |    3 +-
 drivers/target/iscsi/iscsi_target_auth.c       |   28 +-
 drivers/target/iscsi/iscsi_target_configfs.c   |   98 +-
 drivers/target/iscsi/iscsi_target_core.h       |   26 +-
 drivers/target/iscsi/iscsi_target_device.c     |    7 +-
 drivers/target/iscsi/iscsi_target_erl1.c       |   13 +-
 drivers/target/iscsi/iscsi_target_login.c      |  472 +++--
 drivers/target/iscsi/iscsi_target_login.h      |    6 +
 drivers/target/iscsi/iscsi_target_nego.c       |  194 +-
 drivers/target/iscsi/iscsi_target_nego.h       |   11 +-
 drivers/target/iscsi/iscsi_target_parameters.c |   87 +-
 drivers/target/iscsi/iscsi_target_parameters.h |   16 +-
 drivers/target/iscsi/iscsi_target_tmr.c        |    4 +-
 drivers/target/iscsi/iscsi_target_tpg.c        |    6 +-
 drivers/target/iscsi/iscsi_target_transport.c  |   55 +
 drivers/target/iscsi/iscsi_target_util.c       |   53 +-
 drivers/target/iscsi/iscsi_target_util.h       |    1 +
 drivers/target/target_core_file.c              |  122 +-
 drivers/target/target_core_iblock.c            |  108 +-
 drivers/target/target_core_sbc.c               |   85 +
 drivers/target/target_core_transport.c         |   13 +-
 drivers/target/tcm_fc/tfc_io.c                 |    9 +-
 drivers/target/tcm_fc/tfc_sess.c               |    9 +-
 drivers/vhost/Kconfig                          |   10 +-
 drivers/vhost/Kconfig.tcm                      |    6 -
 drivers/vhost/Makefile                         |    3 +-
 drivers/vhost/net.c                            |  255 ++-
 drivers/vhost/{tcm_vhost.c => scsi.c}          |  507 +++++-
 drivers/vhost/tcm_vhost.h                      |  115 --
 drivers/vhost/test.c                           |    9 +-
 drivers/vhost/vhost.c                          |  153 +-
 drivers/vhost/vhost.h                          |   32 +-
 include/target/iscsi/iscsi_transport.h         |   83 +
 include/target/target_core_backend.h           |    4 +
 include/target/target_core_fabric.h            |    2 +-
 include/uapi/linux/vhost.h                     |   28 +
 47 files changed, 4985 insertions(+), 1330 deletions(-)
 create mode 100644 drivers/infiniband/ulp/isert/Kconfig
 create mode 100644 drivers/infiniband/ulp/isert/Makefile
 create mode 100644 drivers/infiniband/ulp/isert/ib_isert.c
 create mode 100644 drivers/infiniband/ulp/isert/ib_isert.h
 create mode 100644 drivers/infiniband/ulp/isert/isert_proto.h
 create mode 100644 drivers/target/iscsi/iscsi_target_transport.c
 delete mode 100644 drivers/vhost/Kconfig.tcm
 rename drivers/vhost/{tcm_vhost.c => scsi.c} (76%)
 delete mode 100644 drivers/vhost/tcm_vhost.h
 create mode 100644 include/target/iscsi/iscsi_transport.h

^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2020-02-11  2:07 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 16:23 [PULL] vhost: cleanups and fixes Michael S. Tsirkin
2018-06-11 18:32 ` Linus Torvalds
2018-06-11 18:44   ` Linus Torvalds
2018-06-12  1:36     ` Michael S. Tsirkin
2018-06-12  1:59       ` Linus Torvalds
2018-06-12 11:05         ` Wei Wang
2018-06-14 15:01           ` Nitesh Narayan Lal
2018-06-15  3:53             ` Wei Wang
2018-06-12  1:57   ` Michael S. Tsirkin
     [not found] <20200210010252-mutt-send-email-mst@kernel.org>
2020-02-11  2:07 ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2019-10-15 21:19 Michael S. Tsirkin
2019-10-15 22:25 ` pr-tracker-bot
2019-05-14 21:11 Michael S. Tsirkin
2019-05-14 21:20 ` pr-tracker-bot
2018-11-01 21:19 Michael S. Tsirkin
2018-11-01 21:44 ` Linus Torvalds
2018-11-01 23:00 ` Kees Cook
2018-11-01 23:06   ` Linus Torvalds
2018-11-01 23:55     ` Michael S. Tsirkin
2018-11-02 11:46     ` Mark Rutland
2018-11-02 13:04       ` Michael S. Tsirkin
2018-11-02 16:14         ` Linus Torvalds
2018-11-02 16:59           ` Michael S. Tsirkin
2018-11-02 17:10             ` Linus Torvalds
2018-11-02 17:15               ` Linus Torvalds
2018-11-02 19:01                 ` Al Viro
2018-11-02 17:21               ` Michael S. Tsirkin
2018-11-02 18:02                 ` Linus Torvalds
2018-11-02 18:12                   ` Michael S. Tsirkin
2018-11-30 13:44     ` Michael S. Tsirkin
2018-11-30 19:01       ` Bijan Mottahedeh
2018-11-30 19:55         ` Michael S. Tsirkin
2018-11-01 23:38   ` Michael S. Tsirkin
2017-12-08 15:47 Michael S. Tsirkin
2017-12-04 13:25 Michael S. Tsirkin
2017-08-25 18:47 Michael S. Tsirkin
2017-04-10 21:36 Michael S. Tsirkin
2017-03-02  5:49 Michael S. Tsirkin
2017-02-03 21:43 Michael S. Tsirkin
2017-01-23 15:05 Michael S. Tsirkin
2017-01-23 21:50 ` Linus Torvalds
2017-01-24  2:45   ` Michael S. Tsirkin
2016-05-24 11:57 Michael S. Tsirkin
2015-12-21  7:58 Michael S. Tsirkin
2015-12-07 17:07 Michael S. Tsirkin
2015-09-18 10:42 Michael S. Tsirkin
2015-09-09  9:15 Michael S. Tsirkin
2015-07-28 10:00 Michael S. Tsirkin
2015-07-15 10:50 Michael S. Tsirkin
2015-07-15 11:26 ` Michael S. Tsirkin
2015-06-01 19:18 Michael S. Tsirkin
2015-06-01 19:45 ` Michael S. Tsirkin
2015-01-08  7:51 Michael S. Tsirkin
2015-01-01 12:26 Michael S. Tsirkin
2014-12-18 10:46 Michael S. Tsirkin
2014-11-13 21:22 Michael S. Tsirkin
2014-06-25 11:05 Michael S. Tsirkin
2013-07-15 18:31 Michael S. Tsirkin
2013-07-22  8:07 ` Michael S. Tsirkin
2013-07-08 11:45 Michael S. Tsirkin
2013-05-02 10:53 Michael S. Tsirkin
2013-05-02 18:55 ` Nicholas A. Bellinger
2013-05-02 19:33   ` Michael S. Tsirkin
2013-05-02 19:49     ` Linus Torvalds
2013-06-05 15:53       ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).