All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Sheng Yang <sheng@linux.intel.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 1/3] Make kvm_cpu_(has|get)_interrupt() work for	userspace irqchip too.
Date: Sat, 11 Apr 2009 14:24:43 +0300	[thread overview]
Message-ID: <49E07DFB.8010108@redhat.com> (raw)
In-Reply-To: <20090407100708.GA25543@redhat.com>

Gleb Natapov wrote:
>>>   * check if there are pending timer events
>>> @@ -48,14 +49,17 @@ int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
>>>  {
>>>  	struct kvm_pic *s;
>>>
>>> -	if (kvm_apic_has_interrupt(v) == -1) {	/* LAPIC */
>>> -		if (kvm_apic_accept_pic_intr(v)) {
>>> -			s = pic_irqchip(v->kvm);	/* PIC */
>>> -			return s->output;
>>> -		} else
>>> -			return 0;
>>> +	if (irqchip_in_kernel(v->kvm)) {
>>> +		if (kvm_apic_has_interrupt(v) == -1) {	/* LAPIC */
>>> +			if (kvm_apic_accept_pic_intr(v)) {
>>> +				s = pic_irqchip(v->kvm);	/* PIC */
>>> +				return s->output;
>>> +			} else
>>> +				return 0;
>>> +		}
>>> +		return 1;
>>>  	}
>>> -	return 1;
>>> +	return v->arch.irq_summary;
>>>  }
>>>       
>> Use if (!irqchip_in_kernel(v->kvm)) for userspace seems more simple(rather 
>> than a series of indention...).
>>
>>     
> As long as lines are smaller then 80 chars I don't care much :) If new
> version of the patch will be needed I'll change this.
>   

Please change it, the less indentation levels the better.


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


      reply	other threads:[~2009-04-11 11:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07  9:08 [PATCH 1/3] Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too Gleb Natapov
2009-04-07  9:08 ` [PATCH 2/3] Consolidate userspace and kernel interrupt injection for VMX Gleb Natapov
2009-04-11 11:29   ` Avi Kivity
2009-04-11 19:53     ` Gleb Natapov
2009-04-07  9:08 ` [PATCH 3/3] Cleanup vmx_intr_assist() Gleb Natapov
2009-04-11 11:30   ` Avi Kivity
2009-04-11 19:52     ` Gleb Natapov
2009-04-07  9:56 ` [PATCH 1/3] Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too Sheng Yang
2009-04-07 10:07   ` Gleb Natapov
2009-04-11 11:24     ` Avi Kivity [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=49E07DFB.8010108@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.intel.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.