x86/PV32: fix physdev_op_compat handling
PATCH v2 1/1 x86/PV32: fix physdev_op_compat handling
The conversion of the original code failed to recognize that the 32-bit compat variant of this (sorry, two different meanings of "compat" here) needs to continue to invoke the compat handler, not the native one. Arrange for this by adding yet another #define.
Affected functions (having existed prior to the introduction of the new hypercall) are PHYSDEVOP_set_iobitmap and PHYSDEVOP_apic_{read,write}. For all others the operand struct layout doesn't differ.
---
v2: Don't remove do_physdev_op override.
xen/arch/x86/x86_64/compat.c +1 -0
@@ -12,6 +12,7 @@ EMIT_FILE;#define physdev_op_t physdev_op_compat_t#define do_physdev_op compat_physdev_op#define do_physdev_op_compat (x) compat_physdev_op_compat(_##x) +#define native compat#define COMPAT #define _XEN_GUEST_HANDLE (t) XEN_GUEST_HANDLE(t)
Quoted 11 lines · Jan Beulich
The conversion of the original code failed to recognize that the 32-bit compat variant of this (sorry, two different meanings of "compat" here) needs to continue to invoke the compat handler, not the native one. Arrange for this by adding yet another #define.
Affected functions (having existed prior to the introduction of the new hypercall) are
PHYSDEVOP_set_iobitmapand PHYSDEVOP_apic_{read,write}. For all others the operand struct layout doesn't differ.Fixes 1252e2823117 ("x86/pv: Export pv_hypercall_table[] rather than working around it in several ways")Signed-off-by Jan Beulich <[email protected]>
Thanks, Roger.
Andrew Cooper
Reviewed-byQuoted 6 lines · Roger Pau Monné
Quoted 5 lines · Jan Beulich
The conversion of the original code failed to recognize that the 32-bit compat variant of this (sorry, two different meanings of "compat" here) needs to continue to invoke the compat handler, not the native one. Arrange for this by adding yet another #define.
Quoted 7 lines
Quoted 6 lines
Affected functions (having existed prior to the introduction of the new hypercall) are
PHYSDEVOP_set_iobitmapand PHYSDEVOP_apic_{read,write}. For all others the operand struct layout doesn't differ.Fixes 1252e2823117 ("x86/pv: Export pv_hypercall_table[] rather than working around it in several ways")Signed-off-by Jan Beulich <[email protected]>Reviewed-by Roger Pau Monné <[email protected]>