summaryrefslogtreecommitdiff
path: root/include/linux/usb/gpio_vbus.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2017-03-14 10:15:39 +0000
committerJames Hogan <james.hogan@imgtec.com>2017-03-28 14:53:59 +0100
commitf4474d50c7d483dd4432d5b0891b0bb9ad0eefc9 (patch)
tree0ae9b270aac75d2c7d3504cacf9c136fa9725096 /include/linux/usb/gpio_vbus.h
parentd42a008f86ba3d715d31788fc5143a4de5685d33 (diff)
KVM: MIPS/VZ: Support hardware guest timer
Transfer timer state to the VZ guest context (CP0_GTOffset & guest CP0_Count) when entering guest mode, enabling direct guest access to it, and transfer back to soft timer when saving guest register state. This usually allows guest code to directly read CP0_Count (via MFC0 and RDHWR) and read/write CP0_Compare, without trapping to the hypervisor for it to emulate the guest timer. Writing to CP0_Count or CP0_Cause.DC is much less common and still triggers a hypervisor GPSI exception, in which case the timer state is transferred back to an hrtimer before emulating the write. We are careful to prevent small amounts of drift from building up due to undeterministic time intervals between reading of the ktime and reading of CP0_Count. Some drift is expected however, since the system clocksource may use a different timer to the local CP0_Count timer used by VZ. This is permitted to prevent guest CP0_Count from appearing to go backwards. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org
Diffstat (limited to 'include/linux/usb/gpio_vbus.h')
0 files changed, 0 insertions, 0 deletions