TW201903608A - Virtual network system and virtual network system communication method - Google Patents

Virtual network system and virtual network system communication method Download PDF

Info

Publication number
TW201903608A
TW201903608A TW107117007A TW107117007A TW201903608A TW 201903608 A TW201903608 A TW 201903608A TW 107117007 A TW107117007 A TW 107117007A TW 107117007 A TW107117007 A TW 107117007A TW 201903608 A TW201903608 A TW 201903608A
Authority
TW
Taiwan
Prior art keywords
virtual
virtual machine
communication device
hypervisor
communication
Prior art date
Application number
TW107117007A
Other languages
Chinese (zh)
Inventor
吉岡明紀
Original Assignee
日商賽爾科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日商賽爾科技股份有限公司 filed Critical 日商賽爾科技股份有限公司
Publication of TW201903608A publication Critical patent/TW201903608A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)

Abstract

The purpose of the present invention is to realize easy communications between virtual machines, without relying on a proprietary application running on a virtual machine or a virtual communication device on a hypervisor. To that end, in the present invention a virtual communication device (4b) included in a virtual machine guest (1b) of a transmission source writes communication data if a shared memory (61b) is available, and issues, by a hypervisor call, a notification of the completion of the communication data write. A hypervisor (9) issues an interrupt (X) to a virtual machine guest (1a) of an addressee. A virtual communication device (4a), triggered by the interrupt (X), reads the communication data written to the shared memory (61b), and issues, by a hypervisor call, a notification of the completion of the communication data read. The hypervisor (9) issues an interrupt (Y) to the virtual machine guest (1b) of the transmission source. Triggered by the interrupt (Y), the virtual communication device (4b) detects availability in the shared memory (61b).

Description

虛擬網路系統以及虛擬網路系統的通訊方法  Virtual network system and communication method of virtual network system  

本發明係關於一種將在超管理器(Hypervisor)上具體化的虛擬機器(virtual machine)間連接成能夠通訊的虛擬網路系統(virtual network system)以及虛擬網路系統的通訊方法。 The present invention relates to a communication method for connecting a virtual machine embodied on a hypervisor into a virtual network system capable of communication and a virtual network system.

近年之實體電腦(physical computer)的處理性能係正在高速化中。一般是隨之而在實體電腦上使超管理器動作以將複數個虛擬機器具體化。虛擬機器間的資訊交換係利用藉由被虛擬化後之輸入輸出介面(input/output interface)所為的超管理器上的虛擬通信裝置之控制來實現。如此的被虛擬化後之輸入輸出介面係複雜的,且會發生較大的額外負擔(overhead)。 In recent years, the processing performance of physical computers has been increasing. It is generally followed by the hypervisor acting on the physical computer to materialize the plurality of virtual machines. The information exchange between the virtual machines is realized by the control of the virtual communication device on the hypervisor by the virtualized input/output interface. Such a virtualized input and output interface is complicated and a large overhead is incurred.

可認為藉由將虛擬通信裝置在虛擬機器上具體化,就能簡化來自在虛擬機器上動作的客體作業系統(Guest Operating System:Guest OS)之控制,且能免除額外負擔。作為如此之例,例如有專利文獻1所記載的發明。 It can be considered that by embodying the virtual communication device on the virtual machine, the control from the guest operating system (Guest Operating System) operating on the virtual machine can be simplified, and the additional burden can be eliminated. As an example, there is an invention described in Patent Document 1.

在專利文獻1之摘要的解決手段中已有記載:「藉由客體虛擬機器206所執行的客體OS 210之虛擬網路介面卡(Network Interface Card:NIC)驅動程式308,來接收客體OS要求封包(request packet),且對計算系統(computing system)之共享記憶體(shared memory)504內的發送佇列(transmission queue)506附加區塊(block),藉此在複數個虛擬機器共享一個實體NIC裝置。然後,服務端虛擬機器214係藉由服務端OS 216的虛擬NIC驅動程式316從發送佇列來擷取(fetch)區塊,對服務端OS要求封包進行包裝(packaging),並交付至服務端OS的服務端OS網路堆疊(network stack)部314,且藉由橋接驅動程式(bridge driver)502路由(routing)至實體NIC驅動程式318,並在網路上發送服務端OS要求封包。」。 In the solution of the abstract of Patent Document 1, it has been described that "the guest OS OS request packet is received by the virtual network interface card (NIC) driver 308 of the guest OS 210 executed by the guest virtual machine 206. (request packet), and a block is added to a transmission queue 506 in a shared memory 504 of a computing system, thereby sharing a physical NIC in a plurality of virtual machines. Then, the server virtual machine 214 fetches the block from the sending queue by the virtual NIC driver 316 of the server OS 216, and packages the server OS request packet and delivers it to the server. The server OS network stack portion 314 of the server OS is routed to the entity NIC driver 318 by a bridge driver 502 and sends a server OS request packet on the network. "."

[先前技術文獻] [Previous Technical Literature]

[專利文獻] [Patent Literature]

專利文獻1:日本特開2012-003747號公報。 Patent Document 1: Japanese Laid-Open Patent Publication No. 2012-003747.

專利文獻1所記載的發明係在共享記憶體上製作佇列,且透過該佇列來實現虛擬機器間的通訊。但是,為了實現如此的通訊,有必要準備獨自的應用程式(application),更需要用以實現佇列之複雜的處理。 According to the invention described in Patent Document 1, a queue is created on a shared memory, and communication between virtual machines is realized by the queue. However, in order to achieve such communication, it is necessary to prepare a separate application, and more complicated processing for realizing the queue.

於是,本發明之課題係在於針對虛擬網路系統,不依靠在虛擬機器上動作的獨自應用程式或超管理器上的虛擬通訊裝置,就能輕易地實現虛擬機器間的通訊。 Accordingly, the subject of the present invention is to enable virtual network systems to easily communicate between virtual machines without relying on a single application operating on a virtual machine or a virtual communication device on a hypervisor.

本發明係為了達成上述目的而提供一種虛擬網路系統,包含:超管理器;第一虛擬機器,係藉由前述超管理器所具體化,且包含虛擬通訊裝置;第二虛擬機器,係藉由前述超管理器所具體化,且包含虛擬通訊裝置;以及共享記憶體,係前述第一虛擬機器及前述第二虛擬機器所共享。 The present invention provides a virtual network system, including: a hypervisor; the first virtual machine is embodied by the foregoing hypervisor and includes a virtual communication device; the second virtual machine is borrowed Specifically embodied by the hypervisor, including a virtual communication device; and shared memory shared by the first virtual machine and the second virtual machine.

前述第一虛擬機器及前述第二虛擬機器中之包含於發送源之虛擬機器的虛擬通訊裝置係只要前述共享記憶體是空的就寫入通訊資料,且藉由超管理器呼叫來對包含於目的地之虛擬機器的虛擬通訊裝置通知通訊資料之寫入完成。 The virtual communication device of the virtual device included in the transmission source in the first virtual machine and the second virtual device is written in the communication material as long as the shared memory is empty, and is included in the communication by the hypervisor call The virtual communication device of the virtual machine of the destination notifies the completion of the writing of the communication data.

前述超管理器係使前述目的地之虛擬機器產生第一中斷。 The aforementioned hypervisor causes the virtual machine of the aforementioned destination to generate a first interrupt.

包含於前述目的地之虛擬機器的虛擬通訊裝置係以前述第一中斷為契機而讀出已寫入至前述共享記憶體的通訊資料,並藉由超管理器呼叫來對包含於前述發送源之虛擬機器的虛擬通訊裝置通知通訊資料之讀出完成。 The virtual communication device of the virtual machine included in the destination reads the communication data written to the shared memory by using the first interrupt, and is included in the transmission source by the hypervisor call. The virtual communication device of the virtual machine notifies the completion of the reading of the communication data.

前述超管理器係使前述發送源之虛擬機器產生第二中斷。 The aforementioned hypervisor causes the virtual machine of the aforementioned transmission source to generate a second interrupt.

包含於前述發送源之虛擬機器的虛擬通訊裝置係以前述第二中斷為契機而偵測前述共享記憶體已變為空的。 The virtual communication device of the virtual machine included in the transmission source detects that the shared memory has become empty by using the second interrupt.

依據本發明,則針對虛擬網路系統,不依靠在虛擬機器上動作的獨自應用程式或超管理器上的虛擬通訊裝置就能夠輕易地實現虛擬機器間的通訊。 According to the present invention, for a virtual network system, communication between virtual machines can be easily realized without relying on a single application operating on a virtual machine or a virtual communication device on a hypervisor.

1、1a至1n‧‧‧虛擬機器客體(虛擬機器之一例) 1, 1a to 1n‧‧‧ virtual machine object (an example of a virtual machine)

2‧‧‧交換器 2‧‧‧Switch

3、3a、3b‧‧‧虛擬通訊裝置驅動程式 3, 3a, 3b‧‧‧ virtual communication device driver

4、4a、4b‧‧‧虛擬通訊裝置 4, 4a, 4b‧‧‧ virtual communication device

5、5b‧‧‧網路應用程式 5, 5b‧‧‧ web application

8‧‧‧外部網路 8‧‧‧External network

9‧‧‧超管理器 9‧‧‧Super Manager

11、11a至11n‧‧‧客體OS 11, 11a to 11n‧‧‧ Guest OS

41、41a、41b‧‧‧虛擬暫存器 41, 41a, 41b‧‧‧ virtual register

61、61b至61n、 61, 61b to 61n,

62、62b至62n‧‧‧共享記憶體 62, 62b to 62n‧‧‧ shared memory

71‧‧‧實體通訊裝置驅動程式 71‧‧‧Communication device driver

72‧‧‧實體通訊裝置 72‧‧‧Communication device

S‧‧‧虛擬網路系統 S‧‧‧Virtual Network System

圖1係顯示第一實施形態中的虛擬網路系統之構成圖。 Fig. 1 is a view showing the configuration of a virtual network system in the first embodiment.

圖2係顯示通訊訊框(communication frame)對共享記憶體之寫出至讀出的通訊序列(communication sequence)。 Figure 2 is a communication sequence showing the communication frame to the read memory of the shared memory.

圖3係通知虛擬機器之讀出完成的通訊序列。 Figure 3 is a communication sequence informing the virtual machine that the readout is complete.

圖4係顯示第一實施形態之變化例中的通訊訊框對共享記憶體之寫出至讀出的通訊序列。 Fig. 4 is a view showing a communication sequence in which a communication frame is written to read from a shared memory in a variation of the first embodiment.

圖5係通知虛擬機器之讀出完成的通訊序列。 Figure 5 is a communication sequence informing the virtual machine that the readout is complete.

圖6係第二實施形態中的虛擬網路系統之構成圖。 Fig. 6 is a view showing the configuration of a virtual network system in the second embodiment.

圖7係顯示通訊訊框對共享記憶體之寫出至讀出的通訊序列。 Figure 7 shows the communication sequence of the communication frame to the shared memory.

圖8係通知虛擬機器之讀出完成的通訊序列。 Figure 8 is a communication sequence informing the virtual machine that the readout is complete.

以下,參照各圖來詳細說明用以實施本發明的形態。 Hereinafter, embodiments for carrying out the invention will be described in detail with reference to the drawings.

圖1係顯示第一實施形態中的虛擬網路系統S之構成圖。 Fig. 1 is a view showing the configuration of a virtual network system S in the first embodiment.

如圖1所示,虛擬網路系統S係包含超管理器9、虛擬機器客體1a至1n、共享記憶體61b至61n及共享記憶體62b至62n所構成。此等超管理器9和虛擬機器客體1a至1n係藉由未圖示之伺服器(server)裝置的CPU(Central Processing Unit;中央處理單元)執行軟體程式(software program)所具體化。虛擬機器客體1a至1n係指超管理器9所具體化的虛擬機器。虛擬機器客體1a至1n係進而使客體OS(Operating System)11a至11n動作。 As shown in FIG. 1, the virtual network system S includes a hypervisor 9, virtual machine objects 1a to 1n, shared memories 61b to 61n, and shared memories 62b to 62n. The hypervisor 9 and the virtual machine objects 1a to 1n are embodied by a CPU (Central Processing Unit) of a server device (not shown) to execute a software program. The virtual machine objects 1a to 1n refer to virtual machines embodied by the hypervisor 9. The virtual machine objects 1a to 1n further operate the guest OSs 11a to 11n.

將虛擬網路系統S具體化的未圖示之伺服器裝置係除了CPU、記憶體,還具備實體通訊裝置72。作為基本輸入輸出系統(BIOS:Basic Input Output System)的廣為習知的系統韌體(system firmware)係由伺服器裝置所執行。BIOS係在系統開機時間(system boot time)開始伺服器裝置之構成要素的特定、試驗及初始化,並且提供伺服器裝置的硬體(hardware)與軟體(software)之間的介面。依據本發明之實施形態,在BIOS剛完成伺服器裝置之初始化後,超管理器程式會被執行,並使圖1的超管理器9具體化。 The server device (not shown) that embody the virtual network system S includes a physical communication device 72 in addition to the CPU and the memory. A widely known system firmware as a basic input/output system (BIOS: Basic Input Output System) is executed by a server device. The BIOS starts the specification, testing, and initialization of the components of the server device at the system boot time, and provides an interface between the hardware and software of the server device. According to an embodiment of the present invention, after the BIOS has just completed initialization of the server device, the hypervisor program is executed and the hypervisor 9 of FIG. 1 is embodied.

超管理器9係在伺服器裝置上同時執行複數個虛擬機器客體1a至1n。更且,超管理器9係監視作為客體作業 系統的客體OS 11a至11n之執行。 The hypervisor 9 simultaneously executes a plurality of virtual machine objects 1a to 1n on the server device. Further, the hypervisor 9 monitors the execution of the guest OSs 11a to 11n as the guest operating system.

以下,在未特別地區別各個虛擬機器客體1a至1n時,簡單記載為虛擬機器客體1。在未特別地區別各個客體OS 11a至11n時,簡單記載為客體OS 11。又,在圖式等中,有的情況是將虛擬機器客體1a記載為“虛擬機器#1”或“VM#1”。更且,有的情況是將虛擬機器客體1b記載為“虛擬機器#2”或“VM#2”。同樣,有的情況是將虛擬機器客體1c記載為“虛擬機器#3”或“VM#3”,將虛擬機器客體1n記載為“虛擬機器#n”或“VM#n”。 Hereinafter, when each of the virtual machine objects 1a to 1n is not particularly distinguished, it is simply described as the virtual machine object 1. When the individual guest OSs 11a to 11n are not particularly distinguished, they are simply described as the guest OS 11. Further, in the drawings and the like, there are cases where the virtual machine object 1a is described as "virtual machine #1" or "VM#1". Furthermore, there are cases where the virtual machine object 1b is described as "virtual machine #2" or "VM#2". Similarly, in some cases, the virtual machine object 1c is described as "virtual machine #3" or "VM#3", and the virtual machine object 1n is described as "virtual machine #n" or "VM#n".

虛擬機器客體1a至1n係共享伺服器裝置的硬體資源(hardware resource)。雖然即便是在多重任務(multitasking)中複數個應用程式仍共享硬體資源,但是無法使一個應用程式之錯誤從其他應用程式中分離。相對於此,在使用了超管理器9的虛擬機器客體1a至1b中,則可以使一個作業系統之錯誤,從共享硬體的其他作業系統中分離。超管理器9係在系統內準備虛擬機器客體1a至1n用的執行環境。超管理器9係依需要而啟動一個以上的虛擬機器客體1。虛擬機器客體1係更執行客體OS 11。 The virtual machine objects 1a to 1n share a hardware resource of the server device. Although even multiple applications share hardware resources in multitasking, they cannot separate an application error from other applications. On the other hand, in the virtual machine objects 1a to 1b using the hypervisor 9, an error in one operating system can be separated from another operating system sharing the hardware. The hypervisor 9 is an execution environment for preparing virtual machine objects 1a to 1n in the system. The hypervisor 9 activates more than one virtual machine object 1 as needed. The virtual machine object 1 system further executes the guest OS 11.

超管理器9係能夠同時啟動及執行複數個虛擬機器客體1a至1n。虛擬機器客體1a(第一虛擬機器)係包含客體OS 11a和虛擬通訊裝置4a。虛擬通訊裝置4a係指建構於虛擬機器客體1a的虛擬之通訊裝置,且藉由後面所述的虛 擬通訊裝置驅動程式(device driver)3a所控制。 The hypervisor 9 is capable of simultaneously starting and executing a plurality of virtual machine objects 1a to 1n. The virtual machine object 1a (first virtual machine) includes a guest OS 11a and a virtual communication device 4a. The virtual communication device 4a is a virtual communication device constructed on the virtual machine object 1a, and is controlled by a virtual communication device driver 3a as will be described later.

