qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH RFC 1/1] tcg: Always pass the full write size to notdirty_wri


From: Richard Henderson
Subject: Re: [PATCH RFC 1/1] tcg: Always pass the full write size to notdirty_write()
Date: Tue, 8 Aug 2023 07:23:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 8/8/23 02:59, Ilya Leoshkevich wrote:
On Mon, 2023-08-07 at 11:21 -0700, Richard Henderson wrote:
IIRC there are some uses of probe_access_* that set size == 0.
Should we adjust addr+size to cover the whole page for that case?
That seems to be the intent, anyway.

There is a comment that says we shouldn't do watchpoint/smc detection
in this case:

     /* Per the interface, size == 0 merely faults the access. */
     if (size == 0) {
         return NULL;
     }

Come to think of it, qemu-user works this way too: SMC is detected on
the actual access, not the probe:

     helper_vstl()
       cpu_stq_be_data_ra()
         ...
            stq_he_p()
              <signal handler called>
                host_signal_handler()
                  handle_sigsegv_accerr_write()
                    page_unprotect()
                      tb_invalidate_phys_page_unwind()
                    cpu_loop_exit_noexc()

So all this is probably fine, I now think it's better to leave the code
as is, especially given that I cannot reproduce the original problem
anymore.

Ok then.


r~



reply via email to

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