All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, eperezma@redhat.com,
	edumazet@google.com, kuba@kernel.org, maxime.coquelin@redhat.com,
	pabeni@redhat.com, davem@davemloft.net
Subject: Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command
Date: Wed, 28 Dec 2022 14:35:58 +0800	[thread overview]
Message-ID: <03d53bb3-49e8-4bab-176f-f76fdede885a@redhat.com> (raw)
In-Reply-To: <20221227042855-mutt-send-email-mst@kernel.org>


在 2022/12/27 17:31, Michael S. Tsirkin 写道:
> On Tue, Dec 27, 2022 at 05:17:20PM +0800, Jason Wang wrote:
>>>>> In particular, we will also directly break the device.
>>>> It's kind of hardening for malicious devices.
>>> ATM no amount of hardening can prevent a malicious hypervisor from
>>> blocking the guest. Recovering when a hardware device is broken would be
>>> nice but I think if we do bother then we should try harder to recover,
>>> such as by driving device reset.
>>
>> Probably, but as discussed in another thread, it needs co-operation in the
>> upper layer (networking core).
> To track all state? Yea, maybe. For sure it's doable just in virtio,
> but if you can find 1-2 other drivers that do this internally
> then factoring this out to net core will likely be accepted.


One thing that might be useful is to reuse tx_timeout() but current 
virtio-net doesn't do more than a simple warning (other drivers may try 
to reset).

So I would leave it for future investigation.

Thanks


>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, eperezma@redhat.com,
	edumazet@google.com, maxime.coquelin@redhat.com, kuba@kernel.org,
	pabeni@redhat.com, davem@davemloft.net
Subject: Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command
Date: Wed, 28 Dec 2022 14:35:58 +0800	[thread overview]
Message-ID: <03d53bb3-49e8-4bab-176f-f76fdede885a@redhat.com> (raw)
In-Reply-To: <20221227042855-mutt-send-email-mst@kernel.org>


在 2022/12/27 17:31, Michael S. Tsirkin 写道:
> On Tue, Dec 27, 2022 at 05:17:20PM +0800, Jason Wang wrote:
>>>>> In particular, we will also directly break the device.
>>>> It's kind of hardening for malicious devices.
>>> ATM no amount of hardening can prevent a malicious hypervisor from
>>> blocking the guest. Recovering when a hardware device is broken would be
>>> nice but I think if we do bother then we should try harder to recover,
>>> such as by driving device reset.
>>
>> Probably, but as discussed in another thread, it needs co-operation in the
>> upper layer (networking core).
> To track all state? Yea, maybe. For sure it's doable just in virtio,
> but if you can find 1-2 other drivers that do this internally
> then factoring this out to net core will likely be accepted.


One thing that might be useful is to reuse tx_timeout() but current 
virtio-net doesn't do more than a simple warning (other drivers may try 
to reset).

So I would leave it for future investigation.

Thanks


>


  reply	other threads:[~2022-12-28  6:36 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26  7:49 [PATCH 0/4] virtio-net: don't busy poll for cvq command Jason Wang
2022-12-26  7:49 ` Jason Wang
2022-12-26  7:49 ` [PATCH 1/4] virtio-net: convert rx mode setting to use workqueue Jason Wang
2022-12-26  7:49   ` Jason Wang
2022-12-27  7:39   ` Michael S. Tsirkin
2022-12-27  7:39     ` Michael S. Tsirkin
2022-12-27  9:06     ` Jason Wang
2022-12-27  9:06       ` Jason Wang
2022-12-30  2:51       ` Jakub Kicinski
2022-12-30  3:40         ` Jason Wang
2022-12-30  3:40           ` Jason Wang
2022-12-26  7:49 ` [PATCH 2/4] virtio_ring: switch to use BAD_RING() Jason Wang
2022-12-26  7:49   ` Jason Wang
2022-12-26 23:36   ` Michael S. Tsirkin
2022-12-26 23:36     ` Michael S. Tsirkin
2022-12-27  3:51     ` Jason Wang
2022-12-27  3:51       ` Jason Wang
2022-12-27  7:21       ` Michael S. Tsirkin
2022-12-27  7:21         ` Michael S. Tsirkin
2022-12-26  7:49 ` [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue Jason Wang
2022-12-26  7:49   ` Jason Wang
2022-12-26 23:34   ` Michael S. Tsirkin
2022-12-26 23:34     ` Michael S. Tsirkin
2022-12-27  3:47     ` Jason Wang
2022-12-27  3:47       ` Jason Wang
2022-12-27  7:19       ` Michael S. Tsirkin
2022-12-27  7:19         ` Michael S. Tsirkin
2022-12-27  9:09         ` Jason Wang
2022-12-27  9:09           ` Jason Wang
2022-12-26 23:38   ` Michael S. Tsirkin
2022-12-26 23:38     ` Michael S. Tsirkin
2022-12-27  4:30     ` Jason Wang
2022-12-27  4:30       ` Jason Wang
2022-12-27  7:33       ` Michael S. Tsirkin
2022-12-27  7:33         ` Michael S. Tsirkin
2022-12-27  9:12         ` Jason Wang
2022-12-27  9:12           ` Jason Wang
2022-12-27  9:38           ` Michael S. Tsirkin
2022-12-27  9:38             ` Michael S. Tsirkin
2022-12-28  6:34             ` Jason Wang
2022-12-28  6:34               ` Jason Wang
2022-12-28 11:53               ` Jason Wang
2022-12-28 11:53                 ` Jason Wang
2022-12-29  7:07                 ` Michael S. Tsirkin
2022-12-29  7:07                   ` Michael S. Tsirkin
2022-12-29  8:04                   ` Jason Wang
2022-12-29  8:04                     ` Jason Wang
2022-12-29  8:10                     ` Michael S. Tsirkin
2022-12-29  8:10                       ` Michael S. Tsirkin
2022-12-30  3:43                       ` Jason Wang
2022-12-30  3:43                         ` Jason Wang
2023-01-27 10:35                         ` Michael S. Tsirkin
2023-01-27 10:35                           ` Michael S. Tsirkin
2023-01-29  5:48                           ` Jason Wang
2023-01-29  5:48                             ` Jason Wang
2023-01-29  7:30                             ` Michael S. Tsirkin
2023-01-29  7:30                               ` Michael S. Tsirkin
2023-01-30  2:53                               ` Jason Wang
2023-01-30  2:53                                 ` Jason Wang
2023-01-30  5:43                                 ` Michael S. Tsirkin
2023-01-30  5:43                                   ` Michael S. Tsirkin
2023-01-30  7:44                                   ` Jason Wang
2023-01-30  7:44                                     ` Jason Wang
2023-01-30 11:18                                     ` Michael S. Tsirkin
2023-01-30 11:18                                       ` Michael S. Tsirkin
2023-01-31  3:24                                       ` Jason Wang
2023-01-31  3:24                                         ` Jason Wang
2023-01-31  7:32                                         ` Michael S. Tsirkin
2023-01-31  7:32                                           ` Michael S. Tsirkin
     [not found]   ` <20230129073713.5236-1-hdanton@sina.com>
2023-01-30  3:58     ` Jason Wang
2022-12-26  7:49 ` [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command Jason Wang
2022-12-26  7:49   ` Jason Wang
2022-12-27  2:19   ` Xuan Zhuo
2022-12-27  2:19     ` Xuan Zhuo
2022-12-27  4:33     ` Jason Wang
2022-12-27  4:33       ` Jason Wang
2022-12-27  6:58       ` Michael S. Tsirkin
2022-12-27  6:58         ` Michael S. Tsirkin
2022-12-27  9:17         ` Jason Wang
2022-12-27  9:17           ` Jason Wang
2022-12-27  9:31           ` Michael S. Tsirkin
2022-12-27  9:31             ` Michael S. Tsirkin
2022-12-28  6:35             ` Jason Wang [this message]
2022-12-28  6:35               ` Jason Wang
2022-12-28  8:31         ` Xuan Zhuo
2022-12-28  8:31           ` Xuan Zhuo
2022-12-28 11:41           ` Jason Wang
2022-12-28 11:41             ` Jason Wang
2022-12-29  2:09             ` Xuan Zhuo
2022-12-29  2:09               ` Xuan Zhuo
2022-12-29  3:22               ` Jason Wang
2022-12-29  3:22                 ` Jason Wang
2022-12-29  3:41                 ` Xuan Zhuo
2022-12-29  3:41                   ` Xuan Zhuo
2022-12-29  4:08                   ` Jason Wang
2022-12-29  4:08                     ` Jason Wang
2022-12-29  6:13                     ` Xuan Zhuo
2022-12-29  6:13                       ` Xuan Zhuo
2022-12-28  8:39       ` Xuan Zhuo
2022-12-28  8:39         ` Xuan Zhuo
2022-12-28 11:43         ` Jason Wang
2022-12-28 11:43           ` Jason Wang
2022-12-29  2:01           ` Xuan Zhuo
2022-12-29  2:01             ` Xuan Zhuo

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=03d53bb3-49e8-4bab-176f-f76fdede885a@redhat.com \
    --to=jasowang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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.