Skip to contentSkip to conversation

Add print for PowerPC qemu for failed DCR read/writes

PATCH In review Jerone Young 3 participants 3 messages Feb 5, 2008 – Feb 6, 2008 2 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add print for PowerPC qemu for failed DCR read/writes

# HG changeset patch
# User Jerone Young <jyoung5-r/[email protected]> # Date 1202249136 21600
# Node ID 4bbbf98ebf05ef77dbb68e2131b3bc0764767c99
# Parent f8cab6a29bf3f34f1cbf4d1e6d7bd21809fd4184
Add print for PowerPC qemu for failed DCR read/writes

This patch adds a print to notify of failed reads and rights. Currently we will still ignore them (until development is fully done). But this makes them easier to spot.

qemu/qemu-kvm-powerpc.c +6 -2
@@ -178,13 +178,17 @@ int handle_powerpc_dcr_read(int vcpu, ui
 int handle_powerpc_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data)
 {
     CPUState *env = cpu_single_env;
-    ppc_dcr_read(env->dcr_env, dcrn, data);
+    if (ppc_dcr_read(env->dcr_env, dcrn, data) < 0)
+        printf("DCR FAILED on READ at 0x%x\n", dcrn);
+ 
     return 0; /* XXX ignore failed DCR ops */
 }
 
 int handle_powerpc_dcr_write(int vcpu, uint32_t dcrn, uint32_t data)
 {
     CPUState *env = cpu_single_env;
-    ppc_dcr_write(env->dcr_env, dcrn, data);
+    if (ppc_dcr_write(env->dcr_env, dcrn, data) < 0)
+        printf("DCR FAILED on WRITE at 0x%x\n", dcrn);
+
     return 0; /* XXX ignore failed DCR ops */
 }

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

A message that is not in the archive (sent off-list or not yet received): 4bbbf98ebf05ef77dbb6.1202249218-Zv899e0YUSbPQpwDFJZrxKsjOiXwFzmk@public.gmane.org

#2 lore raw

hi Jerone,
I think this is good for debugging to find unsupported hardware, but it should not be enabled by default (you could get a printf storm if a guest workload does stupid things). Maybe qemu has some debug/verbose options you can use. And additionally it would be useful for the dcr_write patch to print the value it tried to write.
I also don't know if we really need that caps-locked in the output.

Quoted 23 lines · Jerone Young

# HG changeset patch
# User Jerone Young <jyoung5-r/[email protected]> # Date 1202249136 21600
# Node ID 4bbbf98ebf05ef77dbb68e2131b3bc0764767c99
# Parent f8cab6a29bf3f34f1cbf4d1e6d7bd21809fd4184
Add print for PowerPC qemu for failed DCR read/writes

This patch adds a print to notify of failed reads and rights. Currently we will still ignore them (until development is fully done). But this makes them easier to spot.

qemu/qemu-kvm-powerpc.c +2 -1
@@ -178,13 +178,17 @@ int handle_powerpc_dcr_read(int vcpu, ui
 int handle_powerpc_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data)
 {
     CPUState *env = cpu_single_env;
-    ppc_dcr_read(env->dcr_env, dcrn, data);
+    if (ppc_dcr_read(env->dcr_env, dcrn, data) < 0)
+        printf("DCR FAILED on READ at 0x%x\n", dcrn);

qemu/qemu-kvm-powerpc.c int handle_powerpc_dcr_read(int vcpu, ui · line 191

Quoted 10 lines
qemu/qemu-kvm-powerpc.c +3 -1
+ 
     return 0; /* XXX ignore failed DCR ops */
 }
 
 int handle_powerpc_dcr_write(int vcpu, uint32_t dcrn, uint32_t data)
 {
     CPUState *env = cpu_single_env;
-    ppc_dcr_write(env->dcr_env, dcrn, data);
+    if (ppc_dcr_write(env->dcr_env, dcrn, data) < 0)
+        printf("DCR FAILED on WRITE at 0x%x\n", dcrn);

just a suggestion

        printf("%s - failed writing 0x%x @ 0x%x\n", dcrn, data);
Quoted 12 lines
qemu/qemu-kvm-powerpc.c +1 -1
+
     return 0; /* XXX ignore failed DCR ops */
 }
 
-------------------------------------------------------------------------

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

Signature · 8 lines
Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

A message that is not in the archive (sent off-list or not yet received): 47A99932.3050009-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org

#4 lore raw

Yeah, rate-limiting makes sense. Maybe we could take it one step further and only print the warning the first time a particular unemulated DCR is accessed.

I also agree about the captalization. :)

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
Quoted 41 lines · Christian Ehrhardt

hi Jerone,
I think this is good for debugging to find unsupported hardware, but it should not be enabled by default (you could get a printf storm if a guest workload does stupid things). Maybe qemu has some debug/verbose options you can use. And additionally it would be useful for the dcr_write patch to print the value it tried to write.
I also don't know if we really need that caps-locked in the output.

Quoted 23 lines · Jerone Young

# HG changeset patch
# User Jerone Young <jyoung5-r/[email protected]> # Date 1202249136 21600
# Node ID 4bbbf98ebf05ef77dbb68e2131b3bc0764767c99
# Parent f8cab6a29bf3f34f1cbf4d1e6d7bd21809fd4184
Add print for PowerPC qemu for failed DCR read/writes

This patch adds a print to notify of failed reads and rights. Currently we will still ignore them (until development is fully done). But this makes them easier to spot.

qemu/qemu-kvm-powerpc.c +2 -1
@@ -178,13 +178,17 @@ int handle_powerpc_dcr_read(int vcpu, ui
 int handle_powerpc_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data)
 {
     CPUState *env = cpu_single_env;
-    ppc_dcr_read(env->dcr_env, dcrn, data);
+    if (ppc_dcr_read(env->dcr_env, dcrn, data) < 0)
+        printf("DCR FAILED on READ at 0x%x\n", dcrn);

qemu/qemu-kvm-powerpc.c int handle_powerpc_dcr_read(int vcpu, ui · line 191

Quoted 10 lines
qemu/qemu-kvm-powerpc.c +3 -1
+ 
     return 0; /* XXX ignore failed DCR ops */
 }
 
 int handle_powerpc_dcr_write(int vcpu, uint32_t dcrn, uint32_t data)
 {
     CPUState *env = cpu_single_env;
-    ppc_dcr_write(env->dcr_env, dcrn, data);
+    if (ppc_dcr_write(env->dcr_env, dcrn, data) < 0)
+        printf("DCR FAILED on WRITE at 0x%x\n", dcrn);

just a suggestion

Quoted 15 lines
        printf("%s - failed writing 0x%x @ 0x%x\n", dcrn, data);
Quoted 12 lines
qemu/qemu-kvm-powerpc.c +1 -1
+
     return 0; /* XXX ignore failed DCR ops */
 }
 
-------------------------------------------------------------------------

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/