mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
No real surprises.
Thanks, Rusty. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJR3NcfAAoJENkgDmzRrbjxtgAQAMAChsD867ADZPVaT1jcS6Me 5OoavOnpw84AopY4cLOFxL13lDgHeDZxTbsS56WP/100WEDTFQqr9uWpuFxt/NU7 ukXwMrN/5RBmTXtDpdApM+jnBdgRLxu6gJaEjmVZSW10XwPDar+zGJV+NUVX42uy 8rhjZcFTPIhLz96VBeXgtnmlc8f33AwdFb1JtA6c5slMXmJ0pGKpme3Gri0Hqu0X sowVCchjuJXuhg3siyyjcyrDtWnH6hPNCbvAFuL4wwcGyMjb3TS7l922GiscD9pq KZcpkYywCosJEnaR4XZQ3ewDGnqaslgb556Tcigm2TXC9LfAR/k4Q1ZYiPGrxcmU zgiN/Nvr1PbMDcKr6Lr+utQGh82jeKTcrKz/CPlCJtusg+4hPCwuugDMhNqKK4/2 3O+0c5t32K38TUdDhVRu2wXlvlyLoQc55yIbhw70O+G1Td7KMHrjXuxwyWbP+tGU X/D2DKQu5bcNcBv5sA04PdyRM2buYFvwSZUjxwdwWssmdUqU1xdybDK3pgWf92fF llsri86xZ/hOOE+A+jn/oUpXol2PAVOCoh80P7O9VeuDgPL2Fjl4UWf8HWqVvn/u A3kpCrIygogc4I7xQkdxBkR6Aa2Uh323rpXKm7E4Tlg0Ii6srqBWq74fz2Ou3TlS tOPNG/Npv6yiWo2ejXp8 =XNkj -----END PGP SIGNATURE----- Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull virtio updates from Rusty Russell: "No real surprises" * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: MAINTAINERS: add tools/virtio/ under virtio tools/virtio: move module license stub to module.h virtio: include asm/barrier explicitly virtio: VIRTIO_F_ANY_LAYOUT feature lguest: fix example launcher compilation for broken glibc headers. virtio-net: fix the race between channels setting and refill tools/lguest: real barriers. tools/lguest: fix missing rmb(). virtio_balloon: leak_balloon(): only tell host if we got pages deflated virtio-pci: fix leaks of msix_affinity_masks Fix comment typo "CONFIG_PAE"
This commit is contained in:
commit
5f12972171
10 changed files with 39 additions and 20 deletions
|
|
@ -1,5 +1,4 @@
|
|||
# This creates the demonstration utility "lguest" which runs a Linux guest.
|
||||
# Missing headers? Add "-I../../../include -I../../../arch/x86/include"
|
||||
CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE
|
||||
|
||||
all: lguest
|
||||
|
|
|
|||
|
|
@ -42,14 +42,6 @@
|
|||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_net.h>
|
||||
#include <linux/virtio_blk.h>
|
||||
#include <linux/virtio_console.h>
|
||||
#include <linux/virtio_rng.h>
|
||||
#include <linux/virtio_ring.h>
|
||||
#include <asm/bootparam.h>
|
||||
#include "../../include/linux/lguest_launcher.h"
|
||||
/*L:110
|
||||
* We can ignore the 43 include files we need for this program, but I do want
|
||||
* to draw attention to the use of kernel-style types.
|
||||
|
|
@ -65,6 +57,15 @@ typedef uint16_t u16;
|
|||
typedef uint8_t u8;
|
||||
/*:*/
|
||||
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_net.h>
|
||||
#include <linux/virtio_blk.h>
|
||||
#include <linux/virtio_console.h>
|
||||
#include <linux/virtio_rng.h>
|
||||
#include <linux/virtio_ring.h>
|
||||
#include <asm/bootparam.h>
|
||||
#include "../../include/linux/lguest_launcher.h"
|
||||
|
||||
#define BRIDGE_PFX "bridge:"
|
||||
#ifndef SIOCBRADDIF
|
||||
#define SIOCBRADDIF 0x89a2 /* add interface to bridge */
|
||||
|
|
@ -177,7 +178,8 @@ static struct termios orig_term;
|
|||
* in precise order.
|
||||
*/
|
||||
#define wmb() __asm__ __volatile__("" : : : "memory")
|
||||
#define mb() __asm__ __volatile__("" : : : "memory")
|
||||
#define rmb() __asm__ __volatile__("lock; addl $0,0(%%esp)" : : : "memory")
|
||||
#define mb() __asm__ __volatile__("lock; addl $0,0(%%esp)" : : : "memory")
|
||||
|
||||
/* Wrapper for the last available index. Makes it easier to change. */
|
||||
#define lg_last_avail(vq) ((vq)->last_avail_idx)
|
||||
|
|
@ -676,6 +678,12 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
|
|||
errx(1, "Guest moved used index from %u to %u",
|
||||
last_avail, vq->vring.avail->idx);
|
||||
|
||||
/*
|
||||
* Make sure we read the descriptor number *after* we read the ring
|
||||
* update; don't let the cpu or compiler change the order.
|
||||
*/
|
||||
rmb();
|
||||
|
||||
/*
|
||||
* Grab the next descriptor number they're advertising, and increment
|
||||
* the index we've seen.
|
||||
|
|
@ -694,6 +702,12 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
|
|||
desc = vq->vring.desc;
|
||||
i = head;
|
||||
|
||||
/*
|
||||
* We have to read the descriptor after we read the descriptor number,
|
||||
* but there's a data dependency there so the CPU shouldn't reorder
|
||||
* that: no rmb() required.
|
||||
*/
|
||||
|
||||
/*
|
||||
* If this is an indirect entry, then this buffer contains a descriptor
|
||||
* table which we handle as if it's any normal descriptor chain.
|
||||
|
|
|
|||
|
|
@ -1 +1,6 @@
|
|||
#include <linux/export.h>
|
||||
|
||||
#define MODULE_LICENSE(__MODULE_LICENSE_value) \
|
||||
static __attribute__((unused)) const char *__MODULE_LICENSE_name = \
|
||||
__MODULE_LICENSE_value
|
||||
|
||||
|
|
|
|||
|
|
@ -45,9 +45,6 @@ struct virtqueue {
|
|||
void *priv;
|
||||
};
|
||||
|
||||
#define MODULE_LICENSE(__MODULE_LICENSE_value) \
|
||||
const char *__MODULE_LICENSE_name = __MODULE_LICENSE_value
|
||||
|
||||
/* Interfaces exported by virtio_ring. */
|
||||
int virtqueue_add_sgs(struct virtqueue *vq,
|
||||
struct scatterlist *sgs[],
|
||||
|
|
|
|||
Loading…
Reference in a new issue