public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de•ibm.com>
To: Eugenio Perez Martin <eperezma@redhat•com>
Cc: "Michael S. Tsirkin" <mst@redhat•com>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	kvm list <kvm@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	"virtualization@lists•linux-foundation.org" 
	<virtualization@lists•linux-foundation.org>,
	Halil Pasic <pasic@linux•ibm.com>,
	Cornelia Huck <cohuck@redhat•com>
Subject: Re: [PATCH v3 0/8] vhost: Reset batched descriptors on SET_VRING_BASE call
Date: Wed, 1 Apr 2020 20:44:01 +0200	[thread overview]
Message-ID: <916e60f8-45fe-5cc1-d5a1-defdcd00d75b@de.ibm.com> (raw)
In-Reply-To: <CAJaqyWc+fNzHE_p-pApZtj2ypNQfFLawCWf8GJmP8e=k=C+EgA@mail.gmail.com>



On 01.04.20 20:40, Eugenio Perez Martin wrote:
> On Wed, Apr 1, 2020 at 9:19 AM Christian Borntraeger
> <borntraeger@de•ibm.com> wrote:
>>
>> On 31.03.20 21:27, Eugenio Pérez wrote:
>>> Vhost did not reset properly the batched descriptors on SET_VRING_BASE
>>> event. Because of that, is possible to return an invalid descriptor to
>>> the guest.
>>>
>>> This series ammend this, resetting them every time backend changes, and
>>> creates a test to assert correct behavior. To do that, they need to
>>> expose a new function in virtio_ring, virtqueue_reset_free_head, only
>>> on test code.
>>>
>>> Another useful thing would be to check if mutex is properly get in
>>> vq private_data accessors. Not sure if mutex debug code allow that,
>>> similar to C++ unique lock::owns_lock. Not acquiring in the function
>>> because caller code holds the mutex in order to perform more actions.
>>
>>
>>
>>>
>>> v3:
>>> * Rename accesors functions.
>>> * Make scsi and test use the accesors too.
>>>
>>> v2:
>>> * Squashed commits.
>>> * Create vq private_data accesors (mst).
>>>
>>> This is meant to be applied on top of
>>> c4f1c41a6094582903c75c0dcfacb453c959d457 in
>>> git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git.
>>
>>
>> A quick test on s390 looks good.
>>
> 
> Really good to know :).
> 
> Would it be possible to investigate when qemu launches the offending ioctls?

During guest reboot. This is obvious, no?


  reply	other threads:[~2020-04-01 18:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 19:27 [PATCH v3 0/8] vhost: Reset batched descriptors on SET_VRING_BASE call Eugenio Pérez
2020-03-31 19:27 ` [PATCH v3 1/8] vhost: Create accessors for virtqueues private_data Eugenio Pérez
2020-03-31 19:27 ` [PATCH v3 2/8] vhost: option to fetch descriptors through an independent struct Eugenio Pérez
2020-03-31 19:27 ` [PATCH v3 3/8] vhost: use batched version by default Eugenio Pérez
2020-03-31 19:28 ` [PATCH v3 4/8] vhost: batching fetches Eugenio Pérez
2020-03-31 19:28 ` [PATCH v3 5/8] tools/virtio: Add --batch option Eugenio Pérez
2020-03-31 19:28 ` [PATCH v3 6/8] tools/virtio: Add --batch=random option Eugenio Pérez
2020-03-31 19:28 ` [PATCH v3 7/8] tools/virtio: Add --reset=random Eugenio Pérez
2020-03-31 19:28 ` [PATCH v3 8/8] tools/virtio: Make --reset reset ring idx Eugenio Pérez
2020-03-31 19:51 ` [PATCH v3 0/8] vhost: Reset batched descriptors on SET_VRING_BASE call Michael S. Tsirkin
2020-04-01  7:19 ` Christian Borntraeger
2020-04-01 18:40   ` Eugenio Perez Martin
2020-04-01 18:44     ` Christian Borntraeger [this message]
2020-04-01 19:13       ` Christian Borntraeger
2020-04-02  8:17         ` Eugenio Perez Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=916e60f8-45fe-5cc1-d5a1-defdcd00d75b@de.ibm.com \
    --to=borntraeger@de$(echo .)ibm.com \
    --cc=cohuck@redhat$(echo .)com \
    --cc=eperezma@redhat$(echo .)com \
    --cc=kvm@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mst@redhat$(echo .)com \
    --cc=pasic@linux$(echo .)ibm.com \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=virtualization@lists$(echo .)linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox