1.分别 编写后前端驱动,分别在dom0和domU中加载,可以采用 insmod 方式
2.通过在dom0中运行如下脚本,来触发后前端驱动的probe,以及changed函数例程
#!/bin/bash
if [ $# != 2 ]
then
echo "Usage: $0 <device name> <frontend-id>"
else
# Write backend information into the location the frontend will look
# for it.
xenstore-write /local/domain/${2}/device/${1}/0/backend-id 0
xenstore-write /local/domain/${2}/device/${1}/0/backend \
/local/domain/0/backend/${1}/${2}/0
# Write frontend information into the location the backend will look
# for it.
xenstore-write /local/domain/0/backend/${1}/${2}/0/frontend-id ${2}
xenstore-write /local/domain/0/backend/${1}/${2}/0/frontend \
/local/domain/${2}/device/${1}/0
# Set the permissions on the backend so that the frontend can
# actually read i