From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYH0d-0002UT-2U for qemu-devel@nongnu.org; Fri, 12 Aug 2016 14:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYH0X-0005kG-Sx for qemu-devel@nongnu.org; Fri, 12 Aug 2016 14:16:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYH0X-0005kA-Ni for qemu-devel@nongnu.org; Fri, 12 Aug 2016 14:16:37 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 509333B3EE for ; Fri, 12 Aug 2016 18:16:37 +0000 (UTC) Date: Fri, 12 Aug 2016 15:16:31 -0300 From: Eduardo Habkost Message-ID: <20160812181631.GL5627@thinpad.lan.raisama.net> References: <1471025672-12541-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471025672-12541-1-git-send-email-ehabkost@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.7] target-i386: kvm: Report kvm_pv_unhalt as unsupported w/o kernel_irqchip List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Paolo Bonzini Cc: Andrew Jones , Peter Xu , Radim =?utf-8?B?S3LEjW3DocWZ?= Sorry, forgot the for-2.7 tag in the Subject. This is a bug fix I would like to get into QEMU 2.7. On Fri, Aug 12, 2016 at 03:14:32PM -0300, Eduardo Habkost wrote: > The kvm_pv_unhalt feature doesn't work if kernel_irqchip is > disabled, so we need to report it as unsupported. > > Signed-off-by: Eduardo Habkost > --- > target-i386/kvm.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > index 0b2016a..d1a25c5 100644 > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -329,6 +329,13 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function, > */ > cpuid_1_edx = kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX); > ret |= cpuid_1_edx & CPUID_EXT2_AMD_ALIASES; > + } else if (function == KVM_CPUID_FEATURES && reg == R_EAX) { > + /* kvm_pv_unhalt is reported by GET_SUPPORTED_CPUID, but it can't > + * be enabled without the in-kernel irqchip > + */ > + if (!kvm_irqchip_in_kernel()) { > + ret &= ~(1U << KVM_FEATURE_PV_UNHALT); > + } > } > > /* fallback for older kernels */ > -- > 2.7.4 > -- Eduardo