mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
188d530529
commit
d2ddd2beff
1 file changed
+3
-3
@@ -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;
|
||||
|
||||