|
From: | Paolo Bonzini |
Subject: | Re: [RFC] accel: add cpu_reset |
Date: | Mon, 22 Mar 2021 14:45:07 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 22/03/21 14:35, Claudio Fontana wrote:
On 3/22/21 2:31 PM, Paolo Bonzini wrote:On 22/03/21 14:27, Claudio Fontana wrote:This surprisingly works without moving cpu_reset() to a specific_ss module, even though accel-common.c is specific_ss, hw/core/cpu.c is common_ss. How come the call to accel_reset_cpu works?I don't understand the question. Why wouldn't it work? :) PaoloHeh probably something I forgot or do not understand around the specific_ss / common_ss distinction. I was under the (wrong?) impression that we build some tools or components that include common_ss objects, but not specific_ss. And maybe I am just wrong, and things are simpler than I expected.
No, all emulators include:- some parts of common_ss, compiled once per build. These are files that do not use target-specific definitions. Other sourcesets also define once-per-build files, and in fact they end up in common_ss via the add_all method of sourcesets; softmmu_ss, for example is added to common_ss under the CONFIG_SOFTMMU condition.
- some parts of specific_ss, compiled once per target because these files use target-specific definitions.
- the entirety of the respective hw/ and target/ sourcesets.It is possible to include calls from one sourceset to another (including from common to specific) as long as the conditions ensure that the symbol is defined.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |