Re: [PATCH v5 03/11] virtio-mem: Implement RamDiscardMgr interface

2021-02-22 Thread David Hildenbrand
+if (ret) { +/* Could be a mapping attempt resulted in memory getting populated. */ +ret2 = ram_block_discard_range(vmem->memdev->mr.ram_block, offset, + size); +if (ret2) { +error_report("Unexpected error discarding RAM

Re: [PATCH v5 03/11] virtio-mem: Implement RamDiscardMgr interface

2021-01-27 Thread David Hildenbrand
On 27.01.21 21:14, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: Let's properly notify when (un)plugging blocks, after discarding memory and before allowing the guest to consume memory. Handle errors from notifiers gracefully (e.g., no remaining VFIO mappings) when

Re: [PATCH v5 03/11] virtio-mem: Implement RamDiscardMgr interface

2021-01-27 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > Let's properly notify when (un)plugging blocks, after discarding memory > and before allowing the guest to consume memory. Handle errors from > notifiers gracefully (e.g., no remaining VFIO mappings) when plugging, > rolling back the change and tellin