From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2eoP-0005e3-Fy for qemu-devel@nongnu.org; Tue, 17 May 2016 09:13:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2eoL-00011W-6R for qemu-devel@nongnu.org; Tue, 17 May 2016 09:13:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2eoL-00011M-0n for qemu-devel@nongnu.org; Tue, 17 May 2016 09:13:21 -0400 References: <1462568028-31037-1-git-send-email-rkrcmar@redhat.com> <1462568028-31037-5-git-send-email-rkrcmar@redhat.com> From: Paolo Bonzini Message-ID: <573B18E5.8030901@redhat.com> Date: Tue, 17 May 2016 15:13:09 +0200 MIME-Version: 1.0 In-Reply-To: <1462568028-31037-5-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/4] kvm: support MSI_X2APIC capability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , qemu-devel@nongnu.org Cc: "Lan, Tianyu" , Igor Mammedov , Jan Kiszka , Peter Xu , Eduardo Habkost , Richard Henderson On 06/05/2016 22:53, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > + route->kroute.type =3D kvm_has_msi_x2apic() ? KVM_IRQ_ROUTING_= MSI_X2APIC > + : KVM_IRQ_ROUTING_MS= I; > route->kroute.flags =3D 0; Perhaps using flags here instead of a new route type gives simpler code in the kernel? It's a pity that the padding field of struct kvm_irq_routing_msi was not checked against zero. :( Paolo > route->kroute.u.msi.address_lo =3D (uint32_t)msg.address; > route->kroute.u.msi.address_hi =3D msg.address >> 32;