qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/7] RAMBlock: make guest_memfd require coordinate discard


From: David Hildenbrand
Subject: Re: [PATCH 6/7] RAMBlock: make guest_memfd require coordinate discard
Date: Mon, 13 Jan 2025 11:56:38 +0100
User-agent: Mozilla Thunderbird

On 13.12.24 08:08, Chenyi Qiang wrote:
As guest_memfd is now managed by guest_memfd_manager with
RamDiscardManager, only block uncoordinated discard.

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
---
  system/physmem.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/physmem.c b/system/physmem.c
index 532182a6dd..585090b063 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -1872,7 +1872,7 @@ static void ram_block_add(RAMBlock *new_block, Error 
**errp)
          assert(kvm_enabled());
          assert(new_block->guest_memfd < 0);
- ret = ram_block_discard_require(true);
+        ret = ram_block_coordinated_discard_require(true);
          if (ret < 0) {
              error_setg_errno(errp, -ret,
                               "cannot set up private guest memory: discard 
currently blocked");

Would that also unlock virtio-mem by accident?

--
Cheers,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]