mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-04 05:30:31 -07:00
accel: Directly pass AccelState argument to AccelClass::has_memory()
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250703173248.44995-34-philmd@linaro.org>
This commit is contained in:
parent
583d1c8f16
commit
8dd5e6befc
3 changed files with 4 additions and 4 deletions
|
|
@ -3786,10 +3786,10 @@ int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target)
|
|||
return r;
|
||||
}
|
||||
|
||||
static bool kvm_accel_has_memory(MachineState *ms, AddressSpace *as,
|
||||
static bool kvm_accel_has_memory(AccelState *accel, AddressSpace *as,
|
||||
hwaddr start_addr, hwaddr size)
|
||||
{
|
||||
KVMState *kvm = KVM_STATE(ms->accelerator);
|
||||
KVMState *kvm = KVM_STATE(accel);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < kvm->nr_as; ++i) {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ typedef struct AccelClass {
|
|||
|
||||
/* system related hooks */
|
||||
void (*setup_post)(MachineState *ms, AccelState *accel);
|
||||
bool (*has_memory)(MachineState *ms, AddressSpace *as,
|
||||
bool (*has_memory)(AccelState *accel, AddressSpace *as,
|
||||
hwaddr start_addr, hwaddr size);
|
||||
|
||||
/* gdbstub related hooks */
|
||||
|
|
|
|||
|
|
@ -3501,7 +3501,7 @@ static void mtree_print_flatview(gpointer key, gpointer value,
|
|||
if (fvi->ac) {
|
||||
for (i = 0; i < fv_address_spaces->len; ++i) {
|
||||
as = g_array_index(fv_address_spaces, AddressSpace*, i);
|
||||
if (fvi->ac->has_memory(current_machine, as,
|
||||
if (fvi->ac->has_memory(current_machine->accelerator, as,
|
||||
int128_get64(range->addr.start),
|
||||
MR_SIZE(range->addr.size) + 1)) {
|
||||
qemu_printf(" %s", fvi->ac->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue