[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 05/71] cpu: move run_on_cpu to cpus-common
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [RFC v4 05/71] cpu: move run_on_cpu to cpus-common |
Date: |
Tue, 30 Oct 2018 12:23:51 +0000 |
User-agent: |
mu4e 1.1.0; emacs 26.1.50 |
Paolo Bonzini <address@hidden> writes:
> On 29/10/2018 22:39, Emilio G. Cota wrote:
>> I'm not convinced about adding an "assert(!user-mode)" to run_on_cpu.
>> Given that now it does not depend on the BQL, it could actually
>> work in user-mode if called. If we really wanted to make sure
>> that no user-mode would call it, then a compile-time check
>> would be better than an assert. But again, I fail to see what
>> we'd gain from that.
>>
>> For context, do_run_on_cpu et al. were moved to cpus-common.c by
>> d148d90ee8 ("cpus-common: move CPU work item management to
>> common code", 2016-09-27). The point was to consolidate the
>> run-on-cpu code in a common (softmmu & user-mode) file, since
>> user-mode needed async_run_on_cpu for exclusive work.
>>
>> Now we can finally make run_on_cpu generic as well.
>
> I agree, the run_on_cpu stuff should not be system-specific at all.
I'm happy to for it to be generic - just not broken ;-)
I'm not sure what sort of use cases it has at the moment given we use
start/end_exclusive for both atomics and system call marshalling in
linux-user. However have a common toolbox across system and linux-user
is a good thing.
>
> Paolo
--
Alex Bennée
- [Qemu-devel] [RFC v4 13/71] microblaze: convert to helper_cpu_halted_set, (continued)
[Qemu-devel] [RFC v4 02/71] cpu: rename cpu->work_mutex to cpu->lock, Emilio G. Cota, 2018/10/25
[Qemu-devel] [RFC v4 39/71] i386/hax-all: convert to cpu_interrupt_request, Emilio G. Cota, 2018/10/25
[Qemu-devel] [RFC v4 06/71] cpu: introduce process_queued_cpu_work_locked, Emilio G. Cota, 2018/10/25
[Qemu-devel] [RFC v4 03/71] cpu: introduce cpu_mutex_lock/unlock, Emilio G. Cota, 2018/10/25
[Qemu-devel] [RFC v4 10/71] hppa: convert to helper_cpu_halted_set, Emilio G. Cota, 2018/10/25