• Avi Kivity's avatar
    KVM: Do not communicate to userspace through cpu registers during PIO · 46fc1477
    Avi Kivity authored
    Currently when passing the a PIO emulation request to userspace, we
    rely on userspace updating %rax (on 'in' instructions) and %rsi/%rdi/%rcx
    (on string instructions).  This (a) requires two extra ioctls for getting
    and setting the registers and (b) is unfriendly to non-x86 archs, when
    they get kvm ports.
    
    So fix by doing the register fixups in the kernel and passing to userspace
    only an abstract description of the PIO to be done.
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    46fc1477
svm.c 43.2 KB