Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
9a773408
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看板
提交
9a773408
编写于
5月 14, 2012
作者:
G
Gerd Hoffmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ehci: add live migration support
Signed-off-by:
N
Gerd Hoffmann
<
kraxel@redhat.com
>
上级
93bfef4c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
56 addition
and
6 deletion
+56
-6
hw/usb/hcd-ehci.c
hw/usb/hcd-ehci.c
+56
-6
未找到文件。
hw/usb/hcd-ehci.c
浏览文件 @
9a773408
...
...
@@ -414,16 +414,17 @@ struct EHCIState {
*/
QEMUTimer
*
frame_timer
;
QEMUBH
*
async_bh
;
int
astate
;
// Current state in asynchronous schedule
int
pstate
;
// Current state in periodic schedule
uint32_t
astate
;
/* Current state in asynchronous schedule */
uint32_t
pstate
;
/* Current state in periodic schedule */
USBPort
ports
[
NB_PORTS
];
USBPort
*
companion_ports
[
NB_PORTS
];
uint32_t
usbsts_pending
;
EHCIQueueHead
aqueues
;
EHCIQueueHead
pqueues
;
uint32_t
a_fetch_addr
;
// which address to look at next
uint32_t
p_fetch_addr
;
// which address to look at next
/* which address to look at next */
uint32_t
a_fetch_addr
;
uint32_t
p_fetch_addr
;
USBPacket
ipacket
;
QEMUSGList
isgl
;
...
...
@@ -2390,9 +2391,58 @@ static USBBusOps ehci_bus_ops = {
.
register_companion
=
ehci_register_companion
,
};
static
int
usb_ehci_post_load
(
void
*
opaque
,
int
version_id
)
{
EHCIState
*
s
=
opaque
;
int
i
;
for
(
i
=
0
;
i
<
NB_PORTS
;
i
++
)
{
USBPort
*
companion
=
s
->
companion_ports
[
i
];
if
(
companion
==
NULL
)
{
continue
;
}
if
(
s
->
portsc
[
i
]
&
PORTSC_POWNER
)
{
companion
->
dev
=
s
->
ports
[
i
].
dev
;
}
else
{
companion
->
dev
=
NULL
;
}
}
return
0
;
}
static
const
VMStateDescription
vmstate_ehci
=
{
.
name
=
"ehci"
,
.
unmigratable
=
1
,
.
name
=
"ehci"
,
.
version_id
=
1
,
.
post_load
=
usb_ehci_post_load
,
.
fields
=
(
VMStateField
[])
{
VMSTATE_PCI_DEVICE
(
dev
,
EHCIState
),
/* mmio registers */
VMSTATE_UINT32
(
usbcmd
,
EHCIState
),
VMSTATE_UINT32
(
usbsts
,
EHCIState
),
VMSTATE_UINT32
(
usbintr
,
EHCIState
),
VMSTATE_UINT32
(
frindex
,
EHCIState
),
VMSTATE_UINT32
(
ctrldssegment
,
EHCIState
),
VMSTATE_UINT32
(
periodiclistbase
,
EHCIState
),
VMSTATE_UINT32
(
asynclistaddr
,
EHCIState
),
VMSTATE_UINT32
(
configflag
,
EHCIState
),
VMSTATE_UINT32
(
portsc
[
0
],
EHCIState
),
VMSTATE_UINT32
(
portsc
[
1
],
EHCIState
),
VMSTATE_UINT32
(
portsc
[
2
],
EHCIState
),
VMSTATE_UINT32
(
portsc
[
3
],
EHCIState
),
VMSTATE_UINT32
(
portsc
[
4
],
EHCIState
),
VMSTATE_UINT32
(
portsc
[
5
],
EHCIState
),
/* frame timer */
VMSTATE_TIMER
(
frame_timer
,
EHCIState
),
VMSTATE_UINT64
(
last_run_ns
,
EHCIState
),
VMSTATE_UINT32
(
async_stepdown
,
EHCIState
),
/* schedule state */
VMSTATE_UINT32
(
astate
,
EHCIState
),
VMSTATE_UINT32
(
pstate
,
EHCIState
),
VMSTATE_UINT32
(
a_fetch_addr
,
EHCIState
),
VMSTATE_UINT32
(
p_fetch_addr
,
EHCIState
),
VMSTATE_END_OF_LIST
()
}
};
static
Property
ehci_properties
[]
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录