Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
fea06915
Commit
fea06915
authored
Apr 14, 2010
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'vhost' of
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
parents
5f6c0181
a8d3782f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
drivers/vhost/net.c
drivers/vhost/net.c
+2
-2
drivers/vhost/vhost.c
drivers/vhost/vhost.c
+6
-5
No files found.
drivers/vhost/net.c
View file @
fea06915
...
...
@@ -642,7 +642,7 @@ static struct miscdevice vhost_net_misc = {
&
vhost_net_fops
,
};
int
vhost_net_init
(
void
)
static
int
vhost_net_init
(
void
)
{
int
r
=
vhost_init
();
if
(
r
)
...
...
@@ -659,7 +659,7 @@ int vhost_net_init(void)
}
module_init
(
vhost_net_init
);
void
vhost_net_exit
(
void
)
static
void
vhost_net_exit
(
void
)
{
misc_deregister
(
&
vhost_net_misc
);
vhost_cleanup
();
...
...
drivers/vhost/vhost.c
View file @
fea06915
...
...
@@ -715,8 +715,8 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
return
0
;
}
int
translate_desc
(
struct
vhost_dev
*
dev
,
u64
addr
,
u32
len
,
struct
iovec
iov
[],
int
iov_size
)
static
int
translate_desc
(
struct
vhost_dev
*
dev
,
u64
addr
,
u32
len
,
struct
iovec
iov
[],
int
iov_size
)
{
const
struct
vhost_memory_region
*
reg
;
struct
vhost_memory
*
mem
;
...
...
@@ -741,7 +741,7 @@ int translate_desc(struct vhost_dev *dev, u64 addr, u32 len,
_iov
=
iov
+
ret
;
size
=
reg
->
memory_size
-
addr
+
reg
->
guest_phys_addr
;
_iov
->
iov_len
=
min
((
u64
)
len
,
size
);
_iov
->
iov_base
=
(
void
*
)(
unsigned
long
)
_iov
->
iov_base
=
(
void
__user
*
)(
unsigned
long
)
(
reg
->
userspace_addr
+
addr
-
reg
->
guest_phys_addr
);
s
+=
size
;
addr
+=
size
;
...
...
@@ -995,7 +995,7 @@ void vhost_discard_vq_desc(struct vhost_virtqueue *vq)
* want to notify the guest, using eventfd. */
int
vhost_add_used
(
struct
vhost_virtqueue
*
vq
,
unsigned
int
head
,
int
len
)
{
struct
vring_used_elem
*
used
;
struct
vring_used_elem
__user
*
used
;
/* The virtqueue contains a ring of used buffers. Get a pointer to the
* next entry in that used ring. */
...
...
@@ -1019,7 +1019,8 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
smp_wmb
();
/* Log used ring entry write. */
log_write
(
vq
->
log_base
,
vq
->
log_addr
+
((
void
*
)
used
-
(
void
*
)
vq
->
used
),
vq
->
log_addr
+
((
void
__user
*
)
used
-
(
void
__user
*
)
vq
->
used
),
sizeof
*
used
);
/* Log used index update. */
log_write
(
vq
->
log_base
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment