All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Ouyang, Changchun" <changchun.ouyang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Xie, Huawei" <huawei.xie@intel.com>
Subject: Re: vhost: Problem RESET_OWNER processing
Date: Sat, 8 Aug 2015 08:37:49 +0200	[thread overview]
Message-ID: <55C5A3BD.7080802@siemens.com> (raw)
In-Reply-To: <F52918179C57134FAEC9EA62FA2F962511C6E94C@shsmsx102.ccr.corp.intel.com>

On 2015-08-08 02:04, Ouyang, Changchun wrote:
> 
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jan Kiszka
>> Sent: Friday, August 7, 2015 10:04 PM
>> To: dev@dpdk.org; Xie, Huawei
>> Subject: [dpdk-dev] vhost: Problem RESET_OWNER processing
>>
>> Hi,
>>
>> I was wondering if I'm alone with this: the vhost-switch example crashes on
>> client disconnects if the client send a RESET_OWNER message. That's at least
>> the case for QEMU and vhost-user mode (I suppose vhost-cuse is legacy
> 
> What's your qemu version?

git head, which includes 2.4-rc2.

VHOST_USER_RESET_OWNER dates back to QEMU commit 294ce717e, and that is
after 2.3. Before that commit, QEMU was happily allowing its vhost
servers to corrupt guest memory on reboot or while a virtio device was
otherwise deactivated.

Jan

> 
>> now). And it really ruins the party when playing with this because every VM
>> shutdown or guest reboot triggers.
>>
>> I was looking deeper in the librte_vhost, and I found that reset_owner() is
>> doing cleanup_device and then init_device - but without letting the user
>> know. So vhost-switch crashed in its main loop over continuing to use the
>> device, namely calling rte_vhost_dequeue_burst (with
>> dev->virtqueue[]->avail == NULL).
>>
>> Do we simply need another hook in the vhost API, similar to the destruction
>> notification?
>>
>> Jan
>>
>> --
>> Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate
>> Competence Center Embedded Linux

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2015-08-08  6:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 14:04 vhost: Problem RESET_OWNER processing Jan Kiszka
2015-08-08  0:04 ` Ouyang, Changchun
2015-08-08  6:37   ` Jan Kiszka [this message]

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=55C5A3BD.7080802@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.