From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362AbcCJTed (ORCPT ); Thu, 10 Mar 2016 14:34:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49612 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752794AbcCJTeY (ORCPT ); Thu, 10 Mar 2016 14:34:24 -0500 Date: Thu, 10 Mar 2016 20:34:19 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Suravee Suthikulpanit 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 Subject: Re: [PART1 RFC v2 07/10] svm: Add VMEXIT handlers for AVIC 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160309205512.GD19459@potion.brq.redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 10 Mar 2016 19:34:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-03-09 21:55+0100, Radim Krčmář: > 2016-03-04 14:46-0600, Suravee Suthikulpanit: >> +static int avic_noaccel_interception(struct vcpu_svm *svm) >> +{ >> + int ret = 0; >> + u32 offset = svm->vmcb->control.exit_info_1 & 0xFF0; >> + u32 rw = (svm->vmcb->control.exit_info_1 >> 32) & 0x1; > > Change "u32 rw" to "bool write" > >> + u32 vector = svm->vmcb->control.exit_info_2 & 0xFFFFFFFF; > > 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 the APIC page equal to it? (Btw. edge EOI hacks for PIT and RTC won't work because AVIC doesn't exit when TMR=0, but I'd take it slow and tackle those after v3.)