Linux ÐéÄ⻯ºÍ PCI ͸´«¼¼Êõ
¼¶
±ð£º Öм¶
M.
Tim Jones
, ×ÔÓÉ×÷¼Ò
2009 Äê 11 ÔÂ 19 ÈÕ
´¦ÀíÆ÷ÒѾÑݱä
ΪÕë¶ÔÐéÄâ»·¾³Ìá¸ßÐÔÄÜ£¬µ« I/O ·½Ãæ·¢ÉúÁËʲô±ä»¯ÄØ£¿Á˽âÒ»ÖÖÃûΪÉ豸£¨»ò PCI£©Í¸´«£¨passthrough£©µÄ I/O
ÐÔÄÜÔöÇ¿¼¼Êõ£¬ÕâÖÖ´´Ð¼¼Êõͨ¹ýʹÓÃÀ´×Ô Intel® (VT-d) »ò AMD (IOMMU) µÄÓ²¼þÖ§³Ö¸Ä½ø PCI É豸µÄÐÔÄÜ¡£
¼ÓÈë My developerWorks ÉϵÄÂÌɫС×é
ÔÚ My developerWorks É쵀 GReen IT
Report ¿Õ¼ä
ºÍ ÂÌÉ«¼ÆËãС×é
ÉÏÌÖÂÛ¹ØÓÚÄÜÔ´¡¢Ð§Âʺͻ·¾³µÄÖ÷Ìâ²¢¹²Ïí×ÊÔ´¡£
ƽ̨ÐéÄ⻯ÊÇÔÚÁ½¸ö»ò¶à¸ö²Ù×÷ϵͳ֮¼ä¹²ÏíÒ»¸öƽ̨£¬ÒÔ±ã¸üÓÐЧµØÀûÓÃ×ÊÔ´¡£µ«Æ½Ì¨
²¢²»Ö»ÊÇÒâζ×ÅÒ»¸öÒÔÉϵĴ¦ÀíÆ÷£¬Ëü»¹°üº¬×é³Éƽ̨µÄÆäËûÖØÒªÔªËØ£¬±ÈÈç´æ´¢Æ÷¡¢ÍøÂçºÍÆäËûÓ²¼þ×ÊÔ´¡£Ä³Ð©Ó²¼þ×ÊÔ´¿ÉÒÔÇáËÉÐéÄ⻯£¬±ÈÈç´¦ÀíÆ÷ºÍ´æ´¢Æ÷£»
¶øÁíһЩӲ¼þ×ÊÔ´Ôò²»È»£¬±ÈÈçÊÓƵÊÊÅäÆ÷ºÍ´®¿Ú¡£µ±¹²Ïí²»¿ÉÄÜ»òûÓÃʱ£¬Peripheral Component Interconnect
(PCI) ͸´«¼¼ÊõÌṩÓÐЧʹÓÃÕâЩ×ÊÔ´µÄ·½·¨¡£±¾ÎÄ̽Ë÷͸´«£¨passthrough£©
¼¼ÊõµÄ¸ÅÄî¼°ÆäÔÚ¹ÜÀí³ÌÐò
£¨hypervisor£©ÖеÄʵÏÖ£¬Ïêϸ½éÉÜÖ§³ÖÕâ¸ö×îд´Ð¼¼ÊõµÄ¹ÜÀí³ÌÐò¡£
ƽ̨É豸ģÄâ
ÔÚ̽Ë÷͸´«¼¼Êõ֮ǰ£¬ÈÃÎÒÃÇÏÈÌÖÂÛÒ»ÏÂÈç½ñÉ豸ģÄâÔÚÁ½¸ö¹ÜÀí³ÌÐò¼Ü¹¹ÖÐÊÇÈçºÎ¹¤×÷µÄ¡£µÚÒ»¸ö¼Ü¹¹½«É豸ģÄâÕûºÏµ½¹ÜÀí³ÌÐòÖУ¬¶øµÚ¶þ¸ö¼Ü¹¹
½«É豸ģÄâÍƵ½¹ÜÀí³ÌÐòÖ®ÍâµÄÒ»¸öÓ¦ÓóÌÐòÖС£
¹ÜÀí³ÌÐòÖеÄÉ豸ģÄâ
ÊÇÔÚ VMware
¹¤×÷Õ¾²úÆ·£¨Ò»¸ö»ùÓÚ²Ù×÷ϵͳµÄ¹ÜÀí³ÌÐò£©ÖÐʵÏÖµÄÒ»¸ö¹«¹²·½·¨¡£ÔÚÕâ¸öÄ£ÐÍÖУ¬¹ÜÀí³ÌÐò°üº¬¸÷ÖÖ¿Í»§²Ù×÷ϵͳÄܹ»¹²ÏíµÄ¹«¹²É豸£¬ÈçÐéÄâ´ÅÅÌ¡¢ÐéÄâÍøÂç
ÊÊÅäÆ÷ºÍÆäËû±ØÐèµÄƽ̨ԪËØ¡£Õâ¸öÌض¨Ä£ÐÍÈçͼ 1 Ëùʾ¡£
ͼ 1. »ùÓÚ¹ÜÀí³ÌÐòµÄÉ豸ģÄâ
µÚ¶þ¸ö¼Ü¹¹³ÆΪÓû§¿Õ¼äÉ豸ģÄâ
£¨¼ûͼ
2£©¡£¹ËÃû˼Ò壬ÕâÖÖÉ豸ģÄâÊÇÔÚÓû§¿Õ¼äÖÐʵÏֵģ¬¶ø²»Ç¶Èëµ½¹ÜÀí³ÌÐòÖС£QEMU£¨²»½öÌṩÉ豸ģÄ⣬»¹Ìṩһ¸ö¹ÜÀí³ÌÐò£©ÌṩÉ豸ģÄ⣬ÓÃÓÚ´óÁ¿¶À
Á¢¹ÜÀí³ÌÐò£¬Èç Kernel-based Virtual Machine (KVM) ºÍ VirtualBox
µÈ¡£Õâ¸öÄ£Ð͸ü¾ßÓÅÊÆ£¬ÒòΪÉ豸ģÄâ¶ÀÁ¢ÓÚ¹ÜÀí³ÌÐò£¬Òò¶ø¿ÉÒÔÔÚ¶à¸ö¹ÜÀí³ÌÐòÖ®¼ä¹²Ïí¡£ÁíÍ⣬Õâ¸öÄ£ÐÍ»¹Ö§³ÖÈÎÒâÉ豸ģÄ⣬ÎÞÐë¹ÜÀí³ÌÐò£¨ÒÔÌØȨ״̬ÔË
ÐУ©¸ºµ£Õâ¸ö¹¦ÄÜ¡£
ͼ 2. Óû§¿Õ¼äÉ豸ģÄâ
½«É豸ģÄâ´Ó¹ÜÀí³ÌÐòÍÆÏòÓû§¿Õ¼äÓÐһЩÃ÷ÏÔµÄÓÅÊÆ£¬×î´óµÄÓÅÊÆÉæ¼°ËùνµÄ¿ÉÐżÆËã»ù´¡£
Ïà¹ØÎĵµ£º
¹À¼ÆÊDZ»¹¥»÷ÁË£¬¹ý¸ö¼ÙÆÚssh¾ÍÁ¬½Ó²»ÉÏÁË£¬Ô¶³ÌÁ¬½ÓÌáʾ network refused¡£Ö»ÄÜÅܵ½»ú·¿¿´¸ö¾¿¾¹£¬Ê×ÏÈÓôó¼ÒµÄÐ޸ķ½Ê½£º
LinuxÏÂSSHĬÈÏ22¶Ë¿ÚµÄÐ޸ķ½·¨ÈçÏÂ:
NO 1£º
01¼ÙÈçÒª¸ÄSSHµÄĬÈ϶˿ڣ¨22£©£¬ÄÇôÄãÖ»ÒªÐ޸ģº/etc/ssh/sshd_configÖÐPort 22£¬ÕâÀï°Ñ22¸Ä³É×Ô¼ºÒªÉèµÄ¶Ë¿Ú¾ÍÐÐÁË£¬²»¹ýǧÍò±ðÉèºÍÏÖÒÑÓеĶ ......
WgetÊÇÒ»¸öÊ®·Ö³£ÓÃÃüÁîÐÐÏÂÔع¤¾ß£¬¶àÊýLinux·¢Ðа汾¶¼Ä¬ÈÏ°üº¬Õâ¸ö¹¤¾ß¡£Èç¹ûûÓа²×°¿ÉÔÚ http: //www.gnu.org/software/wget/wget.html ÏÂÔØ×îа汾£¬²¢Ê¹ÓÃÈçÏÂÃüÁî±àÒë°²×°£º
# tar zxvf wget-1.9.1.tar.gz
# cd wget-1.9.1
# ./configure
# make
# make install
ËüµÄÓ÷¨ºÜ¼òµ¥.
1£©Ö§³Ö¶ÏµãÏ ......
by Bjorn Chambless
Introduction
The following is designed familiarize the reader with programming in x86 (AT&T
style, that produced by gcc) assembly under Linux and how to interface assembly
and higher-level language code (i.e. C). The tutorial will also briefly cover
debugging yo ......
ronÊÇÒ»¸ölinuxϵĶ¨Ê±Ö´Ðй¤¾ß£¬¿ÉÒÔÔÚÎÞÐèÈ˹¤¸ÉÔ¤µÄÇé¿öÏÂÔËÐÐ×÷Òµ¡£ÓÉÓÚCron ÊÇLinuxµÄÄÚÖ÷þÎñ£¬µ«Ëü²»×Ô¶¯ÆðÀ´£¬¿ÉÒÔÓÃÒÔϵķ½·¨Æô¶¯¡¢¹Ø±ÕÕâ¸ö·þÎñ:
¡¡¡¡/sbin/service crond start //Æô¶¯·þÎñ
¡¡¡¡/sbin/service crond stop //¹Ø±Õ·þÎñ
¡¡¡¡/sbin/service crond restart //ÖØÆô·þÎñ
¡¡¡¡/sbin/service crond ......
Load Bios
Read MBR's config to find out the os
Load the kernel of the os
init Process starts
execute /etc/rc.d /sysinit
start other modules (etc/modules.conf)
execute the run level scripts
execute /etc/rc.d/rc.local
execute /bin/login
shell started
......