All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Bernhard Kohl <bernhard.kohl@nsn.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Improvements for task switching
Date: Thu, 12 Mar 2009 20:12:58 +0100	[thread overview]
Message-ID: <49B95EBA.6060301@siemens.com> (raw)
In-Reply-To: <49B957BD.7000107@siemens.com>

Jan Kiszka wrote:
> Bernhard Kohl wrote:
>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>> index 5cf28df..eca57a3 100644
>> --- a/arch/x86/kvm/vmx.c
>> +++ b/arch/x86/kvm/vmx.c
>> @@ -3357,7 +3357,8 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
>>  			enable_irq_window(vcpu);
>>  	}
>>  	if (vcpu->arch.interrupt.pending) {
>> -		vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr);
>> +		if (vcpu->arch.interrupt_window_open)
>> +			vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr);
>>  		if (kvm_cpu_has_interrupt(vcpu))
>>  			enable_irq_window(vcpu);
>>  	}
> 
> That causes concerns on my side as we had a hard time stabilizing this
> code. Need to think about it. Do you happen to have a test case for this
> (if it's not publicly shareable, contact me directly)? Did you check
> that this change causes no obvious regressions to other guests? What
> about the user-inject IRQ case, does it already work for you as-is?

Hmm, do_interrupt_requests will most likely not cause troubles as it
both pends and injects interrupts only when the window if open. I don't
get the scenario behind this here yet, but I think it would be a very
good chance to align the code layout of vmx_intr_assist to
do_interrupt_requests in this respect, either finally de-optimizing or
even breaking both :) - or bringing them in the same correct form.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-03-12 19:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-12 17:06 [PATCH] KVM: Improvements for task switching Bernhard Kohl
2009-03-12 18:43 ` Jan Kiszka
2009-03-12 19:12   ` Jan Kiszka [this message]
2009-03-13 14:17   ` Bernhard Kohl
2009-03-13 15:17     ` Jan Kiszka
2009-03-13 15:55       ` Kohl, Bernhard (NSN - DE/Munich)
2009-03-13 15:58         ` Jan Kiszka
2009-03-23 18:15         ` Julian Stecklina
2009-04-12 17:31           ` Julian Stecklina
2009-03-18  0:38       ` Andi Kleen

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=49B95EBA.6060301@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=bernhard.kohl@nsn.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 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.