Remove noisy printf when KVM masks CPU features
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Anthony Liguori
From: Anthony Liguori <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>target-i386/helper.c +0
-0
target-i386/helper.c static void kvm_trim_features(uint32_t *features, uint32_t supported, · line 107
Quoted 7 lines
target-i386/helper.c +0
-1@@ -102,7 +102,6 @@ static void kvm_trim_features(uint32_t *features, uint32_t supported,for (i =0 ; i <32 ; ++i) { mask =1U << i;if ((*features & mask) && !(supported & mask)) { -printf ("Processor feature %s not supported by kvm\n" , names[i]); *features &= ~mask; } }
That was intentional, I didn't want to silently drop features the user requested as those may impact live migration or load/save (or application performance).
Maybe it's better to only do that if -cpu was specified on the command line; and exit() as well. The user can easily pick up the missing bits and remove them from the requested cpu features.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
[Qemu-devel] Re: [Qemu-commits] [COMMIT 883ecbf] Remove noisy printf when KVMmasks CPU features
Quoted 14 lines · Avi Kivity
Quoted 13 lines · Anthony Liguori
From: Anthony Liguori <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>target-i386/helper.c +0
-0@@ -102,7 +102,6 @@ static void kvm_trim_features(uint32_t *features,uint32_t supported, for (i = 0; i < 32; ++i) { mask =1U << i;if ((*features & mask) && !(supported & mask)) {
Quoted 8 lines
Quoted 6 lines
target-i386/helper.c +0
-1-printf ("Processor feature %s not supported by kvm\n" , names[i]); *features &= ~mask;} }That was intentional, I didn't want to silently drop features the user requested as those may impact live migration or load/save (or application performance).
Why not provide a monitor option to view the list of CPUID features that are enabled?
printing to stdio is a bad idea. We print the names of pty devices to stdio and tools have to parse that today. I hope they're sufficiently robust but this isn't something we want to introduce if we don't have to.
Quoted 1 line
Maybe it's better to only do that if -cpu was specified on the command line; and
exit()as well. The user can easily pick up the missing bits and remove them from the requested cpu features.
Yes, that's also a good idea.
Regards,
Anthony Liguori
Signature · 3 lines
Regards, Anthony Liguori