From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] kvm: add set_one_reg/get_one_reg
Date: Wed, 18 Sep 2013 10:15:43 +0200 [thread overview]
Message-ID: <5239612F.5040500@redhat.com> (raw)
In-Reply-To: <52395F88.7000203@ozlabs.ru>
Il 18/09/2013 10:08, Alexey Kardashevskiy ha scritto:
> On 09/18/2013 05:59 PM, Peter Maydell wrote:
>> On 18 September 2013 16:46, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>>> On 09/18/2013 05:14 PM, Peter Maydell wrote:
>>>> On 18 September 2013 05:21, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>>>>> This adds QEMU wrappers for KVM_SET_ONE_REG/KVM_GET_ONE_REG ioctls.
>>>>>
>>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>>> ---
>>>>> include/sysemu/kvm.h | 4 ++++
>>>>> kvm-all.c | 31 +++++++++++++++++++++++++++++++
>>>>> 2 files changed, 35 insertions(+)
>>>>>
>>>>> diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
>>>>> index c7bc07b..b2d61e9 100644
>>>>> --- a/include/sysemu/kvm.h
>>>>> +++ b/include/sysemu/kvm.h
>>>>> @@ -319,4 +319,8 @@ int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
>>>>> void kvm_pc_gsi_handler(void *opaque, int n, int level);
>>>>> void kvm_pc_setup_irq_routing(bool pci_enabled);
>>>>> void kvm_init_irq_routing(KVMState *s);
>>>>> +
>>>>> +int kvm_set_one_reg(CPUState *cs, uint64_t id, void *addr);
>>>>> +int kvm_get_one_reg(CPUState *cs, uint64_t id, void *addr);
>>>>
>>>> Doc comments, please.
>>>
>>> What comments? Do not the function names speak for themselves already?
>>
>> It's a new public function, it should have a comment in the standard
>> format saying what it does and what the input parameters and output are.
>> Just to pick some examples at random, the fact that the return value
>> is 0-on-success-or-negative-errno should be documented, and we should
>> refer the user to the ioctl docs for valid id values. It doesn't need to be
>> a long essay, but we should be documenting new functions as we add them.
>
>
> It would be awesome if you just gave me any really good example of what you
> expect from such a comment as kvm-all.c does not have any whatsoever. And
> pci.c does not. And exec.c does not. But I am sure there is some as
> it cannot possibly be me who starts making such comments in qemu. Thanks.
include/exec/memory.h, include/qom/object.h, include/block/blockjob.h,
include/qemu/main-loop.h, include/block/aio.h have many, thankfully.
Paolo
next prev parent reply other threads:[~2013-09-18 11:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 4:21 [Qemu-devel] [PATCH] kvm: add set_one_reg/get_one_reg Alexey Kardashevskiy
2013-09-18 7:14 ` Peter Maydell
2013-09-18 7:46 ` Alexey Kardashevskiy
2013-09-18 7:59 ` Peter Maydell
2013-09-18 8:08 ` Alexey Kardashevskiy
2013-09-18 8:15 ` Paolo Bonzini [this message]
2013-09-18 8:15 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5239612F.5040500@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).