xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Lan Tianyu <tianyu.lan@intel.com>
Cc: kevin.tian@intel.com, sstabellini@kernel.org, mst@redhat.com,
	qemu-devel@nongnu.org, Jan Beulich <JBeulich@suse.com>,
	marcel@redhat.com, xen-devel@lists.xenproject.org,
	Chao Gao <chao.gao@intel.com>
Subject: Re: [RFC PATCH V2 1/2] xen-pt: bind/unbind interrupt remapping format MSI
Date: Tue, 23 May 2017 18:06:22 +0100	[thread overview]
Message-ID: <20170523170622.GD1591@perard.uk.xensource.com> (raw)
In-Reply-To: <3f3c2075-da6b-dd14-279f-23525f46b3c5@intel.com>

On Tue, May 23, 2017 at 08:16:25PM +0800, Lan Tianyu wrote:
> On 2017年05月19日 20:04, Jan Beulich wrote:
> >>>> On 19.05.17 at 13:16, <anthony.perard@citrix.com> wrote:
> >> On Thu, May 18, 2017 at 01:32:59AM -0400, Lan Tianyu wrote:
> >>> --- a/include/hw/i386/apic-msidef.h
> >>> +++ b/include/hw/i386/apic-msidef.h
> >>> @@ -26,6 +26,7 @@
> >>>  
> >>>  #define MSI_ADDR_DEST_ID_SHIFT          12
> >>>  #define MSI_ADDR_DEST_IDX_SHIFT         4
> >>> -#define  MSI_ADDR_DEST_ID_MASK          0x00ffff0
> >>> +#define  MSI_ADDR_DEST_ID_MASK          0x000fff00
> >> The value of MSI_ADDR_DEST_ID_MASK is changed here. I think the patch
> >> should be:
> >> +#define  MSI_ADDR_DEST_ID_MASK          0x000ffff0
> > Judging from other sources, rather the other way around - the
> > mask needs to have further bits removed (should be 0x000ff000
> > afaict). Xen sources confirm this, and while Linux has the value
> > you suggest, that contradicts
> Agree. Defining the mask as "0x000ff000" makes more sense.
> Just check Qemu source code. Only apic_send_msi() and msi_dest_id() use
> the mask
> to get dest apic id. They mask MSI address field with 
> MSI_ADDR_DEST_ID_MASK and
> then right-shift 12bit. The low 12bit won't be used.
> 
> Anthony, does this make sense?

Yes, it does.
The change to MSI_ADDR_DEST_ID_MASK should probably go in its own patch.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-05-23 17:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18  5:32 [RFC PATCH V2 0/2] Qemu: Add Xen vIOMMU interrupt remapping function Lan Tianyu
2017-05-18  5:32 ` [RFC PATCH V2 1/2] xen-pt: bind/unbind interrupt remapping format MSI Lan Tianyu
2017-05-19 11:16   ` Anthony PERARD
2017-05-19 12:04     ` Jan Beulich
2017-05-23 12:16       ` Lan Tianyu
2017-05-23 17:06         ` Anthony PERARD [this message]
2017-05-24  1:40           ` Lan Tianyu
2017-05-18  5:33 ` [RFC PATCH V2 2/2] msi: Handle remappable format interrupt request Lan Tianyu
2017-05-19 11:57   ` Anthony PERARD
2017-05-22  2:41     ` Lan Tianyu
2017-05-18 13:56 ` [Qemu-devel] [RFC PATCH V2 0/2] Qemu: Add Xen vIOMMU interrupt remapping function no-reply

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=20170523170622.GD1591@perard.uk.xensource.com \
    --to=anthony.perard@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=chao.gao@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=tianyu.lan@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /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;
as well as URLs for NNTP newsgroup(s).