xen/vm-event: Drop unused u_domctl parameter from vm_event_domctl()

This parameter isn't used at all.  Futhermore, elide the copyback in
failing cases, as it is only successful paths which generate data which
needs sending back to the caller.

Finally, drop a redundant d == NULL check, as that logic is all common
at the begining of do_domctl().

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2019-06-04 14:43:51 +01:00
1 parent 844aa0a13d
commit 48b8424945
3 files changed
+5 -10

No files matched your search

+3 -3
View File
@@ -1018,9 +1018,9 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
break;
case XEN_DOMCTL_vm_event_op:
ret = vm_event_domctl(d, &op->u.vm_event_op,
guest_handle_cast(u_domctl, void));
copyback = 1;
ret = vm_event_domctl(d, &op->u.vm_event_op);
if ( ret == 0 )
copyback = true;
break;
#ifdef CONFIG_MEM_ACCESS
+1 -5
View File
@@ -583,8 +583,7 @@ void vm_event_cleanup(struct domain *d)
#endif
}
int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec,
XEN_GUEST_HANDLE_PARAM(void) u_domctl)
int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec)
{
int rc;
@@ -594,9 +593,6 @@ int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec,
return 0;
}
if ( unlikely(d == NULL) )
return -ESRCH;
rc = xsm_vm_event_control(XSM_PRIV, d, vec->mode, vec->op);
if ( rc )
return rc;
+1 -2
View File
@@ -64,8 +64,7 @@ void vm_event_cancel_slot(struct domain *d, struct vm_event_domain *ved);
void vm_event_put_request(struct domain *d, struct vm_event_domain *ved,
vm_event_request_t *req);
int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec,
XEN_GUEST_HANDLE_PARAM(void) u_domctl);
int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec);
void vm_event_vcpu_pause(struct vcpu *v);
void vm_event_vcpu_unpause(struct vcpu *v);
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.