Re: [PATCH 6/6] target/ppc: Add mce_req_event() handler to PPCVirtualHypervisorClass

2020-12-10 Thread Greg Kurz
On Thu, 10 Dec 2020 14:54:08 +1100 David Gibson wrote: > On Wed, Dec 09, 2020 at 06:00:52PM +0100, Greg Kurz wrote: > > kvm_handle_nmi() directly calls spapr_mce_req_event() which is machine > > level code. Apart from being ugly, this forces spapr_mce_req_event() > > to rely on qdev_get_machine()

Re: [PATCH 6/6] target/ppc: Add mce_req_event() handler to PPCVirtualHypervisorClass

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 06:00:52PM +0100, Greg Kurz wrote: > kvm_handle_nmi() directly calls spapr_mce_req_event() which is machine > level code. Apart from being ugly, this forces spapr_mce_req_event() > to rely on qdev_get_machine() to get a pointer to the machine state. > This is a bit unfortuna

[PATCH 6/6] target/ppc: Add mce_req_event() handler to PPCVirtualHypervisorClass

2020-12-09 Thread Greg Kurz
kvm_handle_nmi() directly calls spapr_mce_req_event() which is machine level code. Apart from being ugly, this forces spapr_mce_req_event() to rely on qdev_get_machine() to get a pointer to the machine state. This is a bit unfortunate since POWER CPUs have a backlink to the virtual hypervisor, whic