From: Yang Zhang <yang.zhang.wz@gmail.com>
To: "Jan Kiszka" <jan.kiszka@siemens.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Cc: "Lan, Tianyu" <tianyu.lan@intel.com>,
pbonzini@redhat.com, kvm@vger.kernel.org, tglx@linutronix.de,
gleb@redhat.com, mst@redhat.com, x86@kernel.org,
Peter Xu <peterx@redhat.com>, Igor Mammedov <imammedo@redhat.com>
Subject: Re: Enable more than 255 VCPU support without irq remapping function in the guest
Date: Wed, 27 Apr 2016 17:39:28 +0800 [thread overview]
Message-ID: <572088D0.7040805@gmail.com> (raw)
In-Reply-To: <57204D28.4070706@siemens.com>
On 2016/4/27 13:24, Jan Kiszka wrote:
> On 2016-04-27 06:10, Yang Zhang wrote:
>> On 2016/4/27 0:49, Radim Krčmář wrote:
>>> 2016-04-26 18:17+0200, Jan Kiszka:
>>>> 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 to
>>>>> 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()).
>>>
>>> Our of curiosity, how many VCPUs are you aiming at?
>>>
>>>>> 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 APIC,
>>>>> 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 kernel.
>>>>> 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 vcpus
>>>>> but 256 vcpus seem enough to balance irq requests in the guest. In the
>>>>> 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.
>>>>
>>>> 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. :)
>>>
>>> + Igor extends QEMU to support more than 255 in internal structures and
>>> ACPI. What remains mostly untracked is Seabios/OVMF.
>>
>> If we don't want the interrupt from internal device delivers to CPU
>>> 255, do we still need the VT-d interrupt remapping emulation? I think
>> 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 enough.
>
> What are "internal devices" for you? And which OS do you know that would
> handle such artificial setups without prio massive patching?
Sorry, a typo. I mean the external devices of IOAPIC/MSI/MSIX. Doesn't
current Linux use x2apic without IR in VM?
>
> We do need VT-d IR emulation in order to present our guest a well
> specified and support architecture for running > 255 CPUs.
I mean in Tianyu's case, if he doesn't care about to deliver external
interrupt to CPU >255, IR is not required.
--
best regards
yang
next prev parent reply other threads:[~2016-04-27 9:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 16:14 Enable more than 255 VCPU support without irq remapping function in the guest Lan, Tianyu
2016-04-26 16:17 ` Jan Kiszka
2016-04-26 16:49 ` Radim Krčmář
2016-04-27 4:10 ` Yang Zhang
2016-04-27 5:24 ` Jan Kiszka
2016-04-27 6:24 ` Lan Tianyu
2016-04-27 6:56 ` Jan Kiszka
2016-04-27 9:39 ` Yang Zhang [this message]
2016-04-27 9:45 ` Jan Kiszka
2016-04-28 1:11 ` Yang Zhang
2016-04-28 6:54 ` Jan Kiszka
2016-04-28 15:32 ` Radim Krčmář
2016-04-29 2:09 ` Yang Zhang
2016-04-29 3:01 ` Nadav Amit
2016-05-03 1:34 ` Yang Zhang
2016-04-29 4:59 ` Jan Kiszka
2016-05-03 1:52 ` Yang Zhang
2016-05-03 2:03 ` Nadav Amit
2016-05-03 4:55 ` Jan Kiszka
2016-05-04 1:46 ` Yang Zhang
2016-05-04 1:56 ` Nadav Amit
2016-05-04 5:38 ` Jan Kiszka
2016-04-27 5:39 ` Lan Tianyu
2016-04-27 14:38 ` Radim Krčmář
2016-04-27 5:15 ` Lan Tianyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=572088D0.7040805@gmail.com \
--to=yang.zhang.wz@gmail.com \
--cc=gleb@redhat.com \
--cc=imammedo@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=tianyu.lan@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).