diff --git a/drivers/serial/uart_hvc_xen.c b/drivers/serial/uart_hvc_xen.c index 3911fbfae4..fc26e79f13 100644 --- a/drivers/serial/uart_hvc_xen.c +++ b/drivers/serial/uart_hvc_xen.c @@ -233,14 +233,14 @@ int xen_console_init(const struct device *dev) data->dev = dev; - ret = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &data->evtchn); + ret = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, DOMID_SELF, &data->evtchn); if (ret) { LOG_ERR("%s: failed to get Xen console evtchn, ret = %d\n", __func__, ret); return ret; } - ret = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &console_pfn); + ret = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, DOMID_SELF, &console_pfn); if (ret) { LOG_ERR("%s: failed to get Xen console PFN, ret = %d\n", __func__, ret); diff --git a/drivers/xen/hvm.c b/drivers/xen/hvm.c index 67c254a8bb..5244d34d43 100644 --- a/drivers/xen/hvm.c +++ b/drivers/xen/hvm.c @@ -11,23 +11,23 @@ #include -int hvm_set_parameter(int idx, uint64_t value) +int hvm_set_parameter(int idx, int domid, uint64_t value) { struct xen_hvm_param xhv; - xhv.domid = DOMID_SELF; + xhv.domid = domid; xhv.index = idx; xhv.value = value; return HYPERVISOR_hvm_op(HVMOP_set_param, &xhv); } -int hvm_get_parameter(int idx, uint64_t *value) +int hvm_get_parameter(int idx, int domid, uint64_t *value) { int ret = 0; struct xen_hvm_param xhv; - xhv.domid = DOMID_SELF; + xhv.domid = domid; xhv.index = idx; ret = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); diff --git a/include/zephyr/xen/hvm.h b/include/zephyr/xen/hvm.h index 968abf01c1..1848705975 100644 --- a/include/zephyr/xen/hvm.h +++ b/include/zephyr/xen/hvm.h @@ -11,7 +11,7 @@ #include -int hvm_set_parameter(int idx, uint64_t value); -int hvm_get_parameter(int idx, uint64_t *value); +int hvm_set_parameter(int idx, int domid, uint64_t value); +int hvm_get_parameter(int idx, int domid, uint64_t *value); #endif /* __XEN_HVM_H__ */