All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>, linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, Nadav Amit <namit@cs.technion.ac.il>,
	Gleb Natapov <gleb@kernel.org>
Subject: Re: [PATCH v2 4/4] KVM: x86: simplify kvm_apic_map
Date: Tue, 07 Apr 2015 14:38:08 +0200	[thread overview]
Message-ID: <5523CFB0.7040409@redhat.com> (raw)
In-Reply-To: <1423766494-26150-5-git-send-email-rkrcmar@redhat.com>



On 12/02/2015 19:41, Radim Krčmář wrote:
> +static inline void
> +apic_logical_id(struct kvm_apic_map *map, u32 dest_id, u16 *cid, u16 *lid)
> +{
> +	BUILD_BUG_ON(KVM_APIC_MODE_XAPIC_CLUSTER !=  4);
> +	BUILD_BUG_ON(KVM_APIC_MODE_XAPIC_FLAT    !=  8);
> +	BUILD_BUG_ON(KVM_APIC_MODE_X2APIC        != 16);
> +

I added

	unsigned lid_bits = map->mode;

here (used in the rest of apic_logical_id) and applied the series.

Thanks,

Paolo

> +	*cid = dest_id >> map->mode;
> +	*lid = dest_id & ((1 << map->mode) - 1);
> +}

  reply	other threads:[~2015-04-07 12:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 18:41 [PATCH v2 0/4] KVM: APIC improvements (with bonus mixed mode) Radim Krčmář
2015-02-12 18:41 ` [PATCH v2 1/4] KVM: x86: use MDA for interrupt matching Radim Krčmář
2015-02-12 18:41 ` [PATCH v2 2/4] KVM: x86: fix mixed APIC mode broadcast Radim Krčmář
2015-02-12 18:41 ` [PATCH v2 3/4] KVM: x86: avoid logical_map when it is invalid Radim Krčmář
2015-02-12 18:41 ` [PATCH v2 4/4] KVM: x86: simplify kvm_apic_map Radim Krčmář
2015-04-07 12:38   ` Paolo Bonzini [this message]
2015-02-26  1:55 ` [PATCH v2 0/4] KVM: APIC improvements (with bonus mixed mode) Marcelo Tosatti
2015-02-26  1:55   ` Marcelo Tosatti
2015-02-26  8:49   ` Nadav Amit
2015-02-26 22:31     ` Marcelo Tosatti
2015-02-26 22:31       ` Marcelo Tosatti
2015-02-27 15:22       ` Radim Krčmář
2015-02-27 15:12   ` Radim Krčmář

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=5523CFB0.7040409@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namit@cs.technion.ac.il \
    --cc=rkrcmar@redhat.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.