From: gengdongjiu <gengdongjiu@huawei.com>
To: 'Peter Maydell' <peter.maydell@linaro.org>
Cc: Igor Mammedov <imammedo@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
Marc Zyngier <marc.zyngier@arm.com>,
James Morse <james.morse@arm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Richard Henderson <rth@twiddle.net>,
"zhengxiang (A)" <zhengxiang9@huawei.com>,
Eduardo Habkost <ehabkost@redhat.com>,
kvm-devel <kvm@vger.kernel.org>,
Shannon Zhao <shannon.zhaosl@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>
Subject: [Qemu-devel] 答复: [PATCH RESEND v15 10/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM
Date: Thu, 22 Nov 2018 03:05:41 +0000 [thread overview]
Message-ID: <0184EA26B2509940AA629AE1405DD7F201F7D7EB@DGGEMA503-MBX.china.huawei.com> (raw)
In-Reply-To: <CAFEAcA-6UKk-WF+M+z0=AN-X7q0XRFLo2RG_yBadDeCas4A5wQ@mail.gmail.com>
> >
> > +void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) {
> > + ram_addr_t ram_addr;
> > + hwaddr paddr;
> > +
> > + assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
> > + if (addr) {
> > + ram_addr = qemu_ram_addr_from_host(addr);
> > + if (ram_addr != RAM_ADDR_INVALID &&
> > + kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
> > + kvm_hwpoison_page_add(ram_addr);
> > + if (code == BUS_MCEERR_AR) {
> > + kvm_cpu_synchronize_state(c);
> > + if (ghes_record_errors(ACPI_HEST_NOTIFY_SEA, paddr)) {
> > + kvm_inject_arm_sea(c);
> > + } else {
> > + fprintf(stderr, "failed to record the error\n");
> > + }
>
> Shouldn't there be something in here to say "only report this error to the guest if we are actually reporting RAS errors to the guest" ?
Yes, We can say something that such as "report this error to the guest", because this error is indeed triggered by guest, which is guest error.
>
> > + }
> > + return;
> > + }
> > + fprintf(stderr, "Hardware memory error for memory used by "
> > + "QEMU itself instead of guest system!\n");
> > + }
> > +
> > + if (code == BUS_MCEERR_AR) {
> > + fprintf(stderr, "Hardware memory error!\n");
> > + exit(1);
> > + }
> > +}
> > +
> > /* C6.6.29 BRK instruction */
> > static const uint32_t brk_insn = 0xd4200000;
>
> thanks
> -- PMM
next prev parent reply other threads:[~2018-11-22 3:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 10:29 [Qemu-devel] [PATCH RESEND v15 00/10] Add ARMv8 RAS virtualization support in QEMU Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 01/10] ACPI: add some GHES structures and macros definition Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 02/10] acpi: add build_append_ghes_notify() helper for Hardware Error Notification Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 03/10] acpi: add build_append_ghes_generic_data() helper for Generic Error Data Entry Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 04/10] acpi: add build_append_ghes_generic_status() helper for Generic Error Status Block Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 05/10] ACPI: Add APEI GHES table generation and CPER record support Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 06/10] docs: APEI GHES generation and CPER record description Dongjiu Geng
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 07/10] KVM: Move related hwpoison page functions to accel/kvm/ folder Dongjiu Geng
2018-11-20 14:57 ` Peter Maydell
2018-11-21 12:01 ` [Qemu-devel] 答复: " gengdongjiu
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 08/10] target-arm: kvm64: inject synchronous External Abort Dongjiu Geng
2018-11-20 15:07 ` Peter Maydell
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 09/10] hw/arm/virt: Add RAS platform version for migration Dongjiu Geng
2018-11-20 15:00 ` Peter Maydell
2018-11-08 10:29 ` [Qemu-devel] [PATCH RESEND v15 10/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM Dongjiu Geng
2018-11-20 15:15 ` Peter Maydell
2018-11-22 3:05 ` gengdongjiu [this message]
2018-11-22 10:28 ` [Qemu-devel] 答复: " Peter Maydell
2018-11-22 10:30 ` Peter Maydell
2018-11-08 22:42 ` [Qemu-devel] [PATCH RESEND v15 00/10] Add ARMv8 RAS virtualization support in QEMU no-reply
2018-11-08 22:52 ` no-reply
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=0184EA26B2509940AA629AE1405DD7F201F7D7EB@DGGEMA503-MBX.china.huawei.com \
--to=gengdongjiu@huawei.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=marc.zyngier@arm.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=shannon.zhaosl@gmail.com \
--cc=zhengxiang9@huawei.com \
/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).