Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sheng Yang <yasker@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: "Yang, Sheng" <sheng.yang@intel.com>,
	"'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: [RFC][PATCH 0/2] Fix guest shared interrupt with in-kernel irqchip
Date: Thu, 2 Oct 2008 22:06:31 +0800	[thread overview]
Message-ID: <20081002140631.GA2783@yukikaze> (raw)
In-Reply-To: <48E4CC36.70607@redhat.com>

On Thu, Oct 02, 2008 at 04:27:18PM +0300, Avi Kivity wrote:
> Yang, Sheng wrote:
>> To deal with guest shared interrupt bug in in-kernel irqchip, we should:
>>
>> 1. Identify each level trig interrupt source.
>> 2. Implement logical OR on the same IRQ line for each interrupt source.
>>
>> Here I chose a simple method: the caller of kvm_set_irq() has responsiblity
>> to identify interrupt sources, and IOAPIC/PIC ensure logical OR on IRQ line.
>>   
>
> The downside is that every caller has to do this edge detection.
>
> How about allocating a vector of u32s (one per irq), and each source  
> will allocate a bit within this vector.  The 'or' operation becomes  
> (word != 0).

Oh, that's what I called the "alternative" one... I just think the
request/allocation/free make thing complicate and unnecessary for now, for
we are already ensure that kvm_set_irq() are called in pair.

I once think if we use resource allocating method, the irqs should bind with
the resources, and it's unnecessary. But I think your method is better,
reserve one bit for each source on every irq_state make things simpler.

OK, I will update the patch following this method.

--
regards
Yang, Sheng

  reply	other threads:[~2008-10-02 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02  8:19 [RFC][PATCH 0/2] Fix guest shared interrupt with in-kernel irqchip Yang, Sheng
2008-10-02 13:27 ` Avi Kivity
2008-10-02 14:06   ` Sheng Yang [this message]
2008-10-02 16:45   ` Sheng Yang
2008-10-03  7:36     ` Amit Shah
2008-10-03 10:37       ` Sheng Yang
2008-10-03 10:47         ` Amit Shah
2008-10-04  8:45         ` Avi Kivity
2008-10-04  8:47         ` Avi Kivity
2008-10-06  6:23           ` Sheng Yang
2008-10-06  6:37             ` Sheng Yang
2008-10-10 12:12         ` Amit Shah
2008-10-08  8:29       ` Sheng Yang

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=20081002140631.GA2783@yukikaze \
    --to=yasker@gmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng.yang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox