Page MenuHomeFreeBSD

D37291.diff
No OneTemporary

D37291.diff

diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h
--- a/usr.sbin/bhyve/virtio.h
+++ b/usr.sbin/bhyve/virtio.h
@@ -314,14 +314,14 @@
uint32_t vq_pfn; /* PFN of virt queue (not shifted!) */
- volatile struct vring_desc *vq_desc; /* descriptor array */
- volatile struct vring_avail *vq_avail; /* the "avail" ring */
- volatile struct vring_used *vq_used; /* the "used" ring */
+ struct vring_desc *vq_desc; /* descriptor array */
+ struct vring_avail *vq_avail; /* the "avail" ring */
+ struct vring_used *vq_used; /* the "used" ring */
};
/* as noted above, these are sort of backwards, name-wise */
#define VQ_AVAIL_EVENT_IDX(vq) \
- (*(volatile uint16_t *)&(vq)->vq_used->ring[(vq)->vq_qsize])
+ (*(uint16_t *)&(vq)->vq_used->ring[(vq)->vq_qsize])
#define VQ_USED_EVENT_IDX(vq) \
((vq)->vq_avail->ring[(vq)->vq_qsize])
diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c
--- a/usr.sbin/bhyve/virtio.c
+++ b/usr.sbin/bhyve/virtio.c
@@ -214,10 +214,9 @@
* descriptor.
*/
static inline void
-_vq_record(int i, volatile struct vring_desc *vd,
- struct vmctx *ctx, struct iovec *iov, int n_iov,
- struct vi_req *reqp) {
-
+_vq_record(int i, struct vring_desc *vd, struct vmctx *ctx, struct iovec *iov,
+ int n_iov, struct vi_req *reqp)
+{
if (i >= n_iov)
return;
iov[i].iov_base = paddr_guest2host(ctx, vd->addr, vd->len);
@@ -271,7 +270,7 @@
u_int ndesc, n_indir;
u_int idx, next;
struct vi_req req;
- volatile struct vring_desc *vdir, *vindir, *vp;
+ struct vring_desc *vdir, *vindir, *vp;
struct vmctx *ctx;
struct virtio_softc *vs;
const char *name;
@@ -409,8 +408,8 @@
void
vq_relchain_prepare(struct vqueue_info *vq, uint16_t idx, uint32_t iolen)
{
- volatile struct vring_used *vuh;
- volatile struct vring_used_elem *vue;
+ struct vring_used *vuh;
+ struct vring_used_elem *vue;
uint16_t mask;
/*

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 7, 2:43 AM (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17023860
Default Alt Text
D37291.diff (1 KB)

Event Timeline