mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 03:13:44 +08:00
xen: Simplify halting of first CPU
Use the global first_cpu variable to halt the CPU rather than using a local first_cpu initialized from qemu_get_cpu(0). This will allow to change qemu_get_cpu() return type to CPUState despite use of the CPU_COMMON halted field in the reset handler. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
504134d27f
commit
4a1e40b509
@ -585,9 +585,7 @@ static void xen_reset_vcpu(void *opaque)
|
|||||||
|
|
||||||
void xen_vcpu_init(void)
|
void xen_vcpu_init(void)
|
||||||
{
|
{
|
||||||
CPUArchState *first_cpu;
|
if (first_cpu != NULL) {
|
||||||
|
|
||||||
if ((first_cpu = qemu_get_cpu(0))) {
|
|
||||||
qemu_register_reset(xen_reset_vcpu, first_cpu);
|
qemu_register_reset(xen_reset_vcpu, first_cpu);
|
||||||
xen_reset_vcpu(first_cpu);
|
xen_reset_vcpu(first_cpu);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user