From: Jan Kiszka <jan.kiszka@web.de>
To: Andrea Arcangeli <andrea@qumranet.com>
Cc: Avi Kivity <avi@qumranet.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: [PATCH] fix -no-kvm-irqchip regression
Date: Thu, 14 Aug 2008 08:24:47 +0200 [thread overview]
Message-ID: <48A3CFAF.6030205@web.de> (raw)
In-Reply-To: <20080813234045.GK26466@duo.random>
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
Andrea Arcangeli wrote:
> On Wed, Aug 13, 2008 at 10:05:06AM +0200, Jan Kiszka wrote:
>> Should this issue have been fixed meanwhile? I just gave latest git a
>> try and - as far as I recall my tests before holiday correctly - things
>> look the same. At least some Linux 2.6.23 kernel still hangs here during
>> early boot with -no-kvm-irqchip.
>
> The trouble was that clearing the idt_vectoring_info before handling
> the exit_reason would lead to the handle_exception to fail setting the
> irq_pending bit because is_external_interrupt was run on zero instead
> of the vmcs IDT_VECTORING_INFO_FIELD, so it didn't notice it was an
> external interrupt generating the exit.
>
> This makes the userland irqchip code work again for me, there seem to
> be no good reason to clear this value before returning in guest mode
> and only setting it to zero didn't look an effective debugging aid, so
> it's a microoptimization for the kernel irqchip too.
>
> Signed-off-by: Andrea Arcangeli <andrea@qumranet.com>
Solves the issue here as well. Thanks.
Tested-by: Jan Kiszka <jan.kiszka@web.de>
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 337670b..3c82593 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -2890,13 +2890,10 @@ static void vmx_complete_interrupts(struct vcpu_vmx *vmx)
> kvm_queue_exception_e(&vmx->vcpu, vector, error);
> } else
> kvm_queue_exception(&vmx->vcpu, vector);
> - vmx->idt_vectoring_info = 0;
> }
> kvm_clear_interrupt_queue(&vmx->vcpu);
> - if (idtv_info_valid && type == INTR_TYPE_EXT_INTR) {
> + if (idtv_info_valid && type == INTR_TYPE_EXT_INTR)
> kvm_queue_interrupt(&vmx->vcpu, vector);
> - vmx->idt_vectoring_info = 0;
> - }
> }
>
> static void vmx_intr_assist(struct kvm_vcpu *vcpu)
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2008-08-14 6:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-19 8:43 [REGRESSION?] -no-kvm-irqchip broken with kvm.git Jan Kiszka
2008-07-20 19:49 ` Jan Kiszka
2008-07-22 10:38 ` Avi Kivity
2008-08-13 8:05 ` Jan Kiszka
2008-08-13 8:10 ` Avi Kivity
2008-08-13 8:16 ` Jan Kiszka
2008-08-13 23:40 ` [PATCH] fix -no-kvm-irqchip regression Andrea Arcangeli
2008-08-14 6:24 ` Jan Kiszka [this message]
2008-08-14 8:19 ` Avi Kivity
2008-08-14 12:34 ` Andrea Arcangeli
2008-08-15 9:06 ` Jan Kiszka
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=48A3CFAF.6030205@web.de \
--to=jan.kiszka@web.de \
--cc=andrea@qumranet.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox