From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brQ4z-0006Ty-F1 for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:48:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brQ4u-00072S-Ib for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:48:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brQ4u-00071m-C9 for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:48:16 -0400 Date: Tue, 4 Oct 2016 15:48:11 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20161004134811.GA25826@potion> References: <20160930161013.9832-1-rkrcmar@redhat.com> <20160930161013.9832-8-rkrcmar@redhat.com> <20161004141822.03d5ec7b@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161004141822.03d5ec7b@nial.brq.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 7/8] intel_iommu: keep buggy EIM enabled in 2.7 machine type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Peter Xu , Paolo Bonzini , Richard Henderson 2016-10-04 14:18+0200, Igor Mammedov: > On Fri, 30 Sep 2016 18:10:12 +0200 > Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >> QEMU 2.7 allowed EIM even in configurations that were forbidden in the >> last patch because they were not working, like old KVM or userspace >> APIC. In order to keep backward compatibility, we again allow guests = to >> misbehave in non-obvious ways, and make it the default. >>=20 >> Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 >> --- >> v3: shorten the code [Peter] >> --- >> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c >> @@ -2456,9 +2456,11 @@ static AddressSpace *vtd_host_dma_iommu(PCIBus = *bus, void *opaque, int devfn) >> -static bool vtd_decide_config(IntelIOMMUState *s, Error **errp) >> +static bool vtd_decide_config(IntelIOMMUState *s, PCMachineState *pcm= s, >> + Error **errp) >> { >> X86IOMMUState *x86_iommu =3D X86_IOMMU_DEVICE(s); >> + PCMachineClass *pcmc =3D PC_MACHINE_CLASS(MACHINE_GET_CLASS(pcms)= ); > It's a bit backwards, for devices we usually add a property to affected= device > and use compat macros to do the job. As example look at > commit 048a2e8869cb7e26013e40d860c9ebdf8e28c2ac > x86: ioapic: boost default version to 0x20 I see, v4 will have a property. Thanks.