|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH xenbus 4/4] Provide a registry override to disable use of per-vcpu event channel upcalls
From: Paul Durrant <pdurrant@xxxxxxxxxx>
There is already a REG_DWORD (UseEvtchnFifoAbi) to disable use of FIFO event
channels and force a fall-back to 2-level. This patch adds another
(UseEvtchnUpcall) to disable use of per-vcpu upcalls and force a fall-back to
the callback via.
Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
src/xenbus/evtchn.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c
index 46227725e237..f2cd61b175b9 100644
--- a/src/xenbus/evtchn.c
+++ b/src/xenbus/evtchn.c
@@ -114,6 +114,7 @@ struct _XENBUS_EVTCHN_CONTEXT {
PXENBUS_EVTCHN_ABI_CONTEXT EvtchnFifoContext;
XENBUS_EVTCHN_ABI EvtchnAbi;
BOOLEAN UseEvtchnFifoAbi;
+ BOOLEAN UseEvtchnUpcall;
PXENBUS_HASH_TABLE Table;
LIST_ENTRY List;
};
@@ -1271,6 +1272,12 @@ EvtchnInterruptEnable(
Trace("====>\n");
+ if (!Context->UseEvtchnUpcall)
+ {
+ Info("PER-CPU UPCALL DISABLED\n");
+ goto line;
+ }
+
for (Cpu = 0; Cpu < Context->ProcessorCount; Cpu++) {
PXENBUS_EVTCHN_PROCESSOR Processor;
unsigned int vcpu_id;
@@ -1306,6 +1313,7 @@ EvtchnInterruptEnable(
Processor->UpcallEnabled = TRUE;
}
+line:
Line = FdoGetInterruptLine(Context->Fdo, Context->Interrupt);
status = HvmSetParam(HVM_PARAM_CALLBACK_IRQ, Line);
@@ -1840,6 +1848,7 @@ EvtchnInitialize(
{
HANDLE ParametersKey;
ULONG UseEvtchnFifoAbi;
+ ULONG UseEvtchnUpcall;
NTSTATUS status;
Trace("====>\n");
@@ -1873,6 +1882,14 @@ EvtchnInitialize(
(*Context)->UseEvtchnFifoAbi = (UseEvtchnFifoAbi != 0) ? TRUE : FALSE;
+ status = RegistryQueryDwordValue(ParametersKey,
+ "UseEvtchnUpcall",
+ &UseEvtchnUpcall);
+ if (!NT_SUCCESS(status))
+ UseEvtchnUpcall = 1;
+
+ (*Context)->UseEvtchnUpcall = (UseEvtchnUpcall != 0) ? TRUE : FALSE;
+
status = SuspendGetInterface(FdoGetSuspendContext(Fdo),
XENBUS_SUSPEND_INTERFACE_VERSION_MAX,
(PINTERFACE)&(*Context)->SuspendInterface,
@@ -2082,6 +2099,7 @@ EvtchnTeardown(
RtlZeroMemory(&Context->SuspendInterface,
sizeof (XENBUS_SUSPEND_INTERFACE));
+ Context->UseEvtchnUpcall = FALSE;
Context->UseEvtchnFifoAbi = FALSE;
EvtchnFifoTeardown(Context->EvtchnFifoContext);
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |