Thread (34 messages) 34 messages, 4 authors, 2022-12-28

Re: [PATCH v1 02/12] vhost: Return number of free memslots

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2021-10-27 16:12:00
Also in: qemu-devel

On Wed, Oct 27, 2021 at 04:11:38PM +0200, Philippe Mathieu-Daudé wrote:
On 10/27/21 16:04, David Hildenbrand wrote:
quoted
On 27.10.21 15:36, Philippe Mathieu-Daudé wrote:
quoted
On 10/27/21 14:45, David Hildenbrand wrote:
quoted
Let's return the number of free slots instead of only checking if there
is a free slot. Required to support memory devices that consume multiple
memslots.

Signed-off-by: David Hildenbrand <redacted>
---
 hw/mem/memory-device.c    | 2 +-
 hw/virtio/vhost-stub.c    | 2 +-
 hw/virtio/vhost.c         | 4 ++--
 include/hw/virtio/vhost.h | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
quoted
quoted
quoted
-bool vhost_has_free_slot(void)
+unsigned int vhost_get_free_memslots(void)
 {
     return true;
       return 0;
Oh wait, no. This actually has to be

"return ~0U;" (see real vhost_get_free_memslots())

... because there is no vhost and consequently no limit applies.
Indeed.

Reviewed-by: Philippe Mathieu-Daudé <redacted>
confused. are you acking the theoretical patch with ~0 here?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help