]> git.ipfire.org Git - thirdparty/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)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 9 Nov 2023 13:39:13 +0000 (16:39 +0300)
commit91d789a891a45ea92f5d385f64db2d8d644a077b
treecbd6f4da070a2c426bc02247ce72de367b3f8200
parent3321ec125f06b116c4baf9da7568b7c69fa34813
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.

Cc: qemu-stable@nongnu.org
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>
(cherry picked from commit e7dbb62ff19ce55548c785d76e814e7b144e6217)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/i386/kvm/xen-emu.c