Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754186AbbG3HTz (ORCPT ); Thu, 30 Jul 2015 03:19:55 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:36146 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbbG3HTx (ORCPT ); Thu, 30 Jul 2015 03:19:53 -0400 Subject: Re: [PATCH 2/2] KVM: x86: store IOAPIC-handled vectors in each VCPU To: Steve Rutherford References: <1438177055-26764-1-git-send-email-pbonzini@redhat.com> <1438177055-26764-3-git-send-email-pbonzini@redhat.com> <20150730035543.GE15229@google.com> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, alex.williamson@redhat.com, yang.z.zhang@intel.com, srutherford@intel.com From: Paolo Bonzini Message-ID: <55B9D017.2090107@redhat.com> Date: Thu, 30 Jul 2015 09:19:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150730035543.GE15229@google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 28 On 30/07/2015 05:55, Steve Rutherford wrote: > > static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) > > { > > - u64 eoi_exit_bitmap[4]; > > - > > if (!kvm_apic_hw_enabled(vcpu->arch.apic)) > > return; > > > > - memset(eoi_exit_bitmap, 0, 32); > > + memset(vcpu->arch.eoi_exit_bitmap, 0, 256 / 8); > > > > - kvm_ioapic_scan_entry(vcpu, eoi_exit_bitmap); > > - kvm_x86_ops->load_eoi_exitmap(vcpu, eoi_exit_bitmap); > > + kvm_ioapic_scan_entry(vcpu, vcpu->arch.eoi_exit_bitmap); > Nit: Does scan entry still need to carry around the pointer to the bitmap? IIRC I was copying what you did in your patch, but I also think it's better this way. The IOAPIC has no business in the vcpu structure's fields; it only needs it in order to pass vcpu to kvm_apic_match_dest. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/