]> www.infradead.org Git - users/dwmw2/qemu.git/commit
i386/xen: fix per-vCPU upcall vector for Xen emulation
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 11 Oct 2023 22:30:08 +0000 (23:30 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 25 Oct 2023 11:45:21 +0000 (12:45 +0100)
commitf03de53962271dd03d4b33553a460fc7c61f9a4f
treec08549b6dba339c1f496b4d0be3c2e0affdda7dc
parent614a957c64bffe310ab237a6b62988810a7490e8
i386/xen: fix per-vCPU upcall vector for Xen emulation

The per-vCPU upcall vector support had three problems. Firstly it was
using the wrong hypercall argument and would always return -EFAULT when
the guest tried to set it up. Secondly it was using the wrong ioctl() to
pass the vector to the kernel and thus the *kernel* would always return
-EINVAL. Finally, even when delivering the event directly from userspace
with an MSI, it put the destination CPU ID into the wrong bits of the
MSI address.

Linux doesn't (yet) use this mode so it went without decent testing
for a while.

Fixes: 105b47fdf2d0 ("i386/xen: implement HVMOP_set_evtchn_upcall_vector")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
target/i386/kvm/xen-emu.c