+++ /dev/null
-#!python -u
-
-import os, sys
-import datetime
-import re
-import glob
-import tarfile
-import subprocess
-
-def shell(command):
- print(command)
- sys.stdout.flush()
-
- pipe = os.popen(command, 'r', 1)
-
- for line in pipe:
- print(line.rstrip())
-
- return pipe.close()
-
-
-class msbuild_failure(Exception):
- def __init__(self, value):
- self.value = value
- def __str__(self):
- return repr(self.value)
-
-def msbuild(name, target, args):
- cwd = os.getcwd()
-
- os.environ['PLATFORM'] = 'x64'
- os.environ['CONFIGURATION'] = 'Windows 8 Release'
- os.environ['TARGET'] = target
- os.environ['BUILD_FILE'] = name + '.vcxproj'
- os.environ['BUILD_ARGS'] = args
-
- os.chdir('proj')
- os.chdir(name)
- status = shell('..\\msbuild.bat')
- os.chdir(cwd)
-
-# if (status != None):
-# raise msbuild_failure(sdv_arg)
-
-
-if __name__ == '__main__':
- msbuild('xencrsh', 'sdv', '/p:Inputs="/clean"')
- msbuild('xenvbd', 'sdv', '/p:Inputs="/clean"')
- msbuild('xencrsh', 'sdv', '/p:Inputs="/check:default.sdv"')
- msbuild('xenvbd', 'sdv', '/p:Inputs="/check:default.sdv"')
- msbuild('xencrsh', 'dvl', '')
- msbuild('xenvbd', 'dvl', '')
-#archive the dvl.xmls
IN PXENBUS_DEBUG_CALLBACK Callback
)
{
- ULONG Index;
+ ULONG Index;
+ PXENVBD_GRANTER Granter = FrontendGetGranter(BlockRing->Frontend);
DEBUG(Printf, Debug, Callback,
- "BLOCKRING: Requests : %d / %d / %d\n",
+ "BLOCKRING: Requests : %d / %d / %d\n",
BlockRing->Outstanding,
BlockRing->Submitted,
BlockRing->Recieved);
if (BlockRing->SharedRing) {
DEBUG(Printf, Debug, Callback,
"BLOCKRING: SharedRing : %d / %d - %d / %d\n",
- BlockRing->SharedRing->req_prod,
- BlockRing->SharedRing->req_event,
- BlockRing->SharedRing->rsp_prod,
+ BlockRing->SharedRing->req_prod,
+ BlockRing->SharedRing->req_event,
+ BlockRing->SharedRing->rsp_prod,
BlockRing->SharedRing->rsp_event);
}
DEBUG(Printf, Debug, Callback,
- "BLOCKRING: FrontRing : %d / %d (%d)\n",
+ "BLOCKRING: FrontRing : %d / %d (%d)\n",
BlockRing->FrontRing.req_prod_pvt,
- BlockRing->FrontRing.rsp_cons,
+ BlockRing->FrontRing.rsp_cons,
BlockRing->FrontRing.nr_ents);
DEBUG(Printf, Debug, Callback,
- "BLOCKRING: Order : %d\n",
+ "BLOCKRING: Order : %d\n",
BlockRing->Order);
for (Index = 0; Index < (1ul << BlockRing->Order); ++Index) {
DEBUG(Printf, Debug, Callback,
- "BLOCKRING: Grants[%-2d] : %d\n",
- Index, BlockRing->Grants[Index]);
+ "BLOCKRING: Grants[%-2d] : 0x%p (%u)\n",
+ Index,
+ BlockRing->Grants[Index],
+ GranterReference(Granter, BlockRing->Grants[Index]));
}
BlockRing->Submitted = BlockRing->Recieved = 0;
static DECLSPEC_NOINLINE BOOLEAN
__IsOnList(
IN PLIST_ENTRY ListHead,
- IN PLIST_ENTRY ListItem
+ IN PLIST_ENTRY ListItem,
+ IN BOOLEAN Locked
)
{
+ KIRQL Irql;
PLIST_ENTRY Entry;
+ BOOLEAN Found = FALSE;
+
+ if (!Locked)
+ KeAcquireSpinLock(&__Buffer.Lock, &Irql);
+
+ ASSERT3P(ListHead, !=, NULL);
+ ASSERT3P(ListItem, !=, NULL);
+ ASSERT3P(ListHead->Flink, !=, NULL);
+ ASSERT3P(ListHead, !=, ListItem);
+ ASSERT3U(KeGetCurrentIrql(), ==, DISPATCH_LEVEL);
for (Entry = ListHead->Flink; Entry != ListHead; Entry = Entry->Flink) {
if (Entry == ListItem) {
- return TRUE;
+ Found = TRUE;
+ break;
}
}
- return FALSE;
+
+ if (!Locked)
+ KeReleaseSpinLock(&__Buffer.Lock, Irql);
+
+ return Found;
}
#ifdef DBG
-#define IsOnList(a, b) __IsOnList(a, b)
+#define IsOnList(a, b, c) __IsOnList(a, b, c)
#else
-#define IsOnList(a, b) (TRUE)
+#define IsOnList(a, b, c) (TRUE)
#endif
static DECLSPEC_NOINLINE VOID
}
static DECLSPEC_NOINLINE PXENVBD_BUFFER
__BufferPopFreeList(
-)
+ )
{
PLIST_ENTRY Entry;
static DECLSPEC_NOINLINE VOID
__BufferPushUsedList(
IN PXENVBD_BUFFER BufferId
-)
+ )
{
ASSERT3P(BufferId->Entry.Flink, ==, NULL);
ASSERT3P(BufferId->Entry.Blink, ==, NULL);
}
static DECLSPEC_NOINLINE PXENVBD_BUFFER
__BufferPopUsedList(
-)
+ )
{
PLIST_ENTRY Entry;
{
ASSERT3P(BufferId->Entry.Flink, !=, NULL);
ASSERT3P(BufferId->Entry.Blink, !=, NULL);
- ASSERT(IsOnList(&__Buffer.UsedList, &BufferId->Entry));
+ ASSERT(IsOnList(&__Buffer.UsedList, &BufferId->Entry, TRUE));
RemoveEntryList(&BufferId->Entry);
BufferId->Entry.Flink = NULL;
ASSERT3U(Length, <=, PAGE_SIZE);
ASSERT3P(BufferId->VAddr, !=, NULL);
- ASSERT(IsOnList(&__Buffer.UsedList, &BufferId->Entry));
+ ASSERT(IsOnList(&__Buffer.UsedList, &BufferId->Entry, FALSE));
RtlCopyMemory(BufferId->VAddr, Input, Length);
}
ASSERT3U(Length, <=, PAGE_SIZE);
ASSERT3P(BufferId->VAddr, !=, NULL);
- ASSERT(IsOnList(&__Buffer.UsedList, &BufferId->Entry));
+ ASSERT(IsOnList(&__Buffer.UsedList, &BufferId->Entry, FALSE));
RtlCopyMemory(Output, BufferId->VAddr, Length);
}
)
{
DEBUG(Printf, Debug, Callback,
- "PDO: %s: %u / %u (%u failed)\n",
+ "LOOKASIDE: %s: %u / %u (%u failed)\n",
Name, Lookaside->Used,
Lookaside->Max, Lookaside->Failed);
__LookasideDebug(&Pdo->SegmentList, DebugInterface, DebugCallback, "SEGMENTs");
__LookasideDebug(&Pdo->MappingList, DebugInterface, DebugCallback, "MAPPINGs");
- FrontendDebugCallback(Pdo->Frontend, DebugInterface, DebugCallback);
QueueDebugCallback(&Pdo->FreshSrbs, "Fresh ", DebugInterface, DebugCallback);
QueueDebugCallback(&Pdo->PreparedReqs, "Prepared ", DebugInterface, DebugCallback);
QueueDebugCallback(&Pdo->SubmittedReqs, "Submitted", DebugInterface, DebugCallback);
QueueDebugCallback(&Pdo->ShutdownSrbs, "Shutdown ", DebugInterface, DebugCallback);
+ FrontendDebugCallback(Pdo->Frontend, DebugInterface, DebugCallback);
+
Pdo->BlkOpRead = Pdo->BlkOpWrite = 0;
Pdo->BlkOpIndirectRead = Pdo->BlkOpIndirectWrite = 0;
Pdo->BlkOpBarrier = Pdo->BlkOpDiscard = 0;
}
KeReleaseSpinLock(&Queue->Lock, Irql);
+ Warning("Target[%d] : Tag %x not found in submitted list\n", PdoGetTargetId(Pdo), Tag);
return NULL;
}