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 13:15:56 +0800 Message-ID: <57204B0C.7060706@intel.com> References: <571F93CA.40200@intel.com> <571F9487.5090009@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: Jan Kiszka , pbonzini@redhat.com, kvm@vger.kernel.org, yang.zhang.wz@gmail.com, tglx@linutronix.de, gleb@redhat.com, mst@redhat.com, x86@kernel.org, =?UTF-8?B?UmFkaW0gS3LEjQ==?= =?UTF-8?B?bcOhxZk=?= , Peter Xu Return-path: Received: from mga01.intel.com ([192.55.52.88]:29455 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266AbcD0FXs (ORCPT ); Wed, 27 Apr 2016 01:23:48 -0400 In-Reply-To: <571F9487.5090009@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2016=E5=B9=B404=E6=9C=8827=E6=97=A5 00:17, Jan Kiszka wrote: > On 2016-04-26 18:14, Lan, Tianyu wrote: >> Hi All: >> >> Recently I am working on extending max vcpu to more than 256 on the = both >> KVM/Xen. For some HPC cases, it needs many vcpus. The job requires t= o >> use X2APIC in the guest which supports 32-bit APIC id. Linux kernel >> requires irq remapping function during enabling X2APIC when max APIC= id >> is more than 255(More detail please see try_to_enable_x2apic()). >> >> The irq remapping function helps to deliver irq to cpu 255~. IOAPIC = just >> supports 8-bit target APIC id field and only can deliver irq to >> cpu 0~255. >> >> So far both KVM/Xen doesn't enable irq remapping function. If enable= the >> function, it seems a huge job which need to rework IO-APIC, local AP= IC, >> MSI parts and add virtual VTD support in the KVM. >> >> Other quick way to enable more than 256 VCPUs is to eliminate the >> dependency between irq remapping and X2APIC in the guest linux kerne= l. >> So far I can boot the guest after removing the dependency. >> The side effect I thought is that irq only can deliver to 0~255 vcpu= s >> but 256 vcpus seem enough to balance irq requests in the guest. In t= he >> most cases, there are fewer devices in the guest. >> >> I wonder whether it's feasible. There maybe some other side effects = I >> didn't think of. Very appreciate for your comments. >=20 > Radim is working on the KVM side already, Peter is currently driving = the > VT-d interrupt emulation topic in QEMU. It's in reach, I would say. := ) Oh. Thanks for your information. Very helpful :) >=20 > Jan >=20 > PS: Please no PV mess, at least without good reasons. >=20 --=20 Best regards Tianyu Lan