客體OS 11a係指在虛擬機器客體1a上動作的作業系統,且為用以操作或運用該虛擬機器客體1a的系統軟體。更且,客體OS 11a係具體化虛擬通訊裝置驅動程式3a、交換器(switch)2、實體通訊裝置驅動程式71。虛擬通訊裝置驅動程式3a係指用以控制虛擬通訊裝置4a的程式。交換器2係指中繼通訊訊框的交換器,且為參照MAC(Media Access Control;媒體存取控制)位址(address)來判斷通訊訊框之目的地並予以中繼的L2(Layer 2;第二層)交換器。虛擬通訊裝置4a係具有各為不同的MAC位址。 The guest OS 11a refers to an operating system that operates on the virtual machine object 1a, and is a system software for operating or using the virtual machine object 1a. Furthermore, the guest OS 11a is a virtual communication device driver 3a, a switch 2, and a physical communication device driver 71. The virtual communication device driver 3a is a program for controlling the virtual communication device 4a. The switch 2 refers to the switch of the relay communication frame, and refers to the MAC (Media Access Control) address to determine the destination of the communication frame and relays the L2 (Layer 2) ; second layer) exchanger. The virtual communication device 4a has different MAC addresses.

該虛擬機器客體1a係藉由交換器2來中繼虛擬機器客體1b至1n與外部網路8之間的通訊。 The virtual machine object 1a relays communication between the virtual machine objects 1b to 1n and the external network 8 by the switch 2.

虛擬機器客體1b(第二虛擬機器之一例)係包含客體OS 11b和虛擬通訊裝置4b。虛擬通訊裝置4b係指建構於虛擬機器客體1b的虛擬之通訊裝置,且藉由後面所述的虛擬通訊裝置驅動程式3b所控制。客體OS 11b係指在虛擬機器客體1b上動作的作業系統,且為用以操作或運用該虛擬機器客體1b的系統軟體。 The virtual machine object 1b (an example of the second virtual machine) includes a guest OS 11b and a virtual communication device 4b. The virtual communication device 4b is a virtual communication device constructed on the virtual machine object 1b, and is controlled by the virtual communication device driver 3b described later. The guest OS 11b refers to an operating system that operates on the virtual machine object 1b, and is a system software for operating or using the virtual machine object 1b.

更且,客體OS 11b係具體化虛擬通訊裝置驅動程式3b、網路應用程式(network application)5b。虛擬通訊裝置驅動程式3b係指用以控制虛擬通訊裝置4b的程式。網路應用程式5b係指該客體OS 11b用以對使用者(user)提供便利 的應用軟體。虛擬機器客體1c至1n(第二虛擬機器之一例)亦構成為與該虛擬機器客體1b同樣。 Furthermore, the guest OS 11b is a virtual communication device driver 3b and a network application 5b. The virtual communication device driver 3b is a program for controlling the virtual communication device 4b. The web application 5b refers to an application software used by the guest OS 11b to facilitate users. The virtual machine objects 1c to 1n (an example of the second virtual machine) are also configured in the same manner as the virtual machine object 1b.

以下,在未特別地區別包含於各個虛擬機器客體1a至1n的虛擬通訊裝置4a、4b、…時,簡單地記載為虛擬通訊裝置4。在未特別地區別包含於各個客體OS 11a至11n的虛擬通訊裝置驅動程式3a、3b、…時,簡單地記載為虛擬通訊裝置驅動程式3。在未特別地區別包含於各個客體OS 11b至11n的網路應用程式5b、…時,簡單地記載為網路應用程式5。 Hereinafter, when the virtual communication devices 4a, 4b, ... included in the respective virtual machine objects 1a to 1n are not particularly distinguished, they are simply described as the virtual communication device 4. When the virtual communication device drivers 3a, 3b, ... included in the respective guest OSs 11a to 11n are not particularly distinguished, they are simply described as the virtual communication device driver 3. When the web applications 5b, ... included in the respective guest OSs 11b to 11n are not particularly distinguished, they are simply described as the web application 5.

包含於虛擬機器客體1b至1n的虛擬通訊裝置4係分別透過共享記憶體61b至61n而對包含於虛擬機器客體1a的虛擬通訊裝置4a發送通訊訊框。更且,包含於虛擬機器客體1b至1n的虛擬通訊裝置4係分別透過共享記憶體62b至62n而從虛擬通訊裝置4a接收通訊訊框。該等共享記憶體61b至61n係指能夠從包含於各個虛擬機器客體1b至1n的虛擬通訊裝置4寫入的記憶體區域,且為能夠從包含於虛擬機器客體1a的虛擬通訊裝置4a讀出的記憶體區域。共享記憶體62b至62n係指能夠從包含於虛擬機器客體1a的虛擬通訊裝置4a寫入的記憶體區域,且為能夠從包含於各個虛擬機器客體1b至1n的虛擬通訊裝置4讀出的記憶體區域。 The virtual communication device 4 included in the virtual machine objects 1b to 1n transmits a communication frame to the virtual communication device 4a included in the virtual machine object 1a via the shared memory 61b to 61n. Further, the virtual communication device 4 included in the virtual machine objects 1b to 1n receives the communication frame from the virtual communication device 4a via the shared memory 62b to 62n. The shared memories 61b to 61n are memory areas that can be written from the virtual communication devices 4 included in the respective virtual machine objects 1b to 1n, and are readable from the virtual communication device 4a included in the virtual machine object 1a. Memory area. The shared memory 62b to 62n is a memory area that can be written from the virtual communication device 4a included in the virtual machine object 1a, and is a memory that can be read from the virtual communication device 4 included in each of the virtual machine objects 1b to 1n. Body area.

以下,在未特別地區別共享記憶體61b至61n時,簡單記載為共享記憶體61,在未特別地區別共享記憶體62b 至62n時,簡單記載為共享記憶體62。 In the following, when the shared memory bodies 61b to 61n are not particularly distinguished, the shared memory 61 is simply described, and when the shared memory bodies 62b to 62n are not particularly distinguished, the shared memory 62 is simply described.

再者,亦可使虛擬通訊裝置4具有收發用的佇列緩衝器。此時,發送源之虛擬通訊裝置4係只要在發送用之佇列緩衝器中有空位,則不等待藉由目的地之虛擬通訊裝置4所為的通訊訊框之讀出完成地從虛擬通訊裝置驅動程式3接收通訊訊框。同樣地,接收側之虛擬通訊裝置4係只要在接收用之佇列緩衝器中有空位,則不等待藉由虛擬通訊裝置驅動程式3所為的通訊訊框之接收地讀出來自發送源之虛擬通訊裝置4的通訊訊框。 Furthermore, the virtual communication device 4 can also be provided with a queue buffer for transmission and reception. At this time, the virtual communication device 4 of the transmission source does not wait for the completion of the reading of the communication frame by the destination virtual communication device 4 from the virtual communication device as long as there is a space in the transmission buffer. Driver 3 receives the communication frame. Similarly, the virtual communication device 4 on the receiving side does not wait for the virtual input from the transmission source to wait for reception of the communication frame by the virtual communication device driver 3 as long as there is a space in the buffer for reception. The communication frame of the communication device 4.

依據第一實施形態,為了對各個網路應用程式5提供網路服務,超管理器9係對虛擬機器客體1a至1n之各個虛擬機器客體具體化虛擬通訊裝置4。對虛擬機器客體1a至1n而言,該虛擬通訊裝置4係與實體通訊裝置72具有同樣功能。各個虛擬通訊裝置4係處理來自高階之虛擬通訊裝置驅動程式3的網路要求,且具有送回要求之結果的任務。例如,包含於虛擬機器客體1b的虛擬通訊裝置4b係透過共享記憶體61b而對虛擬通訊裝置4a發送通訊訊框。包含於虛擬機器客體1b的虛擬通訊裝置4b係更透過共享記憶體62b而從虛擬通訊裝置4a接收通訊訊框。 According to the first embodiment, in order to provide network services to the respective web applications 5, the hypervisor 9 embodyes the virtual communication device 4 for each virtual machine object of the virtual machine objects 1a to 1n. For the virtual machine objects 1a to 1n, the virtual communication device 4 has the same function as the physical communication device 72. Each virtual communication device 4 processes the network requirements from the higher-order virtual communication device driver 3 and has the task of returning the result of the request. For example, the virtual communication device 4b included in the virtual machine object 1b transmits a communication frame to the virtual communication device 4a via the shared memory 61b. The virtual communication device 4b included in the virtual machine object 1b receives the communication frame from the virtual communication device 4a through the shared memory 62b.

同樣,包含於虛擬機器客體1c至1n的虛擬通訊裝置4係分別透過共享記憶體61c至61n而對虛擬通訊裝置4a 發送通訊訊框。包含於虛擬機器客體1c至1n的虛擬通訊裝置4係進一步透過共享記憶體62c至62n而從虛擬通訊裝置4a接收通訊訊框。 Similarly, the virtual communication device 4 included in the virtual machine objects 1c to 1n transmits a communication frame to the virtual communication device 4a via the shared memory 61c to 61n. The virtual communication device 4 included in the virtual machine objects 1c to 1n further receives the communication frame from the virtual communication device 4a through the shared memory 62c to 62n.

