Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…
…t/mst/vhost Pull virtio tests and fixes from Michael Tsirkin: "This fixes existing tests broken by barrier rework, and adds some new tests. Plus, there's a fix for an old bug in virtio-pci" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: tools/virtio: add ringtest utilities sh: fix smp_store_mb for !SMP tools/virtio: use virt_xxx barriers virtio_pci: fix use after free on release
- Loading branch information
Showing
13 changed files
with
1,148 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef LINUX_COMPILER_H | ||
#define LINUX_COMPILER_H | ||
|
||
#define WRITE_ONCE(var, val) \ | ||
(*((volatile typeof(val) *)(&(var))) = (val)) | ||
|
||
#define READ_ONCE(var) (*((volatile typeof(val) *)(&(var)))) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
all: | ||
|
||
all: ring virtio_ring_0_9 virtio_ring_poll | ||
|
||
CFLAGS += -Wall | ||
CFLAGS += -pthread -O2 -ggdb | ||
LDFLAGS += -pthread -O2 -ggdb | ||
|
||
main.o: main.c main.h | ||
ring.o: ring.c main.h | ||
virtio_ring_0_9.o: virtio_ring_0_9.c main.h | ||
virtio_ring_poll.o: virtio_ring_poll.c virtio_ring_0_9.c main.h | ||
ring: ring.o main.o | ||
virtio_ring_0_9: virtio_ring_0_9.o main.o | ||
virtio_ring_poll: virtio_ring_poll.o main.o | ||
clean: | ||
-rm main.o | ||
-rm ring.o ring | ||
-rm virtio_ring_0_9.o virtio_ring_0_9 | ||
-rm virtio_ring_poll.o virtio_ring_poll | ||
|
||
.PHONY: all clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Partial implementation of various ring layouts, useful to tune virtio design. | ||
Uses shared memory heavily. |
Oops, something went wrong.