[PATCH] target/i386: Fix OUTL debug output

Philippe Mathieu-Daudé posted 1 patch 5 years, 6 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200517110147.26026-1-f4bug@amsat.org
target/i386/misc_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] target/i386: Fix OUTL debug output
Posted by Philippe Mathieu-Daudé 5 years, 6 months ago
Fix OUTL instructions incorrectly displayed as OUTW.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/i386/misc_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/misc_helper.c b/target/i386/misc_helper.c
index 7d61221024..b6b1d41b14 100644
--- a/target/i386/misc_helper.c
+++ b/target/i386/misc_helper.c
@@ -70,7 +70,7 @@ target_ulong helper_inw(CPUX86State *env, uint32_t port)
 void helper_outl(CPUX86State *env, uint32_t port, uint32_t data)
 {
 #ifdef CONFIG_USER_ONLY
-    fprintf(stderr, "outw: port=0x%04x, data=%08x\n", port, data);
+    fprintf(stderr, "outl: port=0x%04x, data=%08x\n", port, data);
 #else
     address_space_stl(&address_space_io, port, data,
                       cpu_get_mem_attrs(env), NULL);
-- 
2.21.3


Re: [PATCH] target/i386: Fix OUTL debug output
Posted by Richard Henderson 5 years, 5 months ago
On 5/17/20 4:01 AM, Philippe Mathieu-Daudé wrote:
> Fix OUTL instructions incorrectly displayed as OUTW.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/i386/misc_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

as far as it goes.  We should of course never be printing to stderr, but
logging or tracing.


r~

Re: [PATCH] target/i386: Fix OUTL debug output
Posted by Philippe Mathieu-Daudé 5 years, 5 months ago
On 5/19/20 5:39 AM, Richard Henderson wrote:
> On 5/17/20 4:01 AM, Philippe Mathieu-Daudé wrote:
>> Fix OUTL instructions incorrectly displayed as OUTW.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   target/i386/misc_helper.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> 
> as far as it goes.  We should of course never be printing to stderr, but
> logging or tracing.

Yes, this is what the cpu_io() functions do in ioport.c, but they use 
MEMTXATTRS_UNSPECIFIED.

If we could replace one with another, I'm not sure which one is the 
correct one.

Maybe keep cpu_io() from ioport.c but add a MemTxAttrs argument?

Regards,

Phil.

Re: [PATCH] target/i386: Fix OUTL debug output
Posted by Paolo Bonzini 5 years, 5 months ago
On 19/05/20 14:23, Philippe Mathieu-Daudé wrote:
> On 5/19/20 5:39 AM, Richard Henderson wrote:
>> On 5/17/20 4:01 AM, Philippe Mathieu-Daudé wrote:
>>> Fix OUTL instructions incorrectly displayed as OUTW.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>>   target/i386/misc_helper.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>
>> as far as it goes.  We should of course never be printing to stderr, but
>> logging or tracing.
> 
> Yes, this is what the cpu_io() functions do in ioport.c, but they use
> MEMTXATTRS_UNSPECIFIED.
> 
> If we could replace one with another, I'm not sure which one is the
> correct one.
> 
> Maybe keep cpu_io() from ioport.c but add a MemTxAttrs argument?
> 
> Regards,
> 
> Phil.
> 

Queued, thanks.

Paolo