Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
17c56d6d
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
17c56d6d
编写于
2月 13, 2015
作者:
R
Rusty Russell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tools/lguest: give virtqueues names for better error messages
Signed-off-by:
N
Rusty Russell
<
rusty@rustcorp.com.au
>
上级
d39a6785
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
7 deletion
+12
-7
tools/lguest/lguest.c
tools/lguest/lguest.c
+12
-7
未找到文件。
tools/lguest/lguest.c
浏览文件 @
17c56d6d
...
...
@@ -200,6 +200,9 @@ struct virtqueue {
/* Which device owns me. */
struct
device
*
dev
;
/* Name for printing errors. */
const
char
*
name
;
/* The actual ring of buffers. */
struct
vring
vring
;
...
...
@@ -2366,7 +2369,8 @@ static void emulate_mmio(unsigned long paddr, const u8 *insn)
* routines to allocate and manage them.
*/
static
void
add_pci_virtqueue
(
struct
device
*
dev
,
void
(
*
service
)(
struct
virtqueue
*
))
void
(
*
service
)(
struct
virtqueue
*
),
const
char
*
name
)
{
struct
virtqueue
**
i
,
*
vq
=
malloc
(
sizeof
(
*
vq
));
...
...
@@ -2374,6 +2378,7 @@ static void add_pci_virtqueue(struct device *dev,
vq
->
next
=
NULL
;
vq
->
last_avail_idx
=
0
;
vq
->
dev
=
dev
;
vq
->
name
=
name
;
/*
* This is the routine the service thread will run, and its Process ID
...
...
@@ -2666,8 +2671,8 @@ static void setup_console(void)
* stdin. When they put something in the output queue, we write it to
* stdout.
*/
add_pci_virtqueue
(
dev
,
console_input
);
add_pci_virtqueue
(
dev
,
console_output
);
add_pci_virtqueue
(
dev
,
console_input
,
"input"
);
add_pci_virtqueue
(
dev
,
console_output
,
"output"
);
/* We need a configuration area for the emerg_wr early writes. */
add_pci_feature
(
dev
,
VIRTIO_CONSOLE_F_EMERG_WRITE
);
...
...
@@ -2838,8 +2843,8 @@ static void setup_tun_net(char *arg)
dev
->
priv
=
net_info
;
/* Network devices need a recv and a send queue, just like console. */
add_pci_virtqueue
(
dev
,
net_input
);
add_pci_virtqueue
(
dev
,
net_output
);
add_pci_virtqueue
(
dev
,
net_input
,
"rx"
);
add_pci_virtqueue
(
dev
,
net_output
,
"tx"
);
/*
* We need a socket to perform the magic network ioctls to bring up the
...
...
@@ -3026,7 +3031,7 @@ static void setup_block_file(const char *filename)
dev
=
new_pci_device
(
"block"
,
VIRTIO_ID_BLOCK
,
0x01
,
0x80
);
/* The device has one virtqueue, where the Guest places requests. */
add_pci_virtqueue
(
dev
,
blk_request
);
add_pci_virtqueue
(
dev
,
blk_request
,
"request"
);
/* Allocate the room for our own bookkeeping */
vblk
=
dev
->
priv
=
malloc
(
sizeof
(
*
vblk
));
...
...
@@ -3107,7 +3112,7 @@ static void setup_rng(void)
dev
->
priv
=
rng_info
;
/* The device has one virtqueue, where the Guest places inbufs. */
add_pci_virtqueue
(
dev
,
rng_input
);
add_pci_virtqueue
(
dev
,
rng_input
,
"input"
);
/* We don't have any configuration space */
no_device_config
(
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录