From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDITg-0004YR-QZ for qemu-devel@nongnu.org; Mon, 19 Jan 2015 14:59:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDITc-0000b4-N1 for qemu-devel@nongnu.org; Mon, 19 Jan 2015 14:59:12 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:55846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDITc-0000as-Fi for qemu-devel@nongnu.org; Mon, 19 Jan 2015 14:59:08 -0500 Received: by mail-wi0-f177.google.com with SMTP id r20so11010616wiv.4 for ; Mon, 19 Jan 2015 11:59:07 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54BD6207.9020703@redhat.com> Date: Mon, 19 Jan 2015 20:59:03 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1421666643-8092-1-git-send-email-pbonzini@redhat.com> <54BD4953.2040109@suse.de> In-Reply-To: <54BD4953.2040109@suse.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] pc: fix KVM features in pc-1.3 and earlier machine types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= , qemu-devel@nongnu.org, ehabkost@redhat.com 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 >> --- >> 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