Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
f7ce7287
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f7ce7287
编写于
5月 17, 2010
作者:
A
Anthony Liguori
浏览文件
操作
浏览文件
下载
差异文件
Merge remote branch 'mst/for_anthony' into staging
上级
21ffd181
57c3229b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
8 deletion
+16
-8
hw/pci.c
hw/pci.c
+13
-7
hw/virtio-net.c
hw/virtio-net.c
+1
-1
hw/virtio.c
hw/virtio.c
+2
-0
未找到文件。
hw/pci.c
浏览文件 @
f7ce7287
...
...
@@ -324,7 +324,7 @@ static VMStateInfo vmstate_info_pci_config = {
static
int
get_pci_irq_state
(
QEMUFile
*
f
,
void
*
pv
,
size_t
size
)
{
PCIDevice
*
s
=
container_of
(
pv
,
PCIDevice
,
config
);
PCIDevice
*
s
=
container_of
(
pv
,
PCIDevice
,
irq_state
);
uint32_t
irq_state
[
PCI_NUM_PINS
];
int
i
;
for
(
i
=
0
;
i
<
PCI_NUM_PINS
;
++
i
)
{
...
...
@@ -346,7 +346,7 @@ static int get_pci_irq_state(QEMUFile *f, void *pv, size_t size)
static
void
put_pci_irq_state
(
QEMUFile
*
f
,
void
*
pv
,
size_t
size
)
{
int
i
;
PCIDevice
*
s
=
container_of
(
pv
,
PCIDevice
,
config
);
PCIDevice
*
s
=
container_of
(
pv
,
PCIDevice
,
irq_state
);
for
(
i
=
0
;
i
<
PCI_NUM_PINS
;
++
i
)
{
qemu_put_be32
(
f
,
pci_irq_state
(
s
,
i
));
...
...
@@ -627,6 +627,13 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
return
pci_dev
;
}
static
void
do_pci_unregister_device
(
PCIDevice
*
pci_dev
)
{
qemu_free_irqs
(
pci_dev
->
irq
);
pci_dev
->
bus
->
devices
[
pci_dev
->
devfn
]
=
NULL
;
pci_config_free
(
pci_dev
);
}
PCIDevice
*
pci_register_device
(
PCIBus
*
bus
,
const
char
*
name
,
int
instance_size
,
int
devfn
,
PCIConfigReadFunc
*
config_read
,
...
...
@@ -682,10 +689,7 @@ static int pci_unregister_device(DeviceState *dev)
return
ret
;
pci_unregister_io_regions
(
pci_dev
);
qemu_free_irqs
(
pci_dev
->
irq
);
pci_dev
->
bus
->
devices
[
pci_dev
->
devfn
]
=
NULL
;
pci_config_free
(
pci_dev
);
do_pci_unregister_device
(
pci_dev
);
return
0
;
}
...
...
@@ -1654,8 +1658,10 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
if
(
pci_dev
==
NULL
)
return
-
1
;
rc
=
info
->
init
(
pci_dev
);
if
(
rc
!=
0
)
if
(
rc
!=
0
)
{
do_pci_unregister_device
(
pci_dev
);
return
rc
;
}
/* rom loading */
if
(
pci_dev
->
romfile
==
NULL
&&
info
->
romfile
!=
NULL
)
...
...
hw/virtio-net.c
浏览文件 @
f7ce7287
...
...
@@ -227,7 +227,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features)
if
(
!
tap_get_vhost_net
(
n
->
nic
->
nc
.
peer
))
{
return
;
}
return
vhost_net_ack_features
(
tap_get_vhost_net
(
n
->
nic
->
nc
.
peer
),
features
);
vhost_net_ack_features
(
tap_get_vhost_net
(
n
->
nic
->
nc
.
peer
),
features
);
}
static
int
virtio_net_handle_rx_mode
(
VirtIONet
*
n
,
uint8_t
cmd
,
...
...
hw/virtio.c
浏览文件 @
f7ce7287
...
...
@@ -677,6 +677,8 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
features
,
supported_features
);
return
-
1
;
}
if
(
vdev
->
set_features
)
vdev
->
set_features
(
vdev
,
features
);
vdev
->
guest_features
=
features
;
vdev
->
config_len
=
qemu_get_be32
(
f
);
qemu_get_buffer
(
f
,
vdev
->
config
,
vdev
->
config_len
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录