[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization f
From: |
Pavel Dovgaluk |
Subject: |
Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix |
Date: |
Fri, 26 Sep 2014 15:18:10 +0400 |
> From: Paolo Bonzini [mailto:address@hidden On Behalf Of Paolo Bonzini
>
> This patch postpones vapic_paddr initialization, which is performed
> during migration. When vapic_paddr is synchronized within the migration
> process, apic_common functions could operate with incorrect apic state,
> if it hadn't loaded yet. This patch postpones the synchronization until
> the virtual machine is started, ensuring that the whole virtual machine
> state has been loaded.
>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> Tested-by: Pavel Dovgalyuk <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/i386/kvmvapic.c | 37 ++++++++++++++++++++++++++-----------
> 1 file changed, 26 insertions(+), 11 deletions(-)
One more issue for this patch.
> -static int vapic_post_load(void *opaque, int version_id)
> +static void kvmvapic_vm_state_change(void *opaque, int running,
> + RunState state)
> {
> VAPICROMState *s = opaque;
> uint8_t *zero;
>
> + if (!running) {
Exitting here doesn't remove vmsentry. When we load VM state for multiple times,
list of the handlers will be filled with garbage.
> + return;
> + }
> +
> + if (s->state == VAPIC_ACTIVE) {
> + if (smp_cpus == 1) {
> + run_on_cpu(first_cpu, do_vapic_enable, s);
> + } else {
> + zero = g_malloc0(s->rom_state.vapic_size);
> + cpu_physical_memory_write(s->vapic_paddr, zero,
> + s->rom_state.vapic_size);
> + g_free(zero);
> + }
> + }
> +
> + qemu_del_vm_change_state_handler(s->vmsentry);
> +}
Pavel Dovgalyuk
- [Qemu-devel] [PULL 10/21] exec: report error when memory < hpagesize, (continued)
- [Qemu-devel] [PULL 10/21] exec: report error when memory < hpagesize, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 05/21] rules.mak: Fix DSO build by pulling in archive symbols, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Paolo Bonzini, 2014/09/12
- Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Pavel Dovgaluk, 2014/09/19
- Message not available
- Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Paolo Bonzini, 2014/09/19
- Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Pavel Dovgaluk, 2014/09/19
- Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Paolo Bonzini, 2014/09/19
- Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Pavel Dovgaluk, 2014/09/22
- Message not available
- Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Paolo Bonzini, 2014/09/22
Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix,
Pavel Dovgaluk <=
[Qemu-devel] [PULL 14/21] cpu: init vmstate for ticks and clock offset, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 15/21] fdc: adding vmstate for save/restore, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 12/21] vl: use QLIST_FOREACH_SAFE to visit change state handlers, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 16/21] parallel: adding vmstate for save/restore, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 17/21] serial: fixing vmstate for save/restore, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 19/21] mc146818rtc: add missed field to vmstate, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 18/21] piix: do not set irq while loading vmstate, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 20/21] pckbd: adding new fields to vmstate, Paolo Bonzini, 2014/09/12
[Qemu-devel] [PULL 21/21] gdbstub: init mon_chr through qemu_chr_alloc, Paolo Bonzini, 2014/09/12