An apparatus, program product and method effectively virtualize a hardware device shared between multiple processors by a file accessible by a processor such that access to the hardware device may be controlled via a lock associated with the file. By doing so, file-based locking, e.g., as provided by a file locking facility in an operating system running on a processor, may be used to control access to the hardware device on behalf of the processor.