1 | /* $Id: Virtio_1_0.h 81634 2019-11-04 01:58:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Virtio_1_0.h - Virtio Declarations
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009-2019 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef VBOX_INCLUDED_SRC_VirtIO_Virtio_1_0_h
|
---|
19 | #define VBOX_INCLUDED_SRC_VirtIO_Virtio_1_0_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #include <iprt/ctype.h>
|
---|
25 | #include <iprt/sg.h>
|
---|
26 |
|
---|
27 | typedef void * VIRTIOHANDLE; /**< Opaque handle to the VirtIO framework */
|
---|
28 |
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * Important sizing and bounds params for this impl. of VirtIO 1.0 PCI device
|
---|
32 | */
|
---|
33 | /**
|
---|
34 | * TEMPORARY NOTE: Some of these values are experimental during development and will likely change.
|
---|
35 | */
|
---|
36 | #define VIRTIO_MAX_QUEUE_NAME_SIZE 32 /**< Maximum length of a queue name */
|
---|
37 | #define VIRTQ_MAX_SIZE 1024 /**< Max size (# desc elements) of a virtq */
|
---|
38 | #define VIRTQ_MAX_CNT 24 /**< Max queues we allow guest to create */
|
---|
39 | #define VIRTIO_NOTIFY_OFFSET_MULTIPLIER 2 /**< VirtIO Notify Cap. MMIO config param */
|
---|
40 | #define VIRTIO_REGION_PCI_CAP 2 /**< BAR for VirtIO Cap. MMIO (impl specific) */
|
---|
41 | #define VIRTIO_REGION_MSIX_CAP 0 /**< Bar for MSI-X handling */
|
---|
42 |
|
---|
43 | #define VIRTIO_HEX_DUMP(logLevel, pv, cb, base, title) \
|
---|
44 | do { \
|
---|
45 | if (LogIsItEnabled(logLevel, LOG_GROUP)) \
|
---|
46 | virtioHexDump((pv), (cb), (base), (title)); \
|
---|
47 | } while (0)
|
---|
48 |
|
---|
49 |
|
---|
50 | /**
|
---|
51 | * The following structure holds the pre-processed context of descriptor chain pulled from a virtio queue
|
---|
52 | * to conduct a transaction between the client of this virtio implementation and the guest VM's virtio driver.
|
---|
53 | * It contains the head index of the descriptor chain, the output data from the client that has been
|
---|
54 | * converted to a contiguous virtual memory and a physical memory scatter-gather buffer for use by by
|
---|
55 | * the virtio framework to complete the transaction in the final phase of round-trip processing.
|
---|
56 | *
|
---|
57 | * The client should not modify the contents of this buffer. The primary field of interest to the
|
---|
58 | * client is pVirtSrc, which contains the VirtIO "OUT" (to device) buffer from the guest.
|
---|
59 | *
|
---|
60 | * Typical use is, When the client (worker thread) detects available data on the queue, it pulls the
|
---|
61 | * next one of these descriptor chain structs off the queue using virtioQueueGet(), processes the
|
---|
62 | * virtual memory buffer pVirtSrc, produces result data to pass back to the guest driver and calls
|
---|
63 | * virtioQueuePut() to return the result data to the client.
|
---|
64 | */
|
---|
65 | typedef struct VIRTIO_DESC_CHAIN
|
---|
66 | {
|
---|
67 | uint32_t uHeadIdx; /**< Head idx of associated desc chain */
|
---|
68 | uint32_t cbPhysSend; /**< Total size of src buffer */
|
---|
69 | PRTSGBUF pSgPhysSend; /**< Phys S/G/ buf for data from guest */
|
---|
70 | uint32_t cbPhysReturn; /**< Total size of dst buffer */
|
---|
71 | PRTSGBUF pSgPhysReturn; /**< Phys S/G buf to store result for guest */
|
---|
72 | } VIRTIO_DESC_CHAIN_T, *PVIRTIO_DESC_CHAIN_T, **PPVIRTIO_DESC_CHAIN_T;
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * The following structure is used to pass the PCI parameters from the consumer
|
---|
76 | * to this generic VirtIO framework. This framework provides the Vendor ID as Virtio.
|
---|
77 | */
|
---|
78 | typedef struct VIRTIOPCIPARAMS
|
---|
79 | {
|
---|
80 | uint16_t uDeviceId; /**< PCI Cfg Device ID */
|
---|
81 | uint16_t uClassBase; /**< PCI Cfg Base Class */
|
---|
82 | uint16_t uClassSub; /**< PCI Cfg Subclass */
|
---|
83 | uint16_t uClassProg; /**< PCI Cfg Programming Interface Class */
|
---|
84 | uint16_t uSubsystemId; /**< PCI Cfg Card Manufacturer Vendor ID */
|
---|
85 | uint16_t uSubsystemVendorId; /**< PCI Cfg Chipset Manufacturer Vendor ID */
|
---|
86 | uint16_t uRevisionId; /**< PCI Cfg Revision ID */
|
---|
87 | uint16_t uInterruptLine; /**< PCI Cfg Interrupt line */
|
---|
88 | uint16_t uInterruptPin; /**< PCI Cfg Interrupt pin */
|
---|
89 | } VIRTIOPCIPARAMS, *PVIRTIOPCIPARAMS;
|
---|
90 |
|
---|
91 | /**
|
---|
92 | * Implementation-specific client callback to notify client of significant device status
|
---|
93 | * changes.
|
---|
94 | *
|
---|
95 | * @param hVirtio Handle to VirtIO framework
|
---|
96 | * @param fDriverOk True if guest driver is okay (thus queues, etc... are valid)
|
---|
97 | * @param pClient Pointer to opaque client data (state)
|
---|
98 | */
|
---|
99 | typedef DECLCALLBACK(void) FNVIRTIOSTATUSCHANGED(VIRTIOHANDLE hVirtio, void *pClient, uint32_t fDriverOk);
|
---|
100 | typedef FNVIRTIOSTATUSCHANGED *PFNVIRTIOSTATUSCHANGED;
|
---|
101 |
|
---|
102 | /**
|
---|
103 | * When guest-to-host queue notifications are enabled, the guest driver notifies the host
|
---|
104 | * that the avail queue has buffers, and this callback informs the client.
|
---|
105 | *
|
---|
106 | * @param hVirtio Handle to the VirtIO framework
|
---|
107 | * @param qIdx Index of the notified queue
|
---|
108 | * @param pClient Pointer to opaque client data (state)
|
---|
109 | */
|
---|
110 | typedef DECLCALLBACK(void) FNVIRTIOQUEUENOTIFIED(VIRTIOHANDLE hVirtio, void *pClient, uint16_t qIdx);
|
---|
111 | typedef FNVIRTIOQUEUENOTIFIED *PFNVIRTIOQUEUENOTIFIED;
|
---|
112 |
|
---|
113 | /**
|
---|
114 | * Implementation-specific client callback to access VirtIO Device-specific capabilities
|
---|
115 | * (other VirtIO capabilities and features are handled in VirtIO implementation)
|
---|
116 | *
|
---|
117 | * @param pDevIns The device instance.
|
---|
118 | * @param offset Offset within device specific capabilities struct
|
---|
119 | * @param pvBuf Buffer in which to save read data
|
---|
120 | * @param cbWrite Number of bytes to write
|
---|
121 | */
|
---|
122 | typedef DECLCALLBACK(int) FNVIRTIODEVCAPWRITE(PPDMDEVINS pDevIns, uint32_t uOffset, const void *pvBuf, uint32_t cbWrite);
|
---|
123 | typedef FNVIRTIODEVCAPWRITE *PFNVIRTIODEVCAPWRITE;
|
---|
124 |
|
---|
125 | /**
|
---|
126 | * Implementation-specific client ballback to access VirtIO Device-specific capabilities
|
---|
127 | * (other VirtIO capabilities and features are handled in VirtIO implementation)
|
---|
128 | *
|
---|
129 | * @param pDevIns The device instance.
|
---|
130 | * @param offset Offset within device specific capabilities struct
|
---|
131 | * @param pvBuf Buffer in which to save read data
|
---|
132 | * @param cbRead Number of bytes to read
|
---|
133 | */
|
---|
134 | typedef DECLCALLBACK(int) FNVIRTIODEVCAPREAD(PPDMDEVINS pDevIns, uint32_t uOffset, void *pvBuf, uint32_t cbRead);
|
---|
135 | typedef FNVIRTIODEVCAPREAD *PFNVIRTIODEVCAPREAD;
|
---|
136 |
|
---|
137 |
|
---|
138 | /** @name VirtIO port I/O callbacks.
|
---|
139 | * @{ */
|
---|
140 | typedef struct VIRTIOCALLBACKS
|
---|
141 | {
|
---|
142 | DECLCALLBACKMEMBER(void, pfnVirtioStatusChanged)(VIRTIOHANDLE hVirtio, void *pClient, uint32_t fDriverOk);
|
---|
143 | DECLCALLBACKMEMBER(void, pfnVirtioQueueNotified)(VIRTIOHANDLE hVirtio, void *pClient, uint16_t qIdx);
|
---|
144 | DECLCALLBACKMEMBER(int, pfnVirtioDevCapRead)(PPDMDEVINS pDevIns, uint32_t uOffset, void *pvBuf, uint32_t cbRead);
|
---|
145 | DECLCALLBACKMEMBER(int, pfnVirtioDevCapWrite)(PPDMDEVINS pDevIns, uint32_t uOffset, const void *pvBuf, uint32_t cbWrite);
|
---|
146 | DECLCALLBACKMEMBER(int, pfnSSMDevLiveExec)(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass);
|
---|
147 | DECLCALLBACKMEMBER(int, pfnSSMDevSaveExec)(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
|
---|
148 | DECLCALLBACKMEMBER(int, pfnSSMDevLoadExec)(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
|
---|
149 | DECLCALLBACKMEMBER(int, pfnSSMDevLoadDone)(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
|
---|
150 | } VIRTIOCALLBACKS, *PVIRTIOCALLBACKS;
|
---|
151 | /** @} */
|
---|
152 |
|
---|
153 | /** API for VirtIO client */
|
---|
154 |
|
---|
155 | /**
|
---|
156 | * Allocate client context for client to work with VirtIO-provided with queue
|
---|
157 | *
|
---|
158 | * @param hVirtio - Handle to VirtIO framework
|
---|
159 | * @param qIdx - Queue number
|
---|
160 | * @param pcszName - Name to give queue
|
---|
161 | *
|
---|
162 | * @returns status VINF_SUCCESS - Success
|
---|
163 | * VERR_INVALID_STATE - VirtIO not in ready state
|
---|
164 | * VERR_NO_MEMORY - Out of memory
|
---|
165 | *
|
---|
166 | * @returns status. If false, the call failed and the client should call virtioResetAll()
|
---|
167 | */
|
---|
168 | int virtioQueueAttach(VIRTIOHANDLE hVirtio, uint16_t qIdx, const char *pcszName);
|
---|
169 |
|
---|
170 | /**
|
---|
171 | * Detaches from queue and release resources
|
---|
172 | *
|
---|
173 | * @param hVirtio - Handle for VirtIO framework
|
---|
174 | * @param qIdx - Queue number
|
---|
175 | *
|
---|
176 | */
|
---|
177 | int virtioQueueDetach(VIRTIOHANDLE hVirtio, uint16_t qIdx);
|
---|
178 |
|
---|
179 | /**
|
---|
180 | * Removes descriptor chain from avail ring of indicated queue and converts the descriptor
|
---|
181 | * chain into its OUT (to device) and IN to guest components. Additionally it converts
|
---|
182 | * the OUT desc chain data to a contiguous virtual memory buffer for easy consumption
|
---|
183 | * by the caller. The caller must return the descriptor chain pointer via virtioQueuePut()
|
---|
184 | * and then call virtioQueueSync() at some point to return the data to the guest and
|
---|
185 | * complete the transaction.
|
---|
186 | *
|
---|
187 | * @param hVirtio - Handle for VirtIO framework
|
---|
188 | * @param qIdx - Queue number
|
---|
189 | * @param fRemove - flags whether to remove desc chain from queue (false = peek)
|
---|
190 | * @param ppDescChain - Address to store pointer to descriptor chain that contains the
|
---|
191 | * pre-processed transaction information pulled from the virtq.
|
---|
192 | *
|
---|
193 | * @returns status VINF_SUCCESS - Success
|
---|
194 | * VERR_INVALID_STATE - VirtIO not in ready state
|
---|
195 | */
|
---|
196 | int virtioQueueGet(VIRTIOHANDLE hVirtio, uint16_t qIdx, PPVIRTIO_DESC_CHAIN_T ppDescChain, bool fRemove);
|
---|
197 |
|
---|
198 |
|
---|
199 | /**
|
---|
200 | * Returns data to the guest to complete a transaction initiated by virtQueueGet().
|
---|
201 | * The caller passes in a pointer to a scatter-gather buffer of virtual memory segments
|
---|
202 | * and a pointer to the descriptor chain context originally derived from the pulled
|
---|
203 | * queue entry, and this function will write the virtual memory s/g buffer into the
|
---|
204 | * guest's physical memory free the descriptor chain. The caller handles the freeing
|
---|
205 | * (as needed) of the virtual memory buffer.
|
---|
206 | *
|
---|
207 | * NOTE: This does a write-ahead to the used ring of the guest's queue.
|
---|
208 | * The data written won't be seen by the guest until the next call to virtioQueueSync()
|
---|
209 | *
|
---|
210 | *
|
---|
211 | * @param hVirtio - Handle for VirtIO framework
|
---|
212 | * @param qIdx - Queue number
|
---|
213 | *
|
---|
214 | * @param pSgVirtReturn - Points toscatter-gather buffer of virtual memory segments
|
---|
215 | the caller is returning to the guest.
|
---|
216 | *
|
---|
217 | * @param pDescChain - This contains the context of the scatter-gather buffer
|
---|
218 | * originally pulled from the queue.
|
---|
219 | *
|
---|
220 | * @parame fFence - If true, put up copy fence (memory barrier) after
|
---|
221 | * copying to guest phys. mem.
|
---|
222 | *
|
---|
223 | * @returns VINF_SUCCESS - Success
|
---|
224 | * VERR_INVALID_STATE - VirtIO not in ready state
|
---|
225 | * VERR_NOT_AVAILABLE - Queue is empty
|
---|
226 | */
|
---|
227 |
|
---|
228 | int virtioQueuePut(VIRTIOHANDLE hVirtio, uint16_t qIdx, PRTSGBUF pSgVirtReturn,
|
---|
229 | PVIRTIO_DESC_CHAIN_T pDescChain, bool fFence);
|
---|
230 |
|
---|
231 |
|
---|
232 | /**
|
---|
233 | * Updates the indicated virtq's "used ring" descriptor index to match the
|
---|
234 | * current write-head index, thus exposing the data added to the used ring by all
|
---|
235 | * virtioQueuePut() calls since the last sync. This should be called after one or
|
---|
236 | * more virtQueuePut() calls to inform the guest driver there is data in the queue.
|
---|
237 | * Explicit notifications (e.g. interrupt or MSI-X) will be sent to the guest,
|
---|
238 | * depending on VirtIO features negotiated and conditions, otherwise the guest
|
---|
239 | * will detect the update by polling. (see VirtIO 1.0
|
---|
240 | * specification, Section 2.4 "Virtqueues").
|
---|
241 | *
|
---|
242 | * @param hVirtio - Handle for VirtIO framework
|
---|
243 | * @param qIdx - Queue number
|
---|
244 | *
|
---|
245 | * @returns VINF_SUCCESS - Success
|
---|
246 | * VERR_INVALID_STATE - VirtIO not in ready state
|
---|
247 | */
|
---|
248 | int virtioQueueSync(VIRTIOHANDLE hVirtio, uint16_t qIdx);
|
---|
249 |
|
---|
250 | /**
|
---|
251 | * Check if the associated queue is empty
|
---|
252 | *
|
---|
253 | * @param hVirtio - Handle for VirtIO framework
|
---|
254 | * @param qIdx - Queue number
|
---|
255 | *
|
---|
256 | * @returns true - Queue is empty or unavailable.
|
---|
257 | * false - Queue is available and has entries
|
---|
258 | */
|
---|
259 | bool virtioQueueIsEmpty (VIRTIOHANDLE hVirtio, uint16_t qIdx);
|
---|
260 |
|
---|
261 | /**
|
---|
262 | * Return queue enable state
|
---|
263 | *
|
---|
264 | * @param hVirtio - Handle for VirtIO framework
|
---|
265 | * @param qIdx - Queue number
|
---|
266 | * @param fEnabled - Flag indicating whether to enable queue or not
|
---|
267 | */
|
---|
268 | bool virtioIsQueueEnabled(VIRTIOHANDLE hVirtio, uint16_t qIdx);
|
---|
269 |
|
---|
270 | /**
|
---|
271 | * Enable or disable queue
|
---|
272 | *
|
---|
273 | * @param hVirtio - Handle for VirtIO framework
|
---|
274 | * @param qIdx - Queue number
|
---|
275 | * @param fEnabled - Flag indicating whether to enable queue or not
|
---|
276 | */
|
---|
277 | void virtioQueueEnable(VIRTIOHANDLE hVirtio, uint16_t qIdx, bool fEnabled);
|
---|
278 |
|
---|
279 | /**
|
---|
280 | * Request orderly teardown of VirtIO on host and guest
|
---|
281 | * @param hVirtio - Handle for VirtIO framework
|
---|
282 | *
|
---|
283 | */
|
---|
284 | void virtioResetAll(VIRTIOHANDLE hVirtio);
|
---|
285 |
|
---|
286 | /**
|
---|
287 | * This sends notification ('kicks') guest driver to check queues for any new
|
---|
288 | * elements in the used queue to process. It should be called after resuming
|
---|
289 | * in case anything was added to the queues during suspend/quiescing and a
|
---|
290 | * notification was missed, to prevent the guest from stalling after suspend.
|
---|
291 | */
|
---|
292 | void virtioPropagateResumeNotification(VIRTIOHANDLE hVirtio);
|
---|
293 |
|
---|
294 | /**
|
---|
295 | * Get name of queue, by qIdx, assigned at virtioQueueAttach()
|
---|
296 | *
|
---|
297 | * @param hVirtio - Handle for VirtIO framework
|
---|
298 | * @param qIdx - Queue number
|
---|
299 | *
|
---|
300 | * @returns Success: Returns pointer to queue name
|
---|
301 | * Failure: Returns "<null>" (never returns NULL pointer).
|
---|
302 | */
|
---|
303 | const char *virtioQueueGetName(VIRTIOHANDLE hVirtio, uint16_t qIdx);
|
---|
304 |
|
---|
305 | /**
|
---|
306 | * Get the features VirtIO is running withnow.
|
---|
307 | *
|
---|
308 | * @returns Features the guest driver has accepted, finalizing the operational features
|
---|
309 | *
|
---|
310 | */
|
---|
311 | uint64_t virtioGetNegotiatedFeatures(VIRTIOHANDLE hVirtio);
|
---|
312 |
|
---|
313 | /**
|
---|
314 | * Constructor sets up the PCI device controller and VirtIO state
|
---|
315 | *
|
---|
316 | * @param pDevIns Device instance data
|
---|
317 | * @param pClientContext Opaque client context (such as state struct)
|
---|
318 | * @param pVirtio Device State
|
---|
319 | * @param pPciParams Values to populate industry standard PCI Configuration Space data structure
|
---|
320 | * @param pcszInstance Device instance name
|
---|
321 | * @param uDevSpecificFeatures VirtIO device-specific features offered by client
|
---|
322 | * @param devCapReadCallback Client handler to call upon guest read to device specific capabilities.
|
---|
323 | * @param devCapWriteCallback Client handler to call upon guest write to device specific capabilities.
|
---|
324 | * @param devStatusChangedCallback Client handler to call for major device status changes
|
---|
325 | * @param queueNotifiedCallback Client handler for guest-to-host notifications that avail queue has ring data
|
---|
326 | * @param ssmLiveExecCallback Client handler for SSM live exec
|
---|
327 | * @param ssmSaveExecCallback Client handler for SSM save exec
|
---|
328 | * @param ssmLoadExecCallback Client handler for SSM load exec
|
---|
329 | * @param ssmLoadDoneCallback Client handler for SSM load done
|
---|
330 | * @param cbDevSpecificCfg Size of virtio_pci_device_cap device-specific configuration struct
|
---|
331 | * @param pDevSpecificCfg Address of client's VirtIO dev-specific configuration struct
|
---|
332 | */
|
---|
333 | int virtioConstruct(PPDMDEVINS pDevIns,
|
---|
334 | void *pClientContext,
|
---|
335 | VIRTIOHANDLE *phVirtio,
|
---|
336 | PVIRTIOPCIPARAMS pPciParams,
|
---|
337 | const char *pcszInstance,
|
---|
338 | uint64_t uDevSpecificFeatures,
|
---|
339 | PFNVIRTIODEVCAPREAD devCapReadCallback,
|
---|
340 | PFNVIRTIODEVCAPWRITE devCapWriteCallback,
|
---|
341 | PFNVIRTIOSTATUSCHANGED devStatusChangedCallback,
|
---|
342 | PFNVIRTIOQUEUENOTIFIED queueNotifiedCallback,
|
---|
343 | PFNSSMDEVLIVEEXEC ssmLiveExecCallback,
|
---|
344 | PFNSSMDEVSAVEEXEC ssmSaveExecCallback,
|
---|
345 | PFNSSMDEVLOADEXEC ssmLoadExecCallback,
|
---|
346 | PFNSSMDEVLOADDONE ssmLoadDoneCallback,
|
---|
347 | uint16_t cbDevSpecificCfg,
|
---|
348 | void *pDevSpecificCfg);
|
---|
349 |
|
---|
350 | /**
|
---|
351 | * Log memory-mapped I/O input or output value.
|
---|
352 | *
|
---|
353 | * This is designed to be invoked by macros that can make contextual assumptions
|
---|
354 | * (e.g. implicitly derive MACRO parameters from the invoking function). It is exposed
|
---|
355 | * for the VirtIO client doing the device-specific implementation in order to log in a
|
---|
356 | * similar fashion accesses to the device-specific MMIO configuration structure. Macros
|
---|
357 | * that leverage this function are in Virtio_1_0_impl.h and can be used as an example
|
---|
358 | * of how to use this effectively for the device-specific code.
|
---|
359 | *
|
---|
360 | * @param pszFunc - To avoid displaying this function's name via __FUNCTION__ or LogFunc()
|
---|
361 | * @param pszMember - Name of struct member
|
---|
362 | * @param pv - pointer to value
|
---|
363 | * @param cb - size of value
|
---|
364 | * @param uOffset - offset into member where value starts
|
---|
365 | * @param fWrite - True if write I/O
|
---|
366 | * @param fHasIndex - True if the member is indexed
|
---|
367 | * @param idx - The index if fHasIndex
|
---|
368 | */
|
---|
369 | void virtioLogMappedIoValue(const char *pszFunc, const char *pszMember, uint32_t uMemberSize,
|
---|
370 | const void *pv, uint32_t cb, uint32_t uOffset,
|
---|
371 | int fWrite, int fHasIndex, uint32_t idx);
|
---|
372 | /**
|
---|
373 | * Does a formatted hex dump using Log(()), recommend using VIRTIO_HEX_DUMP() macro to
|
---|
374 | * control enabling of logging efficiently.
|
---|
375 | *
|
---|
376 | * @param pv - pointer to buffer to dump contents of
|
---|
377 | * @param cb - count of characters to dump from buffer
|
---|
378 | * @param uBase - base address of per-row address prefixing of hex output
|
---|
379 | * @param pszTitle - Optional title. If present displays title that lists
|
---|
380 | * provided text with value of cb to indicate size next to it.
|
---|
381 | */
|
---|
382 | void virtioHexDump(uint8_t *pv, uint32_t cb, uint32_t uBase, const char *pszTitle);
|
---|
383 |
|
---|
384 | #endif /* !VBOX_INCLUDED_SRC_VirtIO_Virtio_1_0_h */
|
---|