qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] kvm: add set_one_reg/get_one_reg helpers


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] kvm: add set_one_reg/get_one_reg helpers
Date: Thu, 19 Sep 2013 11:15:31 +0900

On 19 September 2013 11:08, Alexey Kardashevskiy <address@hidden> wrote:
> This adds QEMU wrappers for KVM_SET_ONE_REG/KVM_GET_ONE_REG ioctls.
>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> ---
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]