Re: Per-cpu IDT patch
s ymgch <[email protected]> Fri, 3 Jul 2020 16:08:30 +0900
| Newsgroups | gmane.os.netbsd.ports.x86-64,gmane.os.netbsd.ports.i386 |
|---|---|
| Message-ID | <CAPnD6HryyhVqLmaqBdbWHoApzRarNWU51Ee_V+DZ=p_NkA4S9A@mail.gmail.com> |
On Fri, Jul 3, 2020 at 3:27 PM Maxime Villard <[email protected]> wrote: > > Le 03/07/2020 à 07:11, s ymgch a écrit : > > Hi all, > > > > I tried to make an IDT per-cpu. The patch is here: > > http://www.netbsd.org/~yamaguchi/pcpu-idt.patch > > > > The summary of modifications is as follows. > > - Add an IDT pointer and idt_allocmap into struct cpu_info > > - Change prototype of cpu_init_idt() > > - void => struct cpu_info* > > - for loading an IDT address in struct cpu_info* > > - Copy a part of IDT entries from cpu 0 at attaching a CPU > > - for the same entries, for example, exceptions, db, etc. > > > > This function can be enabled by PCPU_IDT option that is newly provided. > > Why would we want a per-cpu IDT? To increase the number of entries? Yes, the intent of the patch is to increase the number of entries. There was a report about lack of the entries: http://gnats.netbsd.org/54837 > > > Does this patch look good? > > Please let me know if you have any comments about this. > > Since the idt page is moved into pcpu_entry, it can be removed from > pcpu_area I will change it.