[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170329154539-mutt-send-email-mst@kernel.org>
Date: Wed, 29 Mar 2017 15:51:44 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Laszlo Ersek <lersek@...hat.com>
Cc: Achin Gupta <achin.gupta@....com>,
gengdongjiu <gengdongjiu@...wei.com>, ard.biesheuvel@...aro.org,
edk2-devel@...ts.01.org, qemu-devel@...gnu.org,
zhaoshenglong@...wei.com, James Morse <james.morse@....com>,
Christoffer Dall <cdall@...aro.org>, xiexiuqi@...wei.com,
Marc Zyngier <marc.zyngier@....com>, catalin.marinas@....com,
will.deacon@....com, christoffer.dall@...aro.org,
rkrcmar@...hat.com, suzuki.poulose@....com, andre.przywara@....com,
mark.rutland@....com, vladimir.murzin@....com,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
wangxiongfeng2@...wei.com, wuquanming@...wei.com,
huangshaoyu@...wei.com, Leif.Lindholm@...aro.com, nd@....com,
Igor Mammedov <imammedo@...hat.com>
Subject: Re: [PATCH] kvm: pass the virtual SEI syndrome to guest OS
On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote:
> (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come
> through a signalfd -- QEMU can format the CPER right into guest memory,
> and then inject whatever interrupt (or assert whatever GPIO line) is
> necessary for notifying the guest.
I think I see a race condition potential - what if guest accesses
CPER in guest memory while it's being written?
We can probably use another level of indirection to fix this:
allocate twice the space, add a pointer to where the valid
table is located and update that after writing CPER completely.
The pointer can be written atomically but also needs to
be read atomically, so I suspect it should be a single byte
as we don't know how are OSPMs implementing this.
--
MST
Powered by blists - more mailing lists