Re: A vulnerability of WindowsGuestDrivers
Hi, Thank you for reaching out. Please send the report to me. But to be clear on the indicated path - kvm-guest-drivers-windows/NetKVM/DebugTools/VirtioConsoleSimulation/ - this is not part of the actual production code or part of the code that runs in kernel. It is a legacy simulator that was used to debug virtio library and it’s code loosely based on virtio-lib, outdated and not used in production. Please send the report anyway so I could evaluate if it related to existing production code as well.. Thank you vey much, Yan Vugenfirer. On Aug 4, 2015, at 10:05 AM, security secur...@service.alibaba.com wrote: Hi team, One of our whitehats has just reported an vulnerability to us. It is an integer overflow problem of KVM WindowsGuestDrivers of VirtIO (Path: kvm-guest-drivers-windows/NetKVM/DebugTools/VirtioConsoleSimulation/). We don't know where to report this vulnerability to, so could you tell us how and to whom can we report it. Thanks! Best regards. Aliyun-Yundun-Xianzhi (http://xianzhi.aliyun.com/) -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net V2] vhost: net: switch to use data copy if pending DMAs exceed the limit
On Mar 17, 2014, at 8:43 AM, Ronen Hod r...@redhat.com wrote: On 03/13/2014 09:28 AM, Jason Wang wrote: On 03/10/2014 04:03 PM, Michael S. Tsirkin wrote: On Fri, Mar 07, 2014 at 01:28:27PM +0800, Jason Wang wrote: We used to stop the handling of tx when the number of pending DMAs exceeds VHOST_MAX_PEND. This is used to reduce the memory occupation of both host and guest. But it was too aggressive in some cases, since any delay or blocking of a single packet may delay or block the guest transmission. Consider the following setup: +-++-+ | VM1 || VM2 | +--+--++--+--+ | | +--+--++--+--+ | tap0|| tap1| +--+--++--+--+ | | pfifo_fast htb(10Mbit/s) | | +--+--+---+ | bridge | +--+--+ | pfifo_fast | +-+ | eth0|(100Mbit/s) +-+ - start two VMs and connect them to a bridge - add an physical card (100Mbit/s) to that bridge - setup htb on tap1 and limit its throughput to 10Mbit/s - run two netperfs in the same time, one is from VM1 to VM2. Another is from VM1 to an external host through eth0. - result shows that not only the VM1 to VM2 traffic were throttled but also the VM1 to external host through eth0 is also throttled somehow. This is because the delay added by htb may lead the delay the finish of DMAs and cause the pending DMAs for tap0 exceeds the limit (VHOST_MAX_PEND). In this case vhost stop handling tx request until htb send some packets. The problem here is all of the packets transmission were blocked even if it does not go to VM2. We can solve this issue by relaxing it a little bit: switching to use data copy instead of stopping tx when the number of pending DMAs exceed half of the vq size. This is safe because: - The number of pending DMAs were still limited (half of the vq size) - The out of order completion during mode switch can make sure that most of the tx buffers were freed in time in guest. So even if about 50% packets were delayed in zero-copy case, vhost could continue to do the transmission through data copy in this case. Test result: Before this patch: VM1 to VM2 throughput is 9.3Mbit/s VM1 to External throughput is 40Mbit/s CPU utilization is 7% After this patch: VM1 to VM2 throughput is 9.3Mbit/s Vm1 to External throughput is 93Mbit/s CPU utilization is 16% Completed performance test on 40gbe shows no obvious changes in both throughput and cpu utilization with this patch. The patch only solve this issue when unlimited sndbuf. We still need a solution for limited sndbuf. Cc: Michael S. Tsirkin m...@redhat.com Cc: Qin Chuanyu qinchua...@huawei.com Signed-off-by: Jason Wang jasow...@redhat.com I thought hard about this. Here's what worries me: if there are still head of line blocking issues lurking in the stack, they will still hurt guests such as windows which rely on timely completion of buffers, but it makes it that much harder to reproduce the problems with linux guests which don't. And this will make even it harder to figure out whether zero copy is actually active to diagnose high cpu utilization cases. Yes. So I think this is a good trick, but let's make this path conditional on a new debugging module parameter: how about head_of_line_blocking with default off? Sure. But the head of line blocking was only partially solved in the patch since we only support in-order completion of zerocopy packets. Maybe we need consider switching to out of order completion even for zerocopy skbs? Yan, Dima, I remember that there is an issue with out-of-order packets and WHQL. The test considers out of order packets reception as a failure. Yan. Ronen. This way if we suspect packets are delayed forever somewhere, we can enable that and see guest networking block. Additionally, I think we should add a way to count zero copy and non zero copy packets. I see two ways to implement this: add tracepoints in vhost-net or add counters in tun accessible with ethtool. This can be a patch on top and does not have to block this one though. Yes, I post a RFC about 2 years ago, see https://lkml.org/lkml/2012/4/9/478 which only traces generic vhost behaviours. I can refresh this and add some -net specific tracepoints. -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at
Re: Windows XP x64 SP2 KVM Guest Virtio Drivers
Hi, WinXP 64bit is a strange bird. Which driver did you tried to install: virtio-net, virtio-block or something else? Best regards, Yan. On Feb 14, 2014, at 3:37 AM, OwN-3m-All own3m...@gmail.com wrote: Hi Guys, Does a virtio KVM driver exist for Windows XP x64 SP2? If not, would it be possible to create one / adapt the Server 2003 version somehow? I tried using the Server 2003 x64 drivers (from http://www.linux-kvm.org/page/WindowsGuestDrivers), but they didn't work. The drivers would install, but then XP x64 would just blue screen and never boot up again. Hoping there's a driver! -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: MSI interrupt support with vioscsi.c miniport driver
Hi Nicholas, Adding Vadim Rozenfeld who wrote the virtio-scsi driver. Best regards, Yan. On Feb 7, 2014, at 10:14 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: Hi Yan, So recently I've been doing some KVM guest performance comparisons between the scsi-mq prototype using virtio-scsi + vhost-scsi, and Windows Server 2012 with vioscsi.sys (virtio-win-0.1-74.iso) + vhost-scsi using PCIe flash backend devices. I've noticed that small block random performance for the MSFT guest is at around ~80K IOPs with multiple vioscsi LUNs + adapters, which ends up being well below what the Linux guest with scsi-mq + virtio-scsi is capable of (~500K). After searching through the various vioscsi registry settings, it appears that MSIEnabled is being explicitly disabled (0x), that is different from what vioscsi.inx is currently defining: [pnpsafe_pci_addreg_msix] HKR, Interrupt Management,, 0x0010 HKR, Interrupt Management\MessageSignaledInterruptProperties,, 0x0010 HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, 0x00010001, 0 HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, 0x00010001, 4 Looking deeper at vioscsi.c code, I've noticed that MSI_SUPPORTED=0 is explicitly disabled at build time in SOURCES + vioscsi.vcxproj, as well as VioScsiFindAdapter() code always ends setting msix_enabled = FALSE here, regardless of MSI_SUPPORTED: https://github.com/YanVugenfirer/kvm-guest-drivers-windows/blob/master/vioscsi/vioscsi.c#L340 Also looking at virtio_stor.c for the raw block driver, MSI_SUPPORTED=1 appears to be the default setting for the driver included in the offical virtio-win iso builds, right..? Sooo, I'd like to try enabling MSI_SUPPORTED=1 in a test vioscsi.sys build of my own, but before going down the WDK development rabbit whole, I'd like to better understand why you've explicitly disabled this logic within vioscsi.c code to start..? Is there anything that needs to be addressed / carried over from virtio_stor.c in order to get MSI_SUPPORTED=1 to work with vioscsi.c miniport code..? TIA! --nab -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Slow TCP performance from Win2k8R2 guests under Linux KVM
Can you try the latest drivers: http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/ Best regards, Yan. On Jul 23, 2013, at 8:24 AM, Gordon Messmer wrote: On 07/21/2013 03:32 AM, Yan Vugenfirer wrote: Can you provide results with iperf or netperf? Actually, iperf seems to operate at expected speeds, while some other applications don't. I'm working on getting a list of some of the affected programs. I believe my users first reported the problem with ftp. I'll follow up as soon as possible. Thanks for the suggestion. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Slow TCP performance from Win2k8R2 guests under Linux KVM
On Jul 16, 2013, at 1:10 AM, Gordon Messmer wrote: Would anyone be so kind as to test the performance of TCP streams on Windows 2k8R2 guests of KVM virt servers? Red Hat's virtio-win-1.6.3 package was published to address a problem described as low performance on Win2k8 guests. Actual performance was not recorded in the bug report. On my KVM servers, Windows 2k8R2 guests are able to send data at less than 4Mbps. I test this by using netcat on Windows and piping a file to its input. The receiving end of the transfer is an un-virtualized CentOS system. Transfer rate is measured by selecting the stream in iptraf while it is active. Can you provide results with iperf or netperf? Thanks, Yan. UDP transfers, such as by CIFS, will send data at around 400Mbps. TCP transfers from Windows 2012 or Windows 8 are not similarly affected. The same driver for Win2k8 was published by Red Hat in virtio-win 1.6.3, 1.6.4, and 1.6.5. Does anyone see TCP transfer rates from Win2k8R2 that don't look ridiculously slow? https://bugzilla.redhat.com/show_bug.cgi?id=859882 http://rhn.redhat.com/errata/RHBA-2013-0441.html http://joncraton.org/blog/46/netcat-for-windows -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: KVM VM(windows xp) reseted when running geekbench for about 2 days
On Apr 18, 2013, at 3:55 PM, Gleb Natapov wrote: On Thu, Apr 18, 2013 at 12:00:49PM +, Zhanghaoyu (A) wrote: I start 10 VMs(windows xp), then running geekbench tool on them, about 2 days, one of them was reset, I found the reset operation is done by int kvm_cpu_exec(CPUArchState *env) { ... switch (run-exit_reason) ... case KVM_EXIT_SHUTDOWN: DPRINTF(shutdown\n); qemu_system_reset_request(); ret = EXCP_INTERRUPT; break; ... } KVM_EXIT_SHUTDOWN exit reason was set previously in triple fault handle handle_triple_fault(). How do you know that reset was done here? This is not the only place where qemu_system_reset_request() is called. Make sure XP is not set to auto-reset in case of BSOD. Best regards, Yan. What causes the triple fault? Are you asking what is triple fault or why it happened in your case? For the former see here: http://en.wikipedia.org/wiki/Triple_fault For the later it is to late to tell after VM reset. You can run QEMU with -no-reboot -no-shutdown. VM will pause instead of rebooting and then you can examine what is going on. -- Gleb. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Virtualbox svga card in KVM
On Apr 6, 2013, at 2:52 AM, Sriram Murthy wrote: For starters, virtual box has better SVGA WDDM drivers that allows for a much richer display when the VM display is local. Does it support S3 and S4 with Windows 8? Yan. I am yet to completely understand both the KVM and the virtualbox SVGA card (actually, the virtualbox SVGA card is based off of the KVM VGA card), so I may not be the authority here. -Sriram - Original Message - From: Stefan Hajnoczi stefa...@gmail.com To: Sriram Murthy srira...@yahoo.com Cc: kvm@vger.kernel.org; qemu list qemu-de...@nongnu.org Sent: Friday, April 5, 2013 12:06 AM Subject: Re: Virtualbox svga card in KVM On Thu, Mar 21, 2013 at 10:53:21AM -0400, Alon Levy wrote: I am planning on bringing in the virtualbox svga card into kvm as a new svga card type (vbox probably?) so that we can load the VirtualBox SVGA card drivers in the guest. I'm curious if the vbox SVGA card has features that existing QEMU graphics cards do not provide? Stefan -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked
On Aug 14, 2012, at 10:35 PM, Anthony Liguori wrote: Marcelo Tosatti mtosa...@redhat.com writes: On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anthony Liguori wrote: Marcelo Tosatti mtosa...@redhat.com writes: On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand if he sees the guest is panicked. We have three solutions to implement this feature: 1. use vmcall 2. use I/O port 3. use virtio-serial. We have decided to avoid touching hypervisor. The reason why I choose choose the I/O port is: 1. it is easier to implememt 2. it does not depend any virtual device 3. it can work when starting the kernel How about searching for the Kernel panic - not syncing string in the guests serial output? Say libvirtd could take an action upon that? No, this is not satisfactory. It depends on the guest OS being configured to use the serial port for console output which we cannot mandate, since it may well be required for other purposes. Please don't forget Windows guests, there is no console and no Kernel Panic string ;) What I used for debugging purposes on Windows guest is to register a bugcheck callback in virtio-net driver and write 1 to VIRTIO_PCI_ISR register. Yan. Considering whether a panic-device should cover other OSes is also \ something to consider. Even for Linux, is panic the only case which should be reported via the mechanism? What about oopses without panic? Is the mechanism general enough for supporting new events, etc. Hi, I think this discussion is gone of the deep end. Forget about !x86 platforms. They have their own way to do this sort of thing. The panic function in kernel/panic.c has the following options, which appear to be arch independent, on panic: - reboot - blink Not sure the semantics of blink but that might be a good place for a pvops hook. None are paravirtual interfaces however. Think of this feature like a status LED on a motherboard. These are very common and usually controlled by IO ports. We're simply reserving a status LED for the guest to indicate that it has paniced. Let's not over engineer this. My concern is that you end up with state that is dependant on x86. Subject: [PATCH v8 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED Having the ability to stop/restart the guest (and even introducing a new VM runstate) is more than a status LED analogy. I must admit, I don't know why a new runstate is necessary/useful. The kernel shouldn't have to care about the difference between a halted guest and a panicked guest. That level of information belongs in userspace IMHO. Can this new infrastructure be used by other architectures? I guess I don't understand why the kernel side of this isn't anything more than a paravirt op hook that does a single outb() with the remaining logic handled 100% in QEMU. Do you consider allowing support for Windows as overengineering? I don't think there is a way to hook BSOD on Windows so attempting to engineer something that works with Windows seems odd, no? Actually there is a way (http://msdn.microsoft.com/en-us/library/windows/hardware/ff553105(v=vs.85).aspx). That's what I just mentioned already done in Windows virtio-net driver. Best regards, Yan. Regards, Anthony Liguori Regards, Anthony Liguori Well, we have more than a single serial port, even when leaving virtio-serial aside... Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked
On Aug 15, 2012, at 12:56 PM, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 02:35:34PM -0500, Anthony Liguori wrote: Do you consider allowing support for Windows as overengineering? I don't think there is a way to hook BSOD on Windows so attempting to engineer something that works with Windows seems odd, no? Yan says in other email that is is possible to register a bugcheck callback. Here you go - http://msdn.microsoft.com/en-us/library/windows/hardware/ff553105(v=vs.85).aspx Already done in virtio-net for two reasons: 1. we could configure virtio-net to notify QEMU in a hacky way (write 1 to VIRTIO_PCI_ISR register) that there was a bugckeck .It was very useful debugging complex WHQL issues that involved host networking. 2. Store additional information (for example time stamps of last receive packet, last interrupt and etc) in crash dump. Yan. -- Gleb. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v8] kvm: notify host when the guest is panicked
On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand if he sees the guest is panicked. We have three solutions to implement this feature: 1. use vmcall 2. use I/O port 3. use virtio-serial. We have decided to avoid touching hypervisor. The reason why I choose choose the I/O port is: 1. it is easier to implememt 2. it does not depend any virtual device 3. it can work when starting the kernel How about searching for the Kernel panic - not syncing string in the guests serial output? Say libvirtd could take an action upon that? No, this is not satisfactory. It depends on the guest OS being configured to use the serial port for console output which we cannot mandate, since it may well be required for other purposes. Please don't forget Windows guests, there is no console and no Kernel Panic string ;) What I used for debugging purposes on Windows guest is to register a bugcheck callback in virtio-net driver and write 1 to VIRTIO_PCI_ISR register. Yan. Well, we have more than a single serial port, even when leaving virtio-serial aside... Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [NetKVM] Number of handled RX packets handled during DPC are configured through INF file and advanced tab in device manager.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit fac89bff95d612c656cdf6fce9f8e1597ae91f35 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Jul 13 14:49:49 2011 +0300 [NetKVM] Number of handled RX packets handled during DPC are configured through INF file and advanced tab in device manager. diff --git a/NetKVM/Common/ParaNdis-Common.c b/NetKVM/Common/ParaNdis-Common.c index 1a51474..af66de1 100644 --- a/NetKVM/Common/ParaNdis-Common.c +++ b/NetKVM/Common/ParaNdis-Common.c @@ -111,6 +111,7 @@ typedef struct _tagConfigurationEntries tConfigurationEntry VlanId; tConfigurationEntry UseMergeableBuffers; tConfigurationEntry MTU; + tConfigurationEntry NumberOfHandledRXPackersInDPC; }tConfigurationEntries; static const tConfigurationEntries defaultConfiguration = @@ -149,6 +150,7 @@ static const tConfigurationEntries defaultConfiguration = { VlanId, 0, 0, 4095}, { MergeableBuf, 1, 0, 1}, { MTU, 1500, 500, 65500}, + { NumberOfHandledRXPackersInDPC, MAX_RX_LOOPS, 1, 1}, }; static void ParaNdis_ResetVirtIONetDevice(PARANDIS_ADAPTER *pContext) @@ -278,6 +280,7 @@ static void ReadNicConfiguration(PARANDIS_ADAPTER *pContext, PUCHAR *ppNewMACAdd GetConfigurationEntry(cfg, pConfiguration-VlanId); GetConfigurationEntry(cfg, pConfiguration-UseMergeableBuffers); GetConfigurationEntry(cfg, pConfiguration-MTU); + GetConfigurationEntry(cfg, pConfiguration-NumberOfHandledRXPackersInDPC); #if !defined(WPP_EVENT_TRACING) bDebugPrint = pConfiguration-isLogEnabled.ulValue; @@ -290,6 +293,7 @@ static void ReadNicConfiguration(PARANDIS_ADAPTER *pContext, PUCHAR *ppNewMACAdd pContext-nEnableDPCChecker = pConfiguration-dpcChecker.ulValue; pContext-bDoInterruptRecovery = pConfiguration-InterruptRecovery.ulValue != 0; pContext-Limits.nPrintDiagnostic = pConfiguration-LogStatistics.ulValue; + pContext-uNumberOfHandledRXPacketsInDPC = pConfiguration-NumberOfHandledRXPackersInDPC.ulValue; pContext-bDoHardReset = pConfiguration-HardReset.ulValue != 0; pContext-bDoSupportPriority = pConfiguration-PrioritySupport.ulValue != 0; pContext-ulFormalLinkSpeed = pConfiguration-ConnectRate.ulValue * 100; @@ -1772,7 +1776,8 @@ ULONG ParaNdis_DPCWorkBody(PARANDIS_ADAPTER *pContext) } if (interruptSources isReceive) { - int nRestartResult = 0, nLoop = 0; + int nRestartResult = 0; + UINT nLoop = 0; do { UINT n; @@ -1788,7 +1793,7 @@ ULONG ParaNdis_DPCWorkBody(PARANDIS_ADAPTER *pContext) NdisReleaseSpinLock(pContext-ReceiveLock); DPrintf(nRestartResult ? 2 : 6, ([%s] queue restarted%s, __FUNCTION__, nRestartResult ? (Rerun) : (Done))); ++nLoop; - if (nLoop MAX_RX_LOOPS) + if (nLoop pContext-uNumberOfHandledRXPacketsInDPC) { DPrintf(0, ([%s] Breaking Rx loop on %d-th operation, __FUNCTION__, nLoop)); ParaNdis_DebugHistory(pContext, hopDPC, (PVOID)4, nRestartResult, 0, 0); diff --git a/NetKVM/wlh/netkvm.inf b/NetKVM/wlh/netkvm.inf index 8143375..752da16 100644 --- a/NetKVM/wlh/netkvm.inf +++ b/NetKVM/wlh/netkvm.inf @@ -191,6 +191,13 @@ HKR, Ndi\params\ConnectTimer, min,0, 0 HKR, Ndi\params\ConnectTimer, max,0, 30 HKR, Ndi\params\ConnectTimer, step, 0, 50 +HKR, Ndi\params\NumberOfHandledRXPackersInDPC, ParamDesc, 0, %NumberOfHandledRXPackersInDPC% +HKR, Ndi\params\NumberOfHandledRXPackersInDPC, type, 0, long +HKR, Ndi\params\NumberOfHandledRXPackersInDPC, default,0, 1000 +HKR, Ndi\params\NumberOfHandledRXPackersInDPC, min,0, 1 +HKR, Ndi\params\NumberOfHandledRXPackersInDPC, max,0, 1 +HKR, Ndi\params\NumberOfHandledRXPackersInDPC, step, 0, 1 + HKR, Ndi\Params\PacketFilter, ParamDesc, 0, %PacketFilter% HKR, Ndi\Params\PacketFilter, Default,0, 1 HKR, Ndi\Params\PacketFilter, type, 0
[COMMIT] [NetKVM] Changing driver and inf versioning to conform to other virtio drivers
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 4dd50edea41a968f3b78edc35df58054f00785b9 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Jul 13 14:54:07 2011 +0300 [NetKVM] Changing driver and inf versioning to conform to other virtio drivers diff --git a/NetKVM/buildAll.bat b/NetKVM/buildAll.bat index d4018b0..c66d84a 100644 --- a/NetKVM/buildAll.bat +++ b/NetKVM/buildAll.bat @@ -23,8 +23,13 @@ popd set BUILDROOT=C:\WINDDK\%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 -set _MAJORVERSION_=209 -set _MINORVERSION_=605 + +if %_BUILD_MAJOR_VERSION_%== set _BUILD_MAJOR_VERSION_=101 +if %_BUILD_MINOR_VERSION_%== set _BUILD_MINOR_VERSION_=58000 +if %_RHEL_RELEASE_VERSION_%== set _RHEL_RELEASE_VERSION_=61 + +set _MAJORVERSION_=%_BUILD_MAJOR_VERSION_% +set _MINORVERSION_=%_BUILD_MINOR_VERSION_% set _DRIVER_ISO_NAME=Install-%_MINORVERSION_%%_MAJORVERSION_%.iso set OLD_PATH=%PATH% @@ -62,8 +67,13 @@ goto :eof :preparebuild echo DIRS=%* dirs for %%f in (%*) do echo !include $(NTMAKEENV)\makefile.def %%f\makefile -set /a _NT_TARGET_MAJ=%_NT_TARGET_VERSION% 8 -set /a _NT_TARGET_MIN=%_NT_TARGET_VERSION% 255 +set /a _NT_TARGET_MAJ_ARCH=%_NT_TARGET_VERSION% 8 +set /a _NT_TARGET_MIN_ARCH=%_NT_TARGET_VERSION% 255 + +set /a _NT_TARGET_MAJ=(%_NT_TARGET_VERSION% 8) * 10 + (%_NT_TARGET_VERSION% 255) +set _NT_TARGET_MIN=%_RHEL_RELEASE_VERSION_% +rem set STAMPINF_VERSION=%_NT_TARGET_MAJ%.%_RHEL_RELEASE_VERSION_%.%_BUILD_MAJOR_VERSION_%.%_BUILD_MINOR_VERSION_% + set _VERSION_=%_NT_TARGET_MAJ%.%_NT_TARGET_MIN%.%_MAJORVERSION_%.%_MINORVERSION_% echo version set: %_VERSION_% goto :eof diff --git a/NetKVM/tools/signing.cmd b/NetKVM/tools/signing.cmd index f4c0a39..24c84cb 100644 --- a/NetKVM/tools/signing.cmd +++ b/NetKVM/tools/signing.cmd @@ -54,7 +54,7 @@ echo system %1 echo INF file %2 echo VERSION file %3 echo Target OS mask %_OSMASK_% -for /F usebackq tokens=2 %%d in (`date /t`) do stampinf -f %2 -d %%d -v %3 -a %_BUILDARCH%.%_NT_TARGET_MAJ%.%_NT_TARGET_MIN% +for /F usebackq tokens=2 %%d in (`date /t`) do stampinf -f %2 -d %%d -v %3 -a %_BUILDARCH%.%_NT_TARGET_MAJ_ARCH%.%_NT_TARGET_MIN_ARCH% inf2cat /driver:%~dp2 /os:%_OSMASK_% SignTool sign %SIGNCERT% %SIGNTIMESTAMP% %~dpn2.cat goto :eof @@ -69,7 +69,7 @@ if /i %1==x86 set _OSMASK_=256 if /i %1==amd64 set _OSMASK_=512 if /i %1==x64 set _OSMASK_=512 echo Target OS mask %_OSMASK_% -for /F usebackq tokens=2 %%d in (`date /t`) do stampinf -f %2 -d %%d -v %3 -a %_BUILDARCH%.%_NT_TARGET_MAJ%.%_NT_TARGET_MIN% +for /F usebackq tokens=2 %%d in (`date /t`) do stampinf -f %2 -d %%d -v %3 -a %_BUILDARCH%.%_NT_TARGET_MAJ_ARCH%.%_NT_TARGET_MIN_ARCH% signability /driver:%~dp2 /auto /cat /dtc /os:%_OSMASK_% taskkill /FI WINDOWTITLE eq signability* SignTool sign %SIGNCERT% %SIGNTIMESTAMP% %~dpn2.cat @@ -87,7 +87,7 @@ rem (128+16=144) xp64 + 2003-64 if /i %1==amd64 set _OSMASK_=144 if /i %1==x64 set _OSMASK_=144 echo Target OS mask %_OSMASK_% -for /F usebackq tokens=2 %%d in (`date /t`) do stampinf -f %2 -d %%d -v %3 -a %_BUILDARCH%.%_NT_TARGET_MAJ%.%_NT_TARGET_MIN% +for /F usebackq tokens=2 %%d in (`date /t`) do stampinf -f %2 -d %%d -v %3 -a %_BUILDARCH%.%_NT_TARGET_MAJ_ARCH%.%_NT_TARGET_MIN_ARCH% signability /driver:%~dp2 /auto /cat /os:%_OSMASK_% taskkill /FI WINDOWTITLE eq signability* SignTool sign %SIGNCERT% %SIGNTIMESTAMP% %~dpn2.cat -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [NetKVM] Debug printouts with timestamps to enable debugging of Power managment events (S3, S4)
repository: C:/dev/kvm-guest-drivers-windows branch: master commit e80717e6d341ba9657411baf34393363f9ec7f3d Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Jul 13 14:58:21 2011 +0300 [NetKVM] Debug printouts with timestamps to enable debugging of Power managment events (S3, S4) diff --git a/NetKVM/Common/ndis56common.h b/NetKVM/Common/ndis56common.h index f80c287..cfc2c7a 100644 --- a/NetKVM/Common/ndis56common.h +++ b/NetKVM/Common/ndis56common.h @@ -270,6 +270,7 @@ typedef struct _tagPARANDIS_ADAPTER BOOLEAN bDoKickOnNoBuffer; BOOLEAN bSurprizeRemoved; BOOLEAN bUsingMSIX; + UINTuNumberOfHandledRXPacketsInDPC; NDIS_DEVICE_POWER_STATE powerState; LONGdpcReceiveActive; LONGcounterDPCInside; diff --git a/NetKVM/wlh/ParaNdis6-Driver.c b/NetKVM/wlh/ParaNdis6-Driver.c index 9e7a06a..1c753d2 100644 --- a/NetKVM/wlh/ParaNdis6-Driver.c +++ b/NetKVM/wlh/ParaNdis6-Driver.c @@ -490,6 +490,7 @@ static NDIS_STATUS ParaNdis6_Restart( NDIS_STATUS status = NDIS_STATUS_SUCCESS; PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)miniportAdapterContext; DEBUG_ENTRY(0); + ParaNdis_DebugHistory(pContext, hopSysResume, NULL, 1, 0, 0); ParaNdis6_SendPauseRestart(pContext, FALSE, NULL); ParaNdis6_ReceivePauseRestart(pContext, FALSE, NULL); @@ -985,11 +986,21 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath { NDIS_STATUS status = NDIS_STATUS_FAILURE; NDIS_MINIPORT_DRIVER_CHARACTERISTICSchars; +#ifdef DEBUG_TIMING + LARGE_INTEGER TickCount; + LARGE_INTEGER SysTime; +#endif DEBUG_TIMING ParaNdis_DebugInitialize(pDriverObject, pRegistryPath); DEBUG_ENTRY(0); _LogOutString(0, __DATE__ __TIME__); +#ifdef DEBUG_TIMING + KeQueryTickCount(TickCount); + NdisGetCurrentSystemTime(SysTime); + DPrintf(0, (\n%s CPU #%d, perf-counter %I64d, tick count %I64d, NDIS_sys_time %I64d\n, __FUNCTION__, KeGetCurrentProcessorNumber(), KeQueryPerformanceCounter(NULL).QuadPart,TickCount.QuadPart, SysTime.QuadPart)); +#endif + NdisZeroMemory(chars, sizeof(chars)); chars.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS; diff --git a/NetKVM/wlh/ParaNdis6-Oid.c b/NetKVM/wlh/ParaNdis6-Oid.c index e71e80c..86a2e68 100644 --- a/NetKVM/wlh/ParaNdis6-Oid.c +++ b/NetKVM/wlh/ParaNdis6-Oid.c @@ -441,6 +441,15 @@ static void OnSetPowerWorkItem(PVOID WorkItemContext, NDIS_HANDLE NdisIoWorkIt PARANDIS_ADAPTER *pContext = pwi-pContext; PNDIS_OID_REQUEST pRequest = (PNDIS_OID_REQUEST)pwi-request; NDIS_STATUS status = NDIS_STATUS_SUCCESS; +#ifdef DEBUG_TIMING + LARGE_INTEGER TickCount; + LARGE_INTEGER SysTime; + + KeQueryTickCount(TickCount); + NdisGetCurrentSystemTime(SysTime); + DPrintf(0, (\n%s CPU #%d, perf-counter %I64d, tick count %I64d, NDIS_sys_time %I64d\n, __FUNCTION__, KeGetCurrentProcessorNumber(), KeQueryPerformanceCounter(NULL).QuadPart,TickCount.QuadPart, SysTime.QuadPart)); +#endif + if (pwi-state == NetDeviceStateD0) { ParaNdis_PowerOn(pContext); @@ -463,7 +472,17 @@ NDIS_STATUS ParaNdis_OnSetPower(PARANDIS_ADAPTER *pContext, tOidDesc *pOid) { NDIS_STATUS status; NDIS_DEVICE_POWER_STATE newState; +#ifdef DEBUG_TIMING + LARGE_INTEGER TickCount; + LARGE_INTEGER SysTime; + + KeQueryTickCount(TickCount); + NdisGetCurrentSystemTime(SysTime); + DPrintf(0, (\n%s CPU #%d, perf-counter %I64d, tick count %I64d, NDIS_sys_time %I64d\n, __FUNCTION__, KeGetCurrentProcessorNumber(), KeQueryPerformanceCounter(NULL).QuadPart,TickCount.QuadPart, SysTime.QuadPart)); +#endif + DEBUG_ENTRY(0); + status = ParaNdis_OidSetCopy(pOid, newState, sizeof(newState)); if (status == NDIS_STATUS_SUCCESS) { -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [COMMIT] [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c.
Hello Vadim, Can you check this issues? Thanks, Yan. -Original Message- From: ya su [mailto:suya94...@gmail.com] Sent: Saturday, March 19, 2011 5:28 AM To: Yan Vugenfirer Cc: kvm@vger.kernel.org Subject: Re: [COMMIT] [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c. Yan: I have tested the newest balloon driver (from 1.1.16) on windows server 2003, balloon.sys can not be installed successfully and return error code 10. have you tested this or any updates? thanks. Regards. Green. 2010/2/15 Yan Vugenfirer yvuge...@redhat.com: repository: C:/dev/kvm-guest-drivers-windows branch: master commit 7ab588f373eda9d08a497e969739019d2075a6d2 Author: Yan Vugenfirer yvuge...@redhat.com Date: Mon Feb 15 15:01:36 2010 +0200 [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/Balloon/BalloonWDF/wmi.c b/Balloon/BalloonWDF/wmi.c deleted file mode 100644 index 70a9270..000 --- a/Balloon/BalloonWDF/wmi.c +++ /dev/null @@ -1,90 +0,0 @@ - /** - * Copyright (c) 2009 Red Hat, Inc. - * - * File: device.c - * - * Author(s): - * - * This file contains WMI support routines - * - * This work is licensed under the terms of the GNU GPL, version 2. See - * the COPYING file in the top-level directory. - * - **/ -#include precomp.h - -#if defined(EVENT_TRACING) -#include wmi.tmh -#endif - - -#define MOFRESOURCENAME LMofResourceName - -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, WmiRegistration) -#pragma alloc_text(PAGE, EvtWmiDeviceInfoQueryInstance) -#endif - -NTSTATUS -WmiRegistration( - WDFDEVICE Device - ) -{ - WDF_WMI_PROVIDER_CONFIG providerConfig; - WDF_WMI_INSTANCE_CONFIG instanceConfig; - NTSTATUS status; - DECLARE_CONST_UNICODE_STRING(mofRsrcName, MOFRESOURCENAME); - - PAGED_CODE(); - - TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, -- WmiRegistration\n); - - status = WdfDeviceAssignMofResourceName(Device, mofRsrcName); - if (!NT_SUCCESS(status)) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP, - WdfDeviceAssignMofResourceName failed 0x%x, status); - return status; - } - - WDF_WMI_PROVIDER_CONFIG_INIT(providerConfig, GUID_DEV_WMI_BALLOON); - providerConfig.MinInstanceBufferSize = sizeof(ULONGLONG); - - WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER_CONFIG(instanceConfig, providerConfig); - instanceConfig.Register = TRUE; - instanceConfig.EvtWmiInstanceQueryInstance = EvtWmiDeviceInfoQueryInstance; - - status = WdfWmiInstanceCreate(Device, - instanceConfig, - WDF_NO_OBJECT_ATTRIBUTES, - WDF_NO_HANDLE); - if (!NT_SUCCESS(status)) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP, - WdfWmiInstanceCreate failed 0x%x, status); - return status; - } - - TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, -- WmiRegistration\n); - return status; -} - -NTSTATUS -EvtWmiDeviceInfoQueryInstance( - __in WDFWMIINSTANCE WmiInstance, - __in ULONG OutBufferSize, - __out_bcount_part(OutBufferSize, *BufferUsed) PVOID OutBuffer, - __out PULONG BufferUsed - ) -{ - PDRIVER_CONTEXT drvCxt = GetDriverContext(WdfGetDriver()); - - PAGED_CODE(); - - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_WMI, -- EvtWmiDeviceInfoQueryInstance\n); - - RtlZeroMemory(OutBuffer, sizeof(ULONGLONG)); - *(ULONGLONG*) OutBuffer = (ULONGLONG)drvCxt-num_pages; - *BufferUsed = sizeof(ULONGLONG); - - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_WMI, -- EvtWmiDeviceInfoQueryInstance\n); - return STATUS_SUCCESS; -} -- To unsubscribe from this list: send the line unsubscribe kvm- commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] [NetKVM] VirtIO library with published indexes
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 62917b884707f6be7b45df56e5f248a18db0cefd Author: Yan Vugenfirer yvuge...@redhat.com Date: Sat Jun 12 17:05:26 2010 +0300 [WIN-GUEST_DRIVERS] [NetKVM] VirtIO library with published indexes Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/VirtIO/VirtIO.h b/VirtIO/VirtIO.h index 12cc027..e98088b 100644 --- a/VirtIO/VirtIO.h +++ b/VirtIO/VirtIO.h @@ -13,6 +13,9 @@ /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 +/* virtio library features bits */ +#define VIRTIO_F_INDIRECT 28 +#define VIRTIO_F_PUBLISH_INDICES 29 /** * virtqueue - a queue to register buffers for sending or receiving. * @callback: the function to call when buffers are consumed (can be NULL). @@ -86,4 +89,3 @@ struct virtqueue_ops { }; #endif /* _LINUX_VIRTIO_H */ - diff --git a/VirtIO/VirtIOPCI.c b/VirtIO/VirtIOPCI.c index 2ed3c97..6d18023 100644 --- a/VirtIO/VirtIOPCI.c +++ b/VirtIO/VirtIOPCI.c @@ -97,6 +97,11 @@ bool VirtIODeviceEnableGuestFeature(VirtIODevice * pVirtIODevice, unsigned uFeat return !!(ulValue (1 uFeature)); } +bool VirtIODeviceHasFeature(unsigned uFeature) +{ + if (uFeature == VIRTIO_F_PUBLISH_INDICES) return TRUE; + return FALSE; +} / // @@ -201,7 +206,7 @@ static void vp_notify(struct virtqueue *vq) ULONG VirtIODeviceISR(VirtIODevice * pVirtIODevice) { ULONG status; - DPrintf(4, (%s\n, __FUNCTION__)); + DPrintf(6, (%s\n, __FUNCTION__)); status = ReadVirtIODeviceByte(pVirtIODevice-addr + VIRTIO_PCI_ISR); diff --git a/VirtIO/VirtIORing.c b/VirtIO/VirtIORing.c index 42040e6..585ada4 100644 --- a/VirtIO/VirtIORing.c +++ b/VirtIO/VirtIORing.c @@ -44,9 +44,6 @@ struct _declspec(align(PAGE_SIZE)) vring_virtqueue /* Number we've added since last sync. */ unsigned int num_added; - /* Last used index we've seen. */ - u16 last_used_idx; - /* How to notify other side. FIXME: commonalize hcalls! */ void (*notify)(struct virtqueue *vq); @@ -234,25 +231,27 @@ static void vring_shutdown(struct virtqueue *_vq) static bool more_used(const struct vring_virtqueue *vq) { - return vq-last_used_idx != vq-vring.used-idx; +return vring_last_used(vq-vring) != vq-vring.used-idx; } static void *vring_get_buf(struct virtqueue *_vq, unsigned int *len) { struct vring_virtqueue *vq = to_vvq(_vq); void *ret; +struct vring_used_elem *u; unsigned int i; if (!more_used(vq)) { - DPrintf(4, (No more buffers in queue: last_used_idx %d vring.used-idx %d\n, vq-last_used_idx, vq-vring.used-idx)); + DPrintf(4, (No more buffers in queue: last_used_idx %d vring.used-idx %d\n, + vring_last_used(vq-vring), + vq-vring.used-idx)); return NULL; } - /* Only get used array entries after they have been exposed by host. */ - rmb(); + u = vq-vring.used-ring[vring_last_used(vq-vring) % vq-vring.num]; + i = u-id; + *len = u-len; - i = vq-vring.used-ring[vq-last_used_idx%vq-vring.num].id; - *len = vq-vring.used-ring[vq-last_used_idx%vq-vring.num].len; DPrintf(4, (%s id %d, len %d\n, __FUNCTION__, i, *len) ); @@ -268,7 +267,7 @@ static void *vring_get_buf(struct virtqueue *_vq, unsigned int *len) /* detach_buf clears data, so grab it now. */ ret = vq-data[i]; detach_buf(vq, i); - vq-last_used_idx++; +vring_last_used(vq-vring)++; return ret; } @@ -317,7 +316,7 @@ void initialize_virtqueue(struct vring_virtqueue *vq, vq-vq.vq_ops = vring_vq_ops; vq-notify = notify; vq-broken = 0; - vq-last_used_idx = 0; + vring_last_used(vq-vring) = 0; vq-num_added = 0; /* No callback? Tell other side not to bother us. */ diff --git a/VirtIO/virtio_pci.h b/VirtIO/virtio_pci.h index 09bb0e4..0c81e10 100644 --- a/VirtIO/virtio_pci.h +++ b/VirtIO/virtio_pci.h @@ -59,6 +59,7 @@ void VirtIODeviceDumpRegisters(VirtIODevice * pVirtIODevice); bool VirtIODeviceGetHostFeature(VirtIODevice * pVirtIODevice, unsigned uFeature); bool VirtIODeviceEnableGuestFeature(VirtIODevice * pVirtIODevice, unsigned uFeature); +bool VirtIODeviceHasFeature(unsigned uFeature); void VirtIODeviceGet(VirtIODevice * pVirtIODevice, unsigned offset, void *buf, diff --git a/VirtIO/virtio_ring.h b/VirtIO/virtio_ring.h index 84e0bc4..0249064 100644 --- a/VirtIO/virtio_ring.h +++ b/VirtIO/virtio_ring.h @@ -67,6 +67,8 @@ struct vring { struct vring_avail *avail; struct vring_used *used; + + u16 *vring_last_used_ptr; }; #pragma pack (pop) @@ -82,6 +84,7
RE: virtio-win problem
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Martin Maurer Sent: Thursday, May 06, 2010 5:59 PM To: kvm@vger.kernel.org Subject: RE: virtio-win problem -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Riccardo Veraldi Sent: Donnerstag, 06. Mai 2010 14:10 To: kvm@vger.kernel.org Subject: virtio-win problem Hello, if I install virtio-win drivers on windows 2008 Server R2, I have the problem of signed device drivers. I Can install the drivers but Windows 2008 server refuses to use them unless I start the machine pressing F8 every time at each reboot bypassing the checking of signed certified drivers, and this is annoying, since I Cannot reboot the virtual machien automatically. Anyone solved this issue ? Redhat released signed drivers working on win2008r2, but no public download or free use (you need a subscription, it's a special license) Or you need to follow the howtos on the KVM wiki pages, http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers [YV] You could test sign the drivers with our own certificate (http://www.rage3d.com/board/showthread.php?t=33920573) and enable the usage of test signed drivers (Bcdedit.exe -set TESTSIGNING ON). Br, Martin -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] Update viostor drivers (WinXP support, MSI support, new build scripts)
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 70fff68250b1a33e8576c41eaf6e79c13b72730f Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Mar 31 17:42:35 2010 +0300 [WIN-GUEST_DRIVERS] Update viostor drivers (WinXP support, MSI support, new build scripts) Signed-off-by: Vadim Rozenfeld vroze...@redhat.com diff --git a/viostor/SOURCES b/viostor/SOURCES index edc46ef..5701b78 100644 --- a/viostor/SOURCES +++ b/viostor/SOURCES @@ -6,6 +6,7 @@ C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !elseif $(DDK_TARGET_OS) == WinLH C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) +C_DEFINES = -DMSI_SUPPORTED=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !elseif $(DDK_TARGET_OS) == WinXP TARGETLIBS=$(SDK_LIB_PATH)\scsiport.lib diff --git a/viostor/buildAll.bat b/viostor/buildAll.bat index 668efe7..526c368 100644 --- a/viostor/buildAll.bat +++ b/viostor/buildAll.bat @@ -1,90 +1,74 @@ -: -: Set global parameters: -: +...@echo off -: Use Windows 7 DDK -if %DDKVER%== set DDKVER=7600.16385.0 +set SYS_FILE_NAME=viostor -: By default DDK is installed under C:\WINDDK, but it can be installed in different location -if %DDKISNTALLROOT%== set DDKISNTALLROOT=C:\WINDDK\ -set BUILDROOT=%DDKISNTALLROOT%%DDKVER% -set X64ENV=x64 -if %DDKVER%==6000 set X64ENV=amd64 +for %%A in (Win7 Wnet Wlh WXp) do for %%B in (32 64) do call :%%A_%%B +goto :eof -if not %1== goto parameters_here -echo no parameters specified, rebuild all -call clean.bat -call %0 WIN7 WIN7_64 Vista Vista64 Win2003 Win200364 XP +:buildsys +call buildOne.bat %1 %2 goto :eof -:parameters_here -:nextparam -if %1== goto :eof -goto %1 -:continue -shift -goto nextparam - -:Win7 -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WIN7 -popd -build -cZg - -goto continue - -:Win7_64 -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre WIN7 -popd -build -cZg - -goto continue - - -:Vista -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Wlh -popd -build -cZg +:packsys +call packOne.bat %1 %2 %SYS_FILE_NAME% %3 +goto :eof -goto continue +:buildpack +call :buildsys %1 %2 +call :packsys %1 %2 %3 +set BUILD_OS= +set BUILD_ARC= +set INF_FILE_NAME= +goto :eof -:Vista64 -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre Wlh -popd -build -cZg +:WIN7_32 +set BUILD_OS=Win7 +set BUILD_ARC=x86 +set INF_FILE_NAME=Wlh +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof -goto continue +:WIN7_64 +set BUILD_OS=Win7 +set BUILD_ARC=x64 +set INF_FILE_NAME=Wlh +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof -:Win2003 -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WNET -popd -build -cZg +:WLH_32 +set BUILD_OS=Wlh +set BUILD_ARC=x86 +set INF_FILE_NAME=Wlh +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof -goto continue +:WLH_64 +set BUILD_OS=Wlh +set BUILD_ARC=x64 +set INF_FILE_NAME=Wlh +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof -:Win200364 -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre WNET -popd -build -cZg +:WNET_32 +set BUILD_OS=Wnet +set BUILD_ARC=x86 +set INF_FILE_NAME=Wnet +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof -goto continue +:WNET_64 +set BUILD_OS=Wnet +set BUILD_ARC=x64 +set INF_FILE_NAME=Wnet +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof -:XP -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WXP -popd -build -cZg +:WXP_32 +set BUILD_OS=WXp +set BUILD_ARC=x86 +set INF_FILE_NAME=Wxp +call :buildpack %BUILD_OS% %BUILD_ARC% %INF_FILE_NAME% +goto :eof +:WXP_64 goto :eof diff --git a/viostor/buildDDK.bat b/viostor/buildDDK.bat deleted file mode 100644 index 8c39eee..000 --- a/viostor/buildDDK.bat +++ /dev/null @@ -1,7 +0,0 @@ -set DDKVER=6001.18001 -set BUILDROOT=C:\WINDDK\%DDKVER% -pushd %BUILDROOT% -set X64ENV=x64 -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre %1 %2 -popd -build -cZg diff --git a/viostor/buildOne.bat b/viostor/buildOne.bat new file mode 100644 index 000..8ecc35d --- /dev/null +++ b/viostor/buildOne.bat @@ -0,0 +1,13 @@ +...@echo off + +if %DDKVER%== set DDKVER=7600.16385.0 +set BUILDROOT=C:\WINDDK\%DDKVER% + +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %2 fre %1 no_oacr +popd +build -cZg + +set DDKVER= +set BUILDROOT= \ No newline at end of file diff --git a/viostor/buildOne_bat b/viostor/buildOne_bat new file mode 100644 index 000..8ecc35d --- /dev/null +++ b/viostor/buildOne_bat @@ -0,0 +1,13 @@ +...@echo off + +if %DDKVER%== set DDKVER=7600.16385.0 +set BUILDROOT=C:\WINDDK\%DDKVER% + +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %2 fre %1 no_oacr +popd +build -cZg + +set DDKVER
[COMMIT] [WIN-GUEST-DRIVERS] NetKVM - Add offline tool to test check sum calculation algorithm. The tool uses driver code on the packets that were recorded with tcpdump or WireShark.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 2565e7ee65c176ffc2e2b5af981a0cce589c40ea Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 12:49:44 2010 +0200 [WIN-GUEST-DRIVERS] NetKVM - Add offline tool to test check sum calculation algorithm. The tool uses driver code on the packets that were recorded with tcpdump or WireShark. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/DebugTools/Netchecksum/ReadMe.txt b/NetKVM/DebugTools/Netchecksum/ReadMe.txt new file mode 100644 index 000..fc8dc61 --- /dev/null +++ b/NetKVM/DebugTools/Netchecksum/ReadMe.txt @@ -0,0 +1,14 @@ + +CONSOLE APPLICATION : netchecksum Project Overview + + +This offline tester of sw-offload.c USES files from NETKVM projects: +ethernetutils.h +ndis56common.h +sw-offload.c + +Preparing input files (each one expected to contain one packet) - +see the format of TXT files, source files are WireShark records. +(some cuts from the WS record required). + +When they are prepared, add them to Jobs array (netchecksum.cpp). \ No newline at end of file diff --git a/NetKVM/DebugTools/Netchecksum/netchecksum.cpp b/NetKVM/DebugTools/Netchecksum/netchecksum.cpp new file mode 100644 index 000..f9dfea2 --- /dev/null +++ b/NetKVM/DebugTools/Netchecksum/netchecksum.cpp @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2008 Red Hat, Inc. + * + * File: netchecksum.cpp + * + * Defines the entry point for the console application + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * +**/ + +#define _CRT_SECURE_NO_WARNINGS + +#include stdafx.h +extern C { +#include ndis56common.h +} + +BYTE buf[0x1]; + + +void ProcessFile(FILE *f, ULONG flags) +{ + BOOL bContinue = TRUE; + UINT offset = 0; + memset(buf, 0, sizeof(buf)); + while (bContinue) + { + char s[3]; + if (fread(s, 1, 1, f) == 1) + { + if (isxdigit(s[0]) fread(s+1, 1, 1, f) == 1 isxdigit(s[1])) + { + ULONG val; + s[2] = 0; + sscanf(s, %x, val); + buf[offset++] = (UCHAR)val; + } + else if (isalpha(s[0])) bContinue = FALSE; + } + } + if (offset 14) + { + if (flags) + { + DPrintf(0, (processing buffer of %d started, offset)); + ParaNdis_CheckSumVerify(buf + 14, offset - 14, pcrIpChecksum | pcrTcpChecksum | flags, __FUNCTION__); + DPrintf(0, (processing buffer of %d finished, offset)); + } + DPrintf(0, (Verification of buffer of %d started, offset)); + ParaNdis_CheckSumVerify(buf + 14, offset - 14, pcrIpChecksum | pcrTcpChecksum, __FUNCTION__); + DPrintf(0, (Verification of buffer of %d finished, offset)); + } + +} + +struct +{ + LPCSTR file; + ULONG flags; +}Jobs[] = +{ + { tcp-short.txt, pcrFixIPChecksum }, + { tcp-ph.txt,pcrFixXxpChecksum }, + { tcp-cs.txt,pcrFixPHChecksum }, + { tcp-badcs.txt, pcrFixXxpChecksum }, + { tcp-badcs.txt, pcrFixPHChecksum }, +}; +int _tmain(int argc, _TCHAR* argv[]) +{ + int i; + FILE *f; + for (i = 0; i sizeof(Jobs)/sizeof(Jobs[0]); ++i) + { + f = fopen(Jobs[i].file,rt); + if (f) + { + DPrintf(0, (Processing file %s started, Jobs[i].file)); + ProcessFile(f, Jobs[i].flags); + DPrintf(0, (Processing file %s finished, Jobs[i].file)); + DPrintf(0, ()); + fclose(f); + } + } + return 0; +} + diff --git a/NetKVM/DebugTools/Netchecksum/netchecksum.sln b/NetKVM/DebugTools/Netchecksum/netchecksum.sln new file mode 100644 index 000..25d2622 --- /dev/null +++ b/NetKVM/DebugTools/Netchecksum/netchecksum.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project({8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}) = netchecksum, netchecksum.vcproj, {B9D81752-EA28-475B-B758-F7CE1D627A8D} +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution
[COMMIT] [WIN-GUEST-DRIVERS] Ruby script to clean the trailing white spaces. Please use it before committing any changes.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 301b02e0c5909072c1119bfb73cee9833748680c Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 12:52:47 2010 +0200 [WIN-GUEST-DRIVERS] Ruby script to clean the trailing white spaces. Please use it before committing any changes. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/rmwhite.rb b/rmwhite.rb new file mode 100644 index 000..e484209 --- /dev/null +++ b/rmwhite.rb @@ -0,0 +1,82 @@ +# +# Remove trailing white spaces recursively from the file or directory +# +# www.yvtechnologies.com +# + +# This function remove trailing white spaces from the single file +# +# Parameters: +# * file - file to clean from trailing whitespaces +def rmwhite_file(strfile) + print(Cleaning: + strfile + \n) + + # Read the file + begin +lines = File.open(strfile).readlines() + rescue +print(Cannot open: + strfile + \n) +return + end + + # Write back + begin +File.open(strfile, w) do |file| + lines.each { |line| file.puts(line.rstrip()) } +end + rescue = e +print(e.class.to_s + : Cannot write back to: + strfile + \n) + end +end + +# This function executes clean up of file or directory +# +# Parameters: +# * file - file or directory path +# * patterns - file pattern to search +def rmwhite_file_or_dir(file, patterns) + if(File.directory?(file)) +current_dir = Dir.pwd() +Dir.chdir(file) +#print (changed dir to: + file + \n) +rmwhite_directory(file, patterns) +Dir.chdir(current_dir) +#print (changed dir to: + current_dir + \n) + else +rmwhite_file(file) + end +end + +# Recurcive function that walks over all directories and files according to the predifined pattern +# +# Parameters: +# * file - file or directory path +# * patterns - file pattern to search +def rmwhite_directory(dir, patterns) + printf(Cleaning: + dir + \n) + + patterns.each do |pattern| + # print(Cleaning pattern: + pattern + current dir: + Dir.pwd() + \n) +arr_entries = Dir[pattern] +arr_entries.each { |entry| rmwhite_file_or_dir(entry, patterns) } + end +end + +if((str_file = ARGV[0].to_s) == ) + print error: syntax rmwhite file\n + exit -1 +else + str_file = ARGV[0].to_s +end + +# File patterns that will be cleared from white spaces +FILE_PATTERNS = [*.txt, *.rc, *.c, *.h, *.cpp, */] + +if(not File.exist?(str_file)) + print error: file doesn't exits\n + exit -1 +end + +current_dir = Dir.pwd() +rmwhite_file_or_dir(str_file, FILE_PATTERNS) +Dir.chdir(current_dir) -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] NetKVMDumpParser debug tool that enables additional dump file parsing. NetKVM driver can be compiled to save debug information during BSOD. This information includes inte
repository: C:/dev/kvm-guest-drivers-windows branch: master commit a2ca8208c68a58f2e5ccc750ee351af1a560d589 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 12:59:54 2010 +0200 [WIN-GUEST-DRIVERS] NetKVMDumpParser debug tool that enables additional dump file parsing. NetKVM driver can be compiled to save debug information during BSOD. This information includes interrupt, dpc timing, pnp messages and other. It may be extended to include other additional info (see driver sources Common/ParaNdis-Debug.c). This debugging capability already exists in the driver, the commit is only for the parsing tool. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops b/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops new file mode 100644 index 000..6b0ed8c --- /dev/null +++ b/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops @@ -0,0 +1,11 @@ +?xml version=1.0 encoding=windows-1251? +VisualStudioPropertySheet + ProjectType=Visual C++ + Version=8.00 + Name=DebugSdk + + UserMacro + Name=DEBUGSDK + Value=C:\Program Files\Debugging Tools for Windows\sdk + / +/VisualStudioPropertySheet diff --git a/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp b/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp new file mode 100644 index 000..b9ba556 --- /dev/null +++ b/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp @@ -0,0 +1,836 @@ +/** + * Copyright (c) 2008 Red Hat, Inc. + * + * File: NetKVMDumpParser.cpp + * + * This file contains dump parsing logic + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * +**/ + +#include stdafx.h +#include NetKVMDumpParser.h +#include ..\..\Common\DebugData.h + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + +#define DEBUG_SYMBOLS_IF IDebugSymbols2 + +#define PRINT(fmt, ...) printf([%s]: ##fmt##\n, __FUNCTION__, __VA_ARGS__); +//#define PRINT(fmt, ...) { CString __s; __s.Format(TEXT([%s]: )##TEXT(fmt)##TEXT(\n), TEXT(__FUNCTION__), __VA_ARGS__); OutputDebugString(__s.GetBuffer()); } + +CString ErrorToString(HRESULT hr) +{ + CString s; + LPTSTR lpMessageBuffer; + if (FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + hr, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default language + (LPTSTR) lpMessageBuffer, + 0, + NULL )) + { + s = lpMessageBuffer; + LocalFree(lpMessageBuffer); + } + else + { + s.Format([Error %lu], hr); + } + return s; +} + +static const LPCSTR OpNames[] = { + PowerOff , + PowerOn , + SysPause , + SysResume, + InternalSendPause, + InternalReceivePause , + InternalSendResume , + InternalReceiveResume, + SysReset , + Halt , + ConnectIndication, + DPC , + Send , + SendNBLRequest , + SendPacketRequest, + SendPacketMapped , + SubmittedPacket , + BufferSent , + BufferReceivedStat , + BufferReturned , + SendComplete , + TxProcess, + PacketReceived , + OidRequest , + PnpEvent , +}; + +static CString HistoryOperationName(ULONG op) +{ + CString s; + if (op sizeof(OpNames)/ sizeof(OpNames[0])) + s = OpNames[op]; + else + s.Format(##%d, op); + return s; +} + +typedef struct _tagNamedFlag +{ + ULONG64 flag; + LPCSTR name; +}tNamedFlag; + +typedef struct _tagNamedValue +{ + ULONG64 value; + LPCSTR name; +}tNamedValue; + +#define STRINGER(x)#x +#define VALUE(v) { v, STRINGER(##v) } +#define ENDTABLE { 0, NULL } + +const tNamedValue SessionStatusValues[] = +{ +VALUE(DEBUG_SESSION_ACTIVE), +VALUE(DEBUG_SESSION_END_SESSION_ACTIVE_TERMINATE), +VALUE(DEBUG_SESSION_END_SESSION_ACTIVE_DETACH), +VALUE(DEBUG_SESSION_END_SESSION_PASSIVE), +VALUE(DEBUG_SESSION_END), +VALUE(DEBUG_SESSION_REBOOT), +VALUE(DEBUG_SESSION_HIBERNATE), +VALUE(DEBUG_SESSION_FAILURE), +ENDTABLE +}; + +const tNamedValue DebuggeeStateValues[] = +{ +VALUE(DEBUG_CDS_ALL), +VALUE(DEBUG_CDS_REGISTERS), +VALUE(DEBUG_CDS_DATA), +ENDTABLE +}; + +const tNamedValue DebuggeeStateArgValues[] = +{ +VALUE(DEBUG_DATA_SPACE_VIRTUAL), +VALUE(DEBUG_DATA_SPACE_PHYSICAL), +VALUE(DEBUG_DATA_SPACE_CONTROL), +VALUE(DEBUG_DATA_SPACE_IO), +VALUE(DEBUG_DATA_SPACE_MSR), +VALUE(DEBUG_DATA_SPACE_BUS_DATA
[COMMIT] [WIN-GUEST-DRIVERS] NetKVMDumpParser debug tool that enables additional dump file parsing. NetKVM driver can be compiled to save debug information during BSOD. This information includes inte
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 9d49be7dff597721a9f015a419c2cf625e0d Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 12:59:54 2010 +0200 [WIN-GUEST-DRIVERS] NetKVMDumpParser debug tool that enables additional dump file parsing. NetKVM driver can be compiled to save debug information during BSOD. This information includes interrupt, dpc timing, pnp messages and other. It may be extended to include other additional info (see driver sources Common/ParaNdis-Debug.c). This debugging capability already exists in the driver, the commit is only for the parsing tool. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops b/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops new file mode 100644 index 000..6b0ed8c --- /dev/null +++ b/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops @@ -0,0 +1,11 @@ +?xml version=1.0 encoding=windows-1251? +VisualStudioPropertySheet + ProjectType=Visual C++ + Version=8.00 + Name=DebugSdk + + UserMacro + Name=DEBUGSDK + Value=C:\Program Files\Debugging Tools for Windows\sdk + / +/VisualStudioPropertySheet diff --git a/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp b/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp new file mode 100644 index 000..b9ba556 --- /dev/null +++ b/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp @@ -0,0 +1,836 @@ +/** + * Copyright (c) 2008 Red Hat, Inc. + * + * File: NetKVMDumpParser.cpp + * + * This file contains dump parsing logic + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * +**/ + +#include stdafx.h +#include NetKVMDumpParser.h +#include ..\..\Common\DebugData.h + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + +#define DEBUG_SYMBOLS_IF IDebugSymbols2 + +#define PRINT(fmt, ...) printf([%s]: ##fmt##\n, __FUNCTION__, __VA_ARGS__); +//#define PRINT(fmt, ...) { CString __s; __s.Format(TEXT([%s]: )##TEXT(fmt)##TEXT(\n), TEXT(__FUNCTION__), __VA_ARGS__); OutputDebugString(__s.GetBuffer()); } + +CString ErrorToString(HRESULT hr) +{ + CString s; + LPTSTR lpMessageBuffer; + if (FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + hr, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default language + (LPTSTR) lpMessageBuffer, + 0, + NULL )) + { + s = lpMessageBuffer; + LocalFree(lpMessageBuffer); + } + else + { + s.Format([Error %lu], hr); + } + return s; +} + +static const LPCSTR OpNames[] = { + PowerOff , + PowerOn , + SysPause , + SysResume, + InternalSendPause, + InternalReceivePause , + InternalSendResume , + InternalReceiveResume, + SysReset , + Halt , + ConnectIndication, + DPC , + Send , + SendNBLRequest , + SendPacketRequest, + SendPacketMapped , + SubmittedPacket , + BufferSent , + BufferReceivedStat , + BufferReturned , + SendComplete , + TxProcess, + PacketReceived , + OidRequest , + PnpEvent , +}; + +static CString HistoryOperationName(ULONG op) +{ + CString s; + if (op sizeof(OpNames)/ sizeof(OpNames[0])) + s = OpNames[op]; + else + s.Format(##%d, op); + return s; +} + +typedef struct _tagNamedFlag +{ + ULONG64 flag; + LPCSTR name; +}tNamedFlag; + +typedef struct _tagNamedValue +{ + ULONG64 value; + LPCSTR name; +}tNamedValue; + +#define STRINGER(x)#x +#define VALUE(v) { v, STRINGER(##v) } +#define ENDTABLE { 0, NULL } + +const tNamedValue SessionStatusValues[] = +{ +VALUE(DEBUG_SESSION_ACTIVE), +VALUE(DEBUG_SESSION_END_SESSION_ACTIVE_TERMINATE), +VALUE(DEBUG_SESSION_END_SESSION_ACTIVE_DETACH), +VALUE(DEBUG_SESSION_END_SESSION_PASSIVE), +VALUE(DEBUG_SESSION_END), +VALUE(DEBUG_SESSION_REBOOT), +VALUE(DEBUG_SESSION_HIBERNATE), +VALUE(DEBUG_SESSION_FAILURE), +ENDTABLE +}; + +const tNamedValue DebuggeeStateValues[] = +{ +VALUE(DEBUG_CDS_ALL), +VALUE(DEBUG_CDS_REGISTERS), +VALUE(DEBUG_CDS_DATA), +ENDTABLE +}; + +const tNamedValue DebuggeeStateArgValues[] = +{ +VALUE(DEBUG_DATA_SPACE_VIRTUAL), +VALUE(DEBUG_DATA_SPACE_PHYSICAL), +VALUE(DEBUG_DATA_SPACE_CONTROL), +VALUE(DEBUG_DATA_SPACE_IO), +VALUE(DEBUG_DATA_SPACE_MSR), +VALUE(DEBUG_DATA_SPACE_BUS_DATA
[COMMIT] [WIN-GUEST-DRIVERS] NetKVMDumpParser debug tool that enables additional dump file parsing. NetKVM driver can be compiled to save debug information during BSOD. This information includes inter
repository: C:/dev/kvm-guest-drivers-windows branch: master commit cccf2bd5f427c73dc6be4c528aa6f9554ffc5e8c Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 12:59:54 2010 +0200 [WIN-GUEST-DRIVERS] NetKVMDumpParser debug tool that enables additional dump file parsing. NetKVM driver can be compiled to save debug information during BSOD. This information includes interrupt, dpc timing, pnp messages and other. It may be extended to include other additional info (see driver sources Common/ParaNdis-Debug.c). This debugging capability already exists in the driver, the commit is only for the parsing tool. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops b/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops new file mode 100644 index 000..6b0ed8c --- /dev/null +++ b/NetKVM/DebugTools/NetKVMDumpParser/DebugSdk.vsprops @@ -0,0 +1,11 @@ +?xml version=1.0 encoding=windows-1251? +VisualStudioPropertySheet + ProjectType=Visual C++ + Version=8.00 + Name=DebugSdk + + UserMacro + Name=DEBUGSDK + Value=C:\Program Files\Debugging Tools for Windows\sdk + / +/VisualStudioPropertySheet diff --git a/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp b/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp new file mode 100644 index 000..b9ba556 --- /dev/null +++ b/NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp @@ -0,0 +1,836 @@ +/** + * Copyright (c) 2008 Red Hat, Inc. + * + * File: NetKVMDumpParser.cpp + * + * This file contains dump parsing logic + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * +**/ + +#include stdafx.h +#include NetKVMDumpParser.h +#include ..\..\Common\DebugData.h + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + +#define DEBUG_SYMBOLS_IF IDebugSymbols2 + +#define PRINT(fmt, ...) printf([%s]: ##fmt##\n, __FUNCTION__, __VA_ARGS__); +//#define PRINT(fmt, ...) { CString __s; __s.Format(TEXT([%s]: )##TEXT(fmt)##TEXT(\n), TEXT(__FUNCTION__), __VA_ARGS__); OutputDebugString(__s.GetBuffer()); } + +CString ErrorToString(HRESULT hr) +{ + CString s; + LPTSTR lpMessageBuffer; + if (FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + hr, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default language + (LPTSTR) lpMessageBuffer, + 0, + NULL )) + { + s = lpMessageBuffer; + LocalFree(lpMessageBuffer); + } + else + { + s.Format([Error %lu], hr); + } + return s; +} + +static const LPCSTR OpNames[] = { + PowerOff , + PowerOn , + SysPause , + SysResume, + InternalSendPause, + InternalReceivePause , + InternalSendResume , + InternalReceiveResume, + SysReset , + Halt , + ConnectIndication, + DPC , + Send , + SendNBLRequest , + SendPacketRequest, + SendPacketMapped , + SubmittedPacket , + BufferSent , + BufferReceivedStat , + BufferReturned , + SendComplete , + TxProcess, + PacketReceived , + OidRequest , + PnpEvent , +}; + +static CString HistoryOperationName(ULONG op) +{ + CString s; + if (op sizeof(OpNames)/ sizeof(OpNames[0])) + s = OpNames[op]; + else + s.Format(##%d, op); + return s; +} + +typedef struct _tagNamedFlag +{ + ULONG64 flag; + LPCSTR name; +}tNamedFlag; + +typedef struct _tagNamedValue +{ + ULONG64 value; + LPCSTR name; +}tNamedValue; + +#define STRINGER(x)#x +#define VALUE(v) { v, STRINGER(##v) } +#define ENDTABLE { 0, NULL } + +const tNamedValue SessionStatusValues[] = +{ +VALUE(DEBUG_SESSION_ACTIVE), +VALUE(DEBUG_SESSION_END_SESSION_ACTIVE_TERMINATE), +VALUE(DEBUG_SESSION_END_SESSION_ACTIVE_DETACH), +VALUE(DEBUG_SESSION_END_SESSION_PASSIVE), +VALUE(DEBUG_SESSION_END), +VALUE(DEBUG_SESSION_REBOOT), +VALUE(DEBUG_SESSION_HIBERNATE), +VALUE(DEBUG_SESSION_FAILURE), +ENDTABLE +}; + +const tNamedValue DebuggeeStateValues[] = +{ +VALUE(DEBUG_CDS_ALL), +VALUE(DEBUG_CDS_REGISTERS), +VALUE(DEBUG_CDS_DATA), +ENDTABLE +}; + +const tNamedValue DebuggeeStateArgValues[] = +{ +VALUE(DEBUG_DATA_SPACE_VIRTUAL), +VALUE(DEBUG_DATA_SPACE_PHYSICAL), +VALUE(DEBUG_DATA_SPACE_CONTROL), +VALUE(DEBUG_DATA_SPACE_IO), +VALUE(DEBUG_DATA_SPACE_MSR), +VALUE(DEBUG_DATA_SPACE_BUS_DATA
[COMMIT] [WIN-GUEST-DRIVERS] NetKVM fix maximum supported NIC rate to pass Win7 WHQL.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit a45d68c6ef9b195e7847458afd33d3ce86e3d458 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 15:17:13 2010 +0200 [WIN-GUEST-DRIVERS] NetKVM fix maximum supported NIC rate to pass Win7 WHQL. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/Common/ParaNdis-Common.c b/NetKVM/Common/ParaNdis-Common.c index 896e6dc..35ec8e3 100644 --- a/NetKVM/Common/ParaNdis-Common.c +++ b/NetKVM/Common/ParaNdis-Common.c @@ -117,7 +117,7 @@ static const tConfigurationEntries defaultConfiguration = { { Promiscuous,0, 0, 1 }, { Priority, 0, 0, 1 }, - { ConnectRate,100,10,1000 }, + { ConnectRate,100,10,1001 }, { DoLog, 1, 0, 1 }, { DebugLevel, 2, 0, 8 }, { ConnectTimer, 0, 0, 30 }, -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] Add additional file types to .gitignore. From now will ignore Windows security certificate as those could not be stored on kernel.org.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 73142a3ff9afa4d955b94647d8e418d3abfccc1f Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 21 15:27:08 2010 +0200 [WIN-GUEST-DRIVERS] Add additional file types to .gitignore. From now will ignore Windows security certificate as those could not be stored on kernel.org. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/.gitignore b/.gitignore index d33928d..80cc2e0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ *.wrn *.log *.err - +*.pfx +*.cer +*.bak -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 7ab588f373eda9d08a497e969739019d2075a6d2 Author: Yan Vugenfirer yvuge...@redhat.com Date: Mon Feb 15 15:01:36 2010 +0200 [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/Balloon/BalloonWDF/wmi.c b/Balloon/BalloonWDF/wmi.c deleted file mode 100644 index 70a9270..000 --- a/Balloon/BalloonWDF/wmi.c +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) 2009 Red Hat, Inc. - * - * File: device.c - * - * Author(s): - * - * This file contains WMI support routines - * - * This work is licensed under the terms of the GNU GPL, version 2. See - * the COPYING file in the top-level directory. - * -**/ -#include precomp.h - -#if defined(EVENT_TRACING) -#include wmi.tmh -#endif - - -#define MOFRESOURCENAME LMofResourceName - -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, WmiRegistration) -#pragma alloc_text(PAGE, EvtWmiDeviceInfoQueryInstance) -#endif - -NTSTATUS -WmiRegistration( -WDFDEVICE Device -) -{ -WDF_WMI_PROVIDER_CONFIG providerConfig; -WDF_WMI_INSTANCE_CONFIG instanceConfig; -NTSTATUSstatus; -DECLARE_CONST_UNICODE_STRING(mofRsrcName, MOFRESOURCENAME); - -PAGED_CODE(); - -TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, -- WmiRegistration\n); - -status = WdfDeviceAssignMofResourceName(Device, mofRsrcName); -if (!NT_SUCCESS(status)) { -TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP, - WdfDeviceAssignMofResourceName failed 0x%x, status); -return status; -} - -WDF_WMI_PROVIDER_CONFIG_INIT(providerConfig, GUID_DEV_WMI_BALLOON); -providerConfig.MinInstanceBufferSize = sizeof(ULONGLONG); - -WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER_CONFIG(instanceConfig, providerConfig); -instanceConfig.Register = TRUE; -instanceConfig.EvtWmiInstanceQueryInstance = EvtWmiDeviceInfoQueryInstance; - -status = WdfWmiInstanceCreate(Device, - instanceConfig, - WDF_NO_OBJECT_ATTRIBUTES, - WDF_NO_HANDLE); -if (!NT_SUCCESS(status)) { -TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP, - WdfWmiInstanceCreate failed 0x%x, status); -return status; -} - -TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, -- WmiRegistration\n); -return status; -} - -NTSTATUS -EvtWmiDeviceInfoQueryInstance( -__in WDFWMIINSTANCE WmiInstance, -__in ULONG OutBufferSize, -__out_bcount_part(OutBufferSize, *BufferUsed) PVOID OutBuffer, -__out PULONG BufferUsed -) -{ -PDRIVER_CONTEXT drvCxt = GetDriverContext(WdfGetDriver()); - -PAGED_CODE(); - -TraceEvents(TRACE_LEVEL_VERBOSE, DBG_WMI, -- EvtWmiDeviceInfoQueryInstance\n); - -RtlZeroMemory(OutBuffer, sizeof(ULONGLONG)); -*(ULONGLONG*) OutBuffer = (ULONGLONG)drvCxt-num_pages; -*BufferUsed = sizeof(ULONGLONG); - -TraceEvents(TRACE_LEVEL_VERBOSE, DBG_WMI, -- EvtWmiDeviceInfoQueryInstance\n); -return STATUS_SUCCESS; -} -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] NetKVM - add ability to compile specificly for Windows 7.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 7ce273108e7dd47eca54e55cfd85121c2dbb67dd Author: Yan Vugenfirer yvuge...@redhat.com Date: Thu Feb 11 16:04:37 2010 +0200 [WIN-GUEST-DRIVERS] NetKVM - add ability to compile specificly for Windows 7. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/Common/common.mak b/NetKVM/Common/common.mak index 4766517..deb0974 100644 --- a/NetKVM/Common/common.mak +++ b/NetKVM/Common/common.mak @@ -12,6 +12,8 @@ C_DEFINES=$(C_DEFINES) -DNDIS51_MINIPORT=1 C_DEFINES=$(C_DEFINES) -DNDIS51_MINIPORT=1 !elseif $(DDK_TARGET_OS)==WinLH C_DEFINES=$(C_DEFINES) -DNDIS60_MINIPORT=1 +!elseif $(DDK_TARGET_OS)==Win7 +C_DEFINES=$(C_DEFINES) -DNDIS60_MINIPORT=1 !else !error DDK_TARGET_OS defined as $(DDK_TARGET_OS) (unsupported) !endif diff --git a/NetKVM/buildAll.bat b/NetKVM/buildAll.bat index c4bb148..73c15a5 100644 --- a/NetKVM/buildAll.bat +++ b/NetKVM/buildAll.bat @@ -23,7 +23,8 @@ set _DRIVER_ISO_NAME=Install-%_MINORVERSION_%%_MAJORVERSION_%.iso if not %1== goto parameters_here echo no parameters specified, rebuild all call clean.bat -call %0 Vista Vista64 XP XP64 Win2K +:call %0 Vista Vista64 XP XP64 Win2K +call %0 Win7 Win7_64 Vista Vista64 XP XP64 call :PackInstall goto :eof :parameters_here @@ -59,6 +60,31 @@ set _VERSION_=%_NT_TARGET_MAJ%.%_NT_TARGET_MIN%.%_MAJORVERSION_%.%_MINORVERSION_ echo version set: %_VERSION_% goto :eof + +:Win7 +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Win7 +popd +call :preparebuild Common wlh VirtIO +build -cZg + +if exist wlh\objfre_win7_x86\i386\netkvm.sys call tools\makeinstall x86 wlh\objfre_win7_x86\i386\netkvm.sys wlh\netkvm.inf %_VERSION_% Win7 +if not exist wlh\objfre_win7_x86\i386\netkvm.sys goto :eof +goto continue + +:Win7_64 +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre Win7 +popd +call :preparebuild Common wlh VirtIO +build -cZg + +if exist wlh\objfre_win7_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wlh\objfre_win7_amd64\amd64\netkvm.sys wlh\netkvm.inf %_VERSION_% Win7 +if not exist wlh\objfre_win7_amd64\amd64\netkvm.sys goto :eof +goto continue + :Vista set DDKBUILDENV= pushd %BUILDROOT% @@ -126,8 +152,8 @@ goto continue :installer -C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv /Rebuild Release Installer\Package\Package.sln /Log Installer\Package\build.log -goto continue +:C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv /Rebuild Release Installer\Package\Package.sln /Log Installer\Package\build.log +:goto continue :PackInstall :echo Packing to ISO image diff --git a/NetKVM/clean.bat b/NetKVM/clean.bat index 1d293a8..8987cb7 100644 --- a/NetKVM/clean.bat +++ b/NetKVM/clean.bat @@ -1,5 +1,8 @@ rmdir /S /Q wlh\objfre_wlh_x86 rmdir /S /Q wlh\objfre_wlh_amd64 +rmdir /S /Q wlh\objfre_win7_amd64 +rmdir /S /Q wlh\objfre_win7_x86 + del wlh\BuildLog.htm rmdir /S /Q wxp\objfre_wnet_amd64 @@ -12,12 +15,16 @@ rmdir /S /Q virtio\objfre_wnet_amd64 rmdir /S /Q virtio\objfre_w2k_x86 rmdir /S /Q virtio\objfre_wxp_x86 rmdir /S /Q virtio\objfre_wlh_amd64 +rmdir /S /Q virtio\objfre_win7_amd64 +rmdir /S /Q virtio\objfre_win7_x86 rmdir /S /Q common\objfre_wlh_x86 rmdir /S /Q common\objfre_wnet_amd64 rmdir /S /Q common\objfre_w2k_x86 rmdir /S /Q common\objfre_wxp_x86 rmdir /S /Q common\objfre_wlh_amd64 +rmdir /S /Q common\objfre_win7_amd64 +rmdir /S /Q common\objfre_win7_x86 rmdir /S /Q Install diff --git a/NetKVM/tools/makeinstall.bat b/NetKVM/tools/makeinstall.bat index 15ed8bc..7717618 100644 --- a/NetKVM/tools/makeinstall.bat +++ b/NetKVM/tools/makeinstall.bat @@ -2,7 +2,7 @@ : Param2 - path to SYS file : Param3 - path to INF file : Param4 - version in x.x.x.x form -: Param5 - Vista | XP | 2K +: Param5 - Win7 | Vista | XP | 2K if /i %1==x86 goto makeinstall diff --git a/NetKVM/tools/signing.cmd b/NetKVM/tools/signing.cmd index 949535a..1daf47e 100644 --- a/NetKVM/tools/signing.cmd +++ b/NetKVM/tools/signing.cmd @@ -1,4 +1,4 @@ -: Param1=signVista | signXP | sigtn2K +: Param1=signWin7 | signVista | signXP | sigtn2K : Param2=x86 | amd64 : Param3=path to INF file (SYS must be is in the same place) : Param4=version string to patch INF @@ -10,6 +10,7 @@ if exist %BUILDROOT%\bin\SelfSign\signability.exe set USESIGNABILITY=old if %1==signVista goto signVista%USESIGNABILITY% if %1==signXP goto signXP%USESIGNABILITY% if %1==sign2K goto sign2K%USESIGNABILITY% +if %1==signWin7 goto signWin7%USESIGNABILITY% echo unsupported parameter %1 goto :eof :create @@ -28,9 +29,17 @@ goto :eof :signVista shift -if /i %1==x86 set _OSMASK_=Vista_X86,Server2008_X86 -if /i %1==amd64 set _OSMASK_=Vista_X64,Server2008_X64 -if /i %1==x64 set _OSMASK_=Vista_X64,Server2008_X64 +if /i %1==x86 set _OSMASK_=Vista_X86,Server2008_X86,7_X86 +if /i %1==amd64 set _OSMASK_=Vista_X64,Server2008_X64,7_X64 +if /i %1==x64 set
[COMMIT] [WIN-GUEST-DRIVERS] viostore - add ability to compile specifically for Windows 7
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 5a045921f6d2c1062eeffecb9134aba169950de5 Author: Yan Vugenfirer yvuge...@redhat.com Date: Thu Feb 11 17:09:00 2010 +0200 [WIN-GUEST-DRIVERS] viostore - add ability to compile specifically for Windows 7 Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/viostor/SOURCES b/viostor/SOURCES index a98a081..edc46ef 100644 --- a/viostor/SOURCES +++ b/viostor/SOURCES @@ -1,15 +1,17 @@ TARGETNAME=viostor TARGETTYPE=MINIPORT -!if $(DDK_TARGET_OS) == WinNET +!if $(DDK_TARGET_OS) == WinNET C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !elseif $(DDK_TARGET_OS) == WinLH C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) -C_DEFINES = -DMSI_SUPPORTED=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib -!else +!elseif $(DDK_TARGET_OS) == WinXP TARGETLIBS=$(SDK_LIB_PATH)\scsiport.lib +!else +C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) +TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !endif SOURCES= virtio_stor.c \ @@ -34,6 +36,6 @@ MSC_WARNING_LEVEL=/W3 /WX # UNSUPPORTED OPTION # # Define this if you want debug messages to come out the console -# +# C_DEFINES = -DRHEL_COM_DEBUG=1 $(C_DEFINES) diff --git a/viostor/buildAll.bat b/viostor/buildAll.bat index 8d05802..668efe7 100644 --- a/viostor/buildAll.bat +++ b/viostor/buildAll.bat @@ -1,19 +1,23 @@ : : Set global parameters: : + +: Use Windows 7 DDK if %DDKVER%== set DDKVER=7600.16385.0 -set BUILDROOT=C:\WINDDK\%DDKVER% + +: By default DDK is installed under C:\WINDDK, but it can be installed in different location +if %DDKISNTALLROOT%== set DDKISNTALLROOT=C:\WINDDK\ +set BUILDROOT=%DDKISNTALLROOT%%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 if not %1== goto parameters_here echo no parameters specified, rebuild all call clean.bat -call %0 Vista Vista64 Win2003 Win200364 XP +call %0 WIN7 WIN7_64 Vista Vista64 Win2003 Win200364 XP goto :eof :parameters_here - :nextparam if %1== goto :eof goto %1 @@ -21,15 +25,24 @@ goto %1 shift goto nextparam +:Win7 +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WIN7 +popd +build -cZg + +goto continue + +:Win7_64 +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre WIN7 +popd +build -cZg + +goto continue -:preparebuild -echo DIRS=%* dirs -for %%f in (%*) do echo !include $(NTMAKEENV)\makefile.def %%f\makefile -set /a _NT_TARGET_MAJ=%_NT_TARGET_VERSION% 8 -set /a _NT_TARGET_MIN=%_NT_TARGET_VERSION% 255 -set _VERSION_=%_NT_TARGET_MAJ%.%_NT_TARGET_MIN%.%_MAJORVERSION_%.%_MINORVERSION_% -echo version set: %_VERSION_% -goto :eof :Vista set DDKBUILDENV= @@ -74,7 +87,4 @@ call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WXP popd build -cZg - - - goto :eof diff --git a/viostor/clean.bat b/viostor/clean.bat index 25b72c7..e47a389 100644 --- a/viostor/clean.bat +++ b/viostor/clean.bat @@ -6,7 +6,8 @@ rmdir /S /Q objfre_wnet_amd64 rmdir /S /Q objfre_w2k_x86 rmdir /S /Q objfre_wlh_x86 rmdir /S /Q objfre_wlh_amd64 - +rmdir /S /Q objfre_win7_x86 +rmdir /S /Q objfre_win7_amd64 diff --git a/viostor/virtio_stor.aps b/viostor/virtio_stor.aps new file mode 100644 index 000..def9d87 Binary files /dev/null and b/viostor/virtio_stor.aps differ -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] viostore - remove redundant Visual Studio files.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 8e90ba4193ea61689eec2158b570e1c1c0c7e9bc Author: Yan Vugenfirer yvuge...@redhat.com Date: Thu Feb 11 17:26:58 2010 +0200 [WIN-GUEST-DRIVERS] viostore - remove redundant Visual Studio files. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/viostor/build.proj b/viostor/build.proj deleted file mode 100644 index 7980ac9..000 --- a/viostor/build.proj +++ /dev/null @@ -1,139 +0,0 @@ -!-- -*** -RedHat.Common.targets - -WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have - created a backup copy. Incorrect changes to this file will make it - impossible to load or build RedHat projects from the command-line or the IDE. - -This file defines the steps in the standard build process for .NET projects. It -contains all the steps that are common among the different .NET languages, such as -Visual Basic, C#, and Visual J#. - -Copyright (C) RedHat Corporation. All rights reserved. -*** --- - -Project -DefaultTargets=Deploy -xmlns=http://schemas.microsoft.com/developer/msbuild/2003; - -Import Project=$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets/ -Import Project=Properties.proj/ - -PropertyGroup -XBuildDependsOnAfterDeploy; Deploy/XBuildDependsOn -TargetInfviostor.inf/TargetInf -/PropertyGroup - -ItemGroup -SignTool Include=C:\WinDDK\6001.18001\bin\SelfSign\SignTool.exe / -Inf2Cat Include=C:\WinDDK\6001.18001\bin\SelfSign\Inf2Cat.exe / -/ItemGroup - -ItemGroup -DriverOS Include=Win2003-32 -BuildAllOSWNET/BuildAllOS -TargetOSXP\x86/TargetOS -BuildAllEnvX86/BuildAllEnv -DriverPathobjfre_wnet_x86\i386/DriverPath - DriverFileNameobjfre_wnet_x86\i386\viostor.sys/DriverFileName -DriverCatFileobjfre_wnet_x86\i386\viostor.cat/DriverCatFile -Inf2CatOSesServer2003_X86/Inf2CatOSes -InfNamewnet.inf/InfName -TargetNameXPX86/TargetName -/DriverOS -DriverOS Include=Win2003-64 -BuildAllOSWNET/BuildAllOS -TargetOSXP\amd64/TargetOS -BuildAllEnvX64/BuildAllEnv -DriverPathobjfre_wnet_amd64\amd64/DriverPath - DriverFileNameobjfre_wnet_amd64\amd64\viostor.sys/DriverFileName - DriverCatFileobjfre_wnet_amd64\amd64\viostor.cat/DriverCatFile -Inf2CatOSesServer2003_X64/Inf2CatOSes -InfNamewnet.inf/InfName -TargetNameXPX64/TargetName -/DriverOS -DriverOS Include=Win2008-32 -BuildAllOSWLH/BuildAllOS -TargetOSVista\x86/TargetOS -BuildAllEnvX86/BuildAllEnv -DriverPathobjfre_wlh_x86\i386/DriverPath - DriverFileNameobjfre_wlh_x86\i386\viostor.sys/DriverFileName -DriverCatFileobjfre_wlh_x86\i386\viostor.cat/DriverCatFile -Inf2CatOSesServer2008_X86/Inf2CatOSes -InfNamewlh.inf/InfName -TargetNameVISTAX86/TargetName -/DriverOS -DriverOS Include=Win2008-64 -BuildAllOSWLH/BuildAllOS -TargetOSVista\amd64/TargetOS -BuildAllEnvX64/BuildAllEnv -DriverPathobjfre_wlh_amd64\amd64/DriverPath - DriverFileNameobjfre_wlh_amd64\amd64\viostor.sys/DriverFileName - DriverCatFileobjfre_wlh_amd64\amd64\viostor.cat/DriverCatFile -Inf2CatOSesServer2008_X64/Inf2CatOSes -InfNamewlh.inf/InfName -TargetNameVISTAX64/TargetName -/DriverOS -/ItemGroup - -!-- Functional Tasks -- -Target Name=INFUpdate -Time Format=MM/dd/ -Output TaskParameter=FormattedTime PropertyName=buildDate / -/Time -CreateItem Include=%(DriverOS.InfName) - Output TaskParameter=Include ItemName=DriversINFFiles/ -/CreateItem -FileUpdate -Files=%(DriverOS.InfName) -Regex=DriverVer\s*=\s*.* -ReplacementText=DriverVer = $(buildDate),$(MajorVersion).$(MinorVersion).$(MaintenanceVersion).$(BuildNumber)#13; -/ -Copy -SourceFiles=%(DriverOS.InfName) -DestinationFiles=%(DriverOS.DriverPath)\$(TargetInf) -/ -/Target - -Target Name=DriverSigning -Exec Command=@(SignTool) sign /v /ac $(SigningCrossCertFile) /s $(SigningCertStore) /n $(SigningCertName) /t http://timestamp.verisign.com/scripts/timestamp.dll %(DriverOS.DriverFileName) / -Exec
[COMMIT] [WIN-GUEST-DRIVERS] VirtIO lib: Adding compilation to Win 7 platform. Also allowing to specify specific path to DDK (no longer tied to installation in C:\WINDDK)
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 9a903b9ef2e73c3da6f700aabb86ea38b472a9e5 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Feb 10 17:26:50 2010 +0200 [WIN-GUEST-DRIVERS] VirtIO lib: Adding compilation to Win 7 platform. Also allowing to specify specific path to DDK (no longer tied to installation in C:\WINDDK) Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/VirtIO/buildAll.bat b/VirtIO/buildAll.bat index 8d05802..3b98210 100644 --- a/VirtIO/buildAll.bat +++ b/VirtIO/buildAll.bat @@ -1,19 +1,23 @@ : : Set global parameters: : + +: Use Windows 7 DDK if %DDKVER%== set DDKVER=7600.16385.0 -set BUILDROOT=C:\WINDDK\%DDKVER% + +: By default DDK is installed under C:\WINDDK, but it can be installed in different location +if %DDKISNTALLROOT%== set DDKISNTALLROOT=C:\WINDDK\ +set BUILDROOT=%DDKISNTALLROOT%%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 if not %1== goto parameters_here echo no parameters specified, rebuild all call clean.bat -call %0 Vista Vista64 Win2003 Win200364 XP +call %0 Win7 Win7_64 Vista Vista64 Win2003 Win200364 XP goto :eof :parameters_here - :nextparam if %1== goto :eof goto %1 @@ -21,20 +25,29 @@ goto %1 shift goto nextparam +:Win7 +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Wlh +popd +build -cZg + +goto continue + +:Win7_64 +set DDKBUILDENV= +pushd %BUILDROOT% +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre WIN7 +popd +build -cZg + +goto continue -:preparebuild -echo DIRS=%* dirs -for %%f in (%*) do echo !include $(NTMAKEENV)\makefile.def %%f\makefile -set /a _NT_TARGET_MAJ=%_NT_TARGET_VERSION% 8 -set /a _NT_TARGET_MIN=%_NT_TARGET_VERSION% 255 -set _VERSION_=%_NT_TARGET_MAJ%.%_NT_TARGET_MIN%.%_MAJORVERSION_%.%_MINORVERSION_% -echo version set: %_VERSION_% -goto :eof :Vista set DDKBUILDENV= pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Wlh +call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WIN7 popd build -cZg @@ -74,7 +87,4 @@ call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WXP popd build -cZg - - - goto :eof -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] NetKVM: Change debeug level for packet filtering OID
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 37cc09539a46f37d18751bb05cb6ae76eb6b3709 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 7 18:19:40 2010 +0200 [WIN-GUEST-DRIVERS] NetKVM: Change debeug level for packet filtering OID Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/Common/ParaNdis-Oid.c b/NetKVM/Common/ParaNdis-Oid.c index 328eadd..f724ffc 100644 --- a/NetKVM/Common/ParaNdis-Oid.c +++ b/NetKVM/Common/ParaNdis-Oid.c @@ -110,7 +110,7 @@ NDIS_STATUS ParaNdis_OnSetPacketFilter(PARANDIS_ADAPTER *pContext, tOidDesc *pOi if (status == NDIS_STATUS_SUCCESS) { - DPrintf(0, ([%s] PACKET FILTER SET TO %x, __FUNCTION__, pContext-PacketFilter)); + DPrintf(1, ([%s] PACKET FILTER SET TO %x, __FUNCTION__, pContext-PacketFilter)); } return status; } -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WINDOWS-GUEST-DRIVERs] Adding balloon driver to global build\clean scripts.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 2cae0c67461fc79802984ca06656230d8d7fa7a2 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Jan 27 16:42:27 2010 +0200 [WINDOWS-GUEST-DRIVERs] Adding balloon driver to global build\clean scripts. diff --git a/VirtIO/clean.bat b/VirtIO/clean.bat index 25b72c7..e47a389 100644 --- a/VirtIO/clean.bat +++ b/VirtIO/clean.bat @@ -6,7 +6,8 @@ rmdir /S /Q objfre_wnet_amd64 rmdir /S /Q objfre_w2k_x86 rmdir /S /Q objfre_wlh_x86 rmdir /S /Q objfre_wlh_amd64 - +rmdir /S /Q objfre_win7_x86 +rmdir /S /Q objfre_win7_amd64 diff --git a/buildAll.bat b/buildAll.bat index 7fcad19..bd91e7a 100644 --- a/buildAll.bat +++ b/buildAll.bat @@ -10,3 +10,7 @@ cd viostor call buildall.bat cd .. +cd Balloon\BalloonWDF +call buildall.bat +cd ..\.. + diff --git a/clean.bat b/clean.bat index 5ccaf2d..c74d6fa 100644 --- a/clean.bat +++ b/clean.bat @@ -10,3 +10,6 @@ cd viostor call clean.bat cd .. +cd Balloon\BalloonWDF +call clean.bat +cd ..\.. \ No newline at end of file -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WINDOWS-GUEST-DRIVERS] Adding balloon driver to global build\clean scripts.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 88a24e312806d5780181c6e3d089091320f830e5 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Jan 27 16:42:27 2010 +0200 [WINDOWS-GUEST-DRIVERS] Adding balloon driver to global build\clean scripts. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/VirtIO/clean.bat b/VirtIO/clean.bat index 25b72c7..e47a389 100644 --- a/VirtIO/clean.bat +++ b/VirtIO/clean.bat @@ -6,7 +6,8 @@ rmdir /S /Q objfre_wnet_amd64 rmdir /S /Q objfre_w2k_x86 rmdir /S /Q objfre_wlh_x86 rmdir /S /Q objfre_wlh_amd64 - +rmdir /S /Q objfre_win7_x86 +rmdir /S /Q objfre_win7_amd64 diff --git a/buildAll.bat b/buildAll.bat index 7fcad19..bd91e7a 100644 --- a/buildAll.bat +++ b/buildAll.bat @@ -10,3 +10,7 @@ cd viostor call buildall.bat cd .. +cd Balloon\BalloonWDF +call buildall.bat +cd ..\.. + diff --git a/clean.bat b/clean.bat index 5ccaf2d..c74d6fa 100644 --- a/clean.bat +++ b/clean.bat @@ -10,3 +10,6 @@ cd viostor call clean.bat cd .. +cd Balloon\BalloonWDF +call clean.bat +cd ..\.. \ No newline at end of file -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: MS Window virtio drivers certification status
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Saul Tamari Sent: Monday, January 11, 2010 4:50 PM To: kvm Subject: MS Window virtio drivers certification status Hi, I'm looking to find some information about the current status of the Windows virtio drivers. Are they certified by Microsoft? [YV] Drivers that were released with RHEL 5.4 are certified by MS for Windows XP, Windows 2003, Windows 2008 and Window 2008 R2. Drivers that will be released with RHEL 5.5 will also include Windows 7 certification. Is there a timeline for this? [YV] We are also working to push certified drivers as part of Fedora 13. Will the drivers be included in future MS operating system DVD distribution? [YV] No timeline for this. We definitely would like this to happen, but the process is in its beginning. Some additional comments regarding MS certification (might be different from things accustomed in open source community): Driver certification is per specific binary and not for the code base. So there is specific binary version of the driver that got MS certification. Thanks, Saul -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: MS Window virtio drivers certification status
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Saul Tamari Sent: Monday, January 11, 2010 6:26 PM To: Yan Vugenfirer Cc: kvm Subject: Re: MS Window virtio drivers certification status Hi, Are you talking about both network block drivers? [YV] Yes. Only difference for block - Windows XP certified driver wasn't release with RHEL5.4. It should be in RHEL 5.5. Thanks, Saul On Mon, Jan 11, 2010 at 5:49 PM, Yan Vugenfirer yvuge...@redhat.com wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Saul Tamari Sent: Monday, January 11, 2010 4:50 PM To: kvm Subject: MS Window virtio drivers certification status Hi, I'm looking to find some information about the current status of the Windows virtio drivers. Are they certified by Microsoft? [YV] Drivers that were released with RHEL 5.4 are certified by MS for Windows XP, Windows 2003, Windows 2008 and Window 2008 R2. Drivers that will be released with RHEL 5.5 will also include Windows 7 certification. Is there a timeline for this? [YV] We are also working to push certified drivers as part of Fedora 13. Will the drivers be included in future MS operating system DVD distribution? [YV] No timeline for this. We definitely would like this to happen, but the process is in its beginning. Some additional comments regarding MS certification (might be different from things accustomed in open source community): Driver certification is per specific binary and not for the code base. So there is specific binary version of the driver that got MS certification. Thanks, Saul -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: debugging windows guests
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Raindog Sent: Tuesday, December 15, 2009 2:25 AM To: kvm@vger.kernel.org Subject: debugging windows guests Hello, I am researching KVM as a malware analysis platform and had some questions about debugging the guest OS. In my case I intend to use windows guests. So my questsions are as follows: Questions: 1. What instrumentation facilities are their available? [YV] http://www.linux-kvm.org/page/WindowsGuestDrivers/GuestDebugging 2. Is it possible to extend the debugging interface so that debugging is more transparent to the guest OS? IE: there is still a limit of 4 HW breakpoints (which makes me wonder why a LIST is used for them...) 3. I'm not finding any published API for interfacing with KVM/KQEMU/QEMU at a low level, for example, for writing custom tracers, etc. Is there one? Or is there something similar? Bugs: 1. I hit a bug w/ instruction logging using a RAM based temp folder. If I ran w/ the following command line: (Version info: QEMU PC emulator version 0.10.50 (qemu-kvm-devel-88)) qemu-system-x86_64 -hda debian.img -enable-nesting -d in_asm It would successfully log to the tmp log file, but obviously, KVM would be disabled. If I use sudo, it won't log to the file, is this a known issue? 2. -enable-nesting on AMD hardware using a xen guest OS causes xen to GPF somewhere in svm_cpu_up. Is nesting supposed to work w/ Xen based guests? -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] viostor driver. some steps toward better performance on XP.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 4153629590c846862f095bbe3689df9e7fd70e06 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Nov 25 13:19:13 2009 +0200 [WIN-GUEST_DRIVERS] viostor driver. some steps toward better performance on XP. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c index d363909..8b91e62 100644 --- a/viostor/virtio_stor.c +++ b/viostor/virtio_stor.c @@ -1131,6 +1131,9 @@ CompleteDPC( } #endif CompleteSRB(DeviceExtension, Srb); +#ifndef USE_STORPORT +--adaptExt-requests; +#endif } #ifdef USE_STORPORT diff --git a/viostor/virtio_stor.h b/viostor/virtio_stor.h index 456fa0e..c00600c 100644 --- a/viostor/virtio_stor.h +++ b/viostor/virtio_stor.h @@ -105,6 +105,8 @@ typedef struct _ADAPTER_EXTENSION { LIST_ENTRYcomplete_list; #ifdef USE_STORPORT STOR_DPC completion_dpc; +#else +ULONG requests; #endif BOOLEAN has_sn; ULONG msix_vectors; diff --git a/viostor/virtio_stor_hw_helper.c b/viostor/virtio_stor_hw_helper.c index ed6abf7..21d27cd 100644 --- a/viostor/virtio_stor_hw_helper.c +++ b/viostor/virtio_stor_hw_helper.c @@ -94,9 +94,11 @@ RhelDoReadWrite(PVOID DeviceExtension, srbExt-vbr.sg[0], srbExt-out, srbExt-in, srbExt-vbr) == 0) { -//FIXME InsertTailList(adaptExt-list_head, srbExt-vbr.list_entry); adaptExt-pci_vq_info.vq-vq_ops-kick(adaptExt-pci_vq_info.vq); +if(++adaptExt-requests adaptExt-queue_depth) { + ScsiPortNotification(NextLuRequest, DeviceExtension, Srb-PathId, Srb-TargetId, Srb-Lun); +} return TRUE; } return FALSE; -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] viostor driver. fix PREfast warnings.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit f148ef98de5cf2c53bfe6cb743bee7424c907397 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Nov 25 13:22:26 2009 +0200 [WIN-GUEST_DRIVERS] viostor driver. fix PREfast warnings. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_pci.c b/viostor/virtio_pci.c index a72b019..78a6d29 100644 --- a/viostor/virtio_pci.c +++ b/viostor/virtio_pci.c @@ -183,6 +183,10 @@ VirtIODeviceFindVirtualQueue( // activate the queue pa = ScsiPortGetPhysicalAddress(DeviceExtension, NULL, info-queue, dummy); +if(!pa.QuadPart) { +ScsiPortWritePortUlong((PULONG)(adaptExt-device_base + VIRTIO_PCI_QUEUE_PFN),(ULONG)0); +return NULL; +} pageNum = (ULONG)(pa.QuadPart PAGE_SHIFT); RhelDbgPrint(TRACE_LEVEL_FATAL, ([%s] queue phys.address %08lx:%08lx, pfn %lx\n, __FUNCTION__, pa.u.HighPart, pa.u.LowPart, pageNum)); ScsiPortWritePortUlong((PULONG)(adaptExt-device_base + VIRTIO_PCI_QUEUE_PFN),(ULONG)(pageNum)); diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c index 8b91e62..c36b85b 100644 --- a/viostor/virtio_stor.c +++ b/viostor/virtio_stor.c @@ -247,29 +247,6 @@ VirtIoFindAdapter( return SP_RETURN_NOT_FOUND; } -if (!ScsiPortValidateRange(DeviceExtension, - ConfigInfo-AdapterInterfaceType, - ConfigInfo-SystemIoBusNumber, - accessRange-RangeStart, - accessRange-RangeLength, - (BOOLEAN)!accessRange-RangeInMemory)) { - -ScsiPortLogError(DeviceExtension, - NULL, - 0, - 0, - 0, - SP_INTERNAL_ADAPTER_ERROR, - __LINE__); - -RhelDbgPrint(TRACE_LEVEL_FATAL, (Range validation failed %x for %x bytes\n, - (*ConfigInfo-AccessRanges)[0].RangeStart.LowPart, - (*ConfigInfo-AccessRanges)[0].RangeLength)); - -return SP_RETURN_ERROR; -} - - ConfigInfo-NumberOfBuses = 1; ConfigInfo-MaximumNumberOfTargets = 1; ConfigInfo-MaximumNumberOfLogicalUnits = 1; @@ -707,7 +684,7 @@ VirtIoAdapterControl( RhelDbgPrint(TRACE_LEVEL_VERBOSE, (ScsiRestartAdapter\n)); adaptExt-pci_vq_info.vq = NULL; #ifdef MSI_SUPPORTED -if(!adaptExt-dump_mode adaptExt-msix_vectors) { +if(!adaptExt-dump_mode adaptExt-msix_vectors) { adaptExt-pci_vq_info.vq = VirtIODeviceFindVirtualQueue(DeviceExtension, 0, adaptExt-msix_vectors); } #endif -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] viostor driver. small fix in startio routine (storport related path).
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 3f938d806abf9aa3c8fe9e3dd825cdd6b5332301 Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Nov 25 13:35:11 2009 +0200 [WIN-GUEST_DRIVERS] viostor driver. small fix in startio routine (storport related path). Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_stor_hw_helper.c b/viostor/virtio_stor_hw_helper.c index 21d27cd..1a6e75e 100644 --- a/viostor/virtio_stor_hw_helper.c +++ b/viostor/virtio_stor_hw_helper.c @@ -27,7 +27,7 @@ SynchronizedAccessRoutine( if (adaptExt-pci_vq_info.vq-vq_ops-add_buf(adaptExt-pci_vq_info.vq, srbExt-vbr.sg[0], srbExt-out, srbExt-in, - srbExt-vbr) == 0){ + srbExt-vbr) = 0){ InsertTailList(adaptExt-list_head, srbExt-vbr.list_entry); adaptExt-pci_vq_info.vq-vq_ops-kick(adaptExt-pci_vq_info.vq); return TRUE; -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] Add IP checksum related missing code from the NDIS 5 driver. Already was implemented in NDIS 6 driver.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 43bc20276c98dc155ed3cfc0ba0c716ae8a8e574 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Nov 15 18:30:05 2009 +0200 [WIN-GUEST_DRIVERS] Add IP checksum related missing code from the NDIS 5 driver. Already was implemented in NDIS 6 driver. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/wxp/ParaNdis5-Impl.c b/NetKVM/wxp/ParaNdis5-Impl.c index 9abbb98..0808811 100644 --- a/NetKVM/wxp/ParaNdis5-Impl.c +++ b/NetKVM/wxp/ParaNdis5-Impl.c @@ -86,6 +86,13 @@ NDIS_HANDLE ParaNdis_OpenNICConfiguration(PARANDIS_ADAPTER *pContext) return cfg; } +void ParaNdis_RestoreDeviceConfigurationAfterReset( + PARANDIS_ADAPTER *pContext) +{ + +} + + /** Indicates connect/disconnect events Parameters: @@ -724,12 +731,14 @@ tMapperResult ParaNdis_PacketMapper( tTcpIpPacketParsingResult packetReview; ULONG dummyTransferSize = 0; ULONG saveBuffers = res.nBuffersMapped; + ULONG flags = pcrIpChecksum | pcrTcpChecksum | pcrFixPHChecksum; PVOID pIpHeader = RtlOffsetToPointer(pBuffer, pContext-Offload.ipHeaderOffset); res.nBuffersMapped = 0; + if (pContext-bFixIPChecksum) flags |= pcrFixIPChecksum; packetReview = ParaNdis_CheckSumVerify( pIpHeader, lengthGet - pContext-Offload.ipHeaderOffset, - pcrIpChecksum | pcrTcpChecksum | pcrFixIPChecksum | pcrFixPHChecksum, + flags, __FUNCTION__); /* uncomment to verify */ /* diff --git a/NetKVM/wxp/netkvm.inf b/NetKVM/wxp/netkvm.inf index 5b0d13f..7bdd8fe 100644 --- a/NetKVM/wxp/netkvm.inf +++ b/NetKVM/wxp/netkvm.inf @@ -149,6 +149,11 @@ HKR, Ndi\Params\IPPacketsCheck,type, 0, enum HKR, Ndi\Params\IPPacketsCheck\enum,1, 0, %Enable% HKR, Ndi\Params\IPPacketsCheck\enum,0, 0, %Disable% +HKR, Ndi\Params\IPChecksumFix, ParamDesc, 0, %IPChecksumFix% +HKR, Ndi\Params\IPChecksumFix, Default,0, 1 +HKR, Ndi\Params\IPChecksumFix, type, 0, enum +HKR, Ndi\Params\IPChecksumFix\enum,1,0, %Enable% +HKR, Ndi\Params\IPChecksumFix\enum,0,0, %Disable% HKR, Ndi\params\DebugLevel,ParamDesc, 0, %DebugLevel% HKR, Ndi\params\DebugLevel,type, 0, int @@ -263,6 +268,7 @@ Offload.TxTCP = Offload Tx TCP checksum OffLoad.TxUDP = Offload Tx UDP checksum Offload.TxLSO = Offload Tx LSO HwOffload = Hardware checksumming +IPChecksumFix = Fix IP checksum on LSO IPPacketsCheck = Analyze IP packets PriorityVlanTag = Priority and VLAN tagging PriorityOnly = Priority -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] viostor driver.Add memory read barrier - synch with fix for Linux guests by Michael S. Tsirkinm...@redhat.com
repository: C:/dev/kvm-guest-drivers-windows branch: master commit b68b7671ab3dd07f7f16e819db2d4060bbaeb901 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Nov 1 15:23:20 2009 +0200 [WIN-GUEST-DRIVERS] viostor driver.Add memory read barrier - synch with fix for Linux guests by Michael S. Tsirkinm...@redhat.com Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_ring.c b/viostor/virtio_ring.c index d099bb8..2911cef 100644 --- a/viostor/virtio_ring.c +++ b/viostor/virtio_ring.c @@ -237,6 +237,8 @@ vring_get_buf( return NULL; } +rmb(); + i = vq-vring.used-ring[vq-last_used_idx%vq-vring.num].id; *len = vq-vring.used-ring[vq-last_used_idx%vq-vring.num].len; -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] Fix the driver version report through OID. Will fix the warning during MS tests.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit e4808e72e5d12fa97b17dfd2d1e465a6c6331e8a Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Nov 1 15:59:18 2009 +0200 [WIN-GUEST-DRIVERS] Fix the driver version report through OID. Will fix the warning during MS tests. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/Common/ParaNdis-Oid.c b/NetKVM/Common/ParaNdis-Oid.c index bca1bcc..328eadd 100644 --- a/NetKVM/Common/ParaNdis-Oid.c +++ b/NetKVM/Common/ParaNdis-Oid.c @@ -263,7 +263,7 @@ NDIS_STATUS ParaNdis_OidQueryCommon(PARANDIS_ADAPTER *pContext, tOidDesc *pOid) break; case OID_GEN_VENDOR_DRIVER_VERSION: - SETINFO(ul, (PARANDIS_MAJOR_DRIVER_VERSION 16) | PARANDIS_MINOR_DRIVER_VERSION); + SETINFO(ul, (NDIS_MINIPORT_MAJOR_VERSION 16) | NDIS_MINIPORT_MINOR_VERSION); break; case OID_GEN_CURRENT_PACKET_FILTER: pInfo = pContext-PacketFilter; -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin m...@redhat.com
Committed. Thanks. -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Vadim Rozenfeld Sent: Sunday, November 01, 2009 12:41 PM To: kvm@vger.kernel.org Subject: [PATCH] viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin m...@redhat.com repository: /home/vadimr/shares/kvm-guest-drivers-windows branch: XP commit 6906acfc2d5f58df43ebc9c190e1447ff6e63a01 Author: Vadim Rozenfeldvroze...@redhat.com Date: Sun Nov 1 11:54:03 2009 +0200 [PATCH] viostor driver.Add memory read barrier - synch with fix for Linux guests by Michael S. Tsirkinm...@redhat.com Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_ring.c b/viostor/virtio_ring.c index d099bb8..2911cef 100644 --- a/viostor/virtio_ring.c +++ b/viostor/virtio_ring.c @@ -237,6 +237,8 @@ vring_get_buf( return NULL; } +rmb(); + i = vq-vring.used-ring[vq-last_used_idx%vq-vring.num].id; *len = vq-vring.used-ring[vq-last_used_idx%vq-vring.num].len; -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] viostor driver. remove trailing white spaces
repository: C:/dev/kvm-guest-drivers-windows branch: master commit d26380f3b3943bb25b8b1a4e12d3c4fa1118898f Author: Yan Vugenfirer yvuge...@redhat.com Date: Wed Oct 28 12:24:15 2009 +0200 [WIN-GUEST-DRIVERS] viostor driver. remove trailing white spaces Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/SOURCES b/viostor/SOURCES index 1352710..a98a081 100644 --- a/viostor/SOURCES +++ b/viostor/SOURCES @@ -1,7 +1,7 @@ TARGETNAME=viostor TARGETTYPE=MINIPORT -!if $(DDK_TARGET_OS) == WinNET +!if $(DDK_TARGET_OS) == WinNET C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !elseif $(DDK_TARGET_OS) == WinLH @@ -34,6 +34,6 @@ MSC_WARNING_LEVEL=/W3 /WX # UNSUPPORTED OPTION # # Define this if you want debug messages to come out the console -# +# C_DEFINES = -DRHEL_COM_DEBUG=1 $(C_DEFINES) diff --git a/viostor/osdep.h b/viostor/osdep.h index bd4c766..a30c411 100644 --- a/viostor/osdep.h +++ b/viostor/osdep.h @@ -2,13 +2,13 @@ * Copyright (c) 2008 Red Hat, Inc. * * File: osdep.h - * - * This file contains highest level definitions + * + * This file contains highest level definitions * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * -**/ +**/ #ifndef __OS_DEP_H #define __OS_DEP_H diff --git a/viostor/txtsetup.oem b/viostor/txtsetup.oem index 0a57c50..b38a26d 100644 --- a/viostor/txtsetup.oem +++ b/viostor/txtsetup.oem @@ -3,7 +3,7 @@ d1 = OEM DISK (SCSI) Win2003/32-bit,\disk1,\i386\Win2003 d2 = OEM DISK (SCSI) Win2003/64-bit,\disk1,\amd64\Win2003 [Defaults] -SCSI = WNET32 +SCSI = WNET32 [scsi] WNET32 = Red Hat VirtIO SCSI Disk Device Win2003/32-bit diff --git a/viostor/virtio_pci.c b/viostor/virtio_pci.c index 6023cef..a72b019 100644 --- a/viostor/virtio_pci.c +++ b/viostor/virtio_pci.c @@ -30,7 +30,7 @@ #include virtio_stor.h -VOID +VOID VirtIODeviceDumpRegisters( IN PVOID DeviceExtension) { @@ -49,9 +49,9 @@ VirtIODeviceDumpRegisters( } -bool +bool VirtIODeviceGetHostFeature( -IN PVOID DeviceExtension, +IN PVOID DeviceExtension, unsigned uFeature) { PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension; @@ -61,7 +61,7 @@ VirtIODeviceGetHostFeature( return !!(ScsiPortReadPortUlong((PULONG)(adaptExt-device_base + VIRTIO_PCI_HOST_FEATURES)) (1 uFeature)); } -VOID +VOID VirtIODeviceReset( IN PVOID DeviceExtension) { @@ -74,7 +74,7 @@ VirtIODeviceReset( VOID VirtIODeviceGet( -IN PVOID DeviceExtension, +IN PVOID DeviceExtension, unsigned offset, PVOID buf, unsigned len) @@ -93,7 +93,7 @@ VirtIODeviceGet( } } -UCHAR +UCHAR VirtIODeviceISR( IN PVOID DeviceExtension) { @@ -106,8 +106,8 @@ VirtIODeviceISR( // the notify function used when creating a virt queue / -static -VOID +static +VOID vp_notify( IN struct virtqueue *vq) { @@ -117,11 +117,11 @@ vp_notify( RhelDbgPrint(TRACE_LEVEL_VERBOSE, (%s queue %d\n, __FUNCTION__, info-queue_index)); // we write the queue's selector into the notification register to -// * signal the other end -ScsiPortWritePortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_PCI_QUEUE_NOTIFY),(USHORT)(info-queue_index)); +// * signal the other end +ScsiPortWritePortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_PCI_QUEUE_NOTIFY),(USHORT)(info-queue_index)); } -struct +struct virtqueue* VirtIODeviceFindVirtualQueue( IN PVOID DeviceExtension, @@ -133,7 +133,7 @@ VirtIODeviceFindVirtualQueue( u16num; ULONG dummy; PHYSICAL_ADDRESS pa; -ULONG pageNum; +ULONG pageNum; unsigned res; PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension; @@ -160,7 +160,7 @@ VirtIODeviceFindVirtualQueue( return NULL; // allocate and fill out our structure the represents an active queue -info = adaptExt-pci_vq_info; +info = adaptExt-pci_vq_info; info-queue_index = index; info-num = num; @@ -168,8 +168,8 @@ VirtIODeviceFindVirtualQueue( RhelDbgPrint(TRACE_LEVEL_FATAL, ([%s] info = %p, info-queue = %p\n, __FUNCTION__, info, info-queue) ); // create the vring memset(info-queue, 0, vring_size(num,PAGE_SIZE)); -vq = vring_new_virtqueue(info-num, - DeviceExtension, +vq = vring_new_virtqueue(info-num, + DeviceExtension, info-queue, vp_notify); @@ -181,7 +181,7 @@ VirtIODeviceFindVirtualQueue( vq-priv = info; info-vq = vq; -// activate the queue +// activate the queue pa = ScsiPortGetPhysicalAddress(DeviceExtension, NULL, info
[COMMIT] [WIN-GUEST-DRIVERS] Clean up prefast (MS static code analyzer tool) errors.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 2a08ca42e31cb525a7179c71fbb7f9e19edc7bb3 Author: Yan Vugenfirer yvuge...@redhat.com Date: Tue Oct 27 18:28:43 2009 +0200 [WIN-GUEST-DRIVERS] Clean up prefast (MS static code analyzer tool) errors. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/Common/ParaNdis-Debug.c b/NetKVM/Common/ParaNdis-Debug.c index 22d3b73..71494ef 100644 --- a/NetKVM/Common/ParaNdis-Debug.c +++ b/NetKVM/Common/ParaNdis-Debug.c @@ -24,12 +24,7 @@ int bDebugPrint = 1; static NDIS_SPIN_LOCK CrashLock; -static VOID ParaNdis_OnBugCheck( -IN KBUGCHECK_CALLBACK_REASON Reason, -IN PKBUGCHECK_REASON_CALLBACK_RECORD Record, -IN OUT PVOID ReasonSpecificData, -IN ULONG ReasonSpecificDataLength -); +static KBUGCHECK_REASON_CALLBACK_ROUTINE ParaNdis_OnBugCheck; static VOID ParaNdis_PrepareBugCheckData(); typedef BOOLEAN (*KeRegisterBugCheckReasonCallbackType) ( diff --git a/NetKVM/wlh/ParaNdis6-Driver.c b/NetKVM/wlh/ParaNdis6-Driver.c index 30357a2..1ceaef6 100644 --- a/NetKVM/wlh/ParaNdis6-Driver.c +++ b/NetKVM/wlh/ParaNdis6-Driver.c @@ -56,7 +56,7 @@ static KeRegisterProcessorChangeCallbackType static KeDeregisterProcessorChangeCallbackType ParaNdis2008_DeregisterCallback = DummyDeregisterProcessorChangeCallback; -static PVOID ProcessorChangeCallbackHandle = NULL; +static PROCESSOR_CALLBACK_FUNCTION * ProcessorChangeCallbackHandle = NULL; static VOID ParaNdis_OnCPUChange( __in PVOID CallbackContext, diff --git a/NetKVM/wxp/ParaNdis5-Driver.c b/NetKVM/wxp/ParaNdis5-Driver.c index 2e36a78..12aeeef 100644 --- a/NetKVM/wxp/ParaNdis5-Driver.c +++ b/NetKVM/wxp/ParaNdis5-Driver.c @@ -22,6 +22,8 @@ static NDIS_HANDLE DriverHandle; static ULONG gID = 0; +static DRIVER_UNLOAD ParaVirtualNICUnload; + /** Unload handler, only responsibility is cleanup WPP ***/ -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] viostor driver. Code cleanup. Getting rid of the Registry stuff.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 1d364940b008413e3ceb5adc06e6c5677e732c83 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 14:20:37 2009 +0200 [WIN-GUEST-DRIVERS] viostor driver. Code cleanup. Getting rid of the Registry stuff. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c index d528ca9..48a57d4 100644 --- a/viostor/virtio_stor.c +++ b/viostor/virtio_stor.c @@ -19,13 +19,6 @@ ULONG RhelDbgLevel = TRACE_LEVEL_NONE; BOOLEAN IsCrashDumpMode; -UNICODE_STRING ViostorServicePathUnicode = -RTL_CONSTANT_STRING(VIOSTOR_SERVICE_NAME); - -UNICODE_STRING MaxTransferSizeUnicode = -RTL_CONSTANT_STRING(MAX_TRANSFER_SIZE); - - BOOLEAN VirtIoHwInitialize( IN PVOID DeviceExtension @@ -98,12 +91,6 @@ CompleteSRB( IN PSCSI_REQUEST_BLOCK Srb ); -BOOLEAN -GetMaxTransferSize( -IN PVOID DeviceExtension -); - - ULONG DriverEntry( IN PVOID DriverObject, @@ -292,35 +279,19 @@ VirtIoFindAdapter( vq_sz = (sizeof(struct vring_virtqueue) + sizeof(PVOID) * pageNum); if(adaptExt-dump_mode) { -adaptExt-breaks_number = 8; -adaptExt-queue_depth = 4; +ConfigInfo-NumberOfPhysicalBreaks = 8; } else { -if(GetMaxTransferSize(DeviceExtension)) { - adaptExt-breaks_number = (adaptExt-transfer_size / 4); - if(pageNum = (adaptExt-breaks_number * 4)) { - adaptExt-breaks_number = (pageNum / 4); - } - adaptExt-breaks_number = min(adaptExt-breaks_number, 64); - adaptExt-breaks_number = max(adaptExt-breaks_number, 1); - adaptExt-queue_depth = (pageNum / adaptExt-breaks_number) - 1; - adaptExt-queue_depth = max(adaptExt-queue_depth, 1); -} else { - adaptExt-breaks_number = (pageNum / 2); - adaptExt-breaks_number = min(adaptExt-breaks_number, 8); - adaptExt-breaks_number = max(adaptExt-breaks_number, 1); - adaptExt-queue_depth = 4; -} +ConfigInfo-NumberOfPhysicalBreaks = 16; } -ConfigInfo-NumberOfPhysicalBreaks = adaptExt-breaks_number; -ConfigInfo-MaximumTransferLength -= ConfigInfo-NumberOfPhysicalBreaks * PAGE_SIZE; +ConfigInfo-MaximumTransferLength = ConfigInfo-NumberOfPhysicalBreaks * PAGE_SIZE; +adaptExt-queue_depth = pageNum / ConfigInfo-NumberOfPhysicalBreaks - 1; RhelDbgPrint(TRACE_LEVEL_INFORMATION, (breaks_number = %x queue_depth = %x\n, -adaptExt-breaks_number, +ConfigInfo-NumberOfPhysicalBreaks, adaptExt-queue_depth)); -ptr = (ULONG_PTR)ScsiPortGetUncachedExtension(DeviceExtension, ConfigInfo, (PAGE_SIZE + vr_sz + vq_sz)); +ptr = (ULONG_PTR)ScsiPortGetUncachedExtension(DeviceExtension, ConfigInfo, (PAGE_SIZE + vr_sz + vq_sz)); if (ptr == (ULONG_PTR)NULL) { ScsiPortLogError(DeviceExtension, NULL, @@ -1000,67 +971,3 @@ CompleteSRB( Srb-Lun); #endif } - -BOOLEAN -GetMaxTransferSize( -IN PVOID DeviceExtension -) -{ - -NTSTATUS status; -OBJECT_ATTRIBUTES oa; -HANDLEkeyHandle; -RHEL_ULONG_VALUE_PARTIAL_INFO ulongValueInfo; -ULONG ulongValueLength; -PADAPTER_EXTENSIONadaptExt; - -adaptExt = (PADAPTER_EXTENSION)DeviceExtension; - -InitializeObjectAttributes(oa, - ViostorServicePathUnicode, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - -status = ZwOpenKey(keyHandle, - KEY_READ, - oa); - -if (!NT_SUCCESS(status)) { -RhelDbgPrint(TRACE_LEVEL_ERROR, - (ReadRegistryValues: Failed to open services key! 0x%x\n, - status)); -return FALSE; -} - -status = ZwQueryValueKey(keyHandle, - MaxTransferSizeUnicode, - KeyValuePartialInformation, - ulongValueInfo, - sizeof(ulongValueInfo), - ulongValueLength); - -if (!NT_SUCCESS(status)) { -RhelDbgPrint(TRACE_LEVEL_ERROR, - (ReadRegistryValues: Failed to query %wZ value! 0x%x\n, - MaxTransferSizeUnicode, status)); -ZwClose(keyHandle); -return FALSE; -} - -ASSERT(ulongValueInfo.PartialInfo.Type == REG_SZ); - -switch(*ulongValueInfo.PartialInfo.Data) { -case '0' : adaptExt-transfer_size = 64; break; -case '1' : adaptExt-transfer_size = 128; break; -case '2' : adaptExt-transfer_size = 256; break
[COMMIT] [WIN-GUEST-DRIVERS]viostor driver. Complete SRBs at DPC level
repository: C:/dev/kvm-guest-drivers-windows branch: master commit c7561ecd1c1d6fd7c119cd45f43579f7cae0bd48 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 15:59:53 2009 +0200 [WIN-GUEST-DRIVERS]viostor driver. Complete SRBs at DPC level Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/buildfre_wxp_x86.err b/viostor/buildfre_wxp_x86.err new file mode 100644 index 000..1214f22 --- /dev/null +++ b/viostor/buildfre_wxp_x86.err @@ -0,0 +1,209 @@ +errors in directory c:\dev\kvm-guest-drivers-windows\viostor +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.h(99) : error C2061: syntax error : identifier 'STOR_DPC' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.h(100) : error C2059: syntax error : '}' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(149) : error C2065: 'ADAPTER_EXTENSION' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(191) : error C2065: 'PADAPTER_EXTENSION' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(191) : error C2146: syntax error : missing ';' before identifier 'adaptExt' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(191) : error C2065: 'adaptExt' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(192) : error C2275: 'ULONG_PTR' : illegal use of this type as an expression +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(192) : error C2146: syntax error : missing ';' before identifier 'ptr' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(192) : error C2065: 'ptr' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(193) : error C2275: 'ULONG' : illegal use of this type as an expression +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(193) : error C2146: syntax error : missing ';' before identifier 'vr_sz' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(193) : error C2065: 'vr_sz' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(194) : error C2275: 'ULONG' : illegal use of this type as an expression +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(194) : error C2146: syntax error : missing ';' before identifier 'vq_sz' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(194) : error C2065: 'vq_sz' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(195) : error C2275: 'USHORT' : illegal use of this type as an expression +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(195) : error C2146: syntax error : missing ';' before identifier 'pageNum' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(195) : error C2065: 'pageNum' : undeclared identifier +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(199) : error C2146: syntax error : missing ';' before identifier 'DeviceExtension' +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(201) : error C2223: left of '-dump_mode' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(265) : error C2223: left of '-device_base' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(272) : error C2223: left of '-device_base' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(287) : error C2223: left of '-device_base' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(287) : error C2198: 'ScsiPortWritePortUshort' : too few arguments for call +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(288) : error C2223: left of '-dump_mode' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(289) : error C2223: left of '-device_base' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(289) : error C2198: 'ScsiPortWritePortUshort' : too few arguments for call +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(293) : error C2223: left of '-device_base' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(293) : error C2198: 'ScsiPortReadPortUshort' : too few arguments for call +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(297) : error C2223: left of '-dump_mode' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(304) : error C2223: left of '-queue_depth' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(325) : error C2223: left of '-pci_vq_info' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(326) : error C2223: left of '-virtqueue' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(326) : error C2223: left of '-pci_vq_info' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(328) : error C2223: left of '-pci_vq_info' must point to struct/union +c:\dev\kvm-guest-drivers-windows\viostor\virtio_stor.c(329) : error C2223
[COMMIT] [WIN-GUEST-DRIVERS] viostor driver. Complete SRBs at DPC level. Fixing previous commit.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit c8a200effa3a9082319ae0130073186ede86cdd4 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 16:02:24 2009 +0200 [WIN-GUEST-DRIVERS] viostor driver. Complete SRBs at DPC level. Fixing previous commit. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c index f1c8099..b515dd9 100644 --- a/viostor/virtio_stor.c +++ b/viostor/virtio_stor.c @@ -30,6 +30,14 @@ VirtIoBuildIo( IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb ); + +VOID +CompleteDpcRoutine( +IN PSTOR_DPC Dpc, +IN PVOID Context, +IN PVOID SystemArgument1, +IN PVOID SystemArgument2 +) ; #endif BOOLEAN @@ -91,6 +99,13 @@ CompleteSRB( IN PSCSI_REQUEST_BLOCK Srb ); +VOID +FORCEINLINE +CompleteDPC( +IN PVOID DeviceExtension, +IN pblk_req vbr +); + ULONG DriverEntry( IN PVOID DriverObject, @@ -325,10 +340,28 @@ VirtIoFindAdapter( } InitializeListHead(adaptExt-list_head); +InitializeListHead(adaptExt-complete_list); return SP_RETURN_FOUND; } +#ifdef USE_STORPORT +BOOLEAN +VirtIoPassiveInitializeRoutine ( +IN PVOID DeviceExtension +) +{ +PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension; + +StorPortInitializeDpc(DeviceExtension, +adaptExt-completion_dpc, +CompleteDpcRoutine); + +return TRUE; +} +#endif + + BOOLEAN VirtIoHwInitialize( IN PVOID DeviceExtension @@ -400,7 +433,14 @@ VirtIoHwInitialize( ScsiPortMoveMemory(adaptExt-inquiry_data.ProductRevisionLevel, 0001, sizeof(0001)); ScsiPortMoveMemory(adaptExt-inquiry_data.VendorSpecific, 0001, sizeof(0001)); -return TRUE; +#ifdef USE_STORPORT +if(!adaptExt-dump_mode) +{ +return StorPortEnablePassiveInitialization(DeviceExtension, VirtIoPassiveInitializeRoutine); +} +#endif + +return TRUE; } BOOLEAN @@ -564,8 +604,7 @@ VirtIoInterrupt( Srb-SrbStatus = SRB_STATUS_ERROR; break; } - RemoveEntryList(vbr-list_entry); - CompleteSRB(DeviceExtension, Srb); + CompleteDPC(DeviceExtension, vbr); } } RhelDbgPrint(TRACE_LEVEL_VERBOSE, (%s isInterruptServiced = %d\n, __FUNCTION__, isInterruptServiced)); @@ -974,3 +1013,63 @@ CompleteSRB( Srb-Lun); #endif } + +VOID +FORCEINLINE +CompleteDPC( +IN PVOID DeviceExtension, +IN pblk_req vbr +) +{ +PSCSI_REQUEST_BLOCK Srb = (PSCSI_REQUEST_BLOCK)vbr-req; +PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension; + +RemoveEntryList(vbr-list_entry); + +#ifdef USE_STORPORT +if(!adaptExt-dump_mode) { +InsertTailList(adaptExt-complete_list, vbr-list_entry); +StorPortIssueDpc(DeviceExtension, + adaptExt-completion_dpc, + NULL, + NULL); +return; +} +#endif +CompleteSRB(DeviceExtension, Srb); +} + + +VOID +CompleteDpcRoutine( +IN PSTOR_DPC Dpc, +IN PVOID Context, +IN PVOID SystemArgument1, +IN PVOID SystemArgument2 +) +{ +STOR_LOCK_HANDLE LockHandle; +PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)Context; + +StorPortAcquireSpinLock ( Context, InterruptLock , NULL, LockHandle); + +while (!IsListEmpty(adaptExt-complete_list)) { +PSCSI_REQUEST_BLOCK Srb; +pblk_req vbr; +vbr = (pblk_req) RemoveHeadList(adaptExt-complete_list); +Srb = (PSCSI_REQUEST_BLOCK)vbr-req; + +StorPortReleaseSpinLock (Context, LockHandle); + +ScsiPortNotification(RequestComplete, + Context, + Srb); + +StorPortAcquireSpinLock ( Context, InterruptLock , NULL, LockHandle); + +} + +StorPortReleaseSpinLock (Context, LockHandle); + +return; +} diff --git a/viostor/virtio_stor.h b/viostor/virtio_stor.h index 2d98738..2533148 100644 --- a/viostor/virtio_stor.h +++ b/viostor/virtio_stor.h @@ -95,6 +95,8 @@ typedef struct _ADAPTER_EXTENSION { ULONG queue_depth; BOOLEAN dump_mode; LIST_ENTRYlist_head; +LIST_ENTRYcomplete_list; +STOR_DPC completion_dpc; }ADAPTER_EXTENSION, *PADAPTER_EXTENSION; typedef struct _RHEL_SRB_EXTENSION { -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] viostor driver. Add support for serial number feature.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 05200e17936d50e4a203b23ac3870c9ffa30396c Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 16:04:27 2009 +0200 [WIN-GUEST-DRIVERS] viostor driver. Add support for serial number feature. Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c index b515dd9..5341940 100644 --- a/viostor/virtio_stor.c +++ b/viostor/virtio_stor.c @@ -416,9 +416,17 @@ VirtIoHwInitialize( RhelDbgPrint(TRACE_LEVEL_INFORMATION, (VIRTIO_BLK_F_GEOMETRY. cylinders = %d heads = %d sectors = %d\n, adaptExt-info.geometry.cylinders, adaptExt-info.geometry.heads, adaptExt-info.geometry.sectors)); } +if (VirtIODeviceGetHostFeature(DeviceExtension, VIRTIO_BLK_F_IDENTIFY)) { +VirtIODeviceGet(DeviceExtension, FIELD_OFFSET(blk_config, identify), + adaptExt-info.identify, VIRTIO_BLK_ID_LEN); +adaptExt-has_sn = TRUE; +RhelDbgPrint(TRACE_LEVEL_INFORMATION, (VIRTIO_BLK_F_IDENTIFY. \n)); +} + + VirtIODeviceGet( DeviceExtension, FIELD_OFFSET(blk_config, capacity), cap, sizeof(cap)); -adaptExt-info.capacity = cap; +adaptExt-info.capacity = cap; RhelDbgPrint(TRACE_LEVEL_INFORMATION, (capacity = %08I64X\n, adaptExt-info.capacity)); memset(adaptExt-inquiry_data, 0, sizeof(INQUIRYDATA)); @@ -800,12 +808,17 @@ RhelScsiGetInquiryData( PVPD_SERIAL_NUMBER_PAGE SerialPage; SerialPage = (PVPD_SERIAL_NUMBER_PAGE)Srb-DataBuffer; -SerialPage-PageCode = VPD_SERIAL_NUMBER; -SerialPage-PageLength = 1; -SerialPage-SerialNumber[0] = '0'; +SerialPage-PageCode = VPD_SERIAL_NUMBER; +if(adaptExt-has_sn) { + SerialPage-PageLength = VIRTIO_BLK_ID_SN_BYTES; + ScsiPortMoveMemory(SerialPage-SerialNumber[0], adaptExt-info.identify[VIRTIO_BLK_ID_SN], VIRTIO_BLK_ID_SN_BYTES); +} else { + SerialPage-PageLength = 1; + SerialPage-SerialNumber[0] = '0'; +} Srb-DataTransferLength = sizeof(VPD_SERIAL_NUMBER_PAGE) + SerialPage-PageLength; } -else if ((cdb-CDB6INQUIRY3.PageCode == VPD_DEVICE_IDENTIFIERS) +else if ((cdb-CDB6INQUIRY3.PageCode == VPD_DEVICE_IDENTIFIERS) (cdb-CDB6INQUIRY3.EnableVitalProductData == 1)) { PVPD_IDENTIFICATION_PAGE IdentificationPage; diff --git a/viostor/virtio_stor.h b/viostor/virtio_stor.h index 2533148..dd4728e 100644 --- a/viostor/virtio_stor.h +++ b/viostor/virtio_stor.h @@ -36,6 +36,12 @@ typedef struct VirtIOBufferDescriptor VIO_SG, *PVIO_SG; #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ #define VIRTIO_BLK_F_RO5 /* Disk is read-only */ #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ +#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ +#define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */ + +#define VIRTIO_BLK_ID_LEN 256 /* length of identify u16 array */ +#define VIRTIO_BLK_ID_SN10 /* start of char * serial# */ +#define VIRTIO_BLK_ID_SN_BYTES 20 /* length in bytes of serial# */ /* These two define direction. */ #define VIRTIO_BLK_T_IN0 @@ -66,6 +72,7 @@ typedef struct virtio_blk_config { } geometry; /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ u32 blk_size; +u16 identify[VIRTIO_BLK_ID_LEN]; }blk_config, *pblk_config; #pragma pack() @@ -97,6 +104,7 @@ typedef struct _ADAPTER_EXTENSION { LIST_ENTRYlist_head; LIST_ENTRYcomplete_list; STOR_DPC completion_dpc; +BOOLEAN has_sn; }ADAPTER_EXTENSION, *PADAPTER_EXTENSION; typedef struct _RHEL_SRB_EXTENSION { -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] Add MSI-X support for viostor driver
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 597c5be5ab7fd44aa4e127c5cec028964588e9a7 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 16:06:30 2009 +0200 [WIN-GUEST-DRIVERS] Add MSI-X support for viostor driver Signed-off-by: Vadim Rozenfeldvroze...@redhat.com diff --git a/viostor/SOURCES b/viostor/SOURCES index 561cfc0..1352710 100644 --- a/viostor/SOURCES +++ b/viostor/SOURCES @@ -6,6 +6,7 @@ C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !elseif $(DDK_TARGET_OS) == WinLH C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES) +C_DEFINES = -DMSI_SUPPORTED=1 $(C_DEFINES) TARGETLIBS=$(SDK_LIB_PATH)\storport.lib !else TARGETLIBS=$(SDK_LIB_PATH)\scsiport.lib diff --git a/viostor/virtio_pci.c b/viostor/virtio_pci.c index 6bf26cc..6023cef 100644 --- a/viostor/virtio_pci.c +++ b/viostor/virtio_pci.c @@ -86,7 +86,7 @@ VirtIODeviceGet( RhelDbgPrint(TRACE_LEVEL_VERBOSE, (%s\n, __FUNCTION__)); -ioaddr = adaptExt-device_base + VIRTIO_PCI_CONFIG + offset; +ioaddr = adaptExt-device_base + VIRTIO_PCI_CONFIG((adaptExt-msix_vectors 0)) + offset; for (i = 0; i len; i++) { ptr[i] = ScsiPortReadPortUchar((PUCHAR)(ioaddr + i)); @@ -125,7 +125,8 @@ struct virtqueue* VirtIODeviceFindVirtualQueue( IN PVOID DeviceExtension, -IN unsigned index) +IN unsigned index, +IN unsigned vector) { virtio_pci_vq_info *info; struct virtqueue *vq; @@ -133,9 +134,20 @@ VirtIODeviceFindVirtualQueue( ULONG dummy; PHYSICAL_ADDRESS pa; ULONG pageNum; +unsigned res; PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension; -RhelDbgPrint(TRACE_LEVEL_VERBOSE, (%s\n, __FUNCTION__)); +RhelDbgPrint(TRACE_LEVEL_VERBOSE, (%s index = %d, vector = %d\n, __FUNCTION__, index, vector)); + +if(vector) { +ScsiPortWritePortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_MSI_CONFIG_VECTOR),(USHORT)0); +res = ScsiPortReadPortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_MSI_CONFIG_VECTOR)); +RhelDbgPrint(TRACE_LEVEL_FATAL, (%s VIRTIO_MSI_CONFIG_VECTOR res = 0x%x\n, __FUNCTION__, res)); +if(res == VIRTIO_MSI_NO_VECTOR) { + RhelDbgPrint(TRACE_LEVEL_FATAL, (%s Cannot find config vector res = 0x%x\n, __FUNCTION__, res)); + return NULL; +} +} // Select the queue we're interested in ScsiPortWritePortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_PCI_QUEUE_SEL),(USHORT)index); @@ -144,7 +156,7 @@ VirtIODeviceFindVirtualQueue( num = ScsiPortReadPortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_PCI_QUEUE_NUM)); RhelDbgPrint(TRACE_LEVEL_FATAL, (%s [vp_dev-addr + VIRTIO_PCI_QUEUE_NUM] = %x\n, __FUNCTION__, num) ); -if (!num || ScsiPortReadPortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_PCI_QUEUE_PFN))) +if (!num || ScsiPortReadPortUlong((PULONG)(adaptExt-device_base + VIRTIO_PCI_QUEUE_PFN))) return NULL; // allocate and fill out our structure the represents an active queue @@ -174,7 +186,18 @@ VirtIODeviceFindVirtualQueue( pageNum = (ULONG)(pa.QuadPart PAGE_SHIFT); RhelDbgPrint(TRACE_LEVEL_FATAL, ([%s] queue phys.address %08lx:%08lx, pfn %lx\n, __FUNCTION__, pa.u.HighPart, pa.u.LowPart, pageNum)); ScsiPortWritePortUlong((PULONG)(adaptExt-device_base + VIRTIO_PCI_QUEUE_PFN),(ULONG)(pageNum)); - + +if(vector) { +ScsiPortWritePortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_MSI_QUEUE_VECTOR),(USHORT)vector); +res = ScsiPortReadPortUshort((PUSHORT)(adaptExt-device_base + VIRTIO_MSI_QUEUE_VECTOR)); +RhelDbgPrint(TRACE_LEVEL_FATAL, (%s VIRTIO_MSI_QUEUE_VECTOR vector = %d, res = 0x%x\n, __FUNCTION__, vector, res)); +if(res == VIRTIO_MSI_NO_VECTOR) { + ScsiPortWritePortUlong((PULONG)(adaptExt-device_base + VIRTIO_PCI_QUEUE_PFN),(ULONG)0); + RhelDbgPrint(TRACE_LEVEL_FATAL, (%s Cannot create vq vector\n, __FUNCTION__)); + return NULL; +} +} + return vq; } diff --git a/viostor/virtio_pci.h b/viostor/virtio_pci.h index fc31163..8f99e18 100644 --- a/viostor/virtio_pci.h +++ b/viostor/virtio_pci.h @@ -52,7 +52,15 @@ /* The remaining space is defined by each driver as the per-driver * configuration space */ -#define VIRTIO_PCI_CONFIG 20 +#define VIRTIO_PCI_CONFIG(msix_enabled)(msix_enabled ? 24 : 20) + +/* MSI-X registers: only enabled if MSI-X is enabled. */ +/* A 16-bit vector for configuration changes. */ +#define VIRTIO_MSI_CONFIG_VECTOR20 +/* A 16-bit vector for selected queue notifications. */ +#define VIRTIO_MSI_QUEUE_VECTOR 22 +/* Vector value used to disable MSI for queue */ +#define VIRTIO_MSI_NO_VECTOR0x typedef struct virtio_pci_vq_info { @@ -98,7 +106,8 @@ struct virtqueue* VirtIODeviceFindVirtualQueue( IN PVOID DeviceExtension
[COMMIT] [WIN-GUEST_DRIVERS] User Windows 7 DDK (build 7600.16385.0) as a default build environment.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 4ab13fe7d8375604846bbc8a01f3a4ea44fafee2 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 17:08:24 2009 +0200 [WIN-GUEST_DRIVERS] User Windows 7 DDK (build 7600.16385.0) as a default build environment. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/buildAll.bat b/NetKVM/buildAll.bat index 47f6165..c4bb148 100644 --- a/NetKVM/buildAll.bat +++ b/NetKVM/buildAll.bat @@ -12,7 +12,7 @@ : to sign the drivers with your certificate. Change tools\makeinstall.bat if needed : : -if %DDKVER%== set DDKVER=6001.18001 +if %DDKVER%== set DDKVER=7600.16385.0 set BUILDROOT=C:\WINDDK\%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 @@ -111,17 +111,18 @@ if not exist wxp\objfre_wnet_amd64\amd64\netkvm.sys goto :eof goto continue +:Win2K compilation is no longer supported by Windows 7 DDK :Win2K -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre W2K -popd -call :preparebuild Common wxp VirtIO -build -cZg - -if exist wxp\objfre_w2k_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_w2k_x86\i386\netkvm.sys wxp\netkvm2k.inf %_VERSION_% 2K -if not exist wxp\objfre_w2k_x86\i386\netkvm.sys goto :eof -goto continue +:set DDKBUILDENV= +:pushd %BUILDROOT% +:call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre W2K +:popd +:call :preparebuild Common wxp VirtIO +:build -cZg + +:if exist wxp\objfre_w2k_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_w2k_x86\i386\netkvm.sys wxp\netkvm2k.inf %_VERSION_% 2K +:if not exist wxp\objfre_w2k_x86\i386\netkvm.sys goto :eof +:goto continue :installer diff --git a/NetKVM/wlh/ParaNdis6-Driver.c b/NetKVM/wlh/ParaNdis6-Driver.c index e7cf3ec..30357a2 100644 --- a/NetKVM/wlh/ParaNdis6-Driver.c +++ b/NetKVM/wlh/ParaNdis6-Driver.c @@ -982,8 +982,8 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath chars.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION; chars.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION; /* stupid thing, they are at least short */ - chars.MajorDriverVersion = PARANDIS_MAJOR_DRIVER_VERSION; - chars.MinorDriverVersion = PARANDIS_MINOR_DRIVER_VERSION; + chars.MajorDriverVersion = (UCHAR)PARANDIS_MAJOR_DRIVER_VERSION; + chars.MinorDriverVersion = (UCHAR)PARANDIS_MINOR_DRIVER_VERSION; // possible value for regular miniport NDIS_WDM_DRIVER - for USB or 1394 // chars.Flags = 0; diff --git a/viostor/buildAll.bat b/viostor/buildAll.bat index e1fd35d..8d05802 100644 --- a/viostor/buildAll.bat +++ b/viostor/buildAll.bat @@ -1,7 +1,7 @@ : : Set global parameters: : -if %DDKVER%== set DDKVER=6001.18001 +if %DDKVER%== set DDKVER=7600.16385.0 set BUILDROOT=C:\WINDDK\%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST_DRIVERS] Use Windows 7 DDK (build 7600.16385.0) as a default build environment.
repository: C:/dev/kvm-guest-drivers-windows branch: master commit f3cde3d0e011c64bae6f6b95d7eb34c87d141487 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Oct 25 17:08:24 2009 +0200 [WIN-GUEST_DRIVERS] Use Windows 7 DDK (build 7600.16385.0) as a default build environment. Signed-off-by: Yan Vugenfirer yvuge...@redhat.com diff --git a/NetKVM/buildAll.bat b/NetKVM/buildAll.bat index 47f6165..c4bb148 100644 --- a/NetKVM/buildAll.bat +++ b/NetKVM/buildAll.bat @@ -12,7 +12,7 @@ : to sign the drivers with your certificate. Change tools\makeinstall.bat if needed : : -if %DDKVER%== set DDKVER=6001.18001 +if %DDKVER%== set DDKVER=7600.16385.0 set BUILDROOT=C:\WINDDK\%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 @@ -111,17 +111,18 @@ if not exist wxp\objfre_wnet_amd64\amd64\netkvm.sys goto :eof goto continue +:Win2K compilation is no longer supported by Windows 7 DDK :Win2K -set DDKBUILDENV= -pushd %BUILDROOT% -call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre W2K -popd -call :preparebuild Common wxp VirtIO -build -cZg - -if exist wxp\objfre_w2k_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_w2k_x86\i386\netkvm.sys wxp\netkvm2k.inf %_VERSION_% 2K -if not exist wxp\objfre_w2k_x86\i386\netkvm.sys goto :eof -goto continue +:set DDKBUILDENV= +:pushd %BUILDROOT% +:call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre W2K +:popd +:call :preparebuild Common wxp VirtIO +:build -cZg + +:if exist wxp\objfre_w2k_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_w2k_x86\i386\netkvm.sys wxp\netkvm2k.inf %_VERSION_% 2K +:if not exist wxp\objfre_w2k_x86\i386\netkvm.sys goto :eof +:goto continue :installer diff --git a/NetKVM/wlh/ParaNdis6-Driver.c b/NetKVM/wlh/ParaNdis6-Driver.c index e7cf3ec..30357a2 100644 --- a/NetKVM/wlh/ParaNdis6-Driver.c +++ b/NetKVM/wlh/ParaNdis6-Driver.c @@ -982,8 +982,8 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath chars.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION; chars.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION; /* stupid thing, they are at least short */ - chars.MajorDriverVersion = PARANDIS_MAJOR_DRIVER_VERSION; - chars.MinorDriverVersion = PARANDIS_MINOR_DRIVER_VERSION; + chars.MajorDriverVersion = (UCHAR)PARANDIS_MAJOR_DRIVER_VERSION; + chars.MinorDriverVersion = (UCHAR)PARANDIS_MINOR_DRIVER_VERSION; // possible value for regular miniport NDIS_WDM_DRIVER - for USB or 1394 // chars.Flags = 0; diff --git a/viostor/buildAll.bat b/viostor/buildAll.bat index e1fd35d..8d05802 100644 --- a/viostor/buildAll.bat +++ b/viostor/buildAll.bat @@ -1,7 +1,7 @@ : : Set global parameters: : -if %DDKVER%== set DDKVER=6001.18001 +if %DDKVER%== set DDKVER=7600.16385.0 set BUILDROOT=C:\WINDDK\%DDKVER% set X64ENV=x64 if %DDKVER%==6000 set X64ENV=amd64 -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[COMMIT] [WIN-GUEST-DRIVERS] Initial support for MSI interrupts and DPC\Interrupt behaviour
repository: C:/dev/kvm-guest-drivers-windows branch: master commit a1d1275e735a02450bc70c262e343c356da1bb34 Author: Yan Vugenfirer yvuge...@redhat.com Date: Thu Oct 22 13:44:42 2009 +0200 [WIN-GUEST-DRIVERS] Initial support for MSI interrupts and DPC\Interrupt behaviour diff --git a/NetKVM/Common/ParaNdis-Common.c b/NetKVM/Common/ParaNdis-Common.c index 3f9faa1..896e6dc 100644 --- a/NetKVM/Common/ParaNdis-Common.c +++ b/NetKVM/Common/ParaNdis-Common.c @@ -406,7 +406,7 @@ static BOOLEAN GetAdapterResources(PNDIS_RESOURCE_LIST RList, tAdapterResources pResources-Level = RList-PartialDescriptors[i].u.Interrupt.Level; pResources-Affinity = RList-PartialDescriptors[i].u.Interrupt.Affinity; pResources-InterruptFlags = RList-PartialDescriptors[i].Flags; - DPrintf(0, (Found Interrupt level %d, vector %d, affinity %X, flags %X, + DPrintf(0, (Found Interrupt vector %d, level %d, affinity %X, flags %X, pResources-Vector, pResources-Level, (ULONG)pResources-Affinity, pResources-InterruptFlags)); } } @@ -529,6 +529,12 @@ NDIS_STATUS ParaNdis_InitializeContext( pContext-AdapterResources.IOLength) ) { + if (pContext-AdapterResources.InterruptFlags CM_RESOURCE_INTERRUPT_MESSAGE) + { + DPrintf(0, ([%s] Message interrupt assigned, __FUNCTION__)); + pContext-bUsingMSIX = TRUE; + } + VirtIODeviceSetIOAddress(pContext-IODevice, pContext-AdapterResources.ulIOAddress); JustForCheckClearInterrupt(pContext, init 0); ParaNdis_ResetVirtIONetDevice(pContext); @@ -557,7 +563,7 @@ NDIS_STATUS ParaNdis_InitializeContext( { VirtIODeviceGet( pContext-IODevice, - 0, // offsetof(struct virtio_net_config, mac) + pContext-bUsingMSIX ? 4 : 0, // offsetof(struct virtio_net_config, mac) pContext-PermanentMacAddress, ETH_LENGTH_OF_ADDRESS); if (!ParaNdis_ValidateMacAddress(pContext-PermanentMacAddress, FALSE)) @@ -1133,6 +1139,7 @@ BOOLEAN ParaNdis_OnInterrupt( if (b) { NdisGetCurrentSystemTime(pContext-LastInterruptTimeStamp); + ParaNdis_VirtIOEnableInterrupt(pContext, FALSE); } return b; } @@ -1698,12 +1705,24 @@ void ParaNdis_ReportLinkStatus(PARANDIS_ADAPTER *pContext) if (pContext-bLinkDetectSupported) { USHORT linkStatus = 0; + USHORT offset = (pContext-bUsingMSIX ? 4 : 0) + sizeof(pContext-CurrentMacAddress); // link changed - VirtIODeviceGet(pContext-IODevice, sizeof(pContext-CurrentMacAddress), linkStatus, sizeof(linkStatus)); + VirtIODeviceGet(pContext-IODevice, offset, linkStatus, sizeof(linkStatus)); bConnected = (linkStatus VIRTIO_NET_S_LINK_UP) != 0; } ParaNdis_IndicateConnect(pContext, bConnected, FALSE); } + +BOOLEAN ParaNdis_MiniportSynchronizeInterruptEnable(IN PVOID SynchronizeContext) +{ + PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)SynchronizeContext; + + DEBUG_ENTRY(6); + ParaNdis_VirtIOEnableInterrupt(pContext, TRUE); + + return TRUE; +} + /** DPC implementation, common for both NDIS Parameters: @@ -1757,6 +1776,8 @@ void ParaNdis_DPCWorkBody(PARANDIS_ADAPTER *pContext) } ParaNdis_DebugHistory(pContext, hopDPC, NULL, 0, pContext-nofFreeHardwareBuffers, pContext-nofFreeTxDescriptors); NdisReleaseSpinLock(pContext-DPCLock); + + ParaNdis_SyncInterruptEnable(pContext); } /** @@ -1967,7 +1988,7 @@ NDIS_STATUS ParaNdis_SetMulticastList( } /** -TODO + Parameters: Return value: ***/ @@ -1975,7 +1996,8 @@ VOID ParaNdis_VirtIOEnableInterrupt( PARANDIS_ADAPTER *pContext, BOOLEAN bEnable) { - DPrintf(0, ([%s] NOT IMPLEMENTED, __FUNCTION__)); + pContext-NetSendQueue-vq_ops-enable_interrupt(pContext-NetSendQueue, bEnable); + pContext-NetReceiveQueue-vq_ops-enable_interrupt(pContext-NetReceiveQueue, bEnable); } /** diff --git a/NetKVM/Common/ParaNdis-Debug.c b/NetKVM/Common/ParaNdis-Debug.c index ef56651..22d3b73 100644 --- a/NetKVM/Common/ParaNdis-Debug.c +++ b/NetKVM/Common/ParaNdis-Debug.c @@ -11,6 +11,7
[COMMIT] [VirtIO] Add op to the library enable\disable the interrupts
repository: C:/dev/kvm-guest-drivers-windows branch: master commit d4513a10128bea867eaebdcf3604646928d6293d Author: Yan Vugenfirer yvuge...@redhat.com Date: Tue Oct 6 20:47:15 2009 +0200 [VirtIO] Add op to the library enable\disable the interrupts diff --git a/VirtIO/VirtIO.h b/VirtIO/VirtIO.h index 0f937ae..12cc027 100644 --- a/VirtIO/VirtIO.h +++ b/VirtIO/VirtIO.h @@ -81,6 +81,8 @@ struct virtqueue_ops { bool (*restart)(struct virtqueue *vq); void (*shutdown)(struct virtqueue *vq); + + void (*enable_interrupt)(struct virtqueue *vq, bool enable); }; #endif /* _LINUX_VIRTIO_H */ diff --git a/VirtIO/VirtIORing.c b/VirtIO/VirtIORing.c index f8d5e0e..0151472 100644 --- a/VirtIO/VirtIORing.c +++ b/VirtIO/VirtIORing.c @@ -200,6 +200,17 @@ static void detach_buf(struct vring_virtqueue *vq, unsigned int head) vq-num_free++; } +static void vring_enable_interrupts(struct virtqueue *_vq, bool enable) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + + if(enable) + vq-vring.avail-flags = ~VRING_AVAIL_F_NO_INTERRUPT; + else + vq-vring.avail-flags |= VRING_AVAIL_F_NO_INTERRUPT; + + mb(); +} /* changed: vring_shutdown brings the queue to initial state, as it was @@ -283,7 +294,8 @@ static struct virtqueue_ops vring_vq_ops = { vring_add_buf, vring_kick_always, vring_get_buf, vring_restart, - vring_shutdown}; + vring_shutdown, + vring_enable_interrupts}; void initialize_virtqueue(struct vring_virtqueue *vq, -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Binary Windows guest drivers are released
Hello All, I am happy to announce that the Windows guest drivers binaries are released. http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers Best regards, Yan Vugenfirer. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: Virtio net driver for Windows 2008 R2
Now :) You can compile the drivers from the git://git.kernel.org/pub/scm/virt/kvm/kvm-guest-drivers-windows.git Use Vista drivers for Win2008R2 if you use default build scripts. You can also use latest WDK and compile the code for Windows 2008 R2. Please keep in mind that you need to test sign the drivers for 64bit MS OSes. Kernel.org policies are preventing me from keeping test certificate in repository and signing the drivers automatically during build process. http://msdn.microsoft.com/en-us/library/aa906344.aspx Best regards, Yan. -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of carlopmart Sent: Monday, September 21, 2009 11:35 PM To: kvm@vger.kernel.org Subject: Virtio net driver for Windows 2008 R2 Hi all. When will be possible to test virtio net drivers for Windows 2008 R2 kvm guests? Thanks. -- CL Martinez carlopmart {at} gmail {d0t} com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [ANNOUNCE] Release to community: Windows kvm/virtio guest drivers
The sources are released and can be easily compiled :) Some technical issues with releasing the binaries. But they are coming soon. Best regards, Yan. -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Armindo Silva Sent: Thursday, September 17, 2009 7:05 PM To: Yan Vugenfirer Cc: Chris Howells; kvm@vger.kernel.org Subject: Re: [ANNOUNCE] Release to community: Windows kvm/virtio guest drivers Hi, There are any news about the new pv drivers? They would be very welcome by the community :) Cheers Armindo On Mon, Aug 17, 2009 at 4:03 PM, Yan Vugenfirer yvuge...@redhat.com wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Chris Howells Sent: Monday, August 17, 2009 5:18 PM To: kvm@vger.kernel.org Subject: Re: [ANNOUNCE] Release to community: Windows kvm/virtio guest drivers Hi, On Mon, August 17, 2009 2:21 pm, Yan Vugenfirer wrote: I am happy to announce the release of the Windows kvm/virtio guest drivers to open source community under GPLv2 license! Wiki: http://www.linux-kvm.org/page/WindowsGuestDrivers Thanks for these, they look very interesting. Unfortunately the download links appear to be broken. I followed the download link at http://www.linux- kvm.org/page/WindowsGuestDrivers/Last_WHQLed_drivers but when I click media:viostor.tar it prompts me to upload a file. Thanks [YV] Soon I will post the MS signed binaries. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- -- The only way of discovering the limits of the possible is to venture a little way past them into the impossible. Sir Arthur C. Clarke -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] KVM: Use thread debug register storage instead of kvm specific data
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Vadim Rozenfeld Sent: Saturday, September 05, 2009 2:35 PM To: Brian Jackson Cc: Andrew Theurer; kvm@vger.kernel.org Subject: Re: [PATCH] KVM: Use thread debug register storage instead of kvm specific data On 09/04/2009 08:04 PM, Brian Jackson wrote: On Friday 04 September 2009 11:08:51 am Andrew Theurer wrote: Brian Jackson wrote: On Friday 04 September 2009 09:48:17 am Andrew Theurer wrote: snip Still not idle=poll, it may shave off 0.2%. Won't this affect SMT in a negative way? (OK, I am not running SMT now, but eventually we will be) A long time ago, we tested P4's with HT, and a polling idle in one thread always negatively impacted performance in the sibling thread. FWIW, I did try idle=halt, and it was slightly worse. I did get a chance to try the latest qemu (master and next heads). I have been running into a problem with virtIO stor driver for windows on anything much newer than kvm-87. I compiled the driver from the new git tree, installed OK, but still had the same error. Finally, I removed the serial number feature in the virtio-blk in qemu, and I can now get the driver to work in Windows. What were the symptoms you were seeing (i.e. define a problem). Device manager reports a problem code 10 occurred, and the driver cannot initialize. Yes! I was getting this after I moved from 0.10.6 to 0.11.0-rc1. Now I know how to fix it. Thank you. Thank you. Vadim Rozenfeld informed me: There is a sanity check in the code, which checks the I/O range and fails if is not equal to 40h. Resent virtio-blk devices have I/O range equal to 0x400 (serial number feature). So, out signed viostor driver will fail on the latest KVMs. This problem was fixed and committed to SVN some time ago. I assumed the fix was to the virtio windows driver, but I could not get the driver I compiled from latest git to work either (only on qemu-kvm-87). So, I just backed out the serial number feature in qemu, and it worked. FWIW, the linux virtio-blk driver never had a problem. There have been very few changes to the viostor windows git repo since it was opened. Unless it was done before they were open sourced. In any case, it doesn't seem to be working with what's publicly available, so I think maybe there is something missing internal to external. I don't believe it was merged to git yet. The signed viostor driver works with qemu-kvm-87 only, otherwise you need to remove SN from the virtio-blk code, or clip IO range to the original size. [YV] Please find attached patch with the fix. Kernel.org experiencing some problems now. The moment they will be fixed, I will push this patch to it. Cheers, Vadim. So, not really any good news on performance with latest qemu builds. Performance is slightly worse: qemu-kvm-87 user nice system irq softirq guest idle iowait 5.79 0.009.28 0.08 1.00 20.81 58.784.26 total busy: 36.97 qemu-kvm-88-905-g6025b2d (master) user nice system irq softirq guest idle iowait 6.57 0.00 10.86 0.08 1.02 21.35 55.904.21 total busy: 39.89 qemu-kvm-88-910-gbf8a05b (next) user nice system irq softirq guest idle iowait 6.60 0.00 10.91 0.09 1.03 21.35 55.714.31 total busy: 39.98 diff of profiles, p1=qemu-kvm-87, p2=qemu-master snip 18x more samples for gfn_to_memslot_unali*, 37x for emulator_read_emula*, and more CPU time in guest mode. One other thing I decided to try was some cpu binding. I know this is not practical for production, but I wanted to see if there's any benefit at all. One reason was that a coworker here tried binding the qemu thread for the vcpu and the qemu IO thread to the same cpu. On a networking test, guest-local-host, throughput was up about 2x. Obviously there was a nice effect of being on the same cache. I wondered, even without full bore throughput tests, could we see any benefit here. So, I bound each pair of VMs to a dedicated core. What I saw was about a 6% improvement in performance. For a system which has pretty incredible memory performance and is not that busy, I was surprised that I got 6%. I am not advocating binding, but what I do wonder: on 1-way VMs, if we keep all the qemu threads together on the same CPU, but still allowing the scheduler to move them (all of them at once) to different cpus over time, would we see the same benefit? One other thing: So far I have not been using preadv/pwritev. I assume I need a more recent glibc (on 2.5 now) for qemu to take advantage of this? Getting p(read|write)v working almost doubled my virtio-net throughput in a Linux guest. Not quite as much in Windows guests. Yes you need glibc-2.10. I think some
[ANNOUNCE] Release to community: Windows kvm/virtio guest drivers
I am happy to announce the release of the Windows kvm/virtio guest drivers to open source community under GPLv2 license! Git repository: http://git.kernel.org/?p=virt/kvm/kvm-guest-drivers-windows.git;a=summary git://git.kernel.org/pub/scm/virt/kvm/kvm-guest-drivers-windows.git http://www.kernel.org/pub/scm/virt/kvm/kvm-guest-drivers-windows.git Wiki: http://www.linux-kvm.org/page/WindowsGuestDrivers Best regards, Yan Vugenfirer. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [ANNOUNCE] Release to community: Windows kvm/virtio guest drivers
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Chris Howells Sent: Monday, August 17, 2009 5:18 PM To: kvm@vger.kernel.org Subject: Re: [ANNOUNCE] Release to community: Windows kvm/virtio guest drivers Hi, On Mon, August 17, 2009 2:21 pm, Yan Vugenfirer wrote: I am happy to announce the release of the Windows kvm/virtio guest drivers to open source community under GPLv2 license! Wiki: http://www.linux-kvm.org/page/WindowsGuestDrivers Thanks for these, they look very interesting. Unfortunately the download links appear to be broken. I followed the download link at http://www.linux-kvm.org/page/WindowsGuestDrivers/Last_WHQLed_drivers but when I click media:viostor.tar it prompts me to upload a file. Thanks [YV] Soon I will post the MS signed binaries. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: Using KVM for Windows kernel debugging
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Tom Parkin Sent: Monday, August 17, 2009 6:16 PM To: kvm@vger.kernel.org Cc: tom.par...@gmail.com Subject: Re: Using KVM for Windows kernel debugging 2009/8/17 Tom Parkin tom.par...@gmail.com: Has anyone on the list got any experience of this kind of setup, or any suggestions that might help ? Sorry for the spam, but I forgot to mention that I found this mail in the archives which looks pertinent: http://article.gmane.org/gmane.comp.emulators.kvm.devel/20770/match=win dows Sadly, the wiki link is no longer valid: http://kvm.qumranet.com/kvmwiki/WindowsGuestDebug If anyone could tell me where that information now resides I'd appreciate it. [YV] I recreated the page: http://www.linux-kvm.org/page/WindowsGuestDrivers/GuestDebugging Thanks again ! Tom -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html