target/i386/emulate/x86_decode: Actually use stream in decode_instruction_stream()
Compared to decode_instruction(), decode_instruction_stream() has an additional stream parameter which avoids some guest memory accesses during instruction decoding. Both functions defer the actual work to decode_opcode() which would set the stream pointer to zero such that decode_instruction_stream() essentially behaved like decode_instruction(). Given that all callers of decode_instruction_stream() properly zero-initialize the decode parameter, the memset() call can be moved into decode_instruction() which is the only other user of decode_opcode(). This preserves the non-zero stream pointer which avoids extra guest memory accesses. Fixes: 1e25327b244a ("target/i386/emulate: Allow instruction decoding from stream") cc: qemu-stable Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr> Reviewed-by: Wei Liu (Microsoft) <wei.liu@kernel.org> Tested-by: Magnus Kulke <magnuskulke@linux.microsoft.com> Link: https://lore.kernel.org/r/20260223233950.96076-4-mohamed@unpredictable.fr Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>