1 Oct 2010 02:35
PAE support for kvm(3)
Jean-Yves Migeon <jeanyves.migeon <at> free.fr>
2010-10-01 00:35:22 GMT
2010-10-01 00:35:22 GMT
Hi list, Attached is the patch required to add PAE support in kvm(3). Except for one "major" nit (see below), it seems to be functional: I can sync a kernel, with or without PAE enabled, and all libkvm binaries (vmstat(1), netstat(1), ...) still work on the core files. I am facing an interesting limitation there: some weeks ago, I added a symbol, i386_use_pae. This variable is also exposed through a sysctl(7): "machdep.pae". Goal was to easily provide an indication whether a kernel is currently using PAE mode or not, and also query its value through kvm_nlist(3) (to select the proper kvatop function, depending on the mode). However, I have some kind of "chicken-egg" situation there: getting i386_use_pae value needs a go through KREAD/kvm_read, but these functions cannot work properly until the correct kvatop function has been selected. Downside is, this depends on i386_use_pae value... At this late hour, I cannot think of a quick and clean solution. Adding an element to the cpu_kcore_hdr_t will break all core dumps from before the change (the offset of the memory segments, "memsegs", will differ); that would need compat code to cope with that. Another possibility is to set the last bit in pdppaddr to indicate PAE activation, but, this seems like a dirty hack (I don't think that PDPpaddr will ever go that high though). Any advice for that one? Thanks in advance!(Continue reading)
RSS Feed