qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Rosato <mjrosato@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Nicholas Miehlbradt <nicholas@linux.ibm.com>,
	thuth@redhat.com, richard.henderson@linaro.org,
	iii@linux.ibm.com, pasic@linux.ibm.com, farman@linux.ibm.com,
	qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] s390x: Clear RAM on diag308 subcode 3 reset
Date: Tue, 29 Apr 2025 10:09:01 -0400	[thread overview]
Message-ID: <27d5d332-bc7c-4036-a3d9-d4666411bd4a@linux.ibm.com> (raw)
In-Reply-To: <5863e80e-8296-4f63-bf7d-783b2a9aca0a@linux.ibm.com>

On 4/29/25 3:45 AM, Christian Borntraeger wrote:
> Am 29.04.25 um 09:37 schrieb David Hildenbrand:
> [...]
>> The only problem I see is with vfio devices is the new "memory pinned" mode. [1]
>>
>> There, we'd have to check if any such device is around (discarding of ram is disabled?), and fallback to actual zeroing of memory.
> 
> CC Matt to double check.

When triggering the "relaxed translation" mode via iommu.passthrough in the guest, we now take the default (for other platforms) memory_region_is_ram() path in vfio_listener_region_add/del() which handles the pin/unpin from vfio common code.  As for ram discarding, we then also use the vfio common path and only uncoordinated discards are disabled via:

vfio_ram_block_discard_disable() -> ram_block_uncoordinated_discard_disable()


> 
>>
>> [1] https://lkml.kernel.org/r/20250226210013.238349-1-mjrosato@linux.ibm.com
> 



  reply	other threads:[~2025-04-29 14:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  5:20 [PATCH] s390x: Clear RAM on diag308 subcode 3 reset Nicholas Miehlbradt
2025-04-29  7:37 ` David Hildenbrand
2025-04-29  7:45   ` Christian Borntraeger
2025-04-29 14:09     ` Matthew Rosato [this message]
2025-05-13  6:50       ` Christian Borntraeger
2025-05-13 13:42         ` Matthew Rosato
2025-05-14  9:32           ` Thomas Huth
2025-05-14 13:19             ` Matthew Rosato

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=27d5d332-bc7c-4036-a3d9-d4666411bd4a@linux.ibm.com \
    --to=mjrosato@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=nicholas@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).