summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
AgeCommit message (Collapse)Author
2017-05-27add missing prototypeMike Larkin
2017-05-26Enable chvgpio(4) in RAMDISK_CD on amd64.Stefan Sperling
Makes the King Jim portabook's keyboard work in bsd.rd. ok deraadt mlarkin
2017-05-25Replace the only usage of x86_pause() with SPINLOCK_SPIN_HOOK.Visa Hankala
OK dlg@
2017-05-25Drop trailing semicolon from a macro.Visa Hankala
OK dlg@
2017-05-19Respect max VPID/ASID limits. VMX VPIDs are capped at 4095, for now.Mike Larkin
2017-05-19return EIO to vmd if the guest HLTs with interrupts disabledMike Larkin
2017-05-18Since copyin(9) already doeas access 32-bit quantities atomically, we canMark Kettenis
add copyin32(9) as a simple C wrapper around it. These wrappers do check alignment and return EFAULT if the userland pointer is misaligned. This is enough to guarantee that the access doesn't cross a cache line boundary which could make the access non-atomic. ok mpi@, visa@, tedu@
2017-05-16Tweak previous, s/int/unsigned/, since the format character is %u.YASUOKA Masahiko
2017-05-16Compare device pathes properly to find the booted disk.YASUOKA Masahiko
Work with and test by Michele Curti.
2017-05-12Make copyin(9) and copyout(9) atomic for naturally aligned 32-bit words.Mark Kettenis
ok mpi@, visa@
2017-05-12Make atomic.h ready to be included in userland.Martin Pieuchot
- prefix the LOCK macro with an underscore - keep setbits/clearbits and virtio barriers inside _KERNEL ok dlg@, kettenis@
2017-05-11panic doesn't need \n.Mike Larkin
Suggested by Michael W. Bombardieri, thanks.
2017-05-11Casting int is required for passing uint64 value to "%u" since we don'tYASUOKA Masahiko
assume the size of int. The problem was spotted by Michele Curti.
2017-05-10The setting of the cpu feature flags for PCLMUL and AES-NI was guarded withTheo Buehler
!SMALL_KERNEL and CRYPTO. Move it out of !SMALL_KERNEL to make use of these features on RAMDISK_CD. Fixes a performance regression in the installer introduced with the new aes implementation. In particular, it halves the time needed to extract baseXX.tgz and compXX.tgz on my T420. tweaks & ok mikeb
2017-05-08After a break point at the beginning of a function, printing itsAlexander Bluhm
arguments faulted in ddb. Accessing the register arguments was off by one and in wrong order. OK dlg@
2017-05-08add a BUS_DMA_64BIT flag to bus_dma on all our archs.David Gwynne
this is so drivers can advertise that they can handle 64 dma addresses to the platform. it may choose to handle dmamaps differently based on this flag. tweaks and ok tom@ ok kettenis@
2017-05-08add printing of arguments in stack traces.David Gwynne
this relies on building the kernel with -msave-args, which has functions save their register arguments on the stack, so ddb can easily find them and print them. while here try to print arguments out of registers if we're at the top of the stack (ie, if we set a breakpoint on a function entry). -msave-args is only added to the compiler flags if the kernel has been configured with ddb. this means it wont waste the space on RAMDISK kernels because they don't include ddb. inspired by similar functionality that has been in use on solaris and its derivatives for well over a decade. ok deraadt@
2017-05-07further improvement to vmm fpu handling (support avx and avx2, blockMike Larkin
avx512 and various xsave* instructions) tested by many
2017-05-05Allow setting guest %xcr0 from vmd(8).Mike Larkin
Tested on linux and amd64 OpenBSD guests. Posted to tech by Pratik Vyas.
2017-05-02Switch glxsb(4), VIA padlock and AES-NI drivers over to the new AESMike Belopuhov
2017-05-02Allow setting of guest MSRs from vmd(8). This change is the first part ofMike Larkin
a larger effort to implement vmctl send/vmctl receive (snapshot and VM migration). From Pratik Vyas, Siri Chandana, Harshada Mone and Ashwin Agrawal, a group of students I am supervising. ok kettenis
2017-04-30Remove some KGDB leftovers.Martin Pieuchot
From Amit Kulkarni.
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-04-28add some comments. no functional changeMike Larkin
2017-04-28vmm: don't use invvpid if we didn't detect vpid capability duringMike Larkin
vcpu setup
2017-04-27rename a struct that was denoted as "VMX only" to make it more clearMike Larkin
that it can be used in SVM and VMX. no functional change
2017-04-27use a more descriptive value from the VEI_DIR_xxx enum instead of aMike Larkin
hardcoded number. no functional change
2017-04-27vmm(4): proper save/restore of FPU context during entry/exit.Mike Larkin
tested by reyk, dcoppa, and a few others. ok kettenis@ on the fpu bits ok deraadt@ on the vmm bits
2017-04-26Convert some hardcoded function names in printfs into %s / __func__.Mike Larkin
Some of these pointed out by Michael W. Bombardieri, I went through the file and fixed the rest. No functional change.
2017-04-26Fix a typo relating to savefpu alignmentMike Larkin
ok kettenis
2017-04-20Tweak lock inits to make the system runnable with witness(4)Visa Hankala
on amd64 and i386.
2017-04-20Hook up mutex(9) to witness(4).Visa Hankala
2017-04-20Hook up mplock to witness(4) on amd64 and i386.Visa Hankala
2017-04-20Add routines for saving stack traces and printing saved tracesVisa Hankala
on amd64 and i386. With guenther@
2017-04-16Replace fetch_and_add() with atomic_inc_int_nv() from <sys/atomic.h>Visa Hankala
to make the code more similar to sparc64's. OK mpi@, guenther@, kettenis@
2017-04-14SVM: calculate max ASID value and save for later use. This will be used inMike Larkin
an upcoming diff to handle ASID/VPID reuse/rollover.
2017-04-13Provide mips64 with kernel-facing TCB_{GET,SET} macros that store itPhilip Guenther
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB macro can be unifdef'ed as always defined. ok kettenis@ visa@ jsing@
2017-04-02Filter out RDTSCP, needed to handle solaris guests. We set the VMX controlMike Larkin
to enable RDTSCP to 0, so when solaris attempted to use the instruction (since it wasn't filtered out of CPUID information), the CPU issued an #UD exception.
2017-03-28Properly handle VMX entry controls governing guest processor mode.Mike Larkin
Before seabios, this didn't matter much but now it does since various bootloaders/kernels need such treatment. ok deraadt
2017-03-28add RDTSCP flags to identcpu.cMike Larkin
ok guenther, deraadt
2017-03-27typo in debug buildMike Larkin
2017-03-27add a newline to an error printfMike Larkin
2017-03-27hibernate_free() should not be called from MD code, acpi_sleep_state()Theo de Raadt
unwinds that. Upon hibernate fail, this was a collection of double-frees.. ok claudio mlarkin
2017-03-26KNFJeremie Courreges-Anglas
2017-03-26discard MSR reads from unknown MSRs instead of passing them through. ThatMike Larkin
behaviour was needed during early development but not anymore. Suppress the printf that accompanied these exits since linux guests go probing wildly into msr-land on each boot. ok deraadt
2017-03-26Add "AVX" to the comment above the previous commit. Spotted by reykMike Larkin
2017-03-26Suppress AVX from the extended CPUID flags. Our AVX treatment is currentlyMike Larkin
incomplete and enabling it leads ubuntu guests to try and use the feature, with incorrect results. We can re-enable this at a later date when AVX is properly handled.
2017-03-25Split vmm_probe() into a vmm_enabled() function, to better follow theTheo de Raadt
probe/attach approach used by mainbus. ok mlarkin kettenis
2017-03-25Use explicit operand with SVM instructions as clang doesn't recognize theMark Kettenis
implicit form. ok mlarkin@