linux_dsm_epyc7002/drivers/virtio
Michael S. Tsirkin 704a0b5f23 virtio_mmio: fix access width for mmio
Going over the virtio mmio code, I noticed that it doesn't correctly
access modern device config values using "natural" accessors: it uses
readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:

	4.2.2.2 Driver Requirements: MMIO Device Register Layout

	...

	The driver MUST only use 32 bit wide and aligned reads and writes to
	access the control registers described in table 4.1.
	For the device-specific configuration space, the driver MUST use
	8 bit wide accesses for 8 bit wide fields, 16 bit wide and aligned
	accesses for 16 bit wide fields and 32 bit wide and aligned accesses for
	32 and 64 bit wide fields.

Borrow code from virtio_pci_modern to do this correctly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-03-17 12:12:21 +10:30
..
config.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig virtio_pci: add an option to disable legacy driver 2015-01-21 16:28:59 +10:30
Makefile virtio_pci: add an option to disable legacy driver 2015-01-21 16:28:59 +10:30
virtio_balloon.c virtio-balloon: do not call blocking ops when !TASK_RUNNING 2015-03-10 11:56:15 +10:30
virtio_mmio.c virtio_mmio: fix access width for mmio 2015-03-17 12:12:21 +10:30
virtio_pci_common.c virtio_pci: add module param to force legacy mode 2015-01-21 16:29:01 +10:30
virtio_pci_common.h virtio_pci: add an option to disable legacy driver 2015-01-21 16:28:59 +10:30
virtio_pci_legacy.c virtio_pci: move probe/remove code to common 2015-01-21 16:28:51 +10:30
virtio_pci_modern.c virtio_pci: use 16-bit accessor for queue_enable. 2015-02-11 15:03:16 +10:30
virtio_ring.c virtio: Avoid possible kernel panic if DEBUG is enabled. 2015-02-11 15:03:14 +10:30
virtio.c virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice. 2015-02-17 16:19:29 +10:30