From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lan Tianyu Subject: Re: Enable more than 255 VCPU support without irq remapping function in the guest Date: Wed, 27 Apr 2016 14:24:18 +0800 Message-ID: <57205B12.6070003@intel.com> References: <571F93CA.40200@intel.com> <571F9487.5090009@siemens.com> <20160426164939.GA18900@potion> <57203B9D.6020402@gmail.com> <57204D28.4070706@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: pbonzini@redhat.com, kvm@vger.kernel.org, tglx@linutronix.de, gleb@redhat.com, mst@redhat.com, x86@kernel.org, Peter Xu , Igor Mammedov To: Jan Kiszka , Yang Zhang , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: Received: from mga09.intel.com ([134.134.136.24]:37738 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbcD0GcJ (ORCPT ); Wed, 27 Apr 2016 02:32:09 -0400 In-Reply-To: <57204D28.4070706@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2016=E5=B9=B404=E6=9C=8827=E6=97=A5 13:24, Jan Kiszka wrote: >> > If we don't want the interrupt from internal device delivers to CP= U >>> >>255, do we still need the VT-d interrupt remapping emulation? I t= hink >> > firmware is able to send IPI to wakeup APs even without IR and OS = is >> > able to do it too. So basically, only KVM and Qemu's support is en= ough. Yes, just starting more than 255 APs doesn't need IR. > What are "internal devices" for you? And which OS do you know that wo= uld > handle such artificial setups without prio massive patching? >=20 > We do need VT-d IR emulation in order to present our guest a well > specified and support architecture for running > 255 CPUs. Changing guest kernel will be big concern. I found commit ce69a784 did optimization to use X2APIC without IR in the guest when APIC id is less than 256 and so I proposed my idea to see everyone's feedback. Whether it's possible to relax the IR requirement when APIC id > 255 in the gue= st. commit ce69a784504222c3ab6f1b3c357d09ec5772127a Author: Gleb Natapov Date: Mon Jul 20 15:24:17 2009 +0300 x86/apic: Enable x2APIC without interrupt remapping under KVM KVM would like to provide x2APIC interface to a guest without emula= ting interrupt remapping device. The reason KVM prefers guest to use x2A= PIC is that x2APIC interface is better virtualizable and provides bette= r performance than mmio xAPIC interface: - msr exits are faster than mmio (no page table walk, emulation) - no need to read back ICR to look at the busy bit - one 64 bit ICR write instead of two 32 bit writes - shared code with the Hyper-V paravirt interface Included patch changes x2APIC enabling logic to enable it even if I= R initialization failed, but kernel runs under KVM and no apic id is greater than 255 (if there is one spec requires BIOS to move to x2apic mode before starting an OS). It's great to know Peter already worked on the IR. --=20 Best regards Tianyu Lan