From: Peter Maydell <peter.maydell@linaro.org>
To: gengdongjiu <gengdongjiu@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Zhaoshenglong <zhaoshenglong@huawei.com>,
Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>, kvm-devel <kvm@vger.kernel.org>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
Marc Zyngier <marc.zyngier@arm.com>,
Will Deacon <will.deacon@arm.com>,
James Morse <james.morse@arm.com>,
Tyler Baicar <tbaicar@codeaurora.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Ingo Molnar <mingo@kernel.org>, "bp@suse.de" <bp@suse.de>,
Shiju Jose <shiju.jose@huawei.com>,
"zjzhang@codeaurora.org" <zjzhang@codeaurora.org>,
arm-mail-list <linux-arm-kernel@lists.infradead.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"devel@acpica.org" <devel@acpica.org>,
John Garry <john.garry@huawei.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
huangdaode <huangdaode@hisilicon.com>,
"Wangzhou (B)" <wangzhou1@hisilicon.com>,
Huangshaoyu <huangshaoyu@huawei.com>,
Wuquanming <wuquanming@huawei.com>,
Linuxarm <linuxarm@huawei.com>,
"Zhengqiang (turing)" <zhengqiang10@huawei.com>
Subject: Re: [Qemu-devel] [PATCH v11 5/6] target-arm: kvm64: handle SIGBUS signal for synchronous External Abort
Date: Fri, 8 Sep 2017 17:21:52 +0100 [thread overview]
Message-ID: <CAFEAcA8HPhHeeXEDtxnewJ7mAJ-gYzR96pC06qA+Xx95LHu2DA@mail.gmail.com> (raw)
In-Reply-To: <0184EA26B2509940AA629AE1405DD7F2015F5F11@DGGEMA503-MBX.china.huawei.com>
On 8 September 2017 at 17:17, gengdongjiu <gengdongjiu@huawei.com> wrote:
>>
>> This code has all just been copied-and-pasted from target/i386/kvm.c.
>> Please instead abstract it out properly into a cpu-independent source file.
>
>
> Yes, it copied from x86.
> Do you mean abstracting this code to a common folder so that i386 and arm platform share it?
I mean it should go into a common source file (perhaps
accel/kvm/kvm-all.c).
>> What is this ??? You should never need to look up things in the cpreg arrays by fieldoffset.
>
>
> I used it to set the esr_el1's and far_el1's value, for example:
>
> /* set ESR_EL1 */
> ret = kvm_arm_cpreg_value(cpu, offsetof(CPUARMState, cp15.esr_el[1]));
>
> /* set FAR_EL1 */
> ret = kvm_arm_cpreg_value(cpu, offsetof(CPUARMState, cp15.far_el[1]));
Yes, I saw that, but I have no idea why you think that's
the right way to set register values. No other code in
QEMU does this.
> So use the added API kvm_arm_cpreg_value() to set their value.
> If not used it, do you better method to set their value?
I suggest:
>> The code for handling debug exits (software step, watchpoint,
>> etc) is probably a good place to look for how to deal with register state.
>> Any new globally-visible function prototype in a header should
>> have a doc-comment formatted documentation comment, please.
>
>
> Ok, thanks for this reminder. Do you mean I need to add comments
> for this globally-visible function, such as below:
>
> /*
> * xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> */
> void kvm_hwpoison_page_add(ram_addr_t ram_addr);
It should be in the doc-comment format, which begins
"/**" and has some stylization of how you list parameters
and so on. Lots of examples in the existing headers.
thanks
-- PMM
next prev parent reply other threads:[~2017-09-08 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 16:17 [Qemu-devel] [PATCH v11 5/6] target-arm: kvm64: handle SIGBUS signal for synchronous External Abort gengdongjiu
2017-09-08 16:21 ` Peter Maydell [this message]
2017-09-08 16:40 ` [Qemu-devel] 答复: " gengdongjiu
-- strict thread matches above, loose matches on Subject: below --
2017-08-18 14:23 [Qemu-devel] [PATCH v11 0/6] Add RAS virtualization support for armv8 SEA and SEI Dongjiu Geng
2017-08-18 14:23 ` [Qemu-devel] [PATCH v11 5/6] target-arm: kvm64: handle SIGBUS signal for synchronous External Abort Dongjiu Geng
2017-09-05 17:46 ` 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=CAFEAcA8HPhHeeXEDtxnewJ7mAJ-gYzR96pC06qA+Xx95LHu2DA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=bp@suse.de \
--cc=christoffer.dall@linaro.org \
--cc=devel@acpica.org \
--cc=edk2-devel@lists.01.org \
--cc=gengdongjiu@huawei.com \
--cc=huangdaode@hisilicon.com \
--cc=huangshaoyu@huawei.com \
--cc=imammedo@redhat.com \
--cc=james.morse@arm.com \
--cc=john.garry@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shiju.jose@huawei.com \
--cc=tbaicar@codeaurora.org \
--cc=wangzhou1@hisilicon.com \
--cc=will.deacon@arm.com \
--cc=wuquanming@huawei.com \
--cc=zhaoshenglong@huawei.com \
--cc=zhengqiang10@huawei.com \
--cc=zjzhang@codeaurora.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).