eal/x86: fix 32-bit write-combined stores
Checks
Commit Message
The "movdiri" instruction is given as a series of bytes in rte_io.h so
that it works on compilers/assemblers which are unaware of the
instruction. The REX prefix (0x40) on this instruction is invalid for
32-bit code, causing issues. Thankfully, the prefix is unnecessary in
64-bit code, since the data size used is 32-bits.
Fixes: 8a00dfc738fe ("eal: add write combining store")
Cc: radu.nicolau@intel.com
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/x86/include/rte_io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.43.0
Comments
On 06-Sep-24 2:27 PM, Bruce Richardson wrote:
> The "movdiri" instruction is given as a series of bytes in rte_io.h so
> that it works on compilers/assemblers which are unaware of the
> instruction. The REX prefix (0x40) on this instruction is invalid for
> 32-bit code, causing issues. Thankfully, the prefix is unnecessary in
> 64-bit code, since the data size used is 32-bits.
>
> Fixes: 8a00dfc738fe ("eal: add write combining store")
> Cc: radu.nicolau@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
On Fri, Sep 06, 2024 at 02:27:57PM +0100, Bruce Richardson wrote:
> The "movdiri" instruction is given as a series of bytes in rte_io.h so
> that it works on compilers/assemblers which are unaware of the
> instruction. The REX prefix (0x40) on this instruction is invalid for
> 32-bit code, causing issues. Thankfully, the prefix is unnecessary in
> 64-bit code, since the data size used is 32-bits.
>
> Fixes: 8a00dfc738fe ("eal: add write combining store")
> Cc: radu.nicolau@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
On Fri, Sep 6, 2024 at 3:28 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> The "movdiri" instruction is given as a series of bytes in rte_io.h so
> that it works on compilers/assemblers which are unaware of the
> instruction. The REX prefix (0x40) on this instruction is invalid for
> 32-bit code, causing issues. Thankfully, the prefix is unnecessary in
> 64-bit code, since the data size used is 32-bits.
>
> Fixes: 8a00dfc738fe ("eal: add write combining store")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Thanks for the fix, and reviews.
Applied.
@@ -24,7 +24,7 @@ __rte_x86_movdiri(uint32_t value, volatile void *addr)
{
asm volatile(
/* MOVDIRI */
- ".byte 0x40, 0x0f, 0x38, 0xf9, 0x02"
+ ".byte 0x0f, 0x38, 0xf9, 0x02"
:
: "a" (value), "d" (addr));
}