From: Gleb Natapov <gleb@redhat.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"Shan, Haitao" <haitao.shan@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>
Subject: Re: [PATCH v6 2/3] x86, apicv: add virtual interrupt delivery support
Date: Thu, 13 Dec 2012 08:50:02 +0200 [thread overview]
Message-ID: <20121213065002.GT11016@redhat.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E2DF5D2@SHSMSX101.ccr.corp.intel.com>
On Thu, Dec 13, 2012 at 01:09:11AM +0000, Zhang, Yang Z wrote:
> >> +static void ioapic_update_eoi_exitmap_one(struct kvm_ioapic *ioapic, int pin)
> >> +{
> >> + union kvm_ioapic_redirect_entry *e;
> >> +
> >> + e = &ioapic->redirtbl[pin];
> >> +
> >> + if ((e->fields.trig_mode == IOAPIC_LEVEL_TRIG ||
> >> + kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC, pin))) {
> >> + struct kvm_lapic_irq irqe;
> >> +
> >> + irqe.dest_id = e->fields.dest_id;
> >> + irqe.vector = e->fields.vector;
> >> + irqe.dest_mode = e->fields.dest_mode;
> >> + irqe.delivery_mode = e->fields.delivery_mode << 8;
> >> + kvm_update_eoi_exitmap(ioapic->kvm, &irqe);
> >> + }
> >> +}
> >> +
> > There is a bugs in exitbitmap recalculation that I've missed.
> > We need to zero all the exit bitmaps for all vcpus before we are
> > starting to recalculate them to get rid of stale bits.
> Right. I forget it too. So if consider to clear it, we should call ioapic_update_eoi_exitmap instead ioapic_update_eoi_exitmap_one when programming one program ioapic entry.
>
Yes.
--
Gleb.
next prev parent reply other threads:[~2012-12-13 6:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 4:56 [PATCH v6 0/3] x86, apicv: Add APIC virtualization support Yang Zhang
2012-12-12 4:56 ` [PATCH v6 1/3] x86, apicv: add APICv register " Yang Zhang
2012-12-12 4:56 ` [PATCH v6 2/3] x86, apicv: add virtual interrupt delivery support Yang Zhang
2012-12-12 10:54 ` Gleb Natapov
2012-12-13 1:09 ` Zhang, Yang Z
2012-12-13 6:50 ` Gleb Natapov [this message]
2012-12-12 4:56 ` [PATCH v6 3/3] x86, apicv: add virtual x2apic support Yang Zhang
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=20121213065002.GT11016@redhat.com \
--to=gleb@redhat.com \
--cc=haitao.shan@intel.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=yang.z.zhang@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.