第一實施形態之虛擬網路係構成將虛擬機器客體1a作為中心的星形連接之拓樸(topology)。虛擬機器客體1a係更藉由連接於虛擬通訊裝置驅動程式3a和實體通訊裝置驅動程式71的交換器2,而在與外部網路8之間中繼通訊訊框。 The virtual network of the first embodiment constitutes a topology of a star connection with the virtual machine object 1a as a center. The virtual machine object 1a relays the communication frame with the external network 8 by the switch 2 connected to the virtual communication device driver 3a and the physical communication device driver 71.

虛擬機器客體1a係藉由虛擬機器間通訊而在各個虛擬機器客體1b至1n之間交換資訊。 The virtual machine object 1a exchanges information between the virtual machine objects 1b to 1n by virtual machine-to-machine communication.

在第一實施形態之虛擬機器間通訊中,發送源之虛擬機器客體1係對共享記憶體61或共享記憶體62寫入通訊訊框。更且,虛擬機器客體1係藉由超管理器呼叫而對超管理器9通知寫入完成。超管理器9係藉由中斷X而對目的地之虛擬機器客體1通知通訊訊框之寫入完成。目的地之虛擬機器客體1係接收藉由中斷X所為的通知,且讀出共享記憶體61或共享記憶體62上的通訊訊框。 In the virtual machine-to-device communication of the first embodiment, the virtual machine object 1 of the transmission source writes a communication frame to the shared memory 61 or the shared memory 62. Furthermore, the virtual machine object 1 notifies the hypervisor 9 of the completion of the write by the hypervisor call. The hypervisor 9 notifies the virtual machine object 1 of the destination of the completion of the writing of the communication frame by interrupt X. The virtual machine object 1 of the destination receives the notification by the interrupt X and reads out the communication frame on the shared memory 61 or the shared memory 62.

更且,目的地之虛擬機器客體1係藉由超管理器呼叫而對超管理器9通知讀出完成。超管理器9係藉由中斷Y而對發送源之虛擬機器客體1通知通訊訊框之讀出完成。虛擬機器間通訊係藉由對稱地具有上述構造而實現雙向之通訊。 Further, the virtual machine object 1 of the destination notifies the hypervisor 9 that the reading is completed by the hypervisor call. The hypervisor 9 notifies the virtual machine object 1 of the transmission source that the reading of the communication frame is completed by interrupting Y. The virtual machine-to-machine communication realizes two-way communication by symmetrically having the above configuration.

再者,其是一種虛擬機器客體1a在與虛擬機器客體1b至1n之間交換資訊的星形連接。雖然虛擬機器客體1b至1n係只要有中斷X和中斷Y就足夠,但是虛擬機器客體1a則需要中斷XB至Xn及中斷YB至YnFurthermore, it is a star connection in which the virtual machine object 1a exchanges information with the virtual machine objects 1b to 1n. Although the virtual machine objects 1b to 1n are sufficient as long as there are interrupt X and interrupt Y, the virtual machine object 1a needs to interrupt X B to X n and interrupt Y B to Y n .

將虛擬通訊裝置4使用該等的構造且從虛擬機器客體1b發送通訊訊框至虛擬機器客體1a的順序,顯示於以下之圖2和圖3。再者,從虛擬機器客體1a發送通訊訊框至虛擬機器客體1b的順序亦為同樣。 The sequence in which the virtual communication device 4 uses these structures and transmits the communication frame from the virtual machine object 1b to the virtual machine object 1a is shown in FIGS. 2 and 3 below. Furthermore, the order of transmitting the communication frame from the virtual machine object 1a to the virtual machine object 1b is also the same.

圖2和圖3係虛擬機器間的通訊序列。該圖2之通訊序列係顯示通訊訊框對共享記憶體61b之寫出至讀出。 Figures 2 and 3 are communication sequences between virtual machines. The communication sequence of FIG. 2 shows the write-to-read of the communication frame to the shared memory 61b.

在步驟S10中,包含於虛擬機器客體1b的虛擬通訊裝置4b係只要共享記憶體61b不是空的(「否」)就在原狀態下等待,若共享記憶體61b是空的(「是」),就前進至步驟S11之處理。再者,共享記憶體61b係在初始狀態中是空的。 In step S10, the virtual communication device 4b included in the virtual machine object 1b waits in the original state as long as the shared memory 61b is not empty ("NO"), and if the shared memory 61b is empty ("Yes"), The process proceeds to step S11. Furthermore, the shared memory 61b is empty in the initial state.

在步驟S11中,虛擬通訊裝置4b係當從上位層之虛擬通訊裝置驅動程式3b接收通訊訊框時,就寫入至共享記憶體61b(步驟S12)。在共享記憶體61b係被寫入通訊訊框並成為不是空的。更且,虛擬通訊裝置4b係藉由超管理器呼叫而通知已完成通訊訊框之寫入、和該通訊訊框之長度資訊(步驟S13)。再者,在圖式中係將超管理器呼叫記載為 “HVC”(Hypervisor call)。該通訊訊框例如是由網路應用程式5b發送至外部網路8者。再者,通訊訊框之長度資訊並非為必須,而亦可始終設為固定長度。 In step S11, when the virtual communication device 4b receives the communication frame from the virtual communication device driver 3b of the higher layer, it writes it to the shared memory 61b (step S12). The shared memory 61b is written into the communication frame and is not empty. Moreover, the virtual communication device 4b notifies the writing of the completed communication frame and the length information of the communication frame by the hypervisor call (step S13). Furthermore, in the drawing, the hypervisor call is described as "HVC" (Hypervisor call). The communication frame is, for example, sent by the web application 5b to the external network 8. Furthermore, the length information of the communication frame is not necessary, but can also be set to a fixed length.

其次,超管理器9係從步驟S13之超管理器呼叫中辨識虛擬機器客體1b已對共享記憶體61b完成寫入,且取得通訊訊框之長度資訊(步驟S14)。超管理器9係使虛擬機器客體1a產生中斷X(步驟S15)。包含於虛擬機器客體1a的虛擬通訊裝置4a係藉由該中斷X來辨識虛擬機器客體1b已對共享記憶體61b完成寫入(步驟S16)。 Next, the hypervisor 9 recognizes that the virtual machine object 1b has completed writing to the shared memory 61b from the hypervisor call in step S13, and acquires the length information of the communication frame (step S14). The hypervisor 9 causes the virtual machine object 1a to generate an interrupt X (step S15). The virtual communication device 4a included in the virtual machine object 1a recognizes that the virtual machine object 1b has completed writing to the shared memory 61b by the interrupt X (step S16).

包含於虛擬機器客體1a的虛擬通訊裝置4a係藉由超管理器呼叫而要求已寫入至共享記憶體61b的通訊訊框之長度資訊(步驟S17)。超管理器9係回應該通訊訊框之長度資訊(步驟S18)。虛擬通訊裝置4a係讀出已寫入至共享記憶體61b的通訊訊框(步驟S19),且將該通訊訊框遞送至上位層之虛擬通訊裝置驅動程式3a(步驟S20)。之後,該通訊訊框係透過虛擬通訊裝置驅動程式3a而遞送至交換器2。 The virtual communication device 4a included in the virtual machine object 1a requests the length information of the communication frame written to the shared memory 61b by the hypervisor call (step S17). The hypervisor 9 returns the length information of the communication frame (step S18). The virtual communication device 4a reads out the communication frame that has been written to the shared memory 61b (step S19), and delivers the communication frame to the virtual communication device driver 3a of the upper layer (step S20). Thereafter, the communication frame is delivered to the switch 2 through the virtual communication device driver 3a.

圖3係通知虛擬機器之讀出完成的通訊序列。 Figure 3 is a communication sequence informing the virtual machine that the readout is complete.

如圖3之步驟S21所示,虛擬通訊裝置4a係用超管理器呼叫來通知已完成共享記憶體61b之讀出。超管理器9係當藉由步驟S21之超管理器呼叫來辨識虛擬機器客體1a 已完成讀出時(步驟S22),就使虛擬機器客體1b產生中斷Y(步驟S23)。藉此,虛擬通訊裝置4b就會辨識藉由虛擬機器客體1a所為的讀出完成(步驟S24),且辨識共享記憶體61b是空的(步驟S25)。之後,可以再次進行步驟S10以後的處理。 As shown in step S21 of Fig. 3, the virtual communication device 4a notifies that the reading of the shared memory 61b has been completed by the hypervisor call. When the hypervisor 9 recognizes that the virtual machine object 1a has completed reading by the hypervisor call of step S21 (step S22), the virtual machine object 1b is caused to generate an interrupt Y (step S23). Thereby, the virtual communication device 4b recognizes that the reading by the virtual machine object 1a is completed (step S24), and recognizes that the shared memory 61b is empty (step S25). Thereafter, the processing from step S10 onward can be performed again.

其次,說明第一實施形態之變化例中的虛擬機器間通訊。發送源之虛擬機器客體1係對共享記憶體61或共享記憶體62寫入通訊訊框,且藉由超管理器呼叫來通知寫入之完成。超管理器9係藉由中斷X來對目的地之虛擬機器客體1通知通訊事件(event)發生。目的地之虛擬機器客體1係當接收藉由中斷X所為的通知時,就更進一步藉由超管理器呼叫來取得中斷要因和通訊訊框長度資訊。由於中斷要因是通訊訊框之寫入完成,所以目的地之虛擬機器客體1會讀出位於共享記憶體61或共享記憶體62的通訊訊框。 Next, the inter-virtual machine communication in the variation of the first embodiment will be described. The virtual machine object 1 of the transmission source writes a communication frame to the shared memory 61 or the shared memory 62, and notifies the completion of the write by the hypervisor call. The hypervisor 9 notifies the virtual machine object 1 of the destination of a communication event by interrupt X. The virtual machine object 1 of the destination, when receiving the notification by the interrupt X, further obtains the interrupt factor and the frame length information by the hypervisor call. Since the interrupt is caused by the completion of the writing of the communication frame, the virtual machine object 1 of the destination reads the communication frame located in the shared memory 61 or the shared memory 62.

更且,目的地之虛擬機器客體1係藉由超管理器呼叫來對超管理器9通知讀出完成。超管理器9係藉由中斷X來對發送源之虛擬機器客體1通知通訊事件發生。發送源之虛擬機器客體1係當接收藉由中斷X所為的通知時,就更進一步藉由超管理器呼叫來取得中斷要因。由於中斷要因是通訊訊框之讀出完成,所以發送源之虛擬機器客體1會辨識通訊訊框之讀出完成。虛擬機器間通訊係藉由對稱地具有該構造而實現雙向之通訊。 Moreover, the virtual machine object 1 of the destination notifies the hypervisor 9 that the reading is completed by the hypervisor call. The hypervisor 9 notifies the virtual machine object 1 of the transmission source of the occurrence of the communication event by the interrupt X. The virtual machine object 1 of the transmission source receives the notification by the interrupt X, and further obtains the interruption factor by the hypervisor call. Since the interrupt is caused by the completion of the reading of the communication frame, the virtual machine object 1 of the transmission source recognizes that the reading of the communication frame is completed. The virtual machine-to-machine communication realizes two-way communication by symmetrically having this configuration.

將虛擬通訊裝置4使用該等的構造且從虛擬機器客體 1b發送通訊訊框至虛擬機器客體1a的順序顯示於以下之圖4和圖5。再者,從虛擬機器客體1a發送通訊訊框至虛擬機器客體1b的順序亦為同樣。 The sequence in which the virtual communication device 4 uses these structures and transmits the communication frame from the virtual machine object 1b to the virtual machine object 1a is shown in Figs. 4 and 5 below. Furthermore, the order of transmitting the communication frame from the virtual machine object 1a to the virtual machine object 1b is also the same.

圖4和圖5係顯示第一實施形態之變化例中的虛擬機器間之通訊序列。該圖4之通訊序列係顯示通訊訊框對共享記憶體61b之寫出至讀出。 4 and 5 show a communication sequence between virtual machines in a variation of the first embodiment. The communication sequence of FIG. 4 shows the write-to-read of the shared frame 61b by the communication frame.

在步驟S30中,包含於虛擬機器客體1b的虛擬通訊裝置4b係只要共享記憶體61b不是空的(「否」)就在原狀態下等待,若共享記憶體61b是空的(「是」),就前進至步驟S31之處理。 In step S30, the virtual communication device 4b included in the virtual machine object 1b waits in the original state as long as the shared memory 61b is not empty ("NO"), and if the shared memory 61b is empty ("Yes"), The process proceeds to step S31.

在步驟S31中,虛擬通訊裝置4b係當從上位層之虛擬通訊裝置驅動程式3b接收通訊訊框時,就寫入至共享記憶體61b(步驟S32)。在共享記憶體61b係寫入有通訊訊框,並成為不是空的。更且,虛擬通訊裝置4b係藉由超管理器呼叫而通知已完成通訊訊框之寫入、和該通訊訊框之長度資訊(步驟S33)。 In step S31, when the virtual communication device 4b receives the communication frame from the virtual communication device driver 3b of the higher layer, it writes it to the shared memory 61b (step S32). A communication frame is written in the shared memory 61b, and is not empty. Moreover, the virtual communication device 4b notifies the writing of the completed communication frame and the length information of the communication frame by calling the hypervisor (step S33).

其次,超管理器9係從步驟S33之超管理器呼叫中辨識虛擬機器客體1b已對共享記憶體61b完成寫入,且取得通訊訊框之長度資訊(步驟S34)。超管理器9係設定寫入完成資訊(步驟S35),且使虛擬機器客體1a產生中斷X(步驟S36)。包含於虛擬機器客體1a的虛擬通訊裝置4a係藉由超管理器呼叫來詢問中斷要因(步驟S37)。對此,超管理器 9係回應藉由虛擬機器客體1a所為之對共享記憶體61b的寫入完成和通訊訊框長度資訊(步驟S38)。藉此,虛擬通訊裝置4a就會辨識虛擬機器客體1b已對共享記憶體61b完成寫入(步驟S39)。 Next, the hypervisor 9 recognizes that the virtual machine object 1b has completed writing to the shared memory 61b from the hypervisor call of step S33, and acquires the length information of the communication frame (step S34). The hypervisor 9 sets the write completion information (step S35), and causes the virtual machine object 1a to generate the interrupt X (step S36). The virtual communication device 4a included in the virtual machine object 1a inquires of the interrupt cause by the hypervisor call (step S37). In response to this, the hypervisor 9 responds to the writing completion and communication frame length information for the shared memory 61b by the virtual machine object 1a (step S38). Thereby, the virtual communication device 4a recognizes that the virtual machine object 1b has completed writing to the shared memory 61b (step S39).

虛擬通訊裝置4a係藉由超管理器呼叫而重設有關虛擬機器客體1a的寫入完成資訊(步驟S40)。虛擬通訊裝置4a係讀出已寫入至共享記憶體61b的通訊訊框(步驟S40),且將該通訊訊框遞送至上位層之虛擬通訊裝置驅動程式3a(步驟S42)。之後,該通訊訊框係透過虛擬通訊裝置驅動程式3a而遞送至交換器2。 The virtual communication device 4a re-sets the write completion information of the virtual machine object 1a by the hypervisor call (step S40). The virtual communication device 4a reads out the communication frame that has been written to the shared memory 61b (step S40), and delivers the communication frame to the virtual communication device driver 3a of the upper layer (step S42). Thereafter, the communication frame is delivered to the switch 2 through the virtual communication device driver 3a.

圖5係通知虛擬機器之讀出完成的通訊序列。 Figure 5 is a communication sequence informing the virtual machine that the readout is complete.

如圖5之步驟S43所示,虛擬通訊裝置4a係用超管理器呼叫來通知已完成共享記憶體61b之讀出。超管理器9係當藉由步驟S43之超管理器呼叫來辨識虛擬機器客體1a之讀出完成時(步驟S44),就在設定了讀出完成資訊之後(步驟S45),使虛擬機器客體1b產生中斷X(步驟S46)。藉此,包含於虛擬機器客體1b的虛擬通訊裝置4b就會藉由超管理器呼叫來詢問中斷要因(步驟S47)。相對於此,超管理器9係回應虛擬機器客體1a之讀出完成(步驟S48)。虛擬通訊裝置4a係辨識虛擬機器客體1a已完成共享記憶體61b之讀出(步驟S49)。更且,虛擬通訊裝置4a係藉由超管理器呼叫來重設讀出完成資訊(步驟S50)。此後,虛擬通訊 裝置4a係辨識共享記憶體61b是空的(步驟S51)。之後,可以再次進行步驟S30以後的處理。 As shown in step S43 of Fig. 5, the virtual communication device 4a notifies that the reading of the shared memory 61b has been completed by the hypervisor call. When the hypervisor 9 recognizes that the reading of the virtual machine object 1a is completed by the hypervisor call of step S43 (step S44), after the read completion information is set (step S45), the virtual machine object 1b is made. An interrupt X is generated (step S46). Thereby, the virtual communication device 4b included in the virtual machine object 1b inquires of the interrupt cause by the hypervisor call (step S47). In contrast, the hypervisor 9 responds to the completion of reading of the virtual machine object 1a (step S48). The virtual communication device 4a recognizes that the virtual machine object 1a has completed reading of the shared memory 61b (step S49). Further, the virtual communication device 4a resets the read completion information by the hypervisor call (step S50). Thereafter, the virtual communication device 4a recognizes that the shared memory 61b is empty (step S51). Thereafter, the processing from step S30 onward can be performed again.

在該變化例中係僅用一條中斷X來通知虛擬通訊中的寫入完成和讀出完成。因而,可以將使用於虛擬通訊的中斷資源最小化。 In this variation, only one interrupt X is used to notify the completion of writing and the completion of reading in the virtual communication. Thus, the interrupt resources used for virtual communication can be minimized.

該變化例係虛擬機器客體1a在與虛擬機器客體1b至1n之間交換資訊的星形連接。虛擬機器客體1b至1n係只要有一條中斷X就足夠,但是虛擬機器客體1a則需要與通訊對接端之台數相同條數的中斷XB至XnThis variation is a star connection in which the virtual machine object 1a exchanges information with the virtual machine objects 1b to 1n. The virtual machine objects 1b to 1n are sufficient as long as there is an interrupt X, but the virtual machine object 1a requires the same number of interrupts X B to X n as the number of communication docking ends.

圖6係第二實施形態中的虛擬網路系統S之構成圖。 Fig. 6 is a view showing the configuration of the virtual network system S in the second embodiment.

第二實施形態的虛擬網路系統S之虛擬通訊裝置4a係具備虛擬暫存器(register)41a,虛擬通訊裝置4b係具備虛擬暫存器41b。以下,在未特別地區別各個虛擬暫存器41a、41b、…時,簡單記載為虛擬暫存器41。該虛擬暫存器41係指藉由超管理器9而寫入值且藉由各個虛擬通訊裝置4所讀取的暫存器。超管理器9係可以透過該虛擬暫存器41而對各個虛擬通訊裝置4發送資訊。 The virtual communication device 4a of the virtual network system S of the second embodiment includes a virtual register 41a, and the virtual communication device 4b includes a virtual register 41b. Hereinafter, when the virtual registers 41a, 41b, ... are not particularly distinguished, they are simply described as the virtual register 41. The virtual register 41 is a register that is written by the hypervisor 9 and read by each virtual communication device 4. The hypervisor 9 can transmit information to each virtual communication device 4 through the virtual register 41.

第二實施形態的虛擬網路系統S係更進一步將從超管理器9往各個虛擬通訊裝置4的中斷限定為僅有一條。藉此可以將中斷資源最小化。 The virtual network system S of the second embodiment further limits the interruption from the hypervisor 9 to each virtual communication device 4 to only one. This allows you to minimize interrupt resources.

其次,說明第二實施形態的虛擬機器間通訊。發送源 之虛擬機器客體1係對共享記憶體61或共享記憶體62寫入通訊訊框,且藉由超管理器呼叫來對超管理器9通知寫入完成。超管理器9係在已對虛擬暫存器41設定通訊訊框長度資訊和寫入完成資訊之後,藉由中斷來對目的地之虛擬機器客體1通知通訊事件發生。 Next, the virtual machine communication of the second embodiment will be described. The virtual machine object 1 of the transmission source writes a communication frame to the shared memory 61 or the shared memory 62, and notifies the super manager 9 of the completion of writing by the hypervisor call. The hypervisor 9 notifies the virtual machine object 1 of the destination of the occurrence of the communication event by interrupting after the communication frame length information and the writing completion information have been set to the virtual register 41.

目的地之虛擬機器客體1係當接收藉由中斷所為的通知時,就藉由虛擬暫存器41來取得中斷要因和通訊訊框長度資訊。由於中斷要因是通訊訊框之寫入完成,所以目的地之虛擬機器客體1會讀出位於共享記憶體61或共享記憶體62的通訊訊框。 The virtual machine object 1 of the destination obtains the interrupt factor and the frame length information by the virtual register 41 when receiving the notification by the interrupt. Since the interrupt is caused by the completion of the writing of the communication frame, the virtual machine object 1 of the destination reads the communication frame located in the shared memory 61 or the shared memory 62.

更且,目的地之虛擬機器客體1係藉由超管理器呼叫來對超管理器9通知讀出完成。超管理器9係藉由中斷來對發送源之虛擬機器客體1通知通訊事件發生。發送源之虛擬機器客體1係當接收藉由中斷所為的通知時,就藉由虛擬暫存器41來取得中斷要因和通訊訊框長度資訊。由於中斷要因是通訊訊框之讀出完成,所以發送源之虛擬機器客體1會辨識通訊訊框之讀出完成。虛擬機器間通訊係藉由對稱地具有該構造來實現雙向之通訊。 Moreover, the virtual machine object 1 of the destination notifies the hypervisor 9 that the reading is completed by the hypervisor call. The hypervisor 9 notifies the virtual machine object 1 of the transmission source of the occurrence of the communication event by the interruption. The virtual machine object 1 of the transmission source obtains the interrupt factor and the communication frame length information by the virtual register 41 when receiving the notification by the interrupt. Since the interrupt is caused by the completion of the reading of the communication frame, the virtual machine object 1 of the transmission source recognizes that the reading of the communication frame is completed. Virtual machine-to-machine communication achieves two-way communication by symmetrically having this configuration.

再者,其是一種虛擬機器客體1a在與虛擬機器客體1b至1n之間交換資訊的星形連接。雖然虛擬機器客體1b至1n係只要有一條中斷就足夠,但是虛擬機器客體1a則需要與目的地之虛擬機器客體1b至1n之台數相應的條數之中斷。 Furthermore, it is a star connection in which the virtual machine object 1a exchanges information with the virtual machine objects 1b to 1n. Although it is sufficient that the virtual machine objects 1b to 1n have one interruption, the virtual machine object 1a requires an interruption of the number corresponding to the number of virtual machine objects 1b to 1n of the destination.

將虛擬通訊裝置4使用此等的構造,且從虛擬機器客體1b發送通訊訊框至虛擬機器客體1a的順序,顯示於以下之圖7和圖8。再者,從虛擬機器客體1a發送通訊訊框至虛擬機器客體1b的順序亦為同樣。 The order in which the virtual communication device 4 uses these structures and transmits the communication frame from the virtual machine object 1b to the virtual machine object 1a is shown in FIGS. 7 and 8 below. Furthermore, the order of transmitting the communication frame from the virtual machine object 1a to the virtual machine object 1b is also the same.

圖7和圖8係第二實施形態中的虛擬機器間之通訊序列。 7 and 8 are communication sequences between virtual machines in the second embodiment.

在步驟S60中,包含於虛擬機器客體1b的虛擬通訊裝置4b係只要共享記憶體61b不是空的(「否」)就在原狀態下等待,若共享記憶體61b是空的(「是」),就前進至步驟S61之處理。再者,共享記憶體61b係在初始狀態中是空的。 In step S60, the virtual communication device 4b included in the virtual machine object 1b waits in the original state as long as the shared memory 61b is not empty ("NO"), and if the shared memory 61b is empty ("Yes"), The process proceeds to step S61. Furthermore, the shared memory 61b is empty in the initial state.

在步驟S61中,虛擬通訊裝置4b係當從上位層之虛擬通訊裝置驅動程式3b接收通訊訊框時,就寫入至共享記憶體61b(步驟S62)。在共享記憶體61b係寫入有通訊訊框,並成為不是空的。更且,虛擬通訊裝置4b係藉由超管理器呼叫而通知通訊訊框之長度資訊和寫入完成(步驟S63)。 In step S61, when the virtual communication device 4b receives the communication frame from the virtual communication device driver 3b of the higher layer, it writes it to the shared memory 61b (step S62). A communication frame is written in the shared memory 61b, and is not empty. Further, the virtual communication device 4b notifies the length information and the writing completion of the communication frame by the hypervisor call (step S63).

其次,超管理器9係從步驟S63之超管理器呼叫中辨識虛擬機器客體1b已對共享記憶體61b完成寫入,且取得通訊訊框之長度資訊(步驟S64)。超管理器9係對虛擬暫存器41a設定有關虛擬機器客體1b的寫入完成資訊(步驟S65),且將通訊訊框之長度資訊寫入至虛擬暫存器41a(步 驟S66)。之後,超管理器9係使虛擬機器客體1a產生中斷(步驟S67)。包含於虛擬機器客體1a的虛擬通訊裝置4a係讀出虛擬暫存器41,並辨識中斷要因是藉由虛擬機器客體1b所為的寫入完成(步驟S68),且讀出通訊訊框之長度資訊(步驟S69)。之後,虛擬通訊裝置4a係重設有關已設定於虛擬暫存器41b之虛擬機器客體1b的寫入完成資訊(步驟S70)。 Next, the hypervisor 9 recognizes that the virtual machine object 1b has completed writing to the shared memory 61b from the hypervisor call in step S63, and acquires the length information of the communication frame (step S64). The hypervisor 9 sets the write completion information on the virtual machine object 1b to the virtual register 41a (step S65), and writes the length information of the communication frame to the virtual register 41a (step S66). Thereafter, the hypervisor 9 causes the virtual machine object 1a to be interrupted (step S67). The virtual communication device 4a included in the virtual machine object 1a reads out the virtual register 41, and recognizes that the interrupt factor is completed by the virtual machine object 1b (step S68), and reads the length information of the communication frame. (Step S69). Thereafter, the virtual communication device 4a resets the write completion information of the virtual machine object 1b that has been set in the virtual register 41b (step S70).

虛擬通訊裝置4a係讀出已寫入至共享記憶體61b的通訊訊框(步驟S71),且將該通訊訊框遞送至上位層之虛擬通訊裝置驅動程式3a(步驟S72)。之後,該通訊訊框係透過虛擬通訊裝置驅動程式3a而遞送至交換器2。 The virtual communication device 4a reads out the communication frame that has been written to the shared memory 61b (step S71), and delivers the communication frame to the virtual communication device driver 3a of the upper layer (step S72). Thereafter, the communication frame is delivered to the switch 2 through the virtual communication device driver 3a.

如圖8之步驟S73所示,虛擬通訊裝置4a係藉由超管理器呼叫來通知讀出完成。超管理器9係當藉由步驟S73之超管理器呼叫,來辨識虛擬機器客體1a之讀出完成時(步驟S74),就在已對虛擬暫存器41b設定有關虛擬機器客體1a的讀出完成資訊之後(步驟S75),使虛擬機器客體1b產生中斷(步驟S76)。藉此,包含於虛擬機器客體1b的虛擬通訊裝置4b就會藉由虛擬暫存器41b來辨識中斷要因是虛擬機器客體1a之讀出完成(步驟S77)。之後,虛擬通訊裝置4b係重設虛擬暫存器41b之讀出完成資訊(步驟S78)。此後,虛擬通訊裝置4a係辨識共享記憶體61b是空的(步驟S79)。之後,可以再次進行步驟S60以後的處理。 As shown in step S73 of Fig. 8, the virtual communication device 4a notifies the completion of the reading by the hypervisor call. The hypervisor 9 recognizes that the reading of the virtual machine object 1a is completed by the hypervisor call in step S73 (step S74), and the reading of the virtual machine object 1a has been set to the virtual register 41b. After the completion of the information (step S75), the virtual machine object 1b is caused to be interrupted (step S76). Thereby, the virtual communication device 4b included in the virtual machine object 1b recognizes that the interrupt cause is the completion of the reading of the virtual machine object 1a by the virtual register 41b (step S77). Thereafter, the virtual communication device 4b resets the read completion information of the virtual register 41b (step S78). Thereafter, the virtual communication device 4a recognizes that the shared memory 61b is empty (step S79). Thereafter, the processing from step S60 onward can be performed again.

(變化例)  (variation)  

本發明係未被限定於上述實施形態,而是在未脫離本發明之趣旨的範圍內,能夠進行變更實施,例如,有以下之(a)至(i)的態樣。 The present invention is not limited to the above-described embodiments, and can be modified and implemented without departing from the scope of the present invention. For example, the following aspects (a) to (i) are possible.

(a)各個實施形態所示的通訊訊框之寫出及讀出之序列、和讀出完成之通知序列,亦可任意地組合。例如,亦可組合圖2所示的第一實施形態之序列、和第8圖所示的第二實施形態之通知序列。 (a) The sequence of writing and reading of the communication frame and the notification sequence of reading completion shown in each embodiment may be arbitrarily combined. For example, the sequence of the first embodiment shown in FIG. 2 and the notification sequence of the second embodiment shown in FIG. 8 may be combined.

(b)上述實施形態的交換器係未被限定於L2交換器,亦可為L3(Layer 3;第三層)交換器或路由器(router)。 (b) The switch of the above embodiment is not limited to the L2 switch, and may be an L3 (Layer 3; Layer 3) switch or router.

(c)在上述實施形態中,寫入至共享記憶體61或共享記憶體62的通訊訊框之長度亦可並非可變長度,亦即,可設為固定長度來運用。 (c) In the above embodiment, the length of the communication frame written to the shared memory 61 or the shared memory 62 may not be a variable length, that is, it may be used as a fixed length.

(d)各個虛擬機器,亦可不藉由中斷,而是藉由往虛擬暫存器之輪訊(polling)、或超管理器呼叫之重複,來辨識寫入完成或讀出完成。 (d) Each virtual machine may also recognize the completion of writing or completion of reading by means of a polling to the virtual register or a repetition of a hypervisor call without interruption.

(e)在上述實施形態中,用超管理器呼叫或虛體暫存器所配送的資訊,亦可包含並未顯示於上述實施形態的元資料(metadata)等。 (e) In the above embodiment, the information distributed by the hypervisor call or the virtual body register may include metadata not shown in the above embodiment.

(f)在上述實施形態中,亦可將虛擬通訊裝置或交換器配置於超管理器。實體通訊裝置或其驅動程式亦為同樣。此時,超管理器呼叫或中斷係可以置換成簡單的函數呼叫。 (f) In the above embodiment, the virtual communication device or the switch may be placed in the hypervisor. The physical communication device or its driver is also the same. At this point, the hypervisor call or interrupt system can be replaced with a simple function call.

(g)在第一實施形態中,虛擬通訊裝置4a,亦可將有關與其 他的虛擬通訊裝置4b、…之間的通訊的中斷設為二條,並藉由超管理器呼叫來辨識已完成寫入的虛擬通訊裝置4、或已完成讀出的虛擬通訊裝置4。 (g) In the first embodiment, the virtual communication device 4a may also set the interruption of communication with the other virtual communication devices 4b, ... to two, and recognize the completed writing by the hypervisor call. The incoming virtual communication device 4 or the virtual communication device 4 that has completed reading.

(h)在第一實施形態之變化例中,虛擬通訊裝置4a,亦可將有關與其他的虛擬通訊裝置4b、…之間的通訊的中斷設為一條,且藉由超管理器呼叫來辨識中斷要因、和使該中斷要因產生的虛擬通訊裝置4。 (h) In the variation of the first embodiment, the virtual communication device 4a may also set the interruption of communication with the other virtual communication devices 4b, ... as one, and identify by the hypervisor call. The cause of the interruption, and the virtual communication device 4 that caused the interruption cause.

(i)在第二實施形態中,虛擬通訊裝置4a,亦可將有關與其他的虛擬通訊裝置4b、…之間的通訊的中斷設為一條,且藉由虛擬暫存器來辨識中斷要因、和使該中斷要因產生的虛擬通訊裝置4。 (i) In the second embodiment, the virtual communication device 4a may also set an interrupt for communication with the other virtual communication devices 4b, ..., and identify the cause of the interruption by the virtual register. And the virtual communication device 4 that causes the interruption to be generated.

Claims (5)

一種虛擬網路系統,係包含:超管理器;第一虛擬機器,係藉由前述超管理器所具體化,且包含虛擬通訊裝置;第二虛擬機器,係藉由前述超管理器所具體化,且包含虛擬通訊裝置;以及共享記憶體,係前述第一虛擬機器及前述第二虛擬機器所共享;前述第一虛擬機器及前述第二虛擬機器中之包含於發送源之虛擬機器的虛擬通訊裝置係只要前述共享記憶體是空的就寫入通訊資料,且藉由超管理器呼叫來對包含於目的地之虛擬機器的虛擬通訊裝置通知通訊資料之寫入完成;前述超管理器係使前述目的地之虛擬機器產生第一中斷;包含於前述目的地之虛擬機器的虛擬通訊裝置係以前述第一中斷為契機而讀出已寫入至前述共享記憶體的通訊資料,並藉由超管理器呼叫來對包含於前述發送源之虛擬機器的虛擬通訊裝置通知通訊資料之讀出完成; 前述超管理器係使前述發送源之虛擬機器產生第二中斷;包含於前述發送源之虛擬機器的虛擬通訊裝置係以前述第二中斷為契機而偵測前述共享記憶體已變為空的。  A virtual network system includes: a hypervisor; the first virtual machine is embodied by the hypervisor and includes a virtual communication device; and the second virtual machine is embodied by the hypervisor. And including a virtual communication device; and shared memory shared by the first virtual machine and the second virtual machine; and virtual communication of the virtual machine included in the source of the first virtual machine and the second virtual machine The device writes the communication data as long as the shared memory is empty, and notifies the virtual communication device of the virtual machine included in the destination by the hypervisor call to complete the writing of the communication data; the super manager is The virtual machine of the destination destination generates a first interrupt; the virtual communication device of the virtual machine included in the destination reads the communication data written to the shared memory by using the first interrupt as a trigger, and The manager calls to notify the virtual communication device of the virtual machine included in the foregoing transmission source that the communication data is read out; the foregoing super management The virtual machine of the virtual source of the transmission source generates a second interrupt; and the virtual communication device of the virtual machine included in the transmission source detects that the shared memory has become empty by using the second interrupt.   如請求項1所記載之虛擬網路系統,其中包含於前述目的地之虛擬機器的虛擬通訊裝置係以前述第一中斷為契機而藉由超管理器呼叫來取得通訊資料之長度資訊,且取得已寫入至前述共享記憶體的通訊資料。  The virtual network system as claimed in claim 1, wherein the virtual communication device of the virtual machine included in the destination obtains the length information of the communication data by using the hypervisor call, and obtains the information by using the first interrupt. The communication data that has been written to the aforementioned shared memory.   如請求項1所記載之虛擬網路系統,其中前述第一虛擬機器和前述第二虛擬機器係更包含虛擬暫存器;前述超管理器係只要已用藉由前述發送源之虛擬機器所為的超管理器呼叫辨識出寫入完成,就會在對前述目的地之虛擬機器的虛擬暫存器寫入通訊資料之長度資訊之後,使前述目的地之虛擬機器產生前述第一中斷;包含於前述目的地之虛擬機器的虛擬通訊裝置係以前述第一中斷為契機而從虛擬暫存器取得通訊資料之長度資訊,並取得已寫入至前述共享記憶體的通訊資料。  The virtual network system as claimed in claim 1, wherein the first virtual machine and the second virtual machine further comprise a virtual register; the super manager is configured to use a virtual machine by using the foregoing sending source. After the hypervisor call recognizes that the writing is completed, the virtual machine of the destination may generate the first interruption after writing the length information of the communication data to the virtual register of the virtual machine of the destination; The virtual communication device of the virtual machine of the destination acquires the length information of the communication data from the virtual register by using the first interrupt, and acquires the communication data written in the shared memory.   如請求項1所記載之虛擬網路系統,其中前述第一虛擬機器和前述第二虛擬機器係更包含虛擬暫存器; 前述超管理器係只要已用藉由前述目的地之虛擬機器所為的超管理器呼叫辨識出讀出完成,就會在對前述發送源之虛擬機器的虛擬暫存器設定讀出完成之後,使前述發送源之虛擬機器產生前述第一中斷;包含於前述發送源之虛擬機器的虛擬通訊裝置係藉由前述第一中斷和前述虛擬暫存器之讀出完成的設定,來偵測前述共享記憶體已變為空的。  The virtual network system as claimed in claim 1, wherein the first virtual machine and the second virtual machine further comprise a virtual register; the super manager is configured to use a virtual machine by the destination. After the hypervisor calls the read completion, the virtual machine of the transmission source generates the first interrupt after the readout of the virtual register setting of the virtual machine of the transmission source is completed; and is included in the foregoing transmission source. The virtual communication device of the virtual machine detects that the shared memory has become empty by the setting of the first interrupt and the readout of the virtual temporary register.   一種虛擬網路系統的通訊方法,係虛擬網路系統所執行的通訊方法,該虛擬網路系統係包含:超管理器;第一虛擬機器,係藉由前述超管理器所具體化,且包含虛擬通訊裝置;第二虛擬機器,係藉由前述超管理器所具體化,且包含虛擬通訊裝置;以及共享記憶體,係前述第一虛擬機器及前述第二虛擬機器所共享;前述第一虛擬機器及前述第二虛擬機器中之包含於發送源之虛擬機器的虛擬通訊裝置係只要前述共享記憶體是空的就寫入通訊資料;藉由超管理器呼叫來對包含於目的地之虛擬機器的虛擬通訊裝置通知通訊資料之寫入完成; 前述超管理器係使前述目的地之虛擬機器產生第一中斷;包含於前述目的地之虛擬機器的虛擬通訊裝置係以前述第一中斷為契機而讀出已寫入至前述共享記憶體的通訊資料;藉由超管理器呼叫來對包含於前述發送源之虛擬機器的虛擬通訊裝置通知通訊資料之讀出完成;前述超管理器係使前述發送源之虛擬機器產生第二中斷;包含於前述發送源之虛擬機器的虛擬通訊裝置係以前述第二中斷為契機而偵測前述共享記憶體已變為空的。  A communication method of a virtual network system is a communication method performed by a virtual network system, the virtual network system includes: a hypervisor; the first virtual machine is embodied by the foregoing hypervisor, and includes a virtual communication device; the second virtual machine is embodied by the hypervisor and includes a virtual communication device; and the shared memory is shared by the first virtual machine and the second virtual machine; the first virtual The virtual communication device of the virtual machine included in the transmission source of the machine and the second virtual machine is written to the communication material as long as the shared memory is empty; and the virtual machine included in the destination is called by the hypervisor call The virtual communication device notifies the completion of the writing of the communication data; the super manager causes the virtual machine of the destination to generate the first interruption; and the virtual communication device of the virtual machine included in the destination is triggered by the first interruption. Reading the communication data that has been written to the aforementioned shared memory; calling the virtual source included in the aforementioned transmission source by the hypervisor call The virtual communication device of the machine notifies that the reading of the communication data is completed; the super manager causes the virtual machine of the transmitting source to generate a second interrupt; and the virtual communication device of the virtual machine included in the transmitting source takes the second interrupt as an opportunity The detection of the aforementioned shared memory has become empty.  
TW107117007A 2017-06-01 2018-05-18 Virtual network system and virtual network system communication method TW201903608A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-108956 2017-06-01
JP2017108956 2017-06-01

Publications (1)

Publication Number Publication Date
TW201903608A true TW201903608A (en) 2019-01-16

Family

ID=64454673

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107117007A TW201903608A (en) 2017-06-01 2018-05-18 Virtual network system and virtual network system communication method

Country Status (2)

Country Link
TW (1) TW201903608A (en)
WO (1) WO2018221118A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7411895B2 (en) 2019-12-05 2024-01-12 パナソニックIpマネジメント株式会社 Information processing device, abnormality detection method and computer program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8739177B2 (en) * 2010-06-21 2014-05-27 Intel Corporation Method for network interface sharing among multiple virtual machines
JP2016018298A (en) * 2014-07-07 2016-02-01 富士通株式会社 Notification conversion program and notification conversion method

Also Published As

Publication number Publication date
WO2018221118A1 (en) 2018-12-06

Similar Documents

Publication Publication Date Title
US11372802B2 (en) Virtual RDMA switching for containerized applications
CN110888827B (en) Data transmission method, device, equipment and storage medium
US20210117224A1 (en) Virtual machine migration while maintaining live network links
JP6257778B2 (en) Method and computer device for affinity binding of interrupts in a virtual network interface card
US6347341B1 (en) Computer program product used for exchange and transfer of data having a siga vector and utilizing a queued direct input-output device
US6345327B1 (en) Queuing method and apparatus for providing direct data processing access using a queued direct input-output device
US6976083B1 (en) Apparatus for providing direct data processing access using a queued direct input-output device
JP2017108231A (en) Communication control program, communication control method, and information processing device
WO2016115831A1 (en) Fault tolerant method, apparatus and system for virtual machine
EP3563534B1 (en) Transferring packets between virtual machines via a direct memory access device
US8615586B2 (en) Discovery of logical images at storage area network endpoints
US6397350B1 (en) Method of providing direct data processing access using a queued direct input-output device
Abbasi et al. A performance comparison of container networking alternatives
US6401145B1 (en) Method of transferring data using an interface element and a queued direct input-output device
WO2014149519A1 (en) Flow director-based low latency networking
US6321350B1 (en) Method and apparatus for error detection using a queued direct Input-Output device
TW201903608A (en) Virtual network system and virtual network system communication method
CN112506676A (en) Inter-process data transmission method, computer device and storage medium
US6345324B1 (en) Apparatus for transferring data using an interface element and a queued direct input-output device
US6339803B1 (en) Computer program product used for exchange and transfer of data having a queuing mechanism and utilizing a queued direct input-output device
US6324600B1 (en) System for controlling movement of data in virtual environment using queued direct input/output device and utilizing finite state machine in main memory with two disjoint sets of states representing host and adapter states
US6339801B1 (en) Method for determining appropriate devices for processing of data requests using a queued direct input/output device by issuing a special command specifying the devices can process data
US6345329B1 (en) Method and apparatus for exchanging data using a queued direct input-output device
JP7451438B2 (en) Communication devices, communication systems, notification methods and programs
US6339802B1 (en) Computer program device and an apparatus for processing of data requests using a queued direct input-output device