From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH v2] KVM: x86: Rework INIT and SIPI handling
Date: Wed, 13 Mar 2013 13:42:01 +0100 [thread overview]
Message-ID: <51407419.3020608@siemens.com> (raw)
In-Reply-To: <514070CC.1010202@redhat.com>
On 2013-03-13 13:27, Paolo Bonzini wrote:
> With the following hack to inject an INIT and corresponding QEMU changes:
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 2609e7b99..efdab35 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6182,8 +6182,16 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
> if (mp_state->mp_state == KVM_MP_STATE_SIPI_RECEIVED) {
> vcpu->arch.mp_state = KVM_MP_STATE_INIT_RECEIVED;
> set_bit(KVM_APIC_SIPI, &vcpu->arch.apic->pending_events);
> - } else
> + } else {
> + if (kvm_vcpu_has_lapic(vcpu)) {
> + if (mp_state->mp_state == KVM_MP_STATE_INIT_RECEIVED &&
> + kvm_vcpu_is_bsp(vcpu))
> + vcpu->arch.apic->pending_events = 1UL << KVM_APIC_INIT;
> + else
> + vcpu->arch.apic->pending_events = 0;
> + }
> vcpu->arch.mp_state = mp_state->mp_state;
> + }
> kvm_make_request(KVM_REQ_EVENT, vcpu);
> return 0;
> }
>
> ... this patch passes the init.flat kvm-unit-test.
>
> Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Cool, thanks.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2013-03-13 12:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 11:42 [PATCH v2] KVM: x86: Rework INIT and SIPI handling Jan Kiszka
2013-03-13 12:27 ` Paolo Bonzini
2013-03-13 12:42 ` Jan Kiszka [this message]
2013-03-13 14:08 ` Gleb Natapov
2013-03-14 0:08 ` Marcelo Tosatti
2013-03-14 2:10 ` Marcelo Tosatti
2013-03-14 10:15 ` Jan Kiszka
2013-03-14 11:24 ` Gleb Natapov
2013-03-14 11:29 ` Jan Kiszka
2013-03-14 12:12 ` Gleb Natapov
2013-03-14 12:16 ` Jan Kiszka
2013-03-14 12:18 ` Gleb Natapov
2013-03-14 12:25 ` Jan Kiszka
2013-03-14 12:28 ` Gleb Natapov
2013-03-14 15:32 ` Jan Kiszka
2013-03-14 15:46 ` Gleb Natapov
2013-03-14 14:32 ` Marcelo Tosatti
2013-03-14 14:53 ` Gleb Natapov
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=51407419.3020608@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.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.