All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: James Sullivan <sullivan.james.f@gmail.com>
Cc: kvm@vger.kernel.org, gleb@kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH v3 1/2] kvm: x86: Extended struct kvm_lapic_irq with msi_redir_hint for MSI delivery
Date: Tue, 17 Mar 2015 15:02:08 +0100	[thread overview]
Message-ID: <20150317140207.GA2556@potion.brq.redhat.com> (raw)
In-Reply-To: <1426555822-3280-2-git-send-email-sullivan.james.f@gmail.com>

2015-03-16 19:30-0600, James Sullivan:
> In kvm_set_msi_irq(), the RH bit is currently ignored for
> determining the destination mode of the MSI delivery, and only the
> DM bit is used. Corrected this so that dest_mode is APIC_DEST_LOGICAL
> only when RH=1/DM=1, and APIC_DEST_PHYSICAL otherwise.
> 
> Extended struct kvm_lapic_irq with bool msi_redir_hint, which will
> be used to determine if the delivery of the MSI should target only
> the lowest priority CPU in the logical group specified for delivery.
> (In physical dest mode, the RH bit is not relevant). Initialized the value
> of msi_redir_hint to true when RH=1 in kvm_set_msi_irq(), and initialized
> to false in all other cases.
> 
> Added value of msi_redir_hint to a debug message dump of an IRQ in
> apic_send_ipi().
> 
> Signed-off-by: James Sullivan <sullivan.james.f@gmail.com>
> ---

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>

Thanks.

---
Btw. I often have comments ... if they are in parentheses, I have a
different opinion on some choice and would like to know why you chose a
that variant instead, because I might be missing something;
there is no need to send new revision or even answer them.

> diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
> @@ -103,12 +103,17 @@ static inline void kvm_set_msi_irq(struct kvm_kernel_irq_routing_entry *e,
> +	irq->msi_redir_hint = ((e->msi.address_lo
> +		& MSI_ADDR_REDIRECTION_LOWPRI) > 0);

(- two extra tabs, or alignment, help to distinguish a continued line
   from indented next line
 - outer parentheses are useless
 - '!= 0' saves thinking about negative values
 - it would fit on one line if we didn't map to {0,1} explicitly;
   KVM style prefers explicit, though ...)

  reply	other threads:[~2015-03-17 14:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17  1:30 [PATCH v3 0/2] kvm: x86: Implement handling of RH=1 for MSI delivery in KVM James Sullivan
2015-03-17  1:30 ` [PATCH v3 1/2] kvm: x86: Extended struct kvm_lapic_irq with msi_redir_hint for MSI delivery James Sullivan
2015-03-17 14:02   ` Radim Krčmář [this message]
2015-03-17  1:30 ` [PATCH v3 2/2] kvm: x86: Deliver MSI IRQ to only lowest prio cpu if msi_redir_hint is true James Sullivan
2015-03-17 14:18   ` Radim Krčmář
2015-03-17  8:19 ` [PATCH v3 0/2] kvm: x86: Implement handling of RH=1 for MSI delivery in KVM Jan Kiszka
2015-03-17 15:33   ` James Sullivan
2015-03-29  2:17   ` James Sullivan

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=20150317140207.GA2556@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sullivan.james.f@gmail.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.