Skip to contentSkip to conversation

tools/xen-cpuid: two small adjustments

PATCH In review Jan Beulich 4 participants 6 messages Oct 2, 2019

lore
Share & tools
lore
#0 lore raw

cover tools/xen-cpuid: two small adjustments

1: MAINTAINERS: add tools/misc/xen-cpuid to "X86 ARCHITECTURE" 2: tools/xen-cpuid: avoid producing bogus output

They're not overly important to have for 4.13, but they're also rather low risk, so I think they're worthwhile considering at this point in time.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw

PATCH 1/2 MAINTAINERS: add tools/misc/xen-cpuid to "X86 ARCHITECTURE"

Along the lines of other x86-specific pieces under tools/.

MAINTAINERS +1 -0
@@ -472,6 +472,7 @@
 F:	tools/firmware/vgabios/
 F:	tools/fuzz/cpu-policy/
 F:	tools/fuzz/x86_instruction_emulator/
+F:	tools/misc/xen-cpuid.c
 F:	tools/tests/cpu-policy/
 F:	tools/tests/x86_emulator/
 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw

PATCH 2/2 tools/xen-cpuid: avoid producing bogus output

In reply to Jan Beulich

I was (mistakenly, as - looking at the code - it's clearly not intended to work) passing the tool "Raw" and "Host" as command line arguments.
Avoid printing just "Raw " with not even a newline at the end in
such a case. Instead report what wasn't understood by the parsing logic.

tools/misc/xen-cpuid.c +9 -0
@@ -530,6 +530,15 @@ int main(int argc, char **argv)
                 break;
             }
 
+            if ( !i )
+            {
+                fprintf(stderr, "'%s' unrecognized - skipping\n", ptr);
+                continue;
+            }
+
+            if ( *ptr )
+                fprintf(stderr, "'%s' unrecognized - ignoring\n", ptr);
+
             decode_featureset(fs, i, "Raw", true);
         }
     }

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

1: MAINTAINERS: add tools/misc/xen-cpuid to "X86 ARCHITECTURE" 2: tools/xen-cpuid: avoid producing bogus output

They're not overly important to have for 4.13, but they're also rather low risk, so I think they're worthwhile considering at this point in time.

For the series:

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on the v1 series
#4 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

1: MAINTAINERS: add tools/misc/xen-cpuid to "X86 ARCHITECTURE" 2: tools/xen-cpuid: avoid producing bogus output

They're not overly important to have for 4.13, but they're also rather low risk, so I think they're worthwhile considering at this point in time.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on the v1 series
#5 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

1: MAINTAINERS: add tools/misc/xen-cpuid to "X86 ARCHITECTURE" 2: tools/xen-cpuid: avoid producing bogus output

They're not overly important to have for 4.13, but they're also rather low risk, so I think they're worthwhile considering at this point in time.

In some copious free time, I was planning to rewrite xen-cpuid in python so we give it more interesting functionality, including "given two policies, are they compatible", and part of that includes getting individual policies at a time.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel