The NetBSD Project

CVS log for src/lib/libnvmm/Makefile

[BACK] Up to [cvs.NetBSD.org] / src / lib / libnvmm

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:05:25 2019 UTC (5 years, 10 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.6.2.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.1: +15 -0 lines
Sync with HEAD

Revision 1.6.2.1
Sun Apr 28 14:22:13 2019 UTC (5 years, 11 months ago) by christos
Branches: phil-wifi
FILE REMOVED
Changes since revision 1.6: +0 -15 lines
file Makefile was added on branch phil-wifi on 2019-06-10 22:05:25 +0000

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Apr 28 14:22:13 2019 UTC (5 years, 11 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, HEAD
Branch point for: phil-wifi
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Modify the communication layer between the kernel NVMM driver and libnvmm:
introduce a bidirectionnal "comm page", a page of memory shared between
the kernel and userland, and used to transfer data in and out in a more
performant manner than ioctls.

The comm page contains the VCPU state, plus three flags:

 - "wanted": the states the kernel must get/set when requested via ioctls
 - "cached": the states that are in the comm page
 - "commit": the states the kernel must set in vcpu_run

The idea is to avoid performing expensive syscalls, by using the VCPU
state cached, either explicitly or speculatively, in the comm page. For
example, if the state is cached we do a direct 1->5 with no syscall:

          +---------------------------------------------+
          |                    Qemu                     |
          +---------------------------------------------+
               |                                   ^
               | (0) nvmm_vcpu_getstate            | (6) Done
               |                                   |
               V                                   |
             +---------------------------------------+
             |                libnvmm                |
             +---------------------------------------+
                  |   ^          |               ^
        (1) State |   | (2) No   | (3) Ioctl:    | (5) Ok, state
        cached?   |   |          | "please cache | fetched
                  |   |          |  the state"   |
                  V   |          |               |
              +-----------+      |               |
              | Comm Page |------+---------------+
              +-----------+      |
                       ^         |
          (4) "Alright |         V
               babe"   |     +--------+
                       +-----| Kernel |
                             +--------+

The main changes in behavior are:

 - nvmm_vcpu_getstate(): won't emit a syscall if the state is already
   cached in the comm page, will just fetch from the comm page directly
 - nvmm_vcpu_setstate(): won't emit a syscall at all, will just cache
   the wanted state in the comm page
 - nvmm_vcpu_run(): will commit the to-be-set state in the comm page,
   as previously requested by nvmm_vcpu_setstate()

In addition to this, the kernel NVMM driver is changed to speculatively
cache certain states known to be of interest, so that the future
nvmm_vcpu_getstate() calls libnvmm or the emulator will perform will use
the comm page rather than expensive syscalls. For example, if an I/O
VMEXIT occurs, the I/O Assist in libnvmm will want GPRS+SEGS+CRS+MSRS,
and now the kernel caches all of that in the comm page before returning
to userland.

Overall, in a normal run of Windows 10, this saves several millions of
syscalls. Eg on a 4CPU Intel with 4VCPUs, booting the Win10 install ISO
goes from taking 1min35 to taking 1min16.

The libnvmm API is not changed, but the ABI is. If we changed the API it
would be possible to save expensive memcpys on libnvmm's side. This will
be avoided in a future version. The comm page can also be extended to
implement future services.

Revision 1.5.2.2: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:13 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.5.2.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.2.1: +15 -0 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.5.2.1
Tue Nov 13 09:24:37 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
FILE REMOVED
Changes since revision 1.5: +0 -15 lines
file Makefile was added on branch pgoyette-compat on 2018-11-26 01:52:13 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Nov 13 09:24:37 2018 UTC (6 years, 5 months ago) by martin
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Branch point for: pgoyette-compat
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -9 lines
Too much magic involved - revert previous.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Nov 13 09:14:14 2018 UTC (6 years, 5 months ago) by martin
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +8 -4 lines
Need some minimalistic support for additional things that ../Makefile
requires, even if we do nothing here

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Nov 13 09:00:09 2018 UTC (6 years, 5 months ago) by martin
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -1 lines
Move conditionals for libnvmm to subdir makefile, requested boy mrg.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Nov 12 17:46:53 2018 UTC (6 years, 5 months ago) by nakayama
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -3 lines
No need to install shared libraries to /lib.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Nov 10 09:28:56 2018 UTC (6 years, 5 months ago) by maxv
Branches: MAIN
Add libnvmm, NetBSD's new virtualization API. It provides a way for VMM
software to effortlessly create and manage virtual machines via NVMM.

It is mostly complete, only nvmm_assist_mem needs to be filled -- I have
a draft for that, but it needs some more care. This Mem Assist should
not be needed when emulating a system in x2apic mode, so theoretically
the current form of libnvmm is sufficient to emulate a whole class of
systems.

Generally speaking, there are so many modes in x86 that it is difficult
to handle each corner case without introducing a ton of checks that just
slow down the common-case execution. Currently we check a limited number
of things; we may add more checks in the future if they turn out to be
needed, but that's rather low priority.

Libnvmm is compiled and installed only on amd64. A man page (reviewed by
wiz@) is provided.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>