History | View | Annotate | Download (7 kB)
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices togetherwith configuration, not code. Unfortunately, that's not the world welive in right now. We still have quite a few devices that need to be...
cpu: Document why cannot_instantiate_with_device_add_yet
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move cpu state syncs up into cpu_dump_state()
The x86 and ppc targets call cpu_synchronize_state() from their*_cpu_dump_state() callbacks to ensure that up to date state is dumpedwhen KVM is enabled (for example when a KVM internal error occurs)....
cpu: Replace qemu_for_each_cpu()
It was introduced to loop over CPUs from target-independent code, butsince commit 182735efaf956ccab50b6d74a4fed163e0f35660 target-independentCPUState is used.
A loop can be considered more efficient than function calls in a loop,...
gdbstub: Fix gdb_register_coprocessor() register counting
Commit a0e372f0c49ac01faeaeb73a6e8f50e8ac615f34 reorganized the registercounting for GDB. While it seems correct not to let the total number ofregisters skyrocket in an SMP scenario through a static variable, the...
cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"
Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".
The reason for the failure is that CPUClass::kvm_fd is not yet...
cpu: Introduce CPUClass::gdb_{read,write}_register()
Completes migration of target-specific code to new target-*/gdbstub.c.
Acked-by: Michael Walle <michael@walle.cc> (for lm32)Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa)Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs
CPUState::gdb_num_regs replaces num_g_regs.CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.
Allows building gdb_register_coprocessor() for xtensa, too.
As a side effect this should fix coprocessor register numbering for SMP....
cpu: Move reset logging to CPUState
x86 was using additional CPU_DUMP_* flags, so make that configurable inCPUClass::reset_dump_flags.
This adds reset logging for alpha, unicore32 and xtensa.
Acked-by: Michael Walle <michael@walle.cc> (for lm32)Reviewed-by: Richard Henderson <rth@twiddle.net>...
cpu: Change qemu_init_vcpu() argument to CPUState
This allows to move the call into CPUState's realizefn.Therefore move the stub into libqemustub.a.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Change cpu_exit() argument to CPUState
It no longer depends on CPUArchState, so move it to qom/cpu.c.
Prepares for changing GDBState::c_cpu to CPUState.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks
Make cpustats monitor command available unconditionally.
Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()arguments to CPUState.
cpu: Change default for CPUClass::get_paging_enabled()
qemu_get_guest_memory_mapping() uses cpu_paging_enabled() to determinewhether to use cpu_get_memory_mapping() to return mappings or whether tofall back to a simple identity map.
Since by default CPUClass::get_memory_mapping() is not implemented,...
cpu: Turn cpu_get_memory_mapping() into a CPUState hook
Change error reporting from return value to Error argument.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>[AF: Fixed cpu_get_memory_mapping() documentation]...
cpu: Turn cpu_paging_enabled() into a CPUState hook
Relocate assignment of x86 get_arch_id to have all hooks in one place.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move cpu_write_elfXX_note() functions to CPUState
Convert cpu_write_elfXX_note() functions to CPUClass methods and passCPUState as argument. Update target-i386 accordingly.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>[AF: Retain stubs as CPUClass' default method implementation; style changes]...
cpu: Introduce get_arch_id() method and override it for X86CPU
get_arch_id() adds possibility for generic code to get a guest-visibleCPU ID without accessing CPUArchState.If derived classes don't override it, it will return cpu_index.
Override it on target-i386 in X86CPU to return the APIC ID....
cpu: Add helper cpu_exists(), to check if CPU with specified id exists
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Call cpu_synchronize_post_init() from DeviceClass::realize()
If hotplugged, synchronize CPU state to KVM.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Resume CPU from DeviceClass::realize() if hot-plugged
cpu: Introduce CPU hot-plug notifier
Hot-add CPU event will be distributed to acpi_piix4 and rtc_cmos.
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
exec: Pass CPUState to cpu_reset_interrupt()
Move it to qom/cpu.c to avoid build failures depending on include orderof cpu-qom.h and exec/cpu-all.h.
Change opaques of various ..._irq_handler() functions to theappropriate CPU type to facilitate using cpu_reset_interrupt()....
cpu: Move exit_request field to CPUState
Since it was located before breakpoints field, it needs to be reset.
cpu: Move current_tb field to CPUState
Explictly NULL it on CPU reset since it was located before breakpoints.
Change vapic_report_tpr_access() argument to CPUState. This alsoresolves the use of void* for cpu.h independence.Change vAPIC patch_instruction() argument to X86CPU....
cpu: Prepare QOM realizefn
Overwrite the default implementation with a no-op, no longerattempting to call DeviceClass::init.
cpu: Add model resolution support to CPUClass
Introduce CPUClass::class_by_name and add a default implementation.Hook up the alpha and ppc implementations.
Introduce a wrapper function cpu_class_by_name().
cpu: Change parent type to Device
This finally makes the CPU class a subclass of the Device class,allowing us to start using DeviceState properties on CPU subclasses.
It has no_user=1, as creating CPUs using -device doesn't work yet.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
qom: move include files to include/qom/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qom: Introduce CPU class
Reintroduce CPUState as QOM object: It's abstract and derived directlyfrom TYPE_OBJECT for compatibility with the user emulators.The identifier CPUState avoids conflicts between CPU and the struct.
Introduce $(qom-twice-y) to build it separately for system and for user...