summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen
Commit message (Collapse)AuthorAgeFilesLines
* xen-netfront: remove useless NULL check in netif_freeroyger2016-02-111-5/+3
| | | | | | | | | | | xn_ifp is allocated in create_netdev with if_alloc(IFT_ETHER). According to the current arrangement it can't be NULL. Coverity ID: 1349805 Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D5252
* xen-netfront: rearrange error paths in setup_txqsroyger2016-02-111-3/+1
| | | | | | | | | | | Coverity spotted double free errors in error path. Fix that by removing the extraneous calls. Coverity ID: 1349798 Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D5251
* xen-netfront: remove pointless assignment in xn_ioctlroyger2016-02-111-2/+0
| | | | | | | | | | | | The variable error is assigned to 0 before entering the switch. Assigning error to 0 before break pointless rewrites the real error value that should be returned. Coverity ID: 1304974 Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D5250
* xen-netfront: add multiqueue supportroyger2016-01-201-661/+979
| | | | | | | | | | | | | | | Add support for multiple TX and RX queue pairs. The default number of queues is set to 4, but can be easily changed from the sysctl node hw.xn.num_queues. Also heavily refactor netfront driver: break out a bunch of helper functions and different structures. Use threads to handle TX and RX. Remove some dead code and fix quite a few bugs as I go along. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D4193
* Add two more assertions to catch busdma problems. Each segment providedcperciva2016-01-111-0/+5
| | | | | | | | by busdma to the blkfront driver must be an integer number of sectors, and must be aligned in memory on a "sector" boundary. Having these assertions yesterday would have made finding the bug fixed in r293698 somewhat easier.
* xen: fix dropping bitmap IPIs during resumeroyger2015-11-181-0/+4
| | | | | | | | | Current Xen resume code clears all pending bitmap IPIs on resume, which is not correct. Instead re-inject bitmap IPI vectors on resume to all CPUs in order to acknowledge any pending bitmap IPIs. Sponsored by: Citrix Systems R&D MFC after: 2 weeks
* xen-blkfront: add support for unmapped IOroyger2015-11-091-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Using unmapped IO is really beneficial when running inside of a VM, since it avoids IPIs to other vCPUs in order to invalidate the mappings. This patch adds unmapped IO support to blkfront. The following tests results have been obtained when running on a Xen host without HAP: PVHVM 3165.84 real 6354.17 user 4483.32 sys PVHVM with unmapped IO 2099.46 real 4624.52 user 2967.38 sys This is because when running using shadow page tables TLB flushes and range invalidations are much more expensive, so using unmapped IO provides a very important performance boost. Sponsored by: Citrix Systems R&D MFC after: 2 weeks X-MFC-with: r290610 dev/xen/blkfront/blkfront.c: - Add and announce support for unmapped IO.
* xen-netfront: remove unused header filesroyger2015-11-051-15/+0
| | | | | | | Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Differential Revision: https://reviews.freebsd.org/D4079
* Do not FALLTHROUGH for SIOC{ADD,DEL}MULTIsjg2015-10-301-1/+1
| | | | | | | | ifmedia_ioctl() returns EINVAL Differential Revision: 3897 Submitted by: aronen@juniper.net Reviewed by: marcel
* x86/dma_bounce: revert r289834 and r289836royger2015-10-261-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new load_ma implementation can cause dereferences when used with certain drivers, back it out until the reason is found: Fatal trap 12: page fault while in kernel mode cpuid = 11; apic id = 03 fault virtual address = 0x30 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff808a2d22 stack pointer = 0x28:0xfffffe07cc737710 frame pointer = 0x28:0xfffffe07cc737790 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 13 (g_down) trap number = 12 panic: page fault cpuid = 11 KDB: stack backtrace: #0 0xffffffff80641647 at kdb_backtrace+0x67 #1 0xffffffff80606762 at vpanic+0x182 #2 0xffffffff806067e3 at panic+0x43 #3 0xffffffff8084eef1 at trap_fatal+0x351 #4 0xffffffff8084f0e4 at trap_pfault+0x1e4 #5 0xffffffff8084e82f at trap+0x4bf #6 0xffffffff80830d57 at calltrap+0x8 #7 0xffffffff8063beab at _bus_dmamap_load_ccb+0x1fb #8 0xffffffff8063bc51 at bus_dmamap_load_ccb+0x91 #9 0xffffffff8042dcad at ata_dmaload+0x11d #10 0xffffffff8042df7e at ata_begin_transaction+0x7e #11 0xffffffff8042c18e at ataaction+0x9ce #12 0xffffffff802a220f at xpt_run_devq+0x5bf #13 0xffffffff802a17ad at xpt_action_default+0x94d #14 0xffffffff802c0024 at adastart+0x8b4 #15 0xffffffff802a2e93 at xpt_run_allocq+0x193 #16 0xffffffff802c0735 at adastrategy+0xf5 #17 0xffffffff80554206 at g_disk_start+0x426 Uptime: 2m29s
* blkfront: add support for unmapped IOroyger2015-10-231-5/+7
| | | | | | | | | | | | | | | | | | | | | | Using unmapped IO is really beneficial when running inside of a VM, since it avoids IPIs to other vCPUs in order to invalidate the mappings. This patch adds unmapped IO support to blkfront. The following tests results have been obtained when running on a Xen host without HAP: PVHVM 3165.84 real 6354.17 user 4483.32 sys PVHVM with unmapped IO 2099.46 real 4624.52 user 2967.38 sys This is because when running using shadow page tables TLB flushes and range invalidations are much more expensive, so using unmapped IO provides a very important performance boost. Sponsored by: Citrix Systems R&D MFC after: 2 weeks X-MFC-with: r289834
* netfront: fix LINT-NOIProyger2015-10-211-0/+2
| | | | | | | | r289587 broke LINT-NOIP kernels because the lro and queued local variables are defined but not used. Add preprocessor guards around them. Reported by: emaste Sponsored by: Citrix Systems R&D
* xen: Code cleanup and small bug fixesroyger2015-10-218-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xen/hypervisor.h: - Remove unused helpers: MULTI_update_va_mapping, is_initial_xendomain, is_running_on_xen - Remove unused define CONFIG_X86_PAE - Remove unused variable xen_start_info: note that it's used inpcifront which is not built at all - Remove forward declaration of HYPERVISOR_crash xen/xen-os.h: - Remove unused define CONFIG_X86_PAE - Drop unused helpers: test_and_clear_bit, clear_bit, force_evtchn_callback - Implement a generic version (based on ofed/include/linux/bitops.h) of set_bit and test_bit and prefix them by xen_ to avoid any use by other code than Xen. Note that It would be worth to investigate a generic implementation in FreeBSD. - Replace barrier() by __compiler_membar() - Replace cpu_relax() by cpu_spinwait(): it's exactly the same as rep;nop = pause xen/xen_intr.h: - Move the prototype of xen_intr_handle_upcall in it: Use by all the platform x86/xen/xen_intr.c: - Use BITSET* for the enabledbits: Avoid to use custom helpers - test_bit/set_bit has been renamed to xen_test_bit/xen_set_bit - Don't export the variable xen_intr_pcpu dev/xen/blkback/blkback.c: - Fix the string format when XBB_DEBUG is enabled: host_addr is typed uint64_t dev/xen/balloon/balloon.c: - Remove set but not used variable - Use the correct type for frame_list: xen_pfn_t represents the frame number on any architecture dev/xen/control/control.c: - Return BUS_PROBE_WILDCARD in xs_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore. dev/xen/grant-table/grant_table.c: - Remove unused cmpxchg - Drop unused include opt_pmap.h: Doesn't exist on ARM64 and it doesn't contain anything required for the code on x86 dev/xen/netfront/netfront.c: - Use the correct type for rx_pfn_array: xen_pfn_t represents the frame number on any architecture dev/xen/netback/netback.c: - Use the correct type for gmfn: xen_pfn_t represents the frame number on any architecture dev/xen/xenstore/xenstore.c: - Return BUS_PROBE_WILDCARD in xctrl_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore. Note that with the changes, x86/include/xen/xen-os.h doesn't contain anymore arch-specific code. Although, a new series will add some helpers that differ between x86 and ARM64, so I've kept the headers for now. Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3921 Sponsored by: Citrix Systems R&D
* xen-netfront: use "netfront" in lock descriptionroyger2015-10-191-2/+2
| | | | | | | | | Missed from r289585. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3937 Sponsored by: Citrix Systems R&D
* xen-netfront: fix netfront create_dev error pathroyger2015-10-191-7/+9
| | | | | | | | | | | The failure path for allocating rx grant refs should not try to free tx grant refs because tx grant refs were allocated after that. Also fix the error path for xen_net_read_mac. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3891 Sponsored by: Citrix Systems R&D
* xen-netfront: no need to set if_outputroyger2015-10-191-1/+0
| | | | | | | | | This is redundant because ether_ifattach will set that field. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3918 Sponsored by: Citrix Systems R&D
* xen-netfront: remove a bunch of FreeBSD version checkroyger2015-10-191-25/+4
| | | | | | | | | We're way beyond FreeBSD 7 at this point. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3892 Sponsored by: Citrix Systems R&D
* xen-netfront: remove XN_LOCK_{INIT,DESTROY}royger2015-10-191-9/+3
| | | | | | | | | | | | Multiqueue feature will make the number of queues dynamic, so XN_LOCK_INIT won't be that useful. Remove the macro and call mtx_init directly. XN_LOCK_DESTROY is just dead code. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3890 Sponsored by: Citrix Systems R&D
* xen-netfront: clean up netfront stats structureroyger2015-10-191-25/+2
| | | | | | | | | Rename it with netfront_ prefix and purge a bunch of unused fields. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3889 Sponsored by: Citrix Systems R&D
* xen-netfront: purge page flipping supportroyger2015-10-191-96/+18
| | | | | | | | | | | | | | Currently neither Linux nor FreeBSD netback supports page flipping. NetBSD still supports that. It is not sure how many people actually use page flipping, but page flipping is supposed to be slower than copying nowadays. It will also shatter frontend / backend address space. Overall this feature is more of a burden than a benefit. Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3888 Sponsored by: Citrix Systems R&D
* xen-netfront: delete all trailing white spacesroyger2015-10-191-124/+124
| | | | | | | Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3886 Sponsored by: Citrix Systems R&D
* xen/console: Introduce a new console driver for Xen guestroyger2015-10-084-744/+797
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Xen console driver is crashing very quickly when using it on an ARM guest. This is because the console lock is recursive and it may lead to recursion on the tty lock and/or corrupt the ring pointer. Furthermore, the console lock is not always taken where it should be and has to be released too early because of the way the console has been designed. Over the years, code has been modified to support various new features but the driver has not been reworked. This new driver has been rewritten with the idea of only having a small set of specific function to write either via the shared ring or the hypercall interface. Note that HVM support has been left aside for now because it requires additional features which are not yet supported. A follow-up patch will be sent with HVM guest support. List of items that may be good to have but not mandatory: - Avoid to flush for each character written when using the tty - Support multiple consoles Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3698 Sponsored by: Citrix Systems R&D
* Update Xen headers from 4.2 to 4.6royger2015-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull the latest headers for Xen which allow us to add support for ARM and use new features in FreeBSD. This is a verbatim copy of the xen/include/public so every headers which don't exits anymore in the Xen repositories have been dropped. Note the interface version hasn't been bumped, it will be done in a follow-up. Although, it requires fix in the code to get it compiled: - sys/xen/xen_intr.h: evtchn_port_t is already defined in the headers so drop it. - {amd64,i386}/include/intr_machdep.h: NR_EVENT_CHANNELS now depends on xen/interface/event_channel.h, so include it. - {amd64,i386}/{amd64,i386}/support.S: It's not neccessary to include machine/intr_machdep.h. This is also fixing build compilation with the new headers. - dev/xen/blkfront/blkfront.c: The typedef for blkif_request_segmenthas been dropped. So directly use struct blkif_request_segment Finally, modify xen/interface/xen-compat.h to throw a preprocessing error if __XEN_INTERFACE_VERSION__ is not set. This is allow us to catch any file where xen/xen-os.h is not correctly included. Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3805 Sponsored by: Citrix Systems R&D
* Add domain support to PCI bus allocationzbb2015-09-161-1/+1
| | | | | | | | | | | | When the system has more than a single PCI domain, the bus numbers are not unique, thus they cannot be used for "pci" device numbering. Change bus numbers to -1 (i.e. to-be-determined automatically) wherever the code did not care about domains. Reviewed by: jhb Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3406
* Code cleanup unused-but-set-variable spotted by gcc.araujo2015-08-253-7/+0
| | | | | | Reviewed by: royger Approved by: bapt (mentor) Differential Revision: D3476
* xen: allow disabling PV disks and nicsroyger2015-08-212-0/+6
| | | | | | | | | | | | | | | Introduce two new loader tunnables that can be used to disable PV disks and PV nics at boot time. They default to 0 and should be set to 1 (or any number different than 0) in order to disable the PV devices: hw.xen.disable_pv_disks=1 hw.xen.disable_pv_nics=1 In /boot/loader.conf will disable both PV disks and nics. Sponsored by: Citrix Systems R&D Tested by: Karl Pielorz <kpielorz_lst@tdx.co.uk> MFC after: 1 week
* Remove another remnant of PV domU support and assume that we always runjhb2015-08-141-60/+0
| | | | | | | with an automatically translated physmap under XEN. Reviewed by: royger (earlier version) Differential Revision: https://reviews.freebsd.org/D3325
* Remove some more vestiges of the Xen PV domu support. Specifically,jhb2015-08-066-16/+6
| | | | | | | | | use vtophys() directly instead of vtomach() and retire the no-longer-used headers <machine/xenfunc.h> and <machine/xenvar.h>. Reported by: bde (stale bits in <machine/xenfunc.h>) Reviewed by: royger (earlier version) Differential Revision: https://reviews.freebsd.org/D3266
* Add support for Xen blkif indirect segment I/Os. This makes it possible forcperciva2015-07-302-23/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the blkfront driver to perform I/Os of up to 2 MB, subject to support from the blkback to which it is connected and the initiation of such large I/Os by the rest of the kernel. In practice, the I/O size is increased from 40 kB to 128 kB. The changes to xen/interface/io/blkif.h consist merely of merging updates from the upstream Xen repository. In dev/xen/blkfront/block.h we add some convenience macros and structure fields used for indirect-page I/Os: The device records its negotiated limit on the number of indirect pages used, while each I/O command structure gains permanently allocated page(s) for indirect page references and the Xen grant references for those pages. In dev/xen/blkfront/blkfront.c we now check in xbd_queue_cb whether a request is small enough to handle without an indirection page, and either follow the previous behaviour or use new code for issuing an indirect segment I/O. In xbd_connect we read the size of indirect segment I/Os supported by the backend and select the maximum size we will use; then allocate the pages and Xen grant references for each I/O command structure. In xbd_free those grants and pages are released. A new loader tunable, hw.xbd.xbd_enable_indirect, can be set to 0 in order to disable this functionality; it works by pretending that the backend does not support this feature. Some backends exhibit a loss of performance with large I/Os, so users may wish to test with and without this functionality enabled. Reviewed by: royger MFC after: 3 days Relnotes: yes
* Create a dedicated function for ensuring that cdir and rdir are populated.mjg2015-07-111-12/+1
| | | | | | | | Previously several places were doing it on its own, partially incorrectly (e.g. without the filedesc locked) or even actively harmful by populating jdir or assigning rootvnode without vrefing it. Reviewed by: kib
* netfront: preserve configuration across migrationsroyger2015-07-031-5/+24
| | | | | | | | | | | Try to preserve the xn configuration when migrating. This is not always possible since the backend might not have the same set of options available, in which case we will try to preserve as many as possible. MFC after: 2 weeks PR: 183139 Reported by: mcdouga9@egr.msu.edu Sponsored by: Citrix Systems R&D
* Rename mksegarray to xbd_mksegarray for consistency with other functioncperciva2015-06-231-2/+2
| | | | | | names in this file. Submitted by: royger
* Garbage collect comments and a macro which related to the pre-r284296cperciva2015-06-211-12/+2
| | | | | | | support for a "segment block" extension in FreeBSD's Xen blkfront/blkback drivers. This commit should not result in any functional changes.
* Move the bus_dma_tag creation and per-transaction data allocation fromcperciva2015-06-211-48/+48
| | | | | | | | | | xbd_initialize to xbd_connect. Both of these initialization steps need to know what the maximum possible I/O size will be, and when we gain support for indirect segment I/Os we won't know that value until we reach xbd_connect. Since none of this data is used before xbd_connect completes, moving the initialization is harmless. This commit should not result in any functional changes.
* If we fail to allocate memory, pass ENOMEM as the error code, not thecperciva2015-06-211-1/+1
| | | | "error" variable (which is always zero at this point).
* Refactor xbd_queue_cb, extracting the code which converts bus_dma segmentscperciva2015-06-201-38/+43
| | | | | | | into blkif segments, and moving it into a new function. This will be used by upcoming support for indirect-segment blkif requests. This commit should not result in any functional changes.
* Minor clean up to xbd_queue_cb:cperciva2015-06-191-4/+4
| | | | | | | | | | | | * nsegs must be at most BLKIF_MAX_SEGMENTS_PER_REQUEST (since we specify that limit to bus_dma_tag_create), so KASSERT that rather than silently adjusting the request. * block_segs is now a synonym for nsegs, so garbage collect that variable. * nsegs is never read during or after the while loop, so remove the dead decrement from the loop. These were all left behind from the pre-r284296 support for a "segment block" extension.
* xen-blk{front/back}: remove broken FreeBSD extensionsroyger2015-06-123-313/+104
| | | | | | | | | | | | | | | The FreeBSD extension adds a new request type, called blkif_segment_block which has a size of 112bytes for both i386 and amd64. This is fine on amd64, since requests have a size of 112B there also. But this is not true for i386, where requests have a size of 108B. So on i386 we basically overrun the ring slot when queuing a request of type blkif_segment_block_t, which is very bad. Remove this extension (including a cleanup of the public blkif.h header file) from blkfront and blkback. Sponsored by: Citrix Systems R&D Tested-by: cperciva
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenjkim2015-05-221-1/+1
| | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
* netfront: wait for backend to connect before sending ARProyger2015-05-141-4/+5
| | | | | | | | | Netfront has to wait for the backend to switch to state XenbusStateConnected before sending the ARP request, or else the backend might not be connected and thus the packet will be lost. Sponsored by: Citrix Systems R&D MFC after: 1 week
* xen: introduce a newbus function to allocate unused memoryroyger2015-05-084-36/+15
| | | | | | | | | | | | | | | | In order to map memory from other domains when running on Xen FreeBSD uses unused physical memory regions. Until now this memory has been allocated using bus_alloc_resource, but this is not completely safe as we can end up using unreclaimed MMIO or ACPI regions. Fix this by introducing a new newbus method that can be used by Xen drivers to request for unused memory regions. On amd64 we make sure this memory comes from regions above 4GB in order to prevent clashes with MMIO/ACPI regions. On i386 there's nothing we can do, so just fall back to the previous mechanism. Sponsored by: Citrix Systems R&D Tested by: Gustau PĂ©rez <gperez@entel.upc.edu>
* Remove support for Xen PV domU kernels. Support for HVM domU kernelsjhb2015-04-306-272/+13
| | | | | | | | | | | | | | | | | | | | | remains. Xen is planning to phase out support for PV upstream since it is harder to maintain and has more overhead. Modern x86 CPUs include virtualization extensions that support HVM guests instead of PV guests. In addition, the PV code was i386 only and not as well maintained recently as the HVM code. - Remove the i386-only NATIVE option that was used to disable certain components for PV kernels. These components are now standard as they are on amd64. - Remove !XENHVM bits from PV drivers. - Remove various shims required for XEN (e.g. PT_UPDATES_FLUSH, LOAD_CR3, etc.) - Remove duplicate copy of <xen/features.h>. - Remove unused, i386-only xenstored.h. Differential Revision: https://reviews.freebsd.org/D2362 Reviewed by: royger Tested by: royger (i386/amd64 HVM domU and amd64 PVH dom0) Relnotes: yes
* Remove unused variable.araujo2015-04-201-2/+0
| | | | | Differential Revision: D2333 Reviewed by: royger
* xen: add a handler for the debug interruptroyger2015-03-301-0/+157
| | | | | | | | | Handle the VIRQ_DEBUG signal and print a stack trace of each vCPU on the Xen console. This is only used for debug purposes and is triggered by the administrator of the Xen host. Sponsored by: Citrix Systems R&D MFC after: 1 week
* netback: disable GSOroyger2015-02-281-1/+1
| | | | | | | | | The current GSO implementation in netback is broken and causes errors on the guest tx path. While this is fixed disable GSO in order to have a working netback. Sponsored by: Citrix Systems R&D Discussed with: gibbs
* Use m_getjcl() instead of old mbuf(9) KPIs.glebius2015-02-271-10/+1
| | | | Tested by: royger
* Previous version of mbufq were fine initialized by M_ZERO, whileglebius2015-02-231-0/+3
| | | | | | new one require explicti initialization. Reported by: royger
* Provide a set of inline functions to manage simple mbuf(9) queues, basedglebius2015-02-192-134/+10
| | | | | | | | on queue(3)'s STAILQ. Utilize them in cxgb(4) and Xen, deleting home grown implementations. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* xen: fix xenstore devroyger2015-02-161-24/+30
| | | | | | | | | | | | | | | | | Xenstore user-space device has two problems currently: - It does not correctly handle concurrent clients, because it's storing each client data in dev->si_drv1. - It does not correctly free this data when the client closes the device. In order to solve both of this issues store the per-client data using cdevpriv, which also comes with a hook in order to perform the necessary cleanup on device close. While there also make the device eternal. Sponsored by: Citrix Systems R&D Reported and Tested by: thompsa MFC after: 2 weeks
* Generalized parts of the XEN timer code into a generic pvclockbryanv2015-02-041-123/+9
| | | | | | | | | KVM clock shares the same data structures between the guest and the host as Xen so it makes sense to just have a single copy of this code. Differential Revision: https://reviews.freebsd.org/D1429 Reviewed by: royger (eariler version) MFC after: 1 month
OpenPOWER on IntegriCloud