A virtual machine system running method and device, electronic equipment, medium and product
By introducing a service virtual machine to specifically operate the storage controller in the virtual machine system, the data storage problem caused by backend virtual machine failures was solved, and the stable operation and high reliability of the virtual machine system were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI LIXIANG AUTOMOBILE CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, backend virtual machines are prone to failure when running a large number of services, which can prevent frontend virtual machines from accessing the storage controller and affect data storage functionality.
A service virtual machine is introduced as the master virtual machine, which is specifically responsible for the operation of the storage controller, while the business virtual machine only performs business processing. The service virtual machine does not have business processing functions. The storage controller is operated through the service virtual machine to complete data storage and perform data backup and recovery in case of failure.
It reduces the probability of service virtual machine failures, ensures the stable operation of the virtual machine system, avoids the problem of being unable to access the storage controller when the business virtual machine fails, and improves the reliability and stability of the system.
Smart Images

Figure CN122152425A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, medium and product for running a virtual machine system. Background Technology
[0002] In traditional automotive design, systems are typically independent, each operating and performing specific functions. However, with the continuous development of automotive technology, multi-domain integration has become a trend. Through multi-domain integration, systems in different domains can achieve more efficient information sharing and collaborative control, thereby improving the overall performance, safety, and reliability of the vehicle. Virtualization technology allows systems from different domains to run on the same high-performance chip, while simultaneously isolating multiple systems from each other and preventing them from interfering with each other.
[0003] In existing technologies, two virtual machines are deployed on a virtualization platform, such as a virtual machine corresponding to an autonomous driving system and a virtual machine corresponding to a multimedia system. One of the two virtual machines acts as the backend, which is the virtual machine that actually operates the storage controller, while the other virtual machine acts as the frontend.
[0004] However, the problem with the existing technology is that when the backend virtual machine is running a large number of services, there may be situations where the backend virtual machine encounters a failure and hangs. When the backend virtual machine fails, access to the storage controller will also be problematic, causing the frontend virtual machine to be unable to access the storage controller and thus unable to use the data storage function. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, medium, and product for running a virtual machine system, in order to solve the problem of high failure rate caused by operating storage controllers using business virtual machines in the prior art.
[0006] According to one aspect of the present invention, a method for operating a virtual machine system is provided. The virtual machine system is implemented based on a chip and includes: a virtual machine monitor, at least two business virtual machines, and a service virtual machine, wherein the business virtual machines are slave virtual machines, and the service virtual machines are master virtual machines; the method includes:
[0007] The service virtual machine performs data storage by operating the storage controller set on the chip according to the storage operation request of the business virtual machine;
[0008] The service virtual machine sends the storage results fed back by the storage controller to the business virtual machine;
[0009] The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
[0010] According to another aspect of the present invention, a virtual machine system is provided, comprising: a virtual machine monitor, at least two business virtual machines and a service virtual machine, wherein the business virtual machines are slave virtual machines and the service virtual machines are master virtual machines;
[0011] The service virtual machine is used to operate the storage controller set on the chip to perform data storage according to the storage access request of the business virtual machine;
[0012] The service virtual machine is used to send the storage results fed back by the storage controller to the business virtual machine;
[0013] The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising at least one processor configured on a chip, and a memory controller and a memory device communicatively connected to the at least one processor;
[0015] The storage device stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the virtual machine system operation method according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the virtual machine system operation method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the virtual machine system operation method described in any embodiment of the present invention.
[0018] The technical solution of this invention completes data storage by operating the storage controller through a service virtual machine in the virtual machine system. The service virtual machine does not have business processing functions, which solves the problem of high failure rate caused by using a business virtual machine to operate the storage controller in the prior art. On the one hand, since the service virtual machine does not perform business processing, the probability of service virtual machine failure can be greatly reduced. On the other hand, using the service virtual machine to operate the storage controller can effectively avoid the problem of not being able to access the storage controller due to a failure of the business virtual machine, thus ensuring the stable operation of the virtual machine system.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A schematic diagram of the structure of a virtual machine system provided for the present technology;
[0022] Figure 2 This is a flowchart illustrating a virtual machine system operation method provided in Embodiment 1 of the present invention;
[0023] Figure 3 This is a flowchart illustrating a virtual machine system operation method provided in Embodiment 2 of the present invention;
[0024] Figure 4 This is a flowchart illustrating a virtual machine system operation method provided in Embodiment 3 of the present invention;
[0025] Figure 5 This is a schematic diagram of the structure of a virtual machine system provided in Embodiment 4 of the present invention;
[0026] Figure 6 This is a schematic diagram of the structure of an electronic device for a virtual machine system operation method according to an embodiment of the present invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. It should be understood that the various steps described in the method embodiments of the present invention can be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0028] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0031] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0032] Figure 1 A schematic diagram of the structure of a virtual machine system provided for the prior art, such as Figure 1 As shown, the virtual machine system includes a hypervisor and two business virtual machines. The system runs on a system-on-chip (SOC). VM1 and VM2 are the two business virtual machines. VM1 is the master virtual machine, which usually acts as the backend and can operate the storage controller on the chip. VM2 is the slave virtual machine, which usually acts as the frontend.
[0033] If virtual machine VM2 needs to store data, it can encapsulate the storage operation request through a standard virtio protocol and send the storage operation request to the host virtual machine VM1 through the hypervisor. After receiving the storage operation request, the host virtual machine VM1 can initiate the actual storage operation to realize the data storage function of VM2.
[0034] Since the primary virtual machine VM1 often fails when it is used as a business virtual machine to handle a large number of business operations, when the primary virtual machine VM1 fails, VM1 is also unable to operate the storage controller, which will cause the secondary virtual machine VM2 to also be unable to perform data storage functions.
[0035] Example 1
[0036] Figure 2 This is a flowchart illustrating a virtual machine system operation method provided in Embodiment 1 of the present invention. This method is applicable to reducing the occurrence of virtual machine failures within a virtual machine system. This method can be executed by a virtual machine system, which can be implemented by software and is generally integrated into an electronic device. In this embodiment, the electronic device includes, but is not limited to, a computer device.
[0037] like Figure 2 As shown in Embodiment 1 of the present invention, a virtual machine system operation method is provided. The virtual machine system is implemented based on a chip and includes: a virtual machine monitor, at least two business virtual machines and a service virtual machine, wherein the business virtual machines are slave virtual machines and the service virtual machines are master virtual machines.
[0038] In this embodiment, virtualization technology can be used to run software systems that run on multiple different chips on the same high-performance chip. One of the main functions of virtualization is to provide security isolation for virtual machines in the virtualization system, so that a failure of one virtual machine will not affect the overall operation of another virtual machine.
[0039] In this context, a virtual machine can be understood as an instance running on a virtualization platform. Different software systems with different functions can be used as virtual machine instances. A business virtual machine can be understood as a virtual machine that processes business operations. One business virtual machine can process one business operation. For example, the autonomous driving system of a vehicle can be used as a business virtual machine, which runs the autonomous driving business. A service virtual machine can be understood as a virtual machine that provides data storage services for the business virtual machines. Service virtual machines do not have business processing functions and cannot receive business processing requests.
[0040] The virtual machine monitor can be used to create and control virtual machines. In this embodiment, the virtual machine monitor can be used to control business virtual machines and service virtual machines.
[0041] In this embodiment, the service virtual machine can be the master virtual machine, which is usually the backend and has the function of actually operating the storage controller; the business virtual machine can be the slave virtual machine, which is usually the frontend and cannot actually control the storage controller. It can only operate the storage controller through the service virtual machine to complete data storage.
[0042] The method includes:
[0043] S110, the service virtual machine, performs data storage by operating the storage controller set on the chip according to the storage operation request of the business virtual machine.
[0044] In this embodiment, when a business virtual machine needs to store data, it can encapsulate the storage operation request through the Virtio protocol and send it to the shared memory area located in the first software layer. The first virtual machine monitor (hypervisor) runs in the first software layer, the business virtual machine runs in the second software layer, and the shared memory area is used for data buffering and exchange. The service virtual machine can retrieve the storage operation request from the shared memory area and operate the storage controller set on the chip to store data according to the storage operation request.
[0045] The business virtual machine does not actually operate the storage controller to store data; the storage operation requests it sends are merely access requests to the service virtual machine. The service virtual machine is the one that actually operates the storage controller.
[0046] S120, the service virtual machine sends the storage results fed back by the storage controller to the business virtual machine.
[0047] The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
[0048] In this embodiment, after the storage controller completes data storage, it can feed back the storage results to the service virtual machine. The service virtual machine can send the storage results to the business virtual machine in the following two ways:
[0049] Method 1: The service virtual machine can directly send the stored results to the business virtual machine;
[0050] Method 2: The service virtual machine can send the stored results to the shared memory area located in the first software layer, so that the business virtual machine can retrieve the stored results from the shared memory area.
[0051] The storage result can characterize whether the storage was successful; for example, the storage result can be either storage successful or storage failed.
[0052] In this embodiment, the business virtual machine has business processing capabilities. Due to the complexity of business processing, the business virtual machine often fails. The service virtual machine does not have business processing capabilities and only serves as a storage backend, so its failure probability is low.
[0053] The present invention provides a virtual machine system operation method. First, a service virtual machine operates a storage controller on a chip to perform data storage according to a storage operation request from a business virtual machine. Then, the service virtual machine sends the storage result fed back by the storage controller to the business virtual machine. This method completes data storage by having a service virtual machine in the virtual machine system operate the storage controller. Since the service virtual machine does not have business processing functions and only acts as a storage backend, the probability of service virtual machine failure can be greatly reduced, ensuring the stable operation of the virtual machine system.
[0054] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0055] In one embodiment, each of the service virtual machines supports different service processing functions, which are vehicle service processing functions, including: vehicle control domain service functions, driving domain service functions, and cockpit domain service functions.
[0056] The vehicle control domain can include chassis systems, window systems, thermal control systems, and instrument systems, while the driving domain can include autonomous driving systems, driver assistance systems, and in-vehicle navigation systems. The cockpit domain can include seat systems, multimedia systems, and display systems.
[0057] It should be noted that in the past, systems on different domain controllers, such as the chassis system in the vehicle control domain and the autonomous driving system in the driving domain, ran on different chips. In this embodiment, virtualization technology is used to run systems on different domains on the same chip, with one system corresponding to one virtual machine. For example, the window system in the vehicle domain is a business virtual machine, and the autonomous driving system in the driving domain is a business virtual machine.
[0058] Different business virtual machines execute different business functions. For example, the business virtual machine corresponding to the autonomous driving system can execute autonomous driving business, the thermal control system in the vehicle control domain can execute temperature regulation business, and the seat system in the cockpit domain can execute seat adjustment business.
[0059] In this embodiment, virtualization technology can greatly save hardware resources by running systems from different domains on the same chip.
[0060] Example 2
[0061] Figure 3 This is a flowchart illustrating a virtual machine system operation method according to Embodiment 2 of the present invention. Embodiment 2 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to Embodiment 1.
[0062] like Figure 3 As shown in Embodiment 2 of the present invention, a virtual machine system operation method is provided. The virtual machine system is implemented based on a chip and includes: a virtual machine monitor, at least two business virtual machines, and a service virtual machine. The business virtual machines are slave virtual machines, and the service virtual machines are master virtual machines. The method includes the following steps:
[0063] S210, the service virtual machine, performs data storage by operating the storage controller set on the chip according to the storage operation request of the business virtual machine.
[0064] S220, the service virtual machine sends the storage results fed back by the storage controller to the business virtual machine.
[0065] The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
[0066] S230. When the virtual machine monitor determines that the service virtual machine has failed, back up the running data during the interaction between the service virtual machine and the business virtual machine, and suspend the business processing function of the business virtual machine.
[0067] The virtual machine monitor can determine if a service virtual machine has failed in the following two ways:
[0068] Method 1: When a service virtual machine detects a failure, it can send the failure information to the virtual machine monitor so that the virtual machine monitor is aware of the failure.
[0069] Method 2: Use the virtual machine monitor to monitor whether the service virtual machine is malfunctioning in real time.
[0070] In this embodiment, when a service virtual machine fails, the virtual machine monitor can suspend the storage control function of the service virtual machine and suspend the service processing function supporting the business virtual machine until the service virtual machine recovers from the failure.
[0071] In this embodiment, when a service virtual machine is determined to have failed, the virtual machine monitor can quickly back up the running data during the interaction between the service virtual machine and the business virtual machine. The virtual machine monitor can also control the business virtual machine to suspend business processing.
[0072] The methods by which the virtual machine monitor controls the service virtual machines to suspend service processing can include:
[0073] Method 1: The virtual machine monitor sends an interruption request to the business virtual machine, and the business virtual machine suspends business processing upon receiving the interruption request;
[0074] Method 2: The virtual machine monitor sends an interruption request to the business virtual machine, which prioritizes processing the interruption request, resulting in the suspension of business processing.
[0075] S240. After the virtual machine monitor confirms that the service virtual machine that failed has recovered, it restores the backed-up running data and restores the business processing function of the service virtual machine.
[0076] In this embodiment, the faulty service virtual machine can be repaired in various ways. Since the virtual machine monitor monitors the service virtual machine in real time, it can know when the faulty service virtual machine has recovered. One feasible method is for the virtual machine monitor to restart the faulty service virtual machine to achieve fault recovery. Because the service virtual machine has a simple structure, it can be restarted quickly.
[0077] In this embodiment, after the service virtual machine recovers from the failure, the virtual machine monitor can restore the backed-up runtime data to the original storage area to restore the link with the service virtual machine and control the service virtual machine to resume service operation.
[0078] The virtual machine monitor can control the virtual machines of the business to resume business operations in the following ways:
[0079] Method 1: The virtual machine monitor sends an end interruption request. After receiving the end interruption request, the business virtual machine processes the business.
[0080] Method 2: The virtual machine monitor stops sending interrupt requests to the business virtual machine. When the business virtual machine does not receive any interrupt requests, it continues to process business operations.
[0081] Embodiment 2 of the present invention provides a method for operating a virtual machine system, including a process for handling a service virtual machine failure. When a service virtual machine fails, the virtual machine monitor employs a strategy of data backup, service suspension, and rapid service recovery after failure, which can quickly restore the normal operation of the system.
[0082] Furthermore, the operational data includes storage operation requests sent by the business virtual machine and business data. The virtual machine monitor runs in the first software layer, and the business virtual machine runs in the second software layer. The first software layer and the second software layer are different software layers on the virtual machine system.
[0083] When the virtual machine monitor determines that the service virtual machine has failed, it controls the backup of the runtime data during the interaction between the service virtual machine and the business virtual machine, including:
[0084] When the virtual machine monitor determines that the service virtual machine has failed, the storage operation request and the business data are backed up to the preset storage area of the first software layer;
[0085] The virtual machine monitor restarts the service virtual machine after the fault recovery, restores the storage operation requests in the preset storage area to the shared memory area of the first software layer, and restores the business data in the preset storage area to the second software layer.
[0086] The virtual machine monitor and the business virtual machines run in different software layers. For example, if the virtual machine system uses an arm64 architecture, the business virtual machines run in the el0 / el1 layer, and the virtual machine monitor runs in the el2 layer. The shared memory area is located in the first software layer and is used for data buffering and exchange. The business virtual machines send storage operation requests encapsulated in the virtio protocol to the shared memory area for caching. Then, the service virtual machines can retrieve storage operation requests from the shared memory area and operate the storage controller to complete data storage according to the storage operation requests.
[0087] The runtime data during the interaction between the service virtual machine and the business virtual machine may include storage operation requests encapsulated by the virtio protocol and business data from the business virtual machine.
[0088] In this embodiment, when the service virtual machine is not faulty, the storage operation requests encapsulated by the virtio protocol are stored in the shared memory area of the first software layer, and the business data is stored in the second software layer. When the service virtual machine fails, both the storage operation requests and the business data can be backed up to a preset storage area in the first software layer. This preset storage area is a pre-set storage area different from the shared memory area. When the service virtual machine recovers from the fault, the data backed up to the preset storage area can be restored to the original storage area. That is, the storage operation requests in the preset storage area are restored to the shared memory area of the first software layer, and the business data in the preset storage area is restored to the second software layer.
[0089] Furthermore, the virtual machine monitor runs in the first software layer, and the business virtual machine runs in the second software layer.
[0090] The virtual machine monitor suspends the service processing functions of the service virtual machine, including:
[0091] The virtual machine monitor controls the running business virtual machine to migrate to the first software layer to suspend the business processing function of the business virtual machine;
[0092] The virtual machine monitor controls the migration of the business virtual machine from the first software layer to the second software layer to restore the business processing function of the business virtual machine.
[0093] The business virtual machine runs on the second software layer. If the business virtual machine is migrated from the second software layer to the first software layer, the business virtual machine will not be able to run normally and will therefore be unable to process business. If the business virtual machine is migrated from the first software layer back to the second software layer, the business virtual machine can run normally and thus restore business processing function.
[0094] Example 3
[0095] Figure 4 This is a flowchart illustrating a virtual machine system operation method according to Embodiment 3 of the present invention. Embodiment 3 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to Embodiments 1 and 2.
[0096] like Figure 4 As shown in Embodiment 3 of the present invention, a virtual machine system operation method is provided. The virtual machine system is implemented based on a chip and includes: a virtual machine monitor, at least two business virtual machines, and a service virtual machine. The business virtual machines are slave virtual machines, and the service virtual machines are master virtual machines. The method includes the following steps:
[0097] S310, the service virtual machine, operates the storage controller set on the chip to perform data storage according to the storage operation request of the business virtual machine.
[0098] S320, the service virtual machine sends the storage results fed back by the storage controller to the business virtual machine.
[0099] The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
[0100] S330. When the business virtual machine detects a fault, the built-in fault handling logic handles the fault.
[0101] In this embodiment, when a business virtual machine fails, the built-in fault handling logic can handle the fault without affecting other business virtual machines or service virtual machines, and it can handle the fault itself.
[0102] There are many methods for handling faults in business virtual machines, which will not be listed here. Commonly used methods include reset and restart and power off.
[0103] If one of the business virtual machines fails, since each business virtual machine acts as the front end and does not operate the storage controller, which is controlled by the back-end service virtual machines, the failure of one business virtual machine will not affect the data storage of other business virtual machines.
[0104] S340. The virtual machine monitor restarts the service virtual machine that failed, backs up the running data during the interaction between the service virtual machine and the business virtual machine, and suspends the business processing function of the business virtual machine.
[0105] S350. After the virtual machine monitor confirms that the service virtual machine that failed has recovered, it restores the backed-up running data and restores the business processing function of the service virtual machine.
[0106] Embodiment 3 of the present invention provides a virtual machine system operation method, which includes handling the failure of a business virtual machine. In this method, each business virtual machine acts as a front end and does not operate the storage controller; therefore, a failure of one business virtual machine will not affect the business processing functions of other business virtual machines.
[0107] Example 4
[0108] Figure 5 This is a schematic diagram of a virtual machine system provided in Embodiment 4 of the present invention. The system is applicable to reducing the occurrence of virtual machine failures within the virtual machine system. The system can be implemented by software and is generally integrated into electronic devices.
[0109] like Figure 5 As shown, the system includes: a virtual machine monitor 110, at least two business virtual machines 120 and a service virtual machine 130, wherein the business virtual machine 120 is a slave virtual machine and the service virtual machine 130 is a master virtual machine;
[0110] Service virtual machine 130 is used to operate the storage controller set on the chip to store data according to the storage access request of business virtual machine 120;
[0111] Service virtual machine 130 is used to send the storage results fed back by the storage controller to business virtual machine 120;
[0112] Among them, business virtual machine 120 is configured to perform business processing functions, while service virtual machine 130 is configured to have no business processing functions.
[0113] This embodiment provides a virtual machine system that can greatly reduce the probability of service virtual machine failure, thereby ensuring the stable operation of the virtual machine system.
[0114] Furthermore, the virtual machine monitor 110 is used for:
[0115] When it is determined that the service virtual machine 130 has failed, the running data during the interaction between the service virtual machine 130 and the business virtual machine 120 is backed up, and the business processing function of the business virtual machine 120 is suspended.
[0116] After confirming that the service virtual machine 130 that failed has recovered, restore the backed-up runtime data and restore the business processing functions of the business virtual machine 120.
[0117] Based on the above optimizations, the running data includes storage operation requests sent by the business virtual machine 120 and business data. The virtual machine monitor 110 runs in the first software layer, and the business virtual machine 120 runs in the second software layer. The first software layer and the second software layer are different software layers on the virtual machine system.
[0118] Virtual machine monitor 110 is used to: when a service virtual machine 130 fails, back up the storage operation request and the business data to a preset storage area of the first software layer;
[0119] The virtual machine monitor 110 is used to: restart the service virtual machine 130 after the fault recovery, restore the storage operation requests in the preset storage area to the shared memory area of the first software layer, and restore the business data in the preset storage area to the second software layer.
[0120] The virtual machine monitor 110 is also used to: control the running business virtual machine to migrate to the first software layer, so as to suspend the business processing function of the business virtual machine;
[0121] The virtual machine monitor 110 is also used to: control the migration of the business virtual machine from the first software layer to the second software layer to restore the business processing function of the business virtual machine.
[0122] Furthermore, the business virtual machine 120 is also used to handle faults by its built-in fault handling logic when it detects a fault in itself.
[0123] Furthermore, each business virtual machine supports different business processing functions, which are vehicle business processing functions, including: vehicle control domain business functions, driving domain business functions, and cockpit domain business functions.
[0124] The virtual machine system described above can execute the virtual machine system running method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0125] Example 5
[0126] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of the present invention is shown. For example... Figure 6As shown, the electronic device 10 includes at least one processor 11 configured on a chip, and a memory controller and memory devices, such as read-only memory (ROM) 12 and random access memory (RAM) 13, which are communicatively connected to the at least one processor 11. The memory devices store computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from memory cell 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0127] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0128] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as virtual machine system operation methods.
[0129] In some embodiments, the virtual machine system operation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the virtual machine system operation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the virtual machine system operation method by any other suitable means (e.g., by means of firmware).
[0130] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0131] In some embodiments, the virtual machine system operation method may be implemented as a computer program, which is implicitly included in a computer program product. When executed by a processor, the computer program implements the virtual machine system operation method of the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a standalone software package, or entirely on a remote machine or server.
[0132] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0133] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0134] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0135] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0136] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0137] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for running a virtual machine system, characterized in that, The virtual machine system is implemented based on a chip and includes: a virtual machine monitor, at least two business virtual machines, and a service virtual machine, wherein the business virtual machines are slave virtual machines, and the service virtual machines are master virtual machines; the method includes: The service virtual machine performs data storage by operating the storage controller set on the chip according to the storage operation request of the business virtual machine; The service virtual machine sends the storage results fed back by the storage controller to the business virtual machine; The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
2. The method according to claim 1, characterized in that, Also includes: When the virtual machine monitor determines that the service virtual machine has failed, it backs up the running data during the interaction between the service virtual machine and the business virtual machine, and suspends the business processing function of the business virtual machine. After the virtual machine monitor confirms that the service virtual machine that failed has recovered, it restores the backed-up runtime data and restores the business processing functions of the service virtual machine.
3. The method according to claim 2, characterized in that, The operational data includes storage operation requests and business data sent by the business virtual machine. The virtual machine monitor runs in the first software layer, and the business virtual machine runs in the second software layer. The first software layer and the second software layer are different software layers on the virtual machine system. When the virtual machine monitor determines that the service virtual machine has failed, it controls the backup of the runtime data during the interaction between the service virtual machine and the business virtual machine, including: When the virtual machine monitor determines that the service virtual machine has failed, the storage operation request and the business data are backed up to the preset storage area of the first software layer; The virtual machine monitor restarts the service virtual machine after the fault recovery, restores the storage operation requests in the preset storage area to the shared memory area of the first software layer, and restores the business data in the preset storage area to the second software layer.
4. The method according to claim 2, characterized in that, The virtual machine monitor runs in the first software layer, and the business virtual machine runs in the second software layer. The virtual machine monitor suspends the service processing functions of the service virtual machine, including: The virtual machine monitor controls the running business virtual machine to migrate to the first software layer to suspend the business processing function of the business virtual machine; The virtual machine monitor controls the migration of the business virtual machine from the first software layer to the second software layer to restore the business processing function of the business virtual machine.
5. The method according to claim 1, characterized in that, Also includes: When the business virtual machine detects a fault, the built-in fault handling logic handles the fault.
6. The method according to claim 1, characterized in that, Each of the aforementioned business virtual machines supports different business processing functions, which are vehicle business processing functions, including: vehicle control domain business functions, driving domain business functions, and cockpit domain business functions.
7. A virtual machine system, characterized in that, include: A virtual machine monitor, at least two business virtual machines, and a service virtual machine, wherein the business virtual machines are slave virtual machines and the service virtual machines are master virtual machines; The service virtual machine is used to operate the storage controller set on the chip to perform data storage according to the storage access request of the business virtual machine; The service virtual machine is used to send the storage results fed back by the storage controller to the business virtual machine; The business virtual machine is configured to perform business processing functions, while the service virtual machine is configured to have no business processing functions.
8. An electronic device, characterized in that, The electronic device includes at least one processor configured on a chip, and a memory controller and a memory device communicatively connected to the at least one processor; The storage device stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the virtual machine system operation method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the virtual machine system operation method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the virtual machine system operation method according to any one of claims 1-6.