From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PART1 RFC v2 07/10] svm: Add VMEXIT handlers for AVIC Date: Thu, 10 Mar 2016 20:34:19 +0100 Message-ID: <20160310193419.GA2657@potion.brq.redhat.com> References: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1457124368-2025-8-git-send-email-Suravee.Suthikulpanit@amd.com> <20160309205512.GD19459@potion.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: pbonzini@redhat.com, joro@8bytes.org, bp@alien8.de, gleb@kernel.org, alex.williamson@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, wei@redhat.com, sherry.hurwitz@amd.com To: Suravee Suthikulpanit Return-path: Content-Disposition: inline In-Reply-To: <20160309205512.GD19459@potion.brq.redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2016-03-09 21:55+0100, Radim Kr=C4=8Dm=C3=A1=C5=99: > 2016-03-04 14:46-0600, Suravee Suthikulpanit: >> +static int avic_noaccel_interception(struct vcpu_svm *svm) >> +{ >> + int ret =3D 0; >> + u32 offset =3D svm->vmcb->control.exit_info_1 & 0xFF0; >> + u32 rw =3D (svm->vmcb->control.exit_info_1 >> 32) & 0x1; >=20 > Change "u32 rw" to "bool write" >=20 >> + u32 vector =3D svm->vmcb->control.exit_info_2 & 0xFFFFFFFF; >=20 > and please #define those masks. I reconsidered. Other users are being removed, so these masks will be used only once and properly named variables are better then. vector isn't used right now ... is the EOI vector you get by reading th= e APIC page equal to it? (Btw. edge EOI hacks for PIT and RTC won't work because AVIC doesn't exit when TMR=3D0, but I'd take it slow and tackle those after v3.)