KR20210061108A - Virtualization system and data exchange method between host and guest in the sytstem - Google Patents

Virtualization system and data exchange method between host and guest in the sytstem Download PDF

Info

Publication number
KR20210061108A
KR20210061108A KR1020190148922A KR20190148922A KR20210061108A KR 20210061108 A KR20210061108 A KR 20210061108A KR 1020190148922 A KR1020190148922 A KR 1020190148922A KR 20190148922 A KR20190148922 A KR 20190148922A KR 20210061108 A KR20210061108 A KR 20210061108A
Authority
KR
South Korea
Prior art keywords
guest
kernel
data
host
area
Prior art date
Application number
KR1020190148922A
Other languages
Korean (ko)
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 주식회사 케이티
Priority to KR1020190148922A priority Critical patent/KR20210061108A/en
Publication of KR20210061108A publication Critical patent/KR20210061108A/en

Links

Images

Classifications

    • 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
    • G06F9/544Buffers; Shared memory; Pipes
    • 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
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45545Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox

Abstract

A virtualization system and a method of exchanging data between a host and a guest in the system are disclosed. According to the method of exchanging data, first, a system call defined in a kernel area of a guest OS is called by a specific application in a user area of the guest OS, where the system call includes an identifier of a hypercall defined in the kernel area of the host OS. Next, by the system call, the identifier of the hypercall is used to call the hypercall, so that information related to specific data in the user area of the guest OS is transferred to the hypercall, where the information related to the specific data includes a memory address for storing the specific data. Then, by the hypercall, a kernel buffer is created in the kernel area of the host OS, and by the hypercall, the information related to the specific data is used to copy the specific data in the user area of the guest OS to the kernel buffer.

Description

가상화 시스템 및 그 시스템에서의 호스트와 게스트 사이의 데이터 교환 방법 {VIRTUALIZATION SYSTEM AND DATA EXCHANGE METHOD BETWEEN HOST AND GUEST IN THE SYTSTEM}Virtualization system and data exchange method between host and guest in the system {VIRTUALIZATION SYSTEM AND DATA EXCHANGE METHOD BETWEEN HOST AND GUEST IN THE SYTSTEM}

본 발명은 가상화 시스템 및 그 시스템에서의 호스트와 게스트 사이의 데이터 교환 방법에 관한 것이다.The present invention relates to a virtualization system and a method of exchanging data between a host and a guest in the system.

가상화 기술은 기업 IT 인프라 관리비 절감, 애플리케이션 배포의 용이성, 기존 서버 활용 및 통합 등 많은 장점을 가지고 있다. 가상화 기술은 물리 머신 상에서 복수 개의 가상 머신을 구동시킴으로써 한정된 자원을 효율적으로 관리할 수 있으며, 구동된 가상 머신 각각 간의 고립성을 이용하여 사용 환경 각각에 대한 보안성을 향상시킬 수 있다는 점에서 소규모의 모바일 단말에서부터 대규모의 클라우드 컴퓨팅에 이르기까지 다양한 분야에서 보편적으로 이용되는 추세이다. Virtualization technology has many advantages, such as reduction of corporate IT infrastructure management costs, ease of application deployment, and utilization and integration of existing servers. Virtualization technology can efficiently manage limited resources by running multiple virtual machines on a physical machine, and improves security for each use environment by using the isolation between each of the driven virtual machines. It is a trend that is widely used in various fields from terminals to large-scale cloud computing.

이러한 가상화 방식 중 하나로, 리눅스(Linux) KVM(Kernel-based Virtual Machine) 기반 가상화 방식에서 사용되는 KVM은 리눅스를 호스트 운영체제(Operating System, 이하 "OS"라 함)로 사용하는 가상화 플랫폼으로서, 호스트 OS인 리눅스의 커널 모듈을 통해 가상화 환경을 구축하고, 오픈 소스 기반의 머신 에뮬레이터인 QEMU(Quick Emulator)를 이용하여 가상 머신의 I/O 요청을 처리한다.As one of these virtualization methods, the KVM used in the Linux Kernel-based Virtual Machine (KVM)-based virtualization method is a virtualization platform that uses Linux as a host operating system (hereinafter referred to as "OS"), and is a host OS. In Linux, a virtualization environment is built through the kernel module, and I/O requests from virtual machines are handled using QEMU (Quick Emulator), an open source based machine emulator.

한편, 리눅스 KVM은 게스트(Guest)의 Vcpu 및 vRAM을 가상화하기 위해 하이퍼콜(Hypercall)을 사용한다. 여기서, 하이퍼콜은 시스템 콜과 유사한 개념에 기초한 것으로, 게스트 OS가 하드웨어 자원을 액세스할 필요가 있을 때 리눅스 KVM에 의해 사용된다. 이러한 하이퍼콜은, 예를 들어 소프트웨어 방식으로 가상으로 구현된 CPU 레지스터(Register)에 값을 저장하고, 저장된 값을 처리 후 다시 돌려주거나, 또는 게스트의 메모리 주소를 받아서 호스트의 실제 메모리 주소를 변환하는 데 사용된다. 즉, 기존에는 하이퍼콜을 IPC(Inter Process Communication) 용도가 아닌, 가상화된 vCPU 및 vRAM 등을 관리하기 위해서만 사용하였다.Meanwhile, Linux KVM uses Hypercall to virtualize the guest's Vcpu and vRAM. Here, the hypercall is based on a concept similar to the system call, and is used by the Linux KVM when the guest OS needs to access hardware resources. Such hypercalls, for example, store a value in a CPU register implemented virtually in software, process the stored value, and return it, or receive the guest's memory address and convert the host's real memory address. Used to In other words, in the past, Hypercall was used only to manage virtualized vCPU and vRAM, not IPC (Inter Process Communication).

한편, 기존의 게스트/호스트간 데이터 교환은 주로 내부 소켓 함수 및 하이퍼바이저의 특수한 가상 디바이스를 통해 이루어졌기 때문에, 네트워크 브리지도 가상화가 필수로 수반되어야 했으며, 내부에서 소켓 통신을 위해 네트워크 포트를 사용하기 때문에 게스트가 많으면 많을수록 호스트의 네트워크 포트 또한 같이 소모되는 문제점이 있다.On the other hand, since the existing data exchange between guest/host was mainly done through the internal socket function and a special virtual device of the hypervisor, virtualization was required for the network bridge as well, and a network port was used for socket communication inside. Therefore, the more guests there are, the more the host's network port is consumed.

또한, 네트워크 함수는 버퍼의 크기가 매우 작기 때문에 크기가 큰 데이터를 전송할 때 Send/Receive 함수의 호출이 많이 발생하게 되어 시스템 성능에도 영향을 미친다는 문제점이 있다.In addition, since the buffer size of the network function is very small, there is a problem that many calls to the Send/Receive function occur when transmitting large data, which affects the system performance.

본 발명이 해결하고자 하는 과제는 호스트의 커널 내의 하이퍼바이저에 직접적으로 게스트와 통신할 수 있는 하이퍼콜들을 구현하여 효율적인 게스트/호스트 통신과 실시간으로 게스트를 제어할 수 있는, 가상화 시스템 및 그 시스템에서의 호스트와 게스트 사이의 데이터 교환 방법을 제공하는 것이다.The problem to be solved by the present invention is a virtualization system and a virtualization system capable of controlling a guest in real time and efficient guest/host communication by implementing hyper-calls that can directly communicate with a guest on a hypervisor in the host's kernel. It is to provide a method of exchanging data between the host and the guest.

본 발명의 하나의 특징에 따른 데이터 교환 방법은,A data exchange method according to one aspect of the present invention,

가상화 시스템에서 호스트 OS(Operating System)와 게스트 OS 사이의 데이터를 교환하는 방법으로서, 상기 게스트 OS의 데이터를 상기 호스트 OS로 복사하기 위해, 상기 게스트 OS에서 실행 중인 특정 애플리케이션에 의해, 상기 게스트 OS의 커널 영역에 정의된 시스템콜(systemcall)이 호출되는 단계 - 상기 시스템콜은 상기 호스트 OS의 커널 영역에 정의된 하이퍼콜의 식별자를 포함함 -, 상기 시스템콜에 의해, 상기 하이퍼콜의 식별자가 사용되어 상기 하이퍼콜이 호출됨으로써, 상기 게스트 OS의 사용자 영역 내의 특정 데이터와 관련된 정보가 상기 하이퍼콜로 전달되는 단계 - 상기 특정 데이터와 관련된 정보는 상기 특정 데이터가 저장된 메모리 주소를 포함함 -, 상기 하이퍼콜에 의해, 상기 호스트 OS의 커널 영역 내에 커널 버퍼가 생성되는 단계, 그리고 상기 하이퍼콜에 의해, 상기 메모리 주소가 사용되어 상기 게스트 OS의 사용자 영역 내의 상기 특정 데이터가 상기 커널 버퍼로 복사되는 단계를 포함한다.A method of exchanging data between a host OS (Operating System) and a guest OS in a virtualization system, wherein in order to copy the data of the guest OS to the host OS, The step of calling a systemcall defined in the kernel area-The system call includes the identifier of the hypercall defined in the kernel area of the host OS -, by the system call, the identifier of the hypercall is used And, by calling the hypercall, information related to specific data in the user area of the guest OS is transferred to the hypercall-the information related to the specific data includes a memory address in which the specific data is stored -, the hypercall By, generating a kernel buffer in the kernel area of the host OS, and copying the specific data in the user area of the guest OS to the kernel buffer by using the memory address by the hypercall. do.

