Skip to contentSkip to conversation

Remove noisy printf when KVM masks CPU features

Qemu-devel Avi Kivity 2 participants 2 messages May 9, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Avi Kivity

author
#1 lore raw
Quoted 10 lines · Anthony Liguori

From: Anthony Liguori <[email protected]>

target-i386/helper.c +0 -0
index bdf242b..5c03e3a 100644

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.
#2 lore raw

[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]>

target-i386/helper.c +0 -0
index bdf242b..5c03e3a 100644
@@ -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