]> www.infradead.org Git - users/dwmw2/qemu.git/commit
i386/xen: redirect gnttab callers with XEN_EMULATE
authorJoao Martins <joao.m.martins@oracle.com>
Thu, 6 Dec 2018 15:18:20 +0000 (10:18 -0500)
committerJoao Martins <joao.m.martins@oracle.com>
Tue, 19 Feb 2019 14:00:57 +0000 (09:00 -0500)
commitd34b7cabdfa359a6ab2388e59b0aa528058d55f8
treed6bc50697ab85d925a90bc3ffe90c331491de2d7
parentfb105f4535c840709fd1adb5d375e5a15dc778e2
i386/xen: redirect gnttab callers with XEN_EMULATE

It adjust how some of the APIs in xen-backend and xen-pvdev to use the
XenBackendOps for platforms that which to emulate some of those
operations.

Meaning instead of a system call, we do it ourselves in a Qemu
equivalent implementation because Qemu will have full visibility of
the grant table frames. Hence it is pointless (and less performant)
to ask /dev/xen/gntdev to do the mapping when we can just fetch
the hva from the gpa (or @frame pointed by gref) directly.

Also, make sure that physical address is properly typed as gnt->frame
is a 32-bit type and thus when shifted by 12 can lose higher bits, hence
some of the casts to hwaddr.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
hw/xen/xen-bus.c
hw/xen/xen-legacy-backend.c
include/hw/xen/xen-bus.h
include/hw/xen/xen-legacy-backend.h
target/i386/trace-events
target/i386/xen.c