From: Kazuto Yoshino <yoshink@alpha.co.jp>
To: xen-devel@lists.xen.org, yoshink@alpha.co.jp
Subject: [SOLVED] GPLPV SCSI passthrough does not working
Date: Fri, 08 Jun 2012 22:37:13 +0900 [thread overview]
Message-ID: <4FD20009.7000302@alpha.co.jp> (raw)
Hi all,
SCSI passthrough of DVD drive is tried on Windows.
If vcpus=1 is used, it works.
However, if vcpus=2 is used, it does not work.
The log is as follows.
Hardware:
DELL Optiplex 990
Intel Core i5 2500
Software:
xen 4.2-unstable (25452:6bea63e6c780)
dom0: Linux 3.1.0-rc10+ 64bit
domU: Windows 7 SP1 64bit
GPLPV 0.10.0.357
domU config:
kernel = "hvmloader"
builder='hvm'
memory = 2048
name = "win7x64"
vcpus=2
vif = [ 'type=ioemu, mac=00:16:3e:19:18:7b, bridge=virbr0' ]
disk = [ 'file:/etc/xen/win7x64.img,hda,w' ]
device_model = 'qemu-dm'
sdl=0
opengl=1
vnc=1
vnclisten="0.0.0.0"
vncpasswd=''
stdvga=0
serial='pty'
tsc_mode=0
command:
# xm create /etc/xen/win7x64.hvm
# xm scsi-attach win7x64 1:0:0:0 2:0:0:0
qemu-dm log:
12983594247656: XenPCI --> XenPci_DeviceWatchHandler
12983594247656: XenPCI Rescanning child list
12983594247656: XenPCI --> XenPci_EvtChildListScanForChildren
12983594247656: XenPCI Found path = device/vbd/768
12983594247656: XenPCI Found path = device/vif/0
12983594247671: XenPCI Found path = device/vscsi/2
12983594247671: XenPCI <-- XenPci_EvtChildListScanForChildren
12983594247671: XenPCI --> XenPci_EvtChildListCreateDevice
12983594247671: XenPCI <-- XenPci_DeviceWatchHandler
12983594247671: XenPCI device = 'vscsi', index = '2', path =
'device/vscsi/2'
12983594247671: XenPCI --> XenPci_DeviceWatchHandler
12983594247671: XenPCI <-- XenPci_EvtChildListCreateDevice
12983594247671: XenPCI <-- XenPci_DeviceWatchHandler
12983594247671: XenPCI --> XenPciPdo_EvtDeviceWdmIrpPreprocess_START_DEVICE
12983594247671: XenPCI --> XenPci_DeviceWatchHandler
12983594247671: XenPCI device/vscsi/2
12983594247671: XenPCI <-- XenPci_DeviceWatchHandler
12983594247671: XenPCI CmResourceTypeMemory (0)
12983594247671: XenPCI --> XenPci_DeviceWatchHandler
12983594247671: XenPCI Start = f2000000, Length = 0
12983594247671: XenPCI <-- XenPci_DeviceWatchHandler
12983594247687: XenPCI pfn[0] = 0000d445
12983594247687: XenPCI New Start = 000000000d445000, Length = 4096
12983594247687: XenPCI CmResourceTypeMemory (1)
12983594247687: XenPCI Start = f2000001, Length = 0
12983594247687: XenPCI <-- XenPciPdo_EvtDeviceWdmIrpPreprocess_START_DEVICE
12983594247687: XenPCI --> XenPciPdo_EvtDevicePrepareHardware
12983594247687: XenPCI <-- XenPciPdo_EvtDevicePrepareHardware
12983594247687: XenPCI --> XenPciPdo_EvtDeviceD0Entry
12983594247687: XenPCI path = device/vscsi/2
12983594247687: XenPCI WdfPowerDeviceD3Final
12983594247687: XenPCI --> XenPci_GetBackendAndAddWatch
12983594247687: XenPCI <-- XenPci_GetBackendAndAddWatch
12983594247687: XenPCI --> XenPci_UpdateBackendState
12983594247687: XenPCI --> XenConfig_InitConfigPage
12983594247687: XenPCI Backend State Changed to InitWait
12983594247687: XenPCI fdo_driver_object = FFFFFA80025B9E70
12983594247687: XenPCI <-- XenPci_UpdateBackendState
12983594247687: XenPCI fdo_driver_extension = FFFFFA8001869010
12983594247703: XenPCI <-- XenConfig_InitConfigPage
12983594247703: XenPCI --> XenPci_XenConfigDeviceSpecifyBuffers
12983594247703: XenPCI XEN_INIT_TYPE_RING - ring-ref = FFFFFA8002AB9000
12983594247703: XenPCI XEN_INIT_TYPE_RING - ring-ref = 16383
12983594247703: XenPCI --> XenPci_DeviceWatchHandler
12983594247703: XenPCI XEN_INIT_TYPE_EVENT_CHANNEL - event-channel = 8
12983594247703: XenPCI <-- XenPci_DeviceWatchHandler
12983594247703: XenPCI --> EvtChn_BindIrq
12983594247703: XenPCI --> XenPci_DeviceWatchHandler
12983594247703: XenPCI <-- EvtChn_BindIrq
12983594247703: XenPCI <-- XenPci_DeviceWatchHandler
12983594247703: XenPCI --> XenPci_ChangeFrontendStateMap
12983594247703: XenPCI --> XenPci_ChangeFrontendState
12983594247703: XenPCI --> XenPci_DeviceWatchHandler
12983594247703: XenPCI <-- XenPci_DeviceWatchHandler
12983594247703: XenPCI --> XenPci_UpdateBackendState
12983594247718: XenPCI Backend State Changed to Connected
12983594247718: XenPCI <-- XenPci_UpdateBackendState
12983594247718: XenPCI <-- XenPci_ChangeFrontendState
12983594247718: XenPCI <-- XenPci_ChangeFrontendStateMap
12983594247718: XenPCI --> XenPci_ChangeFrontendStateMap
12983594247718: XenPCI --> XenPci_ChangeFrontendState
12983594247734: XenPCI <-- XenPci_ChangeFrontendState
12983594247734: XenPCI --> XenPci_DeviceWatchHandler
12983594247734: XenPCI <-- XenPci_ChangeFrontendStateMap
12983594247734: XenPCI <-- XenPci_DeviceWatchHandler
12983594247734: XenPCI <-- XenPci_XenConfigDeviceSpecifyBuffers
12983594247734: XenPCI <-- XenPciPdo_EvtDeviceD0Entry
12983594247734: XenSCSI --> XenScsi_HwScsiFindAdapter
12983594247734: XenSCSI IRQL = 0
12983594247734: XenSCSI BusInterruptLevel = 28
12983594247734: XenSCSI BusInterruptVector = 01c
12983594247734: XenSCSI RangeStart = 0d445000, RangeLength = 00001000
12983594247734: XenSCSI XEN_INIT_TYPE_13
12983594247734: XenSCSI XEN_INIT_TYPE_VECTORS
12983594247734: XenSCSI XEN_INIT_TYPE_11
12983594247734: XenSCSI XEN_INIT_TYPE_RING - ring-ref = FFFFFA8002AB9000
12983594247734: XenSCSI XEN_INIT_TYPE_EVENT_CHANNEL - event-channel = 8
12983594247750: XenSCSI XEN_INIT_TYPE_GRANT_ENTRIES - 144
12983594247750: XenSCSI Dma64BitAddresses supported
12983594247750: XenPCI --> XenPci_XenBus_AddWatch
12983594247750: XenPCI XenPci_XenBus_AddWatch -
/local/domain/0/backend/vscsi/3/2/vscsi-devs = NULL
12983594247750: XenSCSI --> XenScsi_DevWatch
12983594247750: XenPCI <-- XenPci_XenBus_AddWatch
12983594247750: XenSCSI Waiting for pause...
12983594247750: XenSCSI <-- XenScsi_HwScsiFindAdapter
12983594247750: XenSCSI --> XenScsi_HwScsiInitialize
12983594247750: XenSCSI <-- XenScsi_HwScsiInitialize
12983594247750: XenSCSI --> XenScsi_HwScsiAdapterControl
12983594247750: XenSCSI IRQL = 0
12983594247750: XenSCSI ScsiQuerySupportedControlTypes (Max = 5)
12983594247750: XenSCSI <-- XenScsi_HwScsiAdapterControl
12983594247750: XenSCSI Busy
12983594247859: XenSCSI Waiting for pause...
12983594247968: XenSCSI Waiting for pause...
12983594248078: XenSCSI Waiting for pause...
12983594248187: XenSCSI Waiting for pause...
12983594248296: XenSCSI Waiting for pause...
12983594248406: XenSCSI Waiting for pause...
12983594248515: XenSCSI Waiting for pause...
12983594248625: XenSCSI Waiting for pause...
12983594248734: XenSCSI Waiting for pause...
12983594248843: XenSCSI Waiting for pause...
It worked, when correcting the source code of GPLPV as follows.
--- a/xenscsi/xenscsi.c
+++ b/xenscsi/xenscsi.c
@@ -278,17 +278,27 @@
/* this can only be called from a watch and so is always serialised */
FUNCTION_ENTER();
- #if DBG
- oldpause =
- #endif
- InterlockedExchange(&xsdd->shared_paused,
SHARED_PAUSED_PASSIVE_PAUSED);
- ASSERT(oldpause == SHARED_PAUSED_SCSIPORT_UNPAUSED);
-
- while (InterlockedCompareExchange(&xsdd->shared_paused,
SHARED_PAUSED_SCSIPORT_PAUSED, SHARED_PAUSED_SCSIPORT_PAUSED) !=
SHARED_PAUSED_SCSIPORT_PAUSED)
+ while (1)
{
- KdPrint((__DRIVER_NAME " Waiting for pause...\n"));
- wait_time.QuadPart = -100 * 1000 * 10; /* 100ms */
- KeDelayExecutionThread(KernelMode, FALSE, &wait_time);
+ if (InterlockedCompareExchange(&xsdd->shared_paused,
SHARED_PAUSED_SCSIPORT_UNPAUSED, SHARED_PAUSED_SCSIPORT_UNPAUSED) ==
SHARED_PAUSED_SCSIPORT_UNPAUSED)
+ {
+ #if DBG
+ oldpause =
+ #endif
+ InterlockedExchange(&xsdd->shared_paused,
SHARED_PAUSED_PASSIVE_PAUSED);
+ ASSERT(oldpause == SHARED_PAUSED_SCSIPORT_UNPAUSED);
+ }
+
+ if (InterlockedCompareExchange(&xsdd->shared_paused,
SHARED_PAUSED_SCSIPORT_PAUSED, SHARED_PAUSED_SCSIPORT_PAUSED) !=
SHARED_PAUSED_SCSIPORT_PAUSED)
+ {
+ KdPrint((__DRIVER_NAME " Waiting for pause...\n"));
+ wait_time.QuadPart = -100 * 1000 * 10; /* 100ms */
+ KeDelayExecutionThread(KernelMode, FALSE, &wait_time);
+ }
+ else
+ {
+ break;
+ }
}
KdPrint((__DRIVER_NAME " Watch triggered on %s\n", path));
Thanks,
Kazuto Yoshino.
next reply other threads:[~2012-06-08 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 13:37 Kazuto Yoshino [this message]
2012-06-10 4:49 ` [SOLVED] GPLPV SCSI passthrough does not working James Harper
2012-06-11 1:53 ` Kazuto Yoshino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD20009.7000302@alpha.co.jp \
--to=yoshink@alpha.co.jp \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.