On Sat, 26 Aug 2023 16:24:14 -0700
Richard Henderson wrote:
> After system startup, run the update to memory_dispatch
> and the tlb_flush on the cpu. This eliminates a race,
> wherein a running cpu sees the memory_dispatch change
> but has not yet seen the tlb_flush.
>
> Since the update now ha
On 8/27/23 13:17, Alex Bennée wrote:
Richard Henderson writes:
On 8/26/23 16:24, Richard Henderson wrote:
+static void tcg_commit_cpu(CPUState *cpu, run_on_cpu_data data)
+{
+CPUAddressSpace *cpuas = data.host_ptr;
+
+cpuas->memory_dispatch = address_space_to_dispatch(cpuas->as);
+
Richard Henderson writes:
> On 8/26/23 16:24, Richard Henderson wrote:
>> +static void tcg_commit_cpu(CPUState *cpu, run_on_cpu_data data)
>> +{
>> +CPUAddressSpace *cpuas = data.host_ptr;
>> +
>> +cpuas->memory_dispatch = address_space_to_dispatch(cpuas->as);
>> +tlb_flush(cpu);
>>
On 8/26/23 16:24, Richard Henderson wrote:
+static void tcg_commit_cpu(CPUState *cpu, run_on_cpu_data data)
+{
+CPUAddressSpace *cpuas = data.host_ptr;
+
+cpuas->memory_dispatch = address_space_to_dispatch(cpuas->as);
+tlb_flush(cpu);
+}
Question: do I need to take the iothread lock
Richard Henderson writes:
> After system startup, run the update to memory_dispatch
> and the tlb_flush on the cpu. This eliminates a race,
> wherein a running cpu sees the memory_dispatch change
> but has not yet seen the tlb_flush.
>
> Since the update now happens on the cpu, we need not use
After system startup, run the update to memory_dispatch
and the tlb_flush on the cpu. This eliminates a race,
wherein a running cpu sees the memory_dispatch change
but has not yet seen the tlb_flush.
Since the update now happens on the cpu, we need not use
qatomic_rcu_read to protect the read of