On 19 September 2013 11:08, Alexey Kardashevskiy <a...@ozlabs.ru> wrote: > This adds QEMU wrappers for KVM_SET_ONE_REG/KVM_GET_ONE_REG ioctls. > > Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> > --- > Changes: > v2: > * added Doc Comments > * removed error_print
Thanks. The doc comments should go in the header file, not the .c file, though. > @@ -2049,3 +2050,35 @@ int kvm_on_sigbus(int code, void *addr) > { > return kvm_arch_on_sigbus(code, addr); > } > + > +/** > + * kvm_set_one_reg - set a register value in KVM via KVM_SET_ONE_REG ioctl > + * @id: The register ID > + * @addr: The pointer to a value "(must point to a variable of the correct type/size for the register being accessed)". That is, you can't put the value in a uint64_t if the register is 32 bits wide, the kernel will only read/write 32 bits (and the wrong 32 bits if big-endian...) > + * > + * Returns 0 if succeded and negative value if failed. "0 on success, or a negative errno on failure" thanks -- PMM