diff mbox

[v3,1/3] i386/msi: Correct mask of destination ID in MSI address

Message ID 1510899865-40323-2-git-send-email-chao.gao@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chao Gao Nov. 17, 2017, 6:24 a.m. UTC
According to SDM 10.11.1, only [19:12] bits of MSI address are
Destination ID, change the mask to avoid ambiguity for VT-d spec
has used the bit 4 to indicate a remappable interrupt request.

Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
 include/hw/i386/apic-msidef.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael S. Tsirkin Nov. 17, 2017, 1:24 p.m. UTC | #1
On Fri, Nov 17, 2017 at 02:24:23PM +0800, Chao Gao wrote:
> According to SDM 10.11.1, only [19:12] bits of MSI address are
> Destination ID, change the mask to avoid ambiguity for VT-d spec
> has used the bit 4 to indicate a remappable interrupt request.
> 
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
> Reviewed-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

Do you want me to merge this?

> ---
>  include/hw/i386/apic-msidef.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
> index 8b4d4cc..420b411 100644
> --- a/include/hw/i386/apic-msidef.h
> +++ b/include/hw/i386/apic-msidef.h
> @@ -26,6 +26,6 @@
>  
>  #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          0x000ff000
>  
>  #endif /* HW_APIC_MSIDEF_H */
> -- 
> 1.8.3.1
Chao Gao Nov. 20, 2017, 7:56 a.m. UTC | #2
On Fri, Nov 17, 2017 at 03:24:21PM +0200, Michael S. Tsirkin wrote:
>On Fri, Nov 17, 2017 at 02:24:23PM +0800, Chao Gao wrote:
>> According to SDM 10.11.1, only [19:12] bits of MSI address are
>> Destination ID, change the mask to avoid ambiguity for VT-d spec
>> has used the bit 4 to indicate a remappable interrupt request.
>> 
>> Signed-off-by: Chao Gao <chao.gao@intel.com>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
>> Reviewed-by: Peter Xu <peterx@redhat.com>
>
>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
>
>Do you want me to merge this?

Of course. It is a simple patch and has no dependency with the other two in
this series.

Thanks
Chao
diff mbox

Patch

diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
index 8b4d4cc..420b411 100644
--- a/include/hw/i386/apic-msidef.h
+++ b/include/hw/i386/apic-msidef.h
@@ -26,6 +26,6 @@ 
 
 #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          0x000ff000
 
 #endif /* HW_APIC_MSIDEF_H */