From 0356e6b10f6a86528046734065c2dd9a2121f20c Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Mon, 11 May 2015 10:39:07 +0200 Subject: [PATCH] x86/hvm: add store and console event channel params to white-list My recent patch "use white-lists for HVM param guest accessibility checks" (commit 30efda12d63ff536102ed8e580b4c09765683b44) introduced a regression when saving and restoring Windows guests running Xen Project PV drivers. The drivers reset the event channel ABI on resume. This has the effect of closing the store and console local event channel ports created by the toolstack. The drivers do not currently use the console port but they do use the store port and thus, prior to reset, they sample the remote domain and port and then re-bind the channel - yielding a new and possibly different local port - after reset. They then store the new local port value in HVM_PARAM_CONSOLE_EVTCHN. That operation now fails and may lead to a crash, if using a debug build of the drivers, or a barely functional connection to xentored if not. This patch adds HVM_PARAM_STORE_EVTCHN and HVM_PARAM_CONSOLE_EVTCHN to the guest-settable white-list since either of them can be invalidated by an event channel ABI reset and thus the guest may indeed need to write new values to them to make them valid again. Signed-off-by: Paul Durrant Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/hvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 371fd33ed3..78b0efb8bf 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -5632,6 +5632,8 @@ static int hvm_allow_set_param(struct domain *d, case HVM_PARAM_VM86_TSS: case HVM_PARAM_ACPI_IOPORTS_LOCATION: case HVM_PARAM_VM_GENERATION_ID_ADDR: + case HVM_PARAM_STORE_EVTCHN: + case HVM_PARAM_CONSOLE_EVTCHN: break; /* * The following parameters must not be set by the guest -- 2.39.5