All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>, qemu-devel@nongnu.org
Cc: zealot351@gmail.com, maria.klimushenkova@ispras.ru, batuzovk@ispras.ru
Subject: Re: [Qemu-devel] [PATCH] kvmvapic: fix migration
Date: Mon, 22 Sep 2014 21:07:14 +0200	[thread overview]
Message-ID: <54207362.9010704@redhat.com> (raw)
In-Reply-To: <20140922121423.2848.41987.stgit@PASHA-ISP>

Il 22/09/2014 14:14, Pavel Dovgalyuk ha scritto:
> This patch fixes migration by extending do_vapic_enable function. This function
> called vapic_enable which read cpu number from the guest memory. When cpu
> number could not be read, vapic was not enabled while loading the VM state.
> This patch adds required code for cpu_number=0 to do_vapic_enable function,
> because it is called only when cpu_number=0.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
>  hw/i386/kvmvapic.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 2cca7a4..f9da050 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -732,7 +732,11 @@ static void do_vapic_enable(void *data)
>      VAPICROMState *s = data;
>      X86CPU *cpu = X86_CPU(first_cpu);
>  
> -    vapic_enable(s, cpu);
> +    static const uint8_t enabled = 1;
> +    cpu_physical_memory_write(s->vapic_paddr + offsetof(VAPICState, enabled),
> +                              &enabled, sizeof(enabled));
> +    apic_enable_vapic(cpu->apic_state, s->vapic_paddr);
> +    s->state = VAPIC_ACTIVE;
>  }
>  
>  static void kvmvapic_vm_state_change(void *opaque, int running,
> 

Thanks.

Paolo

      reply	other threads:[~2014-09-22 19:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 12:14 [Qemu-devel] [PATCH] kvmvapic: fix migration Pavel Dovgalyuk
2014-09-22 19:07 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54207362.9010704@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=batuzovk@ispras.ru \
    --cc=maria.klimushenkova@ispras.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=zealot351@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.