[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] 答复: [PATCH RESEND v15 10/10] target-arm: kvm64: handle SIGB
From: |
gengdongjiu |
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 |
> >
> > +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
- Re: [Qemu-devel] [PATCH RESEND v15 09/10] hw/arm/virt: Add RAS platform version for migration, (continued)
- [Qemu-devel] [PATCH RESEND v15 01/10] ACPI: add some GHES structures and macros definition, Dongjiu Geng, 2018/11/08
- [Qemu-devel] [PATCH RESEND v15 08/10] target-arm: kvm64: inject synchronous External Abort, Dongjiu Geng, 2018/11/08
- [Qemu-devel] [PATCH RESEND v15 07/10] KVM: Move related hwpoison page functions to accel/kvm/ folder, Dongjiu Geng, 2018/11/08
- [Qemu-devel] [PATCH RESEND v15 06/10] docs: APEI GHES generation and CPER record description, Dongjiu Geng, 2018/11/08
- [Qemu-devel] [PATCH RESEND v15 10/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM, Dongjiu Geng, 2018/11/08
Re: [Qemu-devel] [PATCH RESEND v15 00/10] Add ARMv8 RAS virtualization support in QEMU, no-reply, 2018/11/08
Re: [Qemu-devel] [PATCH RESEND v15 00/10] Add ARMv8 RAS virtualization support in QEMU, no-reply, 2018/11/08