qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v7 05/20] linux-user: Clear translations and tb_jmp_cache on


From: Richard Henderson
Subject: Re: [PATCH v7 05/20] linux-user: Clear translations and tb_jmp_cache on mprotect()
Date: Thu, 1 Sep 2022 06:55:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/31/22 00:17, Ilya Leoshkevich wrote:
      page_set_flags(start, start + len, page_flags);
+    tb_invalidate_phys_range(start, start + len);
+
+    CPU_FOREACH(cpu) {
+        cpu_tb_jmp_cache_clear(cpu);
+    }
+
      mmap_unlock();
      return 0;
  error:

I think adding tb_invalidate_phys_range() obviates the need for
cpu_tb_jmp_cache_clear()? The lookup may still find an invalidated tb,
but it will have CF_INVALID set.

Quite right. And we definitely don't want to have to touch a list of all threads if its not necessary.


r~



reply via email to

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