여기서, 상기 특정 데이터와 관련된 정보는 상기 특정 데이터의 크기 정보를 더 포함하고, 상기 커널 버퍼는 상기 특정 데이터의 크기 정보에 대응되는 크기를 갖도록 생성된다.Here, the information related to the specific data further includes size information of the specific data, and the kernel buffer is generated to have a size corresponding to the size information of the specific data.

또한, 상기 가상화 시스템이 리눅스(Linux) 기반 가상화 시스템이고, 상기 호스트 OS의 커널 영역 내에 KVM((Kernel-based Virtual Machine)이 포함되어 있는 경우, 상기 커널 버퍼로 복사되는 단계에서, 상기 하이퍼콜에 의해, 상기 KVM의 함수가 사용되어, 상기 게스트 OS의 사용자 영역 내의 상기 특정 데이터가 상기 커널 버퍼로 복사된다.In addition, when the virtualization system is a Linux-based virtualization system and a Kernel-based Virtual Machine (KVM) is included in the kernel area of the host OS, in the step of being copied to the kernel buffer, the hypercall By doing so, the function of the KVM is used, and the specific data in the user area of the guest OS is copied to the kernel buffer.

또한, 상기 커널 버퍼로 복사되는 단계 후에, 상기 호스트 OS의 커널 영역에 의해, 상기 커널 버퍼에 복사된 데이터를 사용한 미러링을 통해 상기 게스트 OS에 대한 모니터링이 수행된다.In addition, after the step of copying to the kernel buffer, the guest OS is monitored by the kernel region of the host OS through mirroring using data copied to the kernel buffer.

또한, 상기 특정 데이터와 관련된 정보는 상기 게스트 OS의 식별자를 더 포함하고, 상기 특정 데이터가 복사될 상기 게스트 OS가 복수 개인 경우, 상기 특정 데이터가 복사될 커널 버퍼는 상기 게스트 OS의 식별자를 사용하여 구분된다.In addition, the information related to the specific data further includes an identifier of the guest OS, and when there are a plurality of the guest OS to which the specific data is to be copied, the kernel buffer to which the specific data is to be copied uses the identifier of the guest OS. It is distinguished.

또한, 상기 특정 데이터는 상기 특정 애플리케이션에 의해 상기 게스트 OS의 스크린이 캡처되어 상기 게스트 OS의 사용자 영역 내의 스크린 버퍼에 저장된 스크린 데이터이고, 상기 특정 데이터의 크기 정보는 상기 스크린의 가로 해상도 및 세로 해상도 정보이다.In addition, the specific data is screen data that the screen of the guest OS is captured by the specific application and stored in a screen buffer in the user area of the guest OS, and the size information of the specific data is information on the horizontal resolution and the vertical resolution of the screen. to be.

본 발명의 다른 특징에 따른 데이터 교환 방법은,Data exchange method according to another aspect of the present invention,

가상화 시스템에서 호스트 OS(Operating System)와 게스트 OS 사이의 데이터를 교환하는 방법으로서, 상기 호스트 OS의 제어 데이터를 상기 게스트 OS로 복사하기 위해, 상기 게스트 OS에서 실행 중인 특정 애플리케이션에 의해, 상기 게스트 OS의 커널 영역에 정의된 시스템콜이 호출되는 단계 - 상기 시스템콜은 상기 호스트 OS의 커널 영역에 정의된 하이퍼콜의 식별자를 포함함 -, 상기 시스템콜에 의해, 상기 게스트 OS의 커널 영역 내에 메모리 공간이 할당되는 단계, 상기 시스템콜에 의해, 상기 하이퍼콜의 식별자가 사용되어 상기 하이퍼콜이 호출됨으로써, 상기 메모리 공간의 주소가 상기 하이퍼콜로 전달되는 단계, 상기 하이퍼콜에 의해, 상기 메모리 공간의 주소가 사용되어 상기 호스트 OS의 커널 영역 내의 제어 데이터가 상기 게스트 OS의 커널 영역의 상기 메모리 공간으로 복사되는 단계, 그리고A method of exchanging data between a host OS (operating system) and a guest OS in a virtualization system, wherein to copy control data of the host OS to the guest OS, the guest OS Calling a system call defined in the kernel area of the host OS-The system call includes an identifier of a hypercall defined in the kernel area of the host OS -, by the system call, a memory space in the kernel area of the guest OS A step of allocating, by the system call, the hypercall identifier is used and the hypercall is called, so that the address of the memory space is transferred to the hypercall, by the hypercall, the address of the memory space Is used to copy control data in the kernel region of the host OS into the memory space of the kernel region of the guest OS, and

상기 시스템콜에 의해, 상기 메모리 공간에 복사된 제어 데이터가 상기 게스트 OS의 사용자 영역으로 전달되는 단계를 포함한다.And transmitting the control data copied to the memory space to a user area of the guest OS by the system call.

여기서, 상기 제어 데이터가 상기 게스트 OS의 사용자 영역으로 전달되는 단계는, 상기 시스템콜에 의해, 상기 메모리 공간에 복사된 제어 데이터가 상기 게스트 OS의 커널 영역의 장치 드라이버의 영역으로 인젝션되어 구현되는 것이다.Here, the step of transferring the control data to the user area of the guest OS is implemented by injecting the control data copied to the memory space into the device driver area of the kernel area of the guest OS by the system call. .

또한, 상기 가상화 시스템이 리눅스(Linux) 기반 가상화 시스템이고, 상기 호스트 OS의 커널 영역 내에 KVM((Kernel-based Virtual Machine)이 포함되어 있는 경우, 상기 메모리 공간으로 복사되는 단계에서, 상기 하이퍼콜에 의해, 상기 KVM의 함수가 사용되어, 상기 호스트 OS의 커널 영역의 제어 데이터가 상기 게스트 OS의 커널 영역의 메모리 공간으로 복사된다.In addition, when the virtualization system is a Linux-based virtualization system and a Kernel-based Virtual Machine (KVM) is included in the kernel area of the host OS, in the step of copying to the memory space, the hypercall Accordingly, the KVM function is used, and control data of the kernel region of the host OS is copied to the memory space of the kernel region of the guest OS.

또한, 상기 제어 데이터는 상기 호스트 OS의 커널 영역의 드라이버 영역을 통해 입력되는 키보드 이벤트 및 마우스 이벤트의 데이터이고, 상기 시스템콜 및 상기 호스트콜에 의해, 상기 호스트 OS의 커널 영역의 제어 데이터가 상기 게스트 OS의 커널 영역의 장치 드라이버의 제어 데이터로서 인젝션되어, 상기 게스트 OS에 대한 입출력 제어가 가능하다.In addition, the control data is data of a keyboard event and a mouse event input through the driver area of the kernel area of the host OS, and the control data of the kernel area of the host OS is changed by the system call and the host call. It is injected as control data of the device driver in the kernel area of the OS, and input/output control for the guest OS is possible.

본 발명의 또 다른 특징에 따른 가상화 시스템은, 가상화를 제공하기 위해 하드웨어에 직접적으로 접근하여 제어를 수행하며,커널 영역과 사용자 영역으로 구성되는 호스트 OS(Operating System), 그리고 상기 호스트 OS의 사용자 영역 내에 설치되며, 게스트 OS의 커널 영역 및 사용자 영역으로 구성되는 하나 이상의 게스트 머신을 포함하며, 상기 게스트 OS의 사용자 영역 내의 데이터를 상기 호스트 OS의 커널 영역으로 복사하기 위해, 상기 게스트 OS의 커널 영역에 제1 시스템콜이 정의되어 있고, 상기 호스트 OS의 커널 영역에 상기 제1 시스템콜과 연관된 제1 하이퍼콜이 정의되어 있으며, 상기 게스트 OS의 사용자 영역 내의 특정 애플리케이션에 의해 상기 제1 시스템콜이 호출되는 경우, 상기 제1 시스템콜과 연관된 상기 제1 하이퍼콜이 호출되어, 상기 게스트 OS의 사용자 영역 내의 특정 데이터와 관련된 정보가 상기 제1 하이퍼콜로 전달되고, 상기 제1 하이퍼콜에 의해 상기 특정 데이터와 관련된 정보가 사용되어 상기 게스트 OS의 사용자 영역 내의 특정 데이터가 상기 제1 하이퍼콜에 의해 상기 호스트 OS의 커널 영역 내에 생성된 커널 버퍼로 복사되며, 상기 특정 데이터의 상기 커널 버퍼로의 복사는 상기 특정 데이터와 관련된 정보에 포함된 상기 특정 데이터가 저장된 메모리 주소가 상기 제1 하이퍼콜에 의해 사용되어 수행된다.A virtualization system according to another aspect of the present invention directly accesses and controls hardware to provide virtualization, and a host OS (Operating System) composed of a kernel area and a user area, and a user area of the host OS. It is installed in, and includes one or more guest machines consisting of a kernel area and a user area of the guest OS, and to copy data in the user area of the guest OS to the kernel area of the host OS, in the kernel area of the guest OS. A first system call is defined, a first hypercall associated with the first system call is defined in the kernel area of the host OS, and the first system call is called by a specific application in the user area of the guest OS. If yes, the first hypercall associated with the first system call is called, information related to specific data in the user area of the guest OS is transferred to the first hypercall, and the specific data The information related to is used so that specific data in the user area of the guest OS is copied to a kernel buffer created in the kernel area of the host OS by the first hypercall, and the copy of the specific data to the kernel buffer is performed by the first hypercall. The memory address in which the specific data included in the specific data related information is stored is used by the first hypercall and executed.

여기서, 상기 호스트 OS의 커널 영역의 제어 데이터를 상기 게스트 OS의 커널 영역으로 복사하기 위해, 상기 게스트 OS 커널 영역에 제2 시스템콜이 추가로 정의되어 있고, 상기 호스트 OS의 커널 영역에 상기 제2 시스템콜과 연관된 제2 하이퍼콜이 추가로 정의되어 있으며, 상기 게스트 OS의 사용자 영역 내의 특정 애플리케이션에 의해 상기 제2 시스템콜이 호출되는 경우 상기 제2 시스템콜과 연관된 상기 제2 하이퍼콜이 호출되어, 상기 제2 시스템콜에 의해 상기 게스트 OS의 커널 영역에 할당된 메모리 공간의 주소가 상기 제2 하이퍼콜로 전달되고, 상기 제2 하이퍼콜에 의해 상기 메모리 공간의 주소가 사용되어 상기 호스트 OS의 커널 영역의 제어 데이터가 상기 메모리 공간으로 복사된 후, 상기 제2 시스템콜에 의해 상기 사용자 영역으로 전달된다.Here, in order to copy the control data of the kernel area of the host OS to the kernel area of the guest OS, a second system call is additionally defined in the kernel area of the guest OS, and the second system call is added to the kernel area of the host OS. A second hypercall related to the system call is additionally defined, and when the second system call is called by a specific application in the user area of the guest OS, the second hypercall related to the second system call is called. , The address of the memory space allocated to the kernel area of the guest OS by the second system call is transferred to the second hypercall, and the address of the memory space is used by the second hypercall to use the kernel of the host OS. After the control data of the region is copied to the memory space, it is transferred to the user region by the second system call.

또한, 상기 특정 데이터는 상기 특정 애플리케이션에 의해 상기 게스트 OS의 스크린이 캡처되어 상기 게스트 OS의 사용자 영역 내의 스크린 버퍼에 저장된 스크린 데이터이다.In addition, the specific data is screen data that is stored in a screen buffer in a user area of the guest OS after the screen of the guest OS is captured by the specific application.

또한, 상기 제어 데이터는 상기 호스트 OS의 커널 영역의 드라이버 영역을 통해 입력되는 키보드 이벤트 및 마우스 이벤트의 데이터이고, 상기 제2 시스템콜에 의해 상기 사용자 영역으로 전달되는 것은, 상기 제2 시스템콜에 의해 상기 메모리 공간에 복사된 데이터가 상기 게스트 OS의 커널 영역의 드라이버 영역의 제어 데이터로서 인젝션됨으로써 수행된다.In addition, the control data is data of a keyboard event and a mouse event input through the driver area of the kernel area of the host OS, and is transmitted to the user area by the second system call by the second system call. The data copied to the memory space is injected as control data of the driver area of the kernel area of the guest OS.

본 발명의 실시예에 따르면, 게스트의 사용자 영역으로부터 호스트의 커널에 전달된 데이터를 사용하여 호스트가 게스트에 대한 모니터링을 수행할 수 있다.According to an embodiment of the present invention, the host may monitor the guest by using data transmitted from the user area of the guest to the kernel of the host.

또한, 호스트에서의 제어 데이터 입력을 게스트의 사용자 영역으로 전달할 수 있어서, 호스트에서 게스트에 대한 제어를 수행할 수 있다.In addition, since the control data input from the host can be transmitted to the user area of the guest, the host can control the guest.

또한, 기존에는 없던 방법으로 게스트와 호스트간 데이터 교환을 효율적으로 할 수 있으며, 범용성보다 성능 이슈가 더 중요한 중소규모 실시간 시스템에서 기존 방법보다 부하가 더 적기 때문에 시스템 집선비를 높일 수 있으며, 이에 따른 비용 절감 효과가 있다. In addition, data exchange between the guest and the host can be efficiently performed in a method that has not existed in the past, and in a small and medium-sized real-time system where performance issues are more important than versatility, the system concentration cost can be increased because the load is less than that of the existing method. There is a cost saving effect.

도 1은 본 발명의 실시예에 따른 가상화 시스템의 개략적인 구성도이다.
도 2는 도 1에 도시된 가상화 시스템에서 호스트와 게스트 사이의 데이터 교환을 위해 하이퍼콜 및 시스템콜을 정의하는 개념을 도시한 도면이다.
도 3은 본 발명의 실시예에 따른 호스트와 게스트 사이의 데이터 교환 방법의 개략적인 흐름도이다.
도 4는 도 3에 따른 방법을 가상화 시스템에 적용하여 나타낸 도면이다.
도 5는 본 발명의 다른 실시예에 따른 호스트와 게스트 사이의 데이터 교환 방법의 개략적인 흐름도이다.
도 6은 도 5에 따른 방법을 가상화 시스템에 적용하여 나타낸 도면이다.
1 is a schematic configuration diagram of a virtualization system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a concept of defining a hyper call and a system call for data exchange between a host and a guest in the virtualization system illustrated in FIG. 1.
3 is a schematic flowchart of a method of exchanging data between a host and a guest according to an embodiment of the present invention.
4 is a diagram illustrating the method of FIG. 3 applied to a virtualization system.
5 is a schematic flowchart of a method of exchanging data between a host and a guest according to another embodiment of the present invention.
6 is a diagram illustrating the method of FIG. 5 applied to a virtualization system.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art may easily implement the present invention. However, the present invention may be implemented in various different forms and is not limited to the embodiments described herein. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and similar reference numerals are attached to similar parts throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "…부", "…기", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. Throughout the specification, when a part "includes" a certain component, it means that other components may be further included rather than excluding other components unless specifically stated to the contrary. In addition, terms such as "... unit", "... group", and "module" described in the specification mean a unit that processes at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software. have.

본 발명에서 설명하는 장치들은 적어도 하나의 프로세서, 메모리 장치, 통신 장치 등을 포함하는 하드웨어로 구성되고, 지정된 장소에 하드웨어와 결합되어 실행되는 프로그램이 저장된다. 하드웨어는 본 발명의 방법을 실행할 수 있는 구성과 성능을 가진다. 프로그램은 도면들을 참고로 설명한 본 발명의 동작 방법을 구현한 명령어(instructions)를 포함하고, 프로세서와 메모리 장치 등의 하드웨어와 결합하여 본 발명을 실행한다. The devices described in the present invention are composed of hardware including at least one processor, a memory device, a communication device, and the like, and a program that is combined with the hardware and executed is stored in a designated place. The hardware has the configuration and capability to implement the method of the present invention. The program includes instructions for implementing the operating method of the present invention described with reference to the drawings, and executes the present invention by combining it with hardware such as a processor and a memory device.

본 명세서에서 "전송 또는 제공"은 직접적인 전송 또는 제공하는 것 뿐만 아니라 다른 장치를 통해 또는 우회 경로를 이용하여 간접적으로 전송 또는 제공도 포함할 수 있다.In the present specification, "transmitting or providing" may include not only direct transmission or provision, but also transmission or provision indirectly through another device or using a bypass path.

본 명세서에서 단수로 기재된 표현은 "하나" 또는 "단일" 등의 명시적인 표현을 사용하지 않은 이상, 단수 또는 복수로 해석될 수 있다.Expressions described in the singular in this specification may be interpreted as the singular or plural unless an explicit expression such as "one" or "single" is used.

본 명세서에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.In the present specification, terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another component.

본 명세서에서 운영체제(Operating System, OS)는 컴퓨터 장치에서, 사용자가 하드웨어를 보다 용이하게 사용할 수 있도록 인터페이스를 제공해 주는 프로그램들의 집합으로서, 프로세서, 저장 장치, 입출력 장치, 통신 장치, 데이터 등의 자원을 관리하는 것으로, window NT, window 2000, UNIX(유닉스), LINUX(리눅스) 등이 널리 사용되고 있으며, 이 중에서 특히 LINUX는 본 명세서에서 OS의 예로서 사용된다.In this specification, an operating system (OS) is a set of programs that provide an interface so that a user can use hardware more easily in a computer device, and resources such as a processor, a storage device, an input/output device, a communication device, and data are To manage, window NT, window 2000, UNIX (Unix), LINUX (Linux), and the like are widely used, and among them, LINUX is used as an example of an OS in this specification.

본 명세서에서 사용되는 시스템콜(system call)은 OS의 커널이 제공하는 서비스에 대해, 응용 프로그램의 요청에 따라 커널에 접근하기 위한 인터페이스를 의미한다. The system call used in this specification refers to an interface for accessing the kernel according to the request of an application program for a service provided by the kernel of the OS.

이하, 본 발명의 실시예에 따른 가상화 시스템에서의 호스트와 게스트 사이의 데이터 교환 방법에 대해 설명한다.Hereinafter, a method of exchanging data between a host and a guest in a virtualization system according to an embodiment of the present invention will be described.

도 1은 본 발명의 실시예에 따른 가상화 시스템의 개략적인 구성도이다.1 is a schematic configuration diagram of a virtualization system according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 실시예에 따른 가상화 시스템은, 예를 들어, 리눅스 기반의 KVM 기반 가상화를 제공하기 위해 하드웨어에 직접적으로 접근하여 제어를 수행하는 호스트 OS(100) 및 호스트 OS로부터 할당받은 하드웨어 자원을 사용하는 게스트 OS(200)를 포함한다. 여기서, 게스트 OS(200)는 적어도 하나 이상일 수 있으며, 하나의 게스트 머신을 구성할 수 있다. 또한, 게스트 OS(200)로는 리눅스 커널을 사용하는 Ubuntu, Centos, Android 등 KVM을 지원하는 OS일 수 있다. 한편, 도 1에서는 설명을 간결하게 하기 위해 본 발명의 실시예에서만 사용되는 구성요소들에 대해서만 나타내었지만, 본 발명은 이것으로만 한정되지는 않는다.Referring to FIG. 1, a virtualization system according to an embodiment of the present invention includes, for example, from a host OS 100 and a host OS that directly access and control hardware to provide Linux-based KVM-based virtualization. It includes a guest OS 200 that uses the allocated hardware resources. Here, the guest OS 200 may be at least one or more, and may constitute one guest machine. In addition, the guest OS 200 may be an OS supporting KVM, such as Ubuntu, Centos, and Android using a Linux kernel. Meanwhile, in FIG. 1, only components used only in the embodiments of the present invention are shown in order to simplify the description, but the present invention is not limited thereto.

호스트 OS(100)와 게스트 OS(200)는 각각 커널 영역과 사용자 영역으로 구분된다. 즉, 호스트 OS(100)는 호스트 커널 영역(110)과 호스트 사용자 영역(120)으로 구분되고, 게스트 OS(200)는 게스트 커널 영역(210)과 게스트 사용자 영역(220)으로 구분된다.The host OS 100 and the guest OS 200 are divided into a kernel area and a user area, respectively. That is, the host OS 100 is divided into a host kernel area 110 and a host user area 120, and the guest OS 200 is divided into a guest kernel area 210 and a guest user area 220.

본 발명이 리눅스 KVM 기반의 가상화 방식을 따르므로, 호스트 커널 영역(110)에는 리눅스 커널 OS(100)가 type-1 하이퍼바이저로서 기능하도록 하는 커널 모듈인 KVM(300)이 탑재되어 있다. Since the present invention follows the Linux KVM-based virtualization method, the host kernel area 110 is equipped with a KVM 300, which is a kernel module that allows the Linux kernel OS 100 to function as a type-1 hypervisor.

도 2는 도 1에 도시된 가상화 시스템에서 호스트와 게스트 사이의 데이터 교환을 위해 하이퍼콜 및 시스템콜을 정의하는 개념을 도시한 도면이다.FIG. 2 is a diagram illustrating a concept of defining a hyper call and a system call for data exchange between a host and a guest in the virtualization system illustrated in FIG. 1.

도 2를 참조하면, 호스트 커널 영역(110) 내에 있는 KVM(300) 내에 호스트와 게스트 사이의 데이터 교환을 위해 상호 통신을 위한 하이퍼콜(310, 320)을 정의한다. 이 때, 정의되는 하이퍼콜(310)은 게스트 사용자 영역(220)의 사용자 데이터를 호스트 커널 영역(110)으로 전달하기 위한 하이퍼콜이고, 하이퍼콜(320)은 호스트 커널 영역(110)의 제어 데이터를 게스트 커널 영역(210)으로 전달하기 위한 하이퍼콜로 각각 구분하여 정의될 수 있다. 이 때, 하이퍼콜(310, 320)은 게스트 머신의 CPU 종류에 따라 동일한 기능의 하이퍼콜을 여러 군데 정의할 필요가 있다. 이러한 하이퍼콜(310, 320)의 정의는 커널을 수정함으로써 구현될 수 있다.Referring to FIG. 2, hypercalls 310 and 320 for mutual communication are defined for data exchange between a host and a guest in the KVM 300 in the host kernel area 110. In this case, the defined hypercall 310 is a hypercall for transferring user data of the guest user area 220 to the host kernel area 110, and the hypercall 320 is control data of the host kernel area 110 May be defined separately as hypercalls for delivering to the guest kernel area 210. In this case, the hypercalls 310 and 320 need to define multiple hypercalls having the same function according to the type of CPU of the guest machine. The definition of the hypercalls 310 and 320 may be implemented by modifying the kernel.

예를 들어, 게스트 OS(200)로부터 호스트 OS(100)로 데이터를 전달하는 하나의 예를 들면, 게스트 사용자 영역(220) 내의 사용자 애플리케이션이 스크린 정보를 캡처하여 호스트 OS(100)로 전달하는 데이터 교환의 경우, 다음과 같은 하이퍼콜(310)이 정의될 수 있다. For example, as an example of transmitting data from the guest OS 200 to the host OS 100, the user application in the guest user area 220 captures screen information and transmits the data to the host OS 100 In the case of exchange, the following hypercall 310 may be defined.

#define KVM_HC_CAPTURESCREEN#define KVM_HC_CAPTURESCREEN

전술한 하이퍼콜(310)의 함수 본체는 호스트 커널 영역(110), 구체적으로는 KVM(300)에 정의되어 구현되지만, 하이퍼콜(310)의 ID(정수) 매크로를 게스트 커널 영역(210)에서 참조하기 위해 게스트 커널 영역(210)에도 매크로로 정의되어야 한다.The function body of the hypercall 310 described above is defined and implemented in the host kernel area 110, specifically the KVM 300, but the ID (integer) macro of the hypercall 310 is stored in the guest kernel area 210. For reference, the guest kernel area 210 must also be defined as a macro.

한편, 게스트 사용자 영역(220)에서는 호스트 커널 영역(110)에서 정의된 하이퍼콜(310)을 호출할 수 없기 때문에, 호스트 커널 영역(110) 내의 하이퍼콜(310)을 호출할 수 있도록 특권 영역, 즉 게스트 커널 영역(210)으로의 접근이 가능하도록 하는 시스템콜(211)이 정의될 필요가 있다. 이 때, 시스템콜(211)은 게스트 커널 영역(210) 내의 메모리 공간에 정의된다. On the other hand, since the hypercall 310 defined in the host kernel area 110 cannot be called in the guest user area 220, the privileged area so that the hypercall 310 in the host kernel area 110 can be called, That is, a system call 211 that enables access to the guest kernel area 210 needs to be defined. At this time, the system call 211 is defined in a memory space in the guest kernel area 210.

이와 같이, 본 발명의 실시예에서는 호스트 OS(100)와 게스트 OS(200) 사이의 데이터 교환 및 제어를 위해 하이퍼콜(310)과 이를 호출하기 위한 시스템콜(211)이 쌍으로 구현되어야 한다.As described above, in the embodiment of the present invention, the hypercall 310 and the system call 211 for calling the hypercall 310 for data exchange and control between the host OS 100 and the guest OS 200 must be implemented in pairs.

상기한 예를 참조하여 설명하면, 게스트 사용자 영역(220)에서 스크린 정보를 캡처하여 KVM(300)의 하이퍼콜(310)로 전달하기 위해, 다음과 같은 시스템콜(211)이 정의될 수 있다.Referring to the above example, the following system call 211 may be defined in order to capture screen information in the guest user area 220 and transmit it to the hypercall 310 of the KVM 300.

#define SYSCALL_CALL_HC_CAPTURE#define SYSCALL_CALL_HC_CAPTURE

전술한 시스템콜(211)의 예로서 다음과 같이 정의될 수 있다.As an example of the above-described system call 211, it may be defined as follows.

SYSCALL_DEFINE4(SYSCALL_CALL_HC_CAPTURE, int __user , nIndex, unsigned char __user *, pFrame, int __user *, nWidth, int __user *, nHeight)SYSCALL_DEFINE4(SYSCALL_CALL_HC_CAPTURE, int __user, nIndex, unsigned char __user *, pFrame, int __user *, nWidth, int __user *, nHeight)

{{

 int kWidth;int kWidth;

 int kHeight;int kHeight;

 int kIndex;int kIndex;

 kWidth = g_kFBcapture.nWidth;kWidth = g_kFBcapture.nWidth;

 kHeight = g_kFBcapture.nHeight;kHeight = g_kFBcapture.nHeight;

 if(g_isAllocated==1)if(g_isAllocated==1)

{{

if(g_isFBUpdating == 0)if(g_isFBUpdating == 0)

{{

copy_to_user(pFrame, g_kFBcapture.pFbData, g_kFBcapture.nHeight * g_kFBcapture.nWidth * 4);copy_to_user(pFrame, g_kFBcapture.pFbData, g_kFBcapture.nHeight * g_kFBcapture.nWidth * 4);

}}

elseelse

{{

copy_to_user(pFrame, g_kFBcapture.pFbDB, g_kFBcapture.nHeight * g_kFBcapture.nWidth * 4);copy_to_user(pFrame, g_kFBcapture.pFbDB, g_kFBcapture.nHeight * g_kFBcapture.nWidth * 4);

}}

//printk("copy done.");//printk("copy done.");

copy_to_user(nWidth, &kWidth, sizeof(kWidth));copy_to_user(nWidth, &kWidth, sizeof(kWidth));

copy_to_user(nHeight, &kHeight, sizeof(kHeight));copy_to_user(nHeight, &kHeight, sizeof(kHeight));

}}

elseelse

{{

printk("Kernel space memory is not allocated!");printk("Kernel space memory is not allocated!");

}}

kvm_hypercall3(KVM_HC_INJECTEVENT, nIndex, pFrame, nWidth, nHeight);kvm_hypercall3(KVM_HC_INJECTEVENT, nIndex, pFrame, nWidth, nHeight);

return 0;return 0;

}}

----------------------------

SYSCALL_DEFINE2(SYSCALL_CALL_HC_CAPTURE, int __user, nEventType, unsigned char __user *, pEventData,)SYSCALL_DEFINE2(SYSCALL_CALL_HC_CAPTURE, int __user,nEventType, unsigned char __user *, pEventData,)

{{

kvm_hypercall1(KVM_HC_CAPTURESCREEN, &nEventType, pEventData);kvm_hypercall1(KVM_HC_CAPTURESCREEN, &nEventType, pEventData);

return 0;return 0;

}}

전술한 예의 시스템콜(211)은 호스트 OS(100)로 게스트 OS(200)의 스크린 정보, 특히 게스트 사용자 영역(220)의 스크린 캡처 정보를 전달하기 위해 호출되는 것으로, 하이퍼콜의 ID, 스크린의 가로 해상도, 세로 해상도, 스크린 버퍼, 게스트 ID 등을 전달한다. 여기서, 스크린 버퍼는 스크린 버퍼의 주소 정보를 의미한다.The system call 211 of the above-described example is called to transmit screen information of the guest OS 200, in particular, screen capture information of the guest user area 220 to the host OS 100. It conveys the horizontal resolution, vertical resolution, screen buffer, guest ID, etc. Here, the screen buffer means address information of the screen buffer.

다음, 호스트 OS(100)로부터 게스트 OS(200)로 데이터를 전달하는 하나의 예를 들면, 호스트 OS(100)가 키보드 및 마우스 정보 등의 제어 정보를 게스트 OS(200)로 전달하는 데이터 교환의 경우, 전술한 하이퍼콜(320)이 다음과 같이 정의될 수 있다.Next, as an example of transferring data from the host OS 100 to the guest OS 200, the host OS 100 transfers control information such as keyboard and mouse information to the guest OS 200. In this case, the above-described hypercall 320 may be defined as follows.

#define KVM_HC_INJECTEVENT#define KVM_HC_INJECTEVENT

이와 같이 정의되는 하이퍼콜(320)은 또한 아래와 같이 기존의 하이퍼콜(310)에 추가되는 형식으로 정의될 수도 있다. 아래에서는 본 발명의 실시예에 따라 정의된 하이퍼콜(310, 320)의 예가 볼드체로 표시되어 있다.The hypercall 320 defined as described above may also be defined in a form added to the existing hypercall 310 as follows. Below, examples of hypercalls 310 and 320 defined according to an embodiment of the present invention are shown in bold.

#define KVM_HC_VAPIC_POLL_IRQ  1#define KVM_HC_VAPIC_POLL_IRQ  1

#define KVM_HC_MMU_OP   2#define KVM_HC_MMU_OP   2

#define KVM_HC_FEATURES   3#define KVM_HC_FEATURES   3

#define KVM_HC_PPC_MAP_MAGIC_PAGE 4#define KVM_HC_PPC_MAP_MAGIC_PAGE 4

#define KVM_HC_KICK_CPU   5#define KVM_HC_KICK_CPU   5

#define KVM_HC_MIPS_GET_CLOCK_FREQ 6#define KVM_HC_MIPS_GET_CLOCK_FREQ 6

#define KVM_HC_MIPS_EXIT_VM  7#define KVM_HC_MIPS_EXIT_VM  7

#define KVM_HC_MIPS_CONSOLE_OUTPUT 8#define KVM_HC_MIPS_CONSOLE_OUTPUT 8

#define KVM_HC_CLOCK_PAIRING  9#define KVM_HC_CLOCK_PAIRING  9

#define KVM_HC_CAPTURESCREEN  10#define KVM_HC_CAPTURESCREEN  10

#define KVM_HC_INJECTEVENT   11#define KVM_HC_INJECTEVENT   11

마찬가지로, 전술한 하이퍼콜(320)의 함수 본체도 호스트 커널 영역(110), 구체적으로는 KVM(300)에 정의되어 구현되지만, 하이퍼콜(310)의 ID(정수) 매크로를 게스트 커널 영역(210)에서 참조하기 위해 게스트 커널 영역(210)에도 매크로로 정의되어야 한다.Similarly, the function body of the hypercall 320 described above is also defined and implemented in the host kernel area 110, specifically the KVM 300, but the ID (integer) macro of the hypercall 310 is used in the guest kernel area 210 ) Must be defined as a macro in the guest kernel area 210 as well.

또한, 게스트 사용자 영역(220)에서 호스트 OS(200)의 제어 정보를 가져오는 전술한 하이퍼콜(320)을 호출하는 시스템콜(212)이 다음과 같이 추가로 정의될 수 있다.In addition, a system call 212 that calls the above-described hypercall 320 for obtaining control information of the host OS 200 from the guest user area 220 may be additionally defined as follows.

#define SYSCALL_CALL_HC_INJECT#define SYSCALL_CALL_HC_INJECT

전술한 예의 시스템콜은 호스트 OS(100)로부터 키보드/마우스 이벤트(여기서, 이벤트는 이벤트 데이터를 의미함)를 가져오기 위해 호출되는 것으로, 하이퍼콜의 ID, 마우스 이벤트 및 키보드 이벤트를 전달받을 게스트 커널 영역(210)의 메모리 주소 등의 정보를 전달한다.The system call of the above example is called to get a keyboard/mouse event (here, the event means event data) from the host OS 100, and the guest kernel to receive the ID of the hypercall, the mouse event, and the keyboard event. Information such as a memory address of the area 210 is transmitted.

한편, 전술한 바와 같이, 호스트 OS(100)와 게스트 OS(200) 사이의 데이터 교환이 주기적으로 이루어지기 위해서는 주기적으로 게스트 OS(100)를 호출해야 하기 때문에, 구체적으로는 게스트 사용자 영역(220)에서 게스트 커널 영역(210)에 정의된 시스템콜(211, 212)을 호출해야 하기 때문에 특정 주기별로, 예를 들어 30, 60, 90 fps(frame per second), 또는 33 ms/16 ms/11 ms 주기로 해당 시스템콜(211, 212)을 호출하도록 구현될 수 있다. Meanwhile, as described above, in order to exchange data between the host OS 100 and the guest OS 200 periodically, the guest OS 100 needs to be called periodically. Since the system calls (211, 212) defined in the guest kernel area 210 must be called in each specific period, for example, 30, 60, 90 fps (frame per second), or 33 ms/16 ms/11 ms It may be implemented to call the corresponding system calls 211 and 212 periodically.

이하, 도면을 참조하여, 본 발명의 실시예에 따른 호스트 OS(100)와 게스트 OS(200) 사이의 데이터 교환 방법에 대해 구체적으로 설명한다.Hereinafter, a method of exchanging data between the host OS 100 and the guest OS 200 according to an embodiment of the present invention will be described in detail with reference to the drawings.

여기서는, 게스트 OS(200)에서 호스트 OS(100)로 데이터를 전달하는 방식에 대해 설명한다. 이러한 방식에 대해 설명을 용이하게 하기 위해 전술한 예를 사용한다. 즉, 여기에서는 게스트 OS(200)의 스크린 정보, 즉 게스트 사용자 영역(220) 내에 있는 스크린의 캡처 데이터가 저장되는 스크린 버퍼(221) 내에 저장되어 있는 데이터를 호스트 OS(100), 즉 호스트 커널 영역(110)으로 전달하는 방식에 대해 설명하지만, 본 발명은 이러한 예로만 한정되는 것은 아니다.Here, a method of transferring data from the guest OS 200 to the host OS 100 will be described. In order to facilitate explanation of this method, the above-described example is used. That is, here, the screen information of the guest OS 200, that is, data stored in the screen buffer 221 in which the screen capture data of the screen in the guest user area 220 is stored, is the host OS 100, that is, the host kernel area. Although the method of transferring to (110) will be described, the present invention is not limited to this example.

도 3은 본 발명의 실시예에 따른 호스트와 게스트 사이의 데이터 교환 방법의 개략적인 흐름도이고, 도 4는 도 3에 따른 방법을 가상화 시스템에 적용하여 나타낸 도면이다.3 is a schematic flowchart of a method for exchanging data between a host and a guest according to an embodiment of the present invention, and FIG. 4 is a diagram illustrating the method according to FIG. 3 applied to a virtualization system.

먼저, 게스트 사용자 영역(220) 내에 있는 사용자 애플리케이션(221)이 스크린 캡처를 수행하여 획득된 스크린 데이터를 스크린 버퍼(222)에 저장(S100)한 상태에서 스크린 데이터를 호스트 OS(100)로 전달하기 위해 게스트 커널 영역(210) 내에 정의된 시스템콜(211)을 호출한다(S110). 이 때, 호출되는 시스템콜(211)은, 예를 들어 전술한 HC_CAPTURE이다. 또한, 이러한 호출은 주기적으로 수행될 수 있다.First, while the user application 221 in the guest user area 220 performs screen capture and stores the acquired screen data in the screen buffer 222 (S100), the screen data is transferred to the host OS 100 In order to do so, the system call 211 defined in the guest kernel area 210 is called (S110). At this time, the system call 211 to be called is, for example, the aforementioned HC_CAPTURE. Also, these calls can be made periodically.

호출되는 시스템콜(211) 내에 대응되는 하이퍼콜(310)의 ID가 포함되어 있으므로 시스템콜(211)에 의해 호스트 커널 영역(110) 내의 하이퍼콜(310)이 호출되어(S120) 스크린 정보, 즉 스크린의 가로 해상도 및 세로 해상도 정보, 스크린 버퍼(222)의 메모리 주소, 게스트 ID가 하이퍼콜(310)로 전달된다(S120).Since the ID of the corresponding hypercall 310 is included in the called system call 211, the hypercall 310 in the host kernel area 110 is called by the system call 211 (S120), and screen information, that is, The horizontal and vertical resolution information of the screen, the memory address of the screen buffer 222, and the guest ID are transmitted to the hypercall 310 (S120).

호스트 커널 영역(110)에서 호출된 하이퍼콜(310)은 수신된 스크린 정보에 따라 호스트 커널 영역(110) 내에 커널 버퍼(111)를 생성한다(S130). 선택적으로, 커널 버퍼는 스크린 정보 중 스크린의 가로 해상도 및 세로 해상도 정보에 대응하는 크기를 갖도록 생성될 수 있다. 또한, 호출되는 KVM(300) 내에 정의된 하이퍼콜(310)은 전술한 HC_CAPTURESCREEN이다.The hypercall 310 called from the host kernel area 110 generates a kernel buffer 111 in the host kernel area 110 according to the received screen information (S130). Optionally, the kernel buffer may be generated to have a size corresponding to the horizontal resolution and vertical resolution information of the screen information. In addition, the hypercall 310 defined in the called KVM 300 is the aforementioned HC_CAPTURESCREEN.

그 후, 호스트 커널 영역(110)의 하이퍼콜(310)은 스크린 버퍼(222)의 메모리 주소를 사용하여 게스트 사용자 영역(220) 내의 스크린 버퍼(222)에 접근하여 스크린 버퍼(222) 내에 저장된 스크린 데이터를 호스트 커널 영역(110) 내의 커널 버퍼(111)로 복사한다(S140). 이 때, 호스트 커널 영역(110)에서 스크린 버퍼(222)의 메모리 주소를 사용하여 게스트 사용자 영역(220) 내의 스크린 버퍼(222)에 접근하는 것은 예를 들어, kvm_read_guest_mmu 함수를 통해 구현될 수 있다. 또한, 커널 버퍼(111)는 게스트 ID를 통해 구분될 수 있다.Thereafter, the hypercall 310 of the host kernel area 110 accesses the screen buffer 222 in the guest user area 220 using the memory address of the screen buffer 222 and stores the screen in the screen buffer 222. The data is copied to the kernel buffer 111 in the host kernel area 110 (S140). In this case, accessing the screen buffer 222 in the guest user area 220 using the memory address of the screen buffer 222 in the host kernel area 110 may be implemented through, for example, a kvm_read_guest_mmu function. Also, the kernel buffer 111 can be identified through a guest ID.

이와 같이, 본 발명에서는 게스트 커널 영역(210)에 정의된 시스템콜(211) 과 호스트 커널 영역(110)의 KVM(300) 내에 정의된 하이퍼콜(310)을 사용하여 게스트 사용자 영역(220)의 스크린 데이터를 호스트 커널 영역(110)으로 전달할 수 있으므로, 호스트 OS(100)가 스크린 데이터를 사용하여 게스트 OS(200)에 대한 모니터링을 수행할 수 있다. 예를 들어, xwindows/qt/opencv 등을 사용한 미러링을 통해 게스트 OS(200)에 대한 모니터링이 수행될 수 있다.As described above, in the present invention, the system call 211 defined in the guest kernel area 210 and the hypercall 310 defined in the KVM 300 of the host kernel area 110 are used to control the guest user area 220. Since screen data can be transferred to the host kernel area 110, the host OS 100 can monitor the guest OS 200 using the screen data. For example, monitoring of the guest OS 200 may be performed through mirroring using xwindows/qt/opencv or the like.

다음, 호스트 OS(100)에서 게스트 OS(200)로 데이터를 전달하는 방식에 대해 설명한다. 이러한 방식에 대해 설명을 용이하게 하기 위해 전술한 예를 사용한다. 즉, 여기에서는 호스트 OS(100)의 제어 정보, 구체적으로 키보드 이벤트 및 마우스 이벤트를 게스트 OS(200), 즉 게스트 사용자 영역(220)으로 전달하는 방식에 대해 설명한다.Next, a method of transferring data from the host OS 100 to the guest OS 200 will be described. In order to facilitate explanation of this method, the above-described example is used. That is, here, a method of transmitting control information of the host OS 100, specifically a keyboard event and a mouse event, to the guest OS 200, that is, the guest user area 220 will be described.

도 5는 본 발명의 다른 실시예에 따른 호스트와 게스트 사이의 데이터 교환 방법의 개략적인 흐름도이고, 도 6은 도 5에 따른 방법을 가상화 시스템에 적용하여 나타낸 도면이다.5 is a schematic flowchart of a method of exchanging data between a host and a guest according to another embodiment of the present invention, and FIG. 6 is a diagram illustrating the method of FIG. 5 applied to a virtualization system.

먼저, 게스트 사용자 영역(220) 내에 있는 사용자 애플리케이션(221)이 호스트 커널 영역(110)으로부터 키보드 이벤트 및 마우스 이벤트를 가져오기 위해, 게스트 커널 영역(210) 내에 정의된 시스템콜(212)을 호출한다(S200). 이 때, 호출되는 시스템콜(212)은 전술한 HC_INJECT이다. 또한, 이러한 시스템콜(212)의 호출은 주기적으로 수행될 수 있다.First, the user application 221 in the guest user area 220 calls the system call 212 defined in the guest kernel area 210 to get keyboard events and mouse events from the host kernel area 110. (S200). At this time, the system call 212 to be called is HC_INJECT described above. In addition, the system call 212 may be called periodically.

호출된 시스템콜(212)은 게스트 커널 영역(210) 내에 키보드 이벤트 및 마우스 이벤트를 전달받을 메모리 공간(214)을 할당받는다(S210).The called system call 212 is allocated a memory space 214 to receive keyboard events and mouse events in the guest kernel area 210 (S210).

한편, 시스템콜(212) 내에 대응되는 하이퍼콜(320)의 ID가 포함되어 있으므로 시스템콜(212)에 의해 호스트 커널 영역(110) 내의 하이퍼콜(320)이 호출되어, 키보드 이벤트 및 마우스 이벤트를 전달받을 메모리 공간(214)의 메모리 주소가 전달된다(S220). 여기서, 호출되는 호스트 커널 영역(110) 내에 정의된 하이퍼콜(320)은 전술한 HC_INJECTEVENT이다.On the other hand, since the ID of the corresponding hypercall 320 is included in the system call 212, the hypercall 320 in the host kernel area 110 is called by the system call 212, and keyboard events and mouse events are displayed. The memory address of the memory space 214 to be transmitted is transmitted (S220). Here, the hypercall 320 defined in the called host kernel area 110 is the aforementioned HC_INJECTEVENT.

그 후, 호스트 커널 영역(110)에서 호출된 하이퍼콜(320)은 호스트 OS(100)의 키보드 이벤트 및 마우스 이벤트 정보가 입력되는 드라이버 영역(112), 예를 들어 장치 드라이버, /dev/input/event에서 키보드 이벤트 및 마우스 이벤트를 읽어서 메모리 공간(214)의 주소를 사용하여 게스트 커널 영역(210)에 할당된 메모리 공간(214)에 복사한다(S230). 이 때, 호스트 OS(100)의 키보드 이벤트 및 마우스 이벤트 정보를 게스트 커널 영역(210)에 할당된 메모리 공간(214)에 복사하는 것은 예를 들어, kvm_write_guest_mmu 함수를 통해 구현될 수 있다. Thereafter, the hypercall 320 called from the host kernel area 110 is the driver area 112 into which keyboard and mouse event information of the host OS 100 is input, for example, a device driver, /dev/input/ The keyboard events and mouse events are read from the event and copied to the memory space 214 allocated to the guest kernel area 210 by using the address of the memory space 214 (S230). In this case, copying the keyboard event and mouse event information of the host OS 100 to the memory space 214 allocated to the guest kernel area 210 may be implemented through, for example, a kvm_write_guest_mmu function.

그 후, 게스트 커널 영역(210)의 시스템콜(212)은 메모리 공간(214)에 복사된 키보드 이벤트 및 마우스 이벤트를 게스트 커널 영역(210) 내의 드라이버 영역(215), 예를 들어 장치 드라이버, Guest/dev/event에 인젝션한다(S240). 이러한 인젝션을 통해 사용자 애플리케이션(221)로 호스트 커널 영역(110)에서 발생된 키보드 이벤트 및 마우스 이벤트가 전달될 수 있다.Thereafter, the system call 212 of the guest kernel area 210 transmits keyboard events and mouse events copied to the memory space 214 to the driver area 215 in the guest kernel area 210, for example, a device driver, Guest Inject to /dev/event (S240). Through such injection, a keyboard event and a mouse event generated in the host kernel area 110 may be transmitted to the user application 221.

이와 같이, 본 발명에서는 게스트 커널 영역(210)에 정의된 시스템콜(212)과 호스트 커널 영역(110)의 KVM(300) 내에 정의된 하이퍼콜(320)을 사용하여 호스트 커널 영역(110)의 제어 데이터를 게스트 사용자 영역(220)으로 전달할 수 있으므로, 호스트 OS(100)에서 게스트 OS(200)에 대한 제어, 예를 들어 입출력(Input/Output, I/O) 제어를 수행할 수 있다.As described above, in the present invention, the system call 212 defined in the guest kernel area 210 and the hyper call 320 defined in the KVM 300 of the host kernel area 110 are used to control the host kernel area 110. Since control data can be transferred to the guest user area 220, the host OS 100 can control the guest OS 200, for example, input/output (I/O) control.

한편, 전술한 바와 같은 시스템콜(211, 212) 및 하이퍼콜(310, 320)을 통해 게스트 OS(200)에서 호스트 OS(100)로 전달할 수 있는 데이터는 파일(미디어 파일 포함)과 게스트 OS(200)의 모니터링을 위한 게스트 OS(200)의 시스템 상태 등이며, 반대로 호스트 OS(100)에서 게스트 OS(200)로는 호스트 OS(100)가 게스트 OS(200)에서 특정 기능을 수행할 수 있게 트리거를 걸 수 있도록 하는 제어 정보가 전달될 수 있다.Meanwhile, data that can be transferred from the guest OS 200 to the host OS 100 through the system calls 211 and 212 and the hyper calls 310 and 320 as described above are files (including media files) and the guest OS ( 200) is the system status of the guest OS 200 for monitoring, and on the contrary, from the host OS 100 to the guest OS 200, the host OS 100 triggers the guest OS 200 to perform a specific function. Control information can be delivered to enable the user to hang.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있다.The embodiments of the present invention described above are not implemented only through an apparatus and a method, but may be implemented through a program that realizes a function corresponding to the configuration of the embodiment of the present invention or a recording medium in which the program is recorded.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements by those skilled in the art using the basic concept of the present invention defined in the following claims are also provided. It belongs to the scope of rights.

Claims (14)

가상화 시스템에서 호스트 OS(Operating System)와 게스트 OS 사이의 데이터를 교환하는 방법으로서,
상기 게스트 OS의 데이터를 상기 호스트 OS로 복사하기 위해, 상기 게스트 OS에서 실행 중인 특정 애플리케이션에 의해, 상기 게스트 OS의 커널 영역에 정의된 시스템콜(systemcall)이 호출되는 단계 - 상기 시스템콜은 상기 호스트 OS의 커널 영역에 정의된 하이퍼콜의 식별자를 포함함 -,
상기 시스템콜에 의해, 상기 하이퍼콜의 식별자가 사용되어 상기 하이퍼콜이 호출됨으로써, 상기 게스트 OS의 사용자 영역 내의 특정 데이터와 관련된 정보가 상기 하이퍼콜로 전달되는 단계 - 상기 특정 데이터와 관련된 정보는 상기 특정 데이터가 저장된 메모리 주소를 포함함 -,
상기 하이퍼콜에 의해, 상기 호스트 OS의 커널 영역 내에 커널 버퍼가 생성되는 단계, 그리고
상기 하이퍼콜에 의해, 상기 메모리 주소가 사용되어 상기 게스트 OS의 사용자 영역 내의 상기 특정 데이터가 상기 커널 버퍼로 복사되는 단계
를 포함하는 데이터 교환 방법.
As a method of exchanging data between a host OS (Operating System) and a guest OS in a virtualization system,
In order to copy the data of the guest OS to the host OS, a systemcall defined in the kernel area of the guest OS is called by a specific application running in the guest OS.- The system call is the host Contains the identifier of the hypercall defined in the kernel area of the OS -,
By the system call, the hypercall identifier is used and the hypercall is called, so that information related to specific data in the user area of the guest OS is transferred to the hypercall.- The information related to the specific data is Contains the memory address where the data is stored -,
By the hypercall, generating a kernel buffer in the kernel area of the host OS, and
By the hypercall, the memory address is used and the specific data in the user area of the guest OS is copied to the kernel buffer.
Data exchange method comprising a.
제1항에 있어서,
상기 특정 데이터와 관련된 정보는 상기 특정 데이터의 크기 정보를 더 포함하고,
상기 커널 버퍼는 상기 특정 데이터의 크기 정보에 대응되는 크기를 갖도록 생성되는,
데이터 교환 방법.
The method of claim 1,
The information related to the specific data further includes size information of the specific data,
The kernel buffer is created to have a size corresponding to the size information of the specific data,
How to exchange data.
제1항에 있어서,
상기 가상화 시스템이 리눅스(Linux) 기반 가상화 시스템이고, 상기 호스트 OS의 커널 영역 내에 KVM((Kernel-based Virtual Machine)이 포함되어 있는 경우,
상기 커널 버퍼로 복사되는 단계에서, 상기 하이퍼콜에 의해, 상기 KVM의 함수가 사용되어, 상기 게스트 OS의 사용자 영역 내의 상기 특정 데이터가 상기 커널 버퍼로 복사되는,
데이터 교환 방법.
The method of claim 1,
When the virtualization system is a Linux-based virtualization system and a Kernel-based Virtual Machine (KVM) is included in the kernel area of the host OS,
In the step of copying to the kernel buffer, by the hypercall, the function of the KVM is used so that the specific data in the user area of the guest OS is copied to the kernel buffer,
How to exchange data.
제3항에 있어서,
상기 커널 버퍼로 복사되는 단계 후에,
상기 호스트 OS의 커널 영역에 의해, 상기 커널 버퍼에 복사된 데이터를 사용한 미러링을 통해 상기 게스트 OS에 대한 모니터링이 수행되는,
데이터 교환 방법.
The method of claim 3,
After the step of being copied to the kernel buffer,
Monitoring of the guest OS is performed through mirroring using data copied to the kernel buffer by the kernel region of the host OS,
How to exchange data.
제1항에 있어서,
상기 특정 데이터와 관련된 정보는 상기 게스트 OS의 식별자를 더 포함하고,
상기 특정 데이터가 복사될 상기 게스트 OS가 복수 개인 경우, 상기 특정 데이터가 복사될 커널 버퍼는 상기 게스트 OS의 식별자를 사용하여 구분되는,
데이터 교환 방법.
The method of claim 1,
The information related to the specific data further includes an identifier of the guest OS,
When there are a plurality of guest OSs to which the specific data is to be copied, a kernel buffer to which the specific data is to be copied is identified using an identifier of the guest OS,
How to exchange data.
제1항 내지 제5항 중 어느 한 항에 있어서,
상기 특정 데이터는 상기 특정 애플리케이션에 의해 상기 게스트 OS의 스크린이 캡처되어 상기 게스트 OS의 사용자 영역 내의 스크린 버퍼에 저장된 스크린 데이터이고,
상기 특정 데이터의 크기 정보는 상기 스크린의 가로 해상도 및 세로 해상도 정보인,
데이터 교환 방법.
The method according to any one of claims 1 to 5,
The specific data is screen data that the screen of the guest OS is captured by the specific application and stored in a screen buffer in the user area of the guest OS,
The size information of the specific data is information on the horizontal resolution and the vertical resolution of the screen,
How to exchange data.
가상화 시스템에서 호스트 OS(Operating System)와 게스트 OS 사이의 데이터를 교환하는 방법으로서,
상기 호스트 OS의 제어 데이터를 상기 게스트 OS로 복사하기 위해, 상기 게스트 OS에서 실행 중인 특정 애플리케이션에 의해, 상기 게스트 OS의 커널 영역에 정의된 시스템콜이 호출되는 단계 - 상기 시스템콜은 상기 호스트 OS의 커널 영역에 정의된 하이퍼콜의 식별자를 포함함 -,
상기 시스템콜에 의해, 상기 게스트 OS의 커널 영역 내에 메모리 공간이 할당되는 단계,
상기 시스템콜에 의해, 상기 하이퍼콜의 식별자가 사용되어 상기 하이퍼콜이 호출됨으로써, 상기 메모리 공간의 주소가 상기 하이퍼콜로 전달되는 단계,
상기 하이퍼콜에 의해, 상기 메모리 공간의 주소가 사용되어 상기 호스트 OS의 커널 영역 내의 제어 데이터가 상기 게스트 OS의 커널 영역의 상기 메모리 공간으로 복사되는 단계, 그리고
상기 시스템콜에 의해, 상기 메모리 공간에 복사된 제어 데이터가 상기 게스트 OS의 사용자 영역으로 전달되는 단계
를 포함하는 데이터 교환 방법.
As a method of exchanging data between a host OS (Operating System) and a guest OS in a virtualization system,
In order to copy the control data of the host OS to the guest OS, a system call defined in the kernel area of the guest OS is called by a specific application running in the guest OS.- The system call Contains the hypercall identifier defined in the kernel area -,
Allocating a memory space in the kernel area of the guest OS by the system call,
By the system call, the hypercall identifier is used and the hypercall is called, so that the address of the memory space is transferred to the hypercall,
By the hypercall, the address of the memory space is used and control data in the kernel region of the host OS is copied to the memory space of the kernel region of the guest OS, and
Transferring the control data copied to the memory space to the user area of the guest OS by the system call
Data exchange method comprising a.
제7항에 있어서,
상기 제어 데이터가 상기 게스트 OS의 사용자 영역으로 전달되는 단계는,
상기 시스템콜에 의해, 상기 메모리 공간에 복사된 제어 데이터가 상기 게스트 OS의 커널 영역의 장치 드라이버의 영역으로 인젝션되어 구현되는 것인,
데이터 교환 방법.
The method of claim 7,
The step of transferring the control data to the user area of the guest OS,
By the system call, the control data copied to the memory space is implemented by injecting into the device driver area of the kernel area of the guest OS,
How to exchange data.
제7항에 있어서,
상기 가상화 시스템이 리눅스(Linux) 기반 가상화 시스템이고, 상기 호스트 OS의 커널 영역 내에 KVM((Kernel-based Virtual Machine)이 포함되어 있는 경우,
상기 메모리 공간으로 복사되는 단계에서, 상기 하이퍼콜에 의해, 상기 KVM의 함수가 사용되어, 상기 호스트 OS의 커널 영역의 제어 데이터가 상기 게스트 OS의 커널 영역의 메모리 공간으로 복사되는,
데이터 교환 방법.
The method of claim 7,
When the virtualization system is a Linux-based virtualization system and a Kernel-based Virtual Machine (KVM) is included in the kernel area of the host OS,
In the step of copying to the memory space, the KVM function is used by the hypercall, so that control data of the kernel region of the host OS is copied to the memory space of the kernel region of the guest OS,
How to exchange data.
제7항 내지 제9항 중 어느 한 항에 있어서,
상기 제어 데이터는 상기 호스트 OS의 커널 영역의 드라이버 영역을 통해 입력되는 키보드 이벤트 및 마우스 이벤트의 데이터이고,
상기 시스템콜 및 상기 호스트콜에 의해, 상기 호스트 OS의 커널 영역의 제어 데이터가 상기 게스트 OS의 커널 영역의 장치 드라이버의 제어 데이터로서 인젝션되어, 상기 게스트 OS에 대한 입출력 제어가 가능한,
데이터 교환 방법.
The method according to any one of claims 7 to 9,
The control data is data of a keyboard event and a mouse event input through a driver area of the kernel area of the host OS,
By the system call and the host call, control data of the kernel area of the host OS is injected as control data of the device driver of the kernel area of the guest OS, so that input/output control for the guest OS is possible,
How to exchange data.
가상화 시스템으로서,
가상화를 제공하기 위해 하드웨어에 직접적으로 접근하여 제어를 수행하며,커널 영역과 사용자 영역으로 구성되는 호스트 OS(Operating System), 그리고
상기 호스트 OS의 사용자 영역 내에 설치되며, 게스트 OS의 커널 영역 및 사용자 영역으로 구성되는 하나 이상의 게스트 머신
을 포함하며,
상기 게스트 OS의 사용자 영역 내의 데이터를 상기 호스트 OS의 커널 영역으로 복사하기 위해, 상기 게스트 OS의 커널 영역에 제1 시스템콜이 정의되어 있고, 상기 호스트 OS의 커널 영역에 상기 제1 시스템콜과 연관된 제1 하이퍼콜이 정의되어 있으며,
상기 게스트 OS의 사용자 영역 내의 특정 애플리케이션에 의해 상기 제1 시스템콜이 호출되는 경우, 상기 제1 시스템콜과 연관된 상기 제1 하이퍼콜이 호출되어, 상기 게스트 OS의 사용자 영역 내의 특정 데이터와 관련된 정보가 상기 제1 하이퍼콜로 전달되고,
상기 제1 하이퍼콜에 의해 상기 특정 데이터와 관련된 정보가 사용되어 상기 게스트 OS의 사용자 영역 내의 특정 데이터가 상기 제1 하이퍼콜에 의해 상기 호스트 OS의 커널 영역 내에 생성된 커널 버퍼로 복사되며,
상기 특정 데이터의 상기 커널 버퍼로의 복사는 상기 특정 데이터와 관련된 정보에 포함된 상기 특정 데이터가 저장된 메모리 주소가 상기 제1 하이퍼콜에 의해 사용되어 수행되는,
가상화 시스템.
As a virtualization system,
To provide virtualization, it directly accesses the hardware and performs control, and the host OS (Operating System) consisting of a kernel area and a user area, and
One or more guest machines installed in the user area of the host OS and composed of a kernel area and a user area of the guest OS
Including,
In order to copy data in the user area of the guest OS to the kernel area of the host OS, a first system call is defined in the kernel area of the guest OS, and is associated with the first system call in the kernel area of the host OS. The first hypercall is defined,
When the first system call is called by a specific application in the user area of the guest OS, the first hypercall associated with the first system call is called, so that information related to specific data in the user area of the guest OS is Delivered to the first hypercall,
Information related to the specific data is used by the first hypercall, so that specific data in the user area of the guest OS is copied to a kernel buffer created in the kernel area of the host OS by the first hypercall,
The copying of the specific data to the kernel buffer is performed by using a memory address in which the specific data included in the information related to the specific data is stored is used by the first hypercall,
Virtualization system.
제11항에 있어서,
상기 호스트 OS의 커널 영역의 제어 데이터를 상기 게스트 OS의 커널 영역으로 복사하기 위해, 상기 게스트 OS 커널 영역에 제2 시스템콜이 추가로 정의되어 있고, 상기 호스트 OS의 커널 영역에 상기 제2 시스템콜과 연관된 제2 하이퍼콜이 추가로 정의되어 있으며,
상기 게스트 OS의 사용자 영역 내의 특정 애플리케이션에 의해 상기 제2 시스템콜이 호출되는 경우 상기 제2 시스템콜과 연관된 상기 제2 하이퍼콜이 호출되어, 상기 제2 시스템콜에 의해 상기 게스트 OS의 커널 영역에 할당된 메모리 공간의 주소가 상기 제2 하이퍼콜로 전달되고,
상기 제2 하이퍼콜에 의해 상기 메모리 공간의 주소가 사용되어 상기 호스트 OS의 커널 영역의 제어 데이터가 상기 메모리 공간으로 복사된 후, 상기 제2 시스템콜에 의해 상기 사용자 영역으로 전달되는,
가상화 시스템.
The method of claim 11,
In order to copy the control data of the kernel area of the host OS to the kernel area of the guest OS, a second system call is additionally defined in the kernel area of the guest OS, and the second system call is included in the kernel area of the host OS. A second hypercall associated with is additionally defined,
When the second system call is called by a specific application in the user area of the guest OS, the second hypercall associated with the second system call is called, and the kernel area of the guest OS is called by the second system call. The address of the allocated memory space is transferred to the second hypercall,
After the address of the memory space is used by the second hypercall and control data of the kernel region of the host OS is copied to the memory space, it is transferred to the user region by the second system call,
Virtualization system.
제11항에 있어서,
상기 특정 데이터는 상기 특정 애플리케이션에 의해 상기 게스트 OS의 스크린이 캡처되어 상기 게스트 OS의 사용자 영역 내의 스크린 버퍼에 저장된 스크린 데이터인,
가상화 시스템.
The method of claim 11,
The specific data is screen data that the screen of the guest OS is captured by the specific application and stored in a screen buffer in a user area of the guest OS,
Virtualization system.
제12항에 있어서,
상기 제어 데이터는 상기 호스트 OS의 커널 영역의 드라이버 영역을 통해 입력되는 키보드 이벤트 및 마우스 이벤트의 데이터이고,
상기 제2 시스템콜에 의해 상기 사용자 영역으로 전달되는 것은,
상기 제2 시스템콜에 의해 상기 메모리 공간에 복사된 데이터가 상기 게스트 OS의 커널 영역의 드라이버 영역의 제어 데이터로서 인젝션됨으로써 수행되는,
가상화 시스템.
The method of claim 12,
The control data is data of a keyboard event and a mouse event input through a driver area of the kernel area of the host OS,
Delivered to the user area by the second system call,
The data copied to the memory space by the second system call is injected as control data of the driver region of the kernel region of the guest OS,
Virtualization system.
KR1020190148922A 2019-11-19 2019-11-19 Virtualization system and data exchange method between host and guest in the sytstem KR20210061108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190148922A KR20210061108A (en) 2019-11-19 2019-11-19 Virtualization system and data exchange method between host and guest in the sytstem

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190148922A KR20210061108A (en) 2019-11-19 2019-11-19 Virtualization system and data exchange method between host and guest in the sytstem

Publications (1)

Publication Number Publication Date
KR20210061108A true KR20210061108A (en) 2021-05-27

Family

ID=76135870

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190148922A KR20210061108A (en) 2019-11-19 2019-11-19 Virtualization system and data exchange method between host and guest in the sytstem

Country Status (1)

Country Link
KR (1) KR20210061108A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024025286A1 (en) * 2022-07-29 2024-02-01 삼성전자 주식회사 Electronic device, and method for executing application in multi-os environment using same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024025286A1 (en) * 2022-07-29 2024-02-01 삼성전자 주식회사 Electronic device, and method for executing application in multi-os environment using same

Similar Documents

Publication Publication Date Title
US11836515B2 (en) Multi-hypervisor virtual machines
Steinberg et al. NOVA: A microhypervisor-based secure virtualization architecture
Zhou et al. A bare-metal and asymmetric partitioning approach to client virtualization
US10691363B2 (en) Virtual machine trigger
US7685635B2 (en) Systems and methods for multi-level intercept processing in a virtual machine environment
Shuja et al. A survey of mobile device virtualization: Taxonomy and state of the art
JP4665040B2 (en) Computer and access control method
EP3388934A1 (en) Method and apparatus for processing read/write request in physical host
Xiong et al. Libvmi: a library for bridging the semantic gap between guest OS and VMM
Dong et al. Extending Xen with Intel Virtualization Technology.
KR20180099682A (en) Systems and Methods for Virtual Machine Auditing
JP2008530706A (en) Method, apparatus and system for dynamically reallocating memory from one virtual machine to another
CN101876954B (en) Virtual machine control system and working method thereof
Drepper The Cost of Virtualization: Software developers need to be aware of the compromises they face when using virtualization technology.
Scordino et al. Real-time virtualization for industrial automation
KR20210061108A (en) Virtualization system and data exchange method between host and guest in the sytstem
Grinberg et al. Architectural virtualization extensions: A systems perspective
CN104468307A (en) Real-time communication system based on virtual machine
Im et al. On-demand Virtualization for Post-copy OS Migration in Bare-metal Cloud
Tan et al. How Low Can You Go? Practical cold-start performance limits in FaaS
Benbachir et al. Hypertracing: Tracing through virtualization layers
Klimiankou Towards practical multikernel OSes with MySyS
KR20080079124A (en) Apparatus and method for controlling access to system resource
Kilic Scaling Virtual Processors for Parallel Applications in Virtual Machines
Long et al. GearV: A Two-Gear Hypervisor for Mixed-Criticality IoT Systems