mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: "Wu, Feng" <feng.wu@intel.com>
Cc: "pbonzini@redhat.com" <pbonzini@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts
Date: Tue, 24 Nov 2015 15:31:55 +0100	[thread overview]
Message-ID: <20151124143154.GB13925@potion.brq.redhat.com> (raw)
In-Reply-To: <E959C4978C3B6342920538CF579893F00AE87B7E@SHSMSX104.ccr.corp.intel.com>

2015-11-24 01:26+0000, Wu, Feng:
> "I don't think we do any vector hashing on our client parts.  This may be why the customer is not able to detect this on Skylake client silicon.
> The vector hashing is micro-architectural and something we had done on server parts.
> 
> If you look at the haswell server CPU spec (https://www-ssl.intel.com/content/dam/www/public/us/en/documents/datasheets/xeon-e5-v3-datasheet-vol-2.pdf)
> In section 4.1.2, you will see an IntControl register (this is a register controlled/configured by BIOS) - see below.

Thank you!

> If you look at bits 6:4 in that register, you see the option we offer in hardware for what kind of redirection is applied to lowest priority interrupts.
> There are three options:
> 1.	Fixed priority  
> 2.	Redirect last 
> 3.	Hash Vector
> 
> If picking vector hash, then bits 10:8 specifies the APIC-ID bits used for the hashing."

The hash function just interprets a subset of vector's bits as a number
and uses that as a starting offset in a search for an enabled APIC
within the destination set?

For example:
The x2APIC destination is 0x00000055 (= first four even APICs in cluster
0), the vector is 0b11100000, and bits 10:8 of IntControl are 000.

000 means that bits 7:4 of vector are selected, thus the vector hash is
0b1110 = 14, so the round-robin effectively does 14 % 4 (because we only
have 4 destinations) and delivers to the 3rd possible APIC (= ID 6)?

  reply	other threads:[~2015-11-24 14:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09  2:46 Feng Wu
2015-11-16  6:18 ` Wu, Feng
2015-11-16 19:03 ` Radim Krčmář
2015-11-17  9:41   ` Paolo Bonzini
2015-11-24  1:26     ` Wu, Feng
2015-11-24 14:35       ` Radim Krcmár
2015-11-24 14:38         ` Paolo Bonzini
2015-11-25  1:58           ` Wu, Feng
2015-11-25 11:32             ` Paolo Bonzini
2015-11-24  1:26   ` Wu, Feng
2015-11-24 14:31     ` Radim Krčmář [this message]
2015-11-24 14:44       ` Radim Krčmář
2015-11-25  3:21       ` Wu, Feng
2015-11-25 14:12         ` Radim Krcmár
2015-11-25 14:38           ` Paolo Bonzini
2015-11-25 15:43             ` Radim Krčmář
2015-11-26  6:24               ` Wu, Feng
2015-11-26 14:03                 ` Radim Krcmár
2015-12-09  8:19   ` Wu, Feng
2015-12-09 14:53     ` Radim Krčmář
2015-12-10  1:52       ` Wu, Feng
2015-12-11 14:37         ` Radim Krcmár
2015-12-15  1:52           ` Wu, Feng

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=20151124143154.GB13925@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=feng.wu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®