* [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types
@ 2015-01-19 11:24 Paolo Bonzini
2015-01-19 14:12 ` Eduardo Habkost
2015-01-19 18:13 ` Andreas Färber
0 siblings, 2 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-01-19 11:24 UTC (permalink / raw)
To: qemu-devel; +Cc: ehabkost
Due to a typo, instead of disabling KVM_FEATURE_PV_EOI (bit
6) these machine types are disabling bits 1 and 2, which are
KVM_FEATURE_NOP_IO_DELAY and KVM_FEATURE_MMU_OP. Not a big deal
because they aren't very important and KVM_FEATURE_MMU_OP is
disabled anyway. The worst part is actually that KVM_FEATURE_PV_EOI
is remaining enabled.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/pc_piix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index f0a3201..97a754e 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -406,7 +406,7 @@ static void pc_compat_1_3(MachineState *machine)
static void pc_compat_1_2(MachineState *machine)
{
pc_compat_1_3(machine);
- x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI);
+ x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
}
static void pc_init_pci_2_2(MachineState *machine)
@@ -483,7 +483,7 @@ static void pc_init_isa(MachineState *machine)
if (!machine->cpu_model) {
machine->cpu_model = "486";
}
- x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI);
+ x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode();
pc_init1(machine, 0, 1);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types
2015-01-19 11:24 [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types Paolo Bonzini
@ 2015-01-19 14:12 ` Eduardo Habkost
2015-01-19 18:13 ` Andreas Färber
1 sibling, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-01-19 14:12 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Mon, Jan 19, 2015 at 12:24:03PM +0100, Paolo Bonzini wrote:
> Due to a typo, instead of disabling KVM_FEATURE_PV_EOI (bit
> 6) these machine types are disabling bits 1 and 2, which are
> KVM_FEATURE_NOP_IO_DELAY and KVM_FEATURE_MMU_OP. Not a big deal
> because they aren't very important and KVM_FEATURE_MMU_OP is
> disabled anyway. The worst part is actually that KVM_FEATURE_PV_EOI
> is remaining enabled.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
--
Eduardo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types
2015-01-19 11:24 [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types Paolo Bonzini
2015-01-19 14:12 ` Eduardo Habkost
@ 2015-01-19 18:13 ` Andreas Färber
2015-01-19 19:59 ` Paolo Bonzini
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2015-01-19 18:13 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel, ehabkost
Am 19.01.2015 um 12:24 schrieb Paolo Bonzini:
> Due to a typo, instead of disabling KVM_FEATURE_PV_EOI (bit
> 6) these machine types are disabling bits 1 and 2, which are
> KVM_FEATURE_NOP_IO_DELAY and KVM_FEATURE_MMU_OP. Not a big deal
> because they aren't very important and KVM_FEATURE_MMU_OP is
> disabled anyway. The worst part is actually that KVM_FEATURE_PV_EOI
> is remaining enabled.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/i386/pc_piix.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index f0a3201..97a754e 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -406,7 +406,7 @@ static void pc_compat_1_3(MachineState *machine)
> static void pc_compat_1_2(MachineState *machine)
> {
> pc_compat_1_3(machine);
> - x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI);
> + x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
> }
>
> static void pc_init_pci_2_2(MachineState *machine)
> @@ -483,7 +483,7 @@ static void pc_init_isa(MachineState *machine)
> if (!machine->cpu_model) {
> machine->cpu_model = "486";
> }
> - x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI);
> + x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
> enable_compat_apic_id_mode();
> pc_init1(machine, 0, 1);
> }
Might it make sense to tweak that helper function instead to avoid this
reoccurring? Either way, no objection, please apply through kvm queue.
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types
2015-01-19 18:13 ` Andreas Färber
@ 2015-01-19 19:59 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-01-19 19:59 UTC (permalink / raw)
To: Andreas Färber, qemu-devel, ehabkost
On 19/01/2015 19:13, Andreas Färber wrote:
> Am 19.01.2015 um 12:24 schrieb Paolo Bonzini:
>> Due to a typo, instead of disabling KVM_FEATURE_PV_EOI (bit
>> 6) these machine types are disabling bits 1 and 2, which are
>> KVM_FEATURE_NOP_IO_DELAY and KVM_FEATURE_MMU_OP. Not a big deal
>> because they aren't very important and KVM_FEATURE_MMU_OP is
>> disabled anyway. The worst part is actually that KVM_FEATURE_PV_EOI
>> is remaining enabled.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> hw/i386/pc_piix.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>> index f0a3201..97a754e 100644
>> --- a/hw/i386/pc_piix.c
>> +++ b/hw/i386/pc_piix.c
>> @@ -406,7 +406,7 @@ static void pc_compat_1_3(MachineState *machine)
>> static void pc_compat_1_2(MachineState *machine)
>> {
>> pc_compat_1_3(machine);
>> - x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI);
>> + x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
>> }
>>
>> static void pc_init_pci_2_2(MachineState *machine)
>> @@ -483,7 +483,7 @@ static void pc_init_isa(MachineState *machine)
>> if (!machine->cpu_model) {
>> machine->cpu_model = "486";
>> }
>> - x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI);
>> + x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
>> enable_compat_apic_id_mode();
>> pc_init1(machine, 0, 1);
>> }
>
> Might it make sense to tweak that helper function instead to avoid this
> reoccurring? Either way, no objection, please apply through kvm queue.
Will do. The problem is that the same function is used for CPUID_*
defines that _are_ bitmasks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-19 19:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 11:24 [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types Paolo Bonzini
2015-01-19 14:12 ` Eduardo Habkost
2015-01-19 18:13 ` Andreas Färber
2015-01-19 19:59 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).