From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Thomas Huth <thuth@redhat.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Nicholas Miehlbradt <nicholas@linux.ibm.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, 11 Nov 2025 14:37:31 +0100 [thread overview]
Message-ID: <a80fc77e-e565-42ce-9d31-3e09d694c7f2@kernel.org> (raw)
In-Reply-To: <d5990a22-76dc-4c20-ba38-6179899a3f42@redhat.com>
>>> /*
>>> * Temporarily drop the record/replay mutex to let rr_cpu_thread_fn()
>>> @@ -479,6 +480,7 @@ static void s390_machine_reset(MachineState *machine,
>>> ResetType type)
>>> switch (reset_type) {
>>> case S390_RESET_EXTERNAL:
>>> case S390_RESET_REIPL:
>>> + case S390_RESET_REIPL_CLEAR:
>>> /*
>>> * Reset the subsystem which includes a AP reset. If a PV
>>> * guest had APQNs attached the AP reset is a prerequisite to
>>> @@ -489,6 +491,10 @@ static void s390_machine_reset(MachineState *machine,
>>> ResetType type)
>>> s390_machine_unprotect(ms);
>>> }
>>> + if (reset_type == S390_RESET_REIPL_CLEAR) {
>>> + ram_block_discard_range(rb, 0 , qemu_ram_get_used_length(rb));
>>> + }
>>> +
...
>>
>>
>>
>> Do I see that right that this patch never made it into qemu master? IIRC
>> Matt has clarified all concerns?
>
> I was hoping to see a reply from David that he's fine with the patch now...
> David?
Staring at this again, one more point regarding userfaultfd: doing the
discard on the destination while postcopy is active might be problematic.
I don't remember all details, but I think that if we have the following:
1) Migrate page X to dst
2) Discard page X on dst
3) Access page X on dst
that postcopy_request_page()->migrate_send_rp_req_pages() would assume
that the page was already transferred (marked received in the receive
bitmap during 1) ) and essentially never place a fresh zeropage during
3) to be stuck forever.
--
Cheers
David
next prev parent reply other threads:[~2025-11-11 13:39 UTC|newest]
Thread overview: 13+ 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
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
2025-11-11 8:43 ` Christian Borntraeger
2025-11-11 8:51 ` Thomas Huth
2025-11-11 13:37 ` David Hildenbrand (Red Hat) [this message]
2025-11-11 14:55 ` Christian Borntraeger
2025-11-11 15:48 ` David Hildenbrand (Red Hat)
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=a80fc77e-e565-42ce-9d31-3e09d694c7f2@kernel.org \
--to=david@kernel.org \
--cc=borntraeger@linux.ibm.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).