x86/hvm: Partially revert ("xen/mem_access: wrap memory access when VM_EVENT=n")

It is erroneous to check current like this; most commonly, introspection is
dom0 issuing hypercalls against domU.

The use of vm_event_is_enabled() is only for the IS_ENABLED(CONFIG_VM_EVENT)
short circut, so just use that directly.

Reported-by: Hady Azzam <hadyazzam@protonmail.com>
Fixes: b18e38e42d ("xen/mem_access: wrap memory access when VM_EVENT=n")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Tested-by: Hady Azzam <hadyazzam@protonmail.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
Andrew Cooper committed 2026-06-08 10:07:05 +01:00
1 parent 188d530529
commit d2ddd2beff
1 file changed
+3 -3
+3 -3
View File
@@ -4789,7 +4789,7 @@ static int do_altp2m_op(
break;
case HVMOP_altp2m_set_mem_access:
if ( !vm_event_is_enabled(current) )
if ( !IS_ENABLED(CONFIG_VM_EVENT) )
{
rc = -EOPNOTSUPP;
break;
@@ -4804,7 +4804,7 @@ static int do_altp2m_op(
break;
case HVMOP_altp2m_set_mem_access_multi:
if ( !vm_event_is_enabled(current) )
if ( !IS_ENABLED(CONFIG_VM_EVENT) )
{
rc = -EOPNOTSUPP;
break;
@@ -4841,7 +4841,7 @@ static int do_altp2m_op(
break;
case HVMOP_altp2m_get_mem_access:
if ( !vm_event_is_enabled(current) )
if ( !IS_ENABLED(CONFIG_VM_EVENT) )
{
rc = -EOPNOTSUPP;
break;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.