SYSTEM RESET VIA A CONTROLLER
By offloading keyboard controller reset port emulation to a platform controller, the system efficiently and securely resets individual VMs in a computer system with multiple VMs, addressing the challenges of hypervisor-based resource consumption and malicious interference.
Patent Information
- Application Number
- DE102021102013
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-02-27
- Filing Date
- 2021-01-28
- Publication Date
- 2024-12-05
- Estimated Expiration
- 2041-01-28
AI Technical Summary
Existing systems face challenges in securely resetting individual virtual machines (VMs) in a computer system with multiple VMs without affecting other VMs or the rest of the system, often leading to resource consumption and slowdowns due to hypervisor-based emulation of keyboard controller reset ports.
Offloading the emulation of keyboard controller reset ports to a platform controller separate from the hypervisor, utilizing a platform controller that provides secure and efficient reset port emulation through a platform controller separate from the main processor, reducing processor resource consumption and protecting against malicious activities.
This approach allows for secure and efficient resetting of individual VMs without impacting other VMs or the system, reducing processor load and safeguarding against malicious interference.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
background
[0001] A computer system comprises various electronic components, such as a processor, memory, persistent storage, a network interface controller, etc. Machine-readable instructions, including software programs and / or firmware programs, can be executed on the processor. A user, a program, or an electronic component can cause the computer system to reset.
[0002] US 2010 / 0 125 723 A1 discloses a method and a system for a fast reset and restart of a platform by minimizing the hardware initialization of input / output devices during the restart. US 2015 / 0 160 960 A1 relates to the communication between virtualization layers and guest operating systems of a computer system with virtual machines. US 2016 / 0 124 751 A1 discloses access restrictions and isolated access rights for systems with multiple operating systems. US 2016 / 0 283 425 A1 discloses a device wherein a controller interface interacts with a virtualized USB component, with multiple instances of the virtualized USB component operating in a secure environment.
[0003] It is an object of the present invention to provide a secure means of selectively resetting individual virtual machines (VMs) in a computer system with a plurality of virtual machines (VMs) coordinated via a hypervisor, without affecting the other VMs or the rest of the computer system. This object is achieved by a system according to claim 1, a non-transitory, machine-readable storage medium according to claim 13, or by a method according to claim 18. Brief description of the drawings
[0004] Some implementations of the present revelation are described with reference to the following figures. Fig. 1A is a block diagram of a system according to some examples. Fig. 1B is a block diagram of a platform control system according to some examples. Fig. 2A-2B are block diagrams of memory address spaces according to some examples. Fig. Figure 3 is a block diagram of a system, with further examples. Fig. Figure 4 is a block diagram of a storage medium that stores machine-readable instructions according to some examples. Fig. Figure 5 is a flowchart of a process according to some examples.
[0005] In the drawings, identical reference numbers denote similar, but not necessarily identical, elements. The illustrations are not necessarily to scale, and the size of some parts may be exaggerated to better illustrate the example shown. Furthermore, the drawings provide examples and / or implementations consistent with the description; however, the description is not limited to the examples and / or implementations shown in the drawings. Detailed description
[0006] In this disclosure, the use of the term "a", "an", or "the" also includes the plural forms, unless the context clearly indicates otherwise. Similarly, the terms "includes", "including", "comprises", "with", "have", or "with", when used in this disclosure, specify the presence of the indicated elements but do not exclude the presence or addition of other elements.
[0007] Examples of computer systems include: a desktop computer, a notebook, a tablet computer, a server computer, a smartphone, a wearable device (e.g., a smartwatch, smart glasses, a head-worn device, etc.), a gaming device, an Internet of Things (IoT) device, a printing system, a storage device, a communication node, and so on.
[0008] A computer system reset can be triggered by a user, a program, or an electronic component. For example, a user can activate a combination of specific keys on a keyboard to trigger the reset. Alternatively, a user can activate a control in a graphical user interface (GUI) of the computer system to trigger the reset. A program (whether running inside or outside the computer system) can issue a command or other indication to trigger the computer system reset. An electronic component (inside or outside the computer system) can output a signal or other indication to cause the computer system to reset.
[0009] A "reset" or resetting of a computer system can refer to restarting the computer system (turning the computer system off and then on), restarting the computer system (maintaining power to the computer system but shutting down the operating system (OS) of the computer system and then booting the OS), or to any other way that causes the computer system to delete status information of programs in the computer system (including the OS, application programs, etc.) and start the programs with the deleted status information.
[0010] In some examples, a computer system can be reset by activating a reset port. This activation can be achieved by writing a specific value (e.g., FEh, where "h" stands for hexadecimal) to a specific reset port address (e.g., address 64h in an input / output (I / O) address space). Reset port address 64h can be the address of a register ("reset register") in the I / O address space.
[0011] In some examples, the reset port may be part of a keyboard controller, so that in response to writing the specified value to the reset port address (e.g., writing FEh to address 64h), the keyboard controller performs a reset of the computer system.
[0012] Some computer systems can implement virtualization, allowing multiple virtual machines (VMs) to run within a single computer system (such VMs are also considered hosted by the computer system). The VMs can share the computer system's physical resources (e.g., a processor, memory, persistent storage, a network interface controller, etc.). A "virtual machine" or "VM" can refer to a partition of a computer system where machine-readable instructions (e.g., a guest operating system, an application program, etc.) can be executed while remaining isolated from machine-readable instructions running in another VM. In some examples, a container can also be considered a VM.
[0013] A computer system that implements virtualization may also include a hypervisor, also known as a virtual machine monitor (VMM). The hypervisor (which contains machine-readable instructions) can create virtual machines (VMs) that run on the computer system, and it can manage the execution of the VMs and their sharing of the computer system's physical resources. The hypervisor can emulate the computer system's physical resources so that a VM can access these emulated resources, and it can provide isolation between VMs.
[0014] A program running in a virtual machine (VM), or a user interacting with the VM, can trigger a VM reset. Since a computer system hosting the VM can contain multiple VMs, a reset initiated by the VM should only reset the VM and not the computer system. Resetting the computer system would render the other VMs hosted by that computer system, as well as other functionalities and services of the computer system, unavailable during the reset process.
[0015] In some examples, a hypervisor can emulate a keyboard controller, or more precisely, a keyboard controller's reset port. When a specific VM activates a keyboard controller's reset port (for example, by writing the specified value to the reset port address), the emulated keyboard controller (as emulated by the hypervisor) performs the reset for that VM. However, the emulated keyboard controller consumes physical resources of the computer system, including processor resources. In response to a write to the reset port address by each VM, the emulated keyboard controller (as emulated by the hypervisor) checks whether the value written to the reset port address matches the specified value (for example, FEh).In a computer system with a large number of VMs, the emulated keyboard controller can consume processor cycles, which can slow down other operations of the computer system. Another example: A malware-infected or malfunctioning VM might perform a large number of write operations to the reset port address with values other than the specified one (e.g., FEh), which can slow down the computer system if the hypervisor is handling keyboard controller emulation to process such write operations.
[0016] In accordance with some implementations of this disclosure, the emulation of a keyboard controller's reset port can be offloaded to a platform controller, separate from the hypervisor, instead of using a hypervisor to handle reset port activations by virtual machines. A "platform controller" can refer to a controller that performs specific tasks in a computer system. In some examples, the platform controller is a bus device on a bus, such as a Peripheral Component Interconnect (PCI) bus. In more specific examples, the PCI bus might be a PCI Express (PCIe) bus. In other examples, the platform controller might be a bus device connected to a different type of bus in a system. A "bus" refers to a communication link that allows multiple devices to communicate with each other.
[0017] The platform controller is separate from the system's main processor, which can execute various machine-readable instructions for the system, such as virtual machines (VMs), an operating system, an application program, firmware (e.g., boot code, hardware initialization code, etc.), and so on. The platform controller may be dedicated to performing specific system tasks, including emulating reset ports and other functions (e.g., power management, thermal management, system monitoring, etc.). In some examples, the platform controller may be a separate system-on-a-chip (SoC) integrated with the main processor. In more specialized examples, the platform controller may consist of an intelligent network interface controller (NIC) or be part of a baseboard management controller (BMC).The platform controller can have its own processing circuitry (separate from the main processor, which runs the operating system and / or other program code of a computer system) and run its own firmware. A BMC is a specialized service processor that can monitor the physical state of a computer system using sensors and communicates with a management system via an independent out-of-band connection.
[0018] The BMC can also communicate with applications running at the operating system level via an IOCTL (Input / Output Controller) interface driver, a REST (Representational State Transfer) application programming interface (API), or another system software proxy that facilitates communication between the BMC and applications. The BMC can have hardware-level access to hardware components within the computer system. The BMC may be able to directly modify these hardware components. The BMC can operate independently of the operating system of the computer system in which it resides. The BMC can reside on the motherboard or mainboard of the computer system being monitored.The fact that a BMC is mounted on a motherboard of the computer system being monitored, or otherwise connected to or attached to the computer system being monitored, does not prevent the BMC from being considered separate from a processing resource that runs the operating system. A BMC has management functions for administering components of the computer system. Examples of BMC management functions may include one or a combination of the following: power supply control, thermal monitoring and control, fan control, system health monitoring, remote access to the computer system, remote restart of the computer system, system setup, deployment and recovery of operating system images, system security, etc.
[0019] In some examples, a BMC can provide so-called "lights-out" functionality for computer systems. This "lights-out" functionality allows a user, such as a system administrator, to perform administrative operations on the computer system even if no operating system is installed or if the system is not functioning. Furthermore, in some examples, the BMC can be powered by auxiliary energy (e.g., battery power or an auxiliary power rail); therefore, the computer system does not need to be powered on for the BMC to perform its operations. The services provided by the BMC can be considered "out-of-band" services because the operating system may not be running, and in some cases, the computer system may be powered off or malfunctioning (e.g., due to a glitch or hardware failure).
[0020] The BMC can include a communication interface, such as a network interface, and / or a serial interface, through which an administrator or other entity can communicate with the BMC remotely. An out-of-band service can be provided by the BMC through a dedicated management channel (e.g., the communication interface) and is available regardless of whether the computer system is powered on. In some examples, the BMC is an example of the platform controller.
[0021] The platform controller provides a separate physical processor (separate from the system's main processor) where keyboard emulation can be securely implemented. This protects the platform controller against attacks that could affect the main processor's operation, such as malware infecting a system and running on the main processor.
[0022] Offloading the reset port emulation to the platform controller reduces the processor resources consumed by the hypervisor when resetting a virtual machine (VM). In some examples, a portion of PCI memory is allocated to contain register sets associated with the respective VMs, with each register set containing a reset register that, when written with a specific value, resets the corresponding VM. Write operations to the PCI memory portion containing the reset registers can be detected by the keyboard controller.
[0023] Fig. 1A is a block diagram of a System 100. The System 100 can comprise one or more computer systems.
[0024] System 100 comprises n VMs (VM 1 to VM n in Fig. (shown as 1), where n is 1. VMs can be started on request by a user or other entity. System 100 can start with zero VMs, and additional VM(s) are started on request. Each VM contains a corresponding guest operating system. VM 1 contains a guest operating system 102-1, and VM n contains a guest operating system 102-n. Examples of guest operating systems are a Linux operating system, a Windows operating system, and / or other types of operating systems. The various guest operating systems 102-1 through 102-n can be of the same type or of different types. Each VM can also contain a corresponding application program (or multiple application programs) that runs within the VM. For example, VM 1 contains an application program 104-1, and VM n contains an application program 104-n.Note that before creating a VM, there is no guest operating system 102-i (i = 1 to n) and no application program 104-i.
[0025] System 100 also includes a Hypervisor 106, which creates the VMs, manages the execution of the VMs, emulates physical resources of System 100 that the VMs can access, provides isolation between the VMs, and performs other virtualization tasks.
[0026] In accordance with some implementations of the present disclosure, the emulation of the reset port of a keyboard controller can be offloaded to a platform controller 108 of the system 100 instead of being emulated by the hypervisor 106. In some examples, the platform controller 108 is a bus device on a bus 110 of the system 100. For example, the bus 110 can be a PCIe bus. In other examples, the bus 110 can be a different type of bus or a different type of communication structure.
[0027] The Platform Controller 108 can be implemented with any type of hardware processing circuit, such as a microcontroller, a programmable integrated circuit (e.g., an application-specific integrated circuit or ASIC), a programmable gate array, a microprocessor, or any other type of hardware processing circuit.
[0028] In some examples, the platform controller 108 is separate and distinct from a processor (or processors) 112 of the system 100. A processor can be a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, a digital signal processor, or other hardware processing circuitry.
[0029] Processor 112 is coupled to bus 110, either directly or via another device, such as a bridge device. Processor 112 executes machine-readable instructions from system 100, including the hypervisor 106 and the VMs, a host operating system (if present), and other programs (including software programs and / or firmware programs).
[0030] The processor 112 can be coupled to a system memory 113, which may comprise one or more storage devices for storing data and machine-readable instructions. A storage device can be volatile, such as a dynamic random-access memory (DRAM) device, a static random-access memory (SRAM) device, etc. Alternatively, a storage device can be non-volatile. Although not shown, the system memory 113 may contain a memory controller, or alternatively, a memory controller may be connected to the storage device(s) to control access to the data in the storage device(s).
[0031] Other devices can also be connected to bus 110, including a network interface controller (NIC) 130 and persistent storage 132. The NIC 130 is capable of communicating over a network, allowing components of system 100, including the VMs, to communicate with other units over the network through the NIC 130. In some examples, a physical keyboard controller may also be connected to bus 110.
[0032] The persistent memory 132 can store data that persists even if the power supply to the system 100 or the persistent memory 132 is interrupted. The persistent memory 132 can be implemented with one (or more) non-volatile storage device. A non-volatile storage device can include a flash memory device, a disk-based storage device, etc.
[0033] In examples according to Fig. 1A Reset port emulation can be performed using PCI functions 114-1 through 114-n, provided by the platform controller 108. The hypervisor 106 can assign one or more PCI functions to each virtual machine (VM). PCI functions 114-1 through 114-n each contain virtual keyboard controllers (vKBCs) 128-1 through 128-n. Instead of implementing physical keyboard controllers, the vKBCs 128-1 through 128-n contained in PCI functions 114-1 through 114-n are provided by the platform controller 108.
[0034] Fig. Figure 1B shows further details of the Platform Controller 108 according to some examples. The Platform Controller 108 may have different implementations in other examples. In some examples, PCI functions 114-1 to 114-n are used. Fig. 1A is implemented as virtual functions (VFs) 150-1 to 150-n, conforming to PCIe Single Root I / O Virtualization (SR-IOV) as defined by a PCI Special Interest Group (SIG), a community that defines standards (including the SR-IOV specification) related to PCIe. Each VF 150-i contains a corresponding vKBC 128-i. In the example of Fig. VF 1B is assigned to VM 1, VF 150-n is assigned to VM n, and so on. Each VF can support a unique and separate data path for I / O-related functions (e.g., reset port writes) within the PCIe hierarchy. The vKBC 128-1 emulates a reset port for VM 1, and the vKBC 128-n emulates the reset port for VM n.
[0035] In other examples, PCI functions 114-1 to 114-n can be derived from Fig. 1A can be implemented as a different type of function.
[0036] SR-IOV allows a PCIe device (e.g., a keyboard controller) to be controlled by the Platform Controller 108 of Fig. 1B is implemented), to present itself to a host (e.g., System 100) as several different virtual devices. The PCIe device (e.g., Platform Controller 108) implements a PCIe Physical Function (PF) 152, which is divided into several VFs (e.g., 150-1 to 150-n in Fig. 1B) is partitioned to share the resources of the PCIe device in a virtual environment.
[0037] The PF 152 provides control over the creation and allocation of VFs. The PF 152 includes an SR-IOV capability structure and manages SR-IOV functionality. The PF 152 can be used like any other PCIe device in System 100. Fig. 1A can be detected, managed and manipulated.
[0038] The VFs 150-1 to 150-n share the underlying hardware of the platform controller and the PCIe interface to the PCI bus 110.
[0039] The Platform Controller 108 from Fig. 1B also includes a processor 154 and a memory 156. The processor 154 of Fig. 1B is used to execute commands from platform controller 108 in order to fulfill tasks of platform controller 108.
[0040] In accordance with some implementations of this disclosure, SR-IOV allows VMs to activate reset ports, bypassing an emulation layer in the Hypervisor 106. VFs according to SR-IOV are lightweight, so a large number of VFs can be implemented on the Platform Controller 108. For example, if the System 100 contains a large number of VMs, a correspondingly large number of VFs can be implemented on the Platform Controller 108 to perform reset port emulation for the respective VMs.
[0041] An SR-IOV-enabled device (e.g., the Platform Controller 108) can be configured (e.g., by the Hypervisor 106 or another entity in System 100) to appear in PCI memory or I / O space as multiple VFs, each with its own PCI configuration space. PCI memory or I / O space can refer to a portion of the memory or I / O space in System 100 that contains structures (e.g., registers) that can be used by an entity (e.g., a VM or another entity) in System 100 to interact with a corresponding PCI device, such as one of the VFs 150-1 through 150-n.
[0042] In some examples, to implement keyboard controller reset port emulation, each VF 150-1 through 150-n has a class code representing a keyboard controller. According to PCle, a class code is a three-byte field in the header of a function's configuration space that identifies a functionality of the function. A class code might contain, for example, a base class subfield (e.g., one byte long), a subclass subfield (e.g., one byte long), and a programming interface subfield (e.g., one byte long). The base class subfield broadly classifies the type of functionality the VF provides. The subclass subfield more specifically identifies the type of functionality the VF provides. The programming interface subfield identifies the specific register-level interface (if any) of a VF, allowing device-independent software (e.g., a virtual machine) to interact with the VF.For example, a class code value of 09h / 00h / 00h assigned to a VF indicates that the VF corresponds to a keyboard controller. In other examples, different class code values can represent a keyboard controller.
[0043] In some examples, VM i (i = 1 to n) can recognize, based on the "Base Class" and "Subclass" subfields together, that a VF 150-i (i = 1 to n) provides the functionality of a keyboard controller. The programming interface subfield can identify a reset register (in Fig. 2A is represented as 116-i (i = 1 to n), which is connected to each corresponding VF 150-i that VM i can interact with (e.g., write a specific value to the reset register 116-i to cause a reset of VM i). The multiple VFs 150-1 to 150-n appear as multiple reset ports that corresponding VMs can use to reset the VMs. Each reset register 116-i is part of a corresponding vKBC 128-i. The reset register 116-i in the corresponding vKBC 128-i is mapped to a memory address space 118, specifically PCI memory in memory address space 118. Memory address space 118 can be implemented with a number of storage devices in System 100, including system memory 113. Fig. 1A, registers in platform controller 108, and so on. The reset registers 116-1 to 116-n comprise memory-mapped registers that are part of the memory address space 118.
[0044] In alternative examples, e.g., in examples where the functions 114-1 to 114-n are PFs, the reset registers 116-1 to 116-n can be part of an I / O address space.
[0045] Implementing the reset registers 116-1 to 116-n in memory space can be more efficient than implementing reset registers in I / O space (e.g., in implementations where SR-IOV is not used), since I / O space accesses of reset registers can slow down the operation of processor 112.
[0046] Memory addresses in memory address space 118 can be mapped to a memory controller and / or a PCIe controller. The memory controller is connected to a memory device (or alternatively, multiple memory devices). A memory device can be volatile (e.g., dynamic random-access memory or DRAM, static random-access memory or SRAM, etc.). Alternatively, a memory device can include non-volatile memory (e.g., flash memory, etc.). A PCIe controller is connected to a PCIe device. A PCIe device can support memory accesses, but it cannot actually access memory devices like DRAM or SRAM. Instead, a PCIe device can access memory-mapping registers that are part of memory address space 118.
[0047] In some examples, the starting address (or base address) of the PCI memory space for each reset register 116-i is based on a memory address contained in a PCI base address register (BAR) 120 located in the PCI configuration space. PCI-BAR 120 is contained in PF 152, as shown in Fig. Figure 1B shows that PCI defines several BARs that can be used to hold different memory addresses for a PCI device or function.
[0048] The reset register base addresses 160-1 to 160-n of the PCI memory areas, which contain the respective reset registers 116-1 to 116-n, are derived from the memory address contained in BAR 120. Hypervisor 106 writes the memory address to BAR 120. The memory address contained in BAR 120 defines a chunk of PCI memory space to be divided equally among VFs 150-1 to 150-n. The defined chunk of PCI memory space has a size BARSIZE. Each VF is allocated a portion of the BARSIZE / n chunk of PCI memory space. The reset register base address 160-i of the PCI memory containing the reset register 116-i is calculated based on the VF number of VF 150-i in conjunction with the BAR 120.
[0049] A keyboard controller device driver (or other program) located in a VM can access the PCI memory area of the corresponding VF. As in Fig. As shown in Figure 1A, several keyboard controller device drivers 122-1 to 122-n are included in the respective guest operating systems 102-1 to 102-n.
[0050] In some examples, a guest operating system 102-i in VM i can contain an application programming interface (API) that allows the keyboard controller device driver 122-i in VM i to access the PCI memory area of the VF 150-i.
[0051] After SR-IOV is enabled in PF 152 of the platform controller 108, the VF instances 150-i are available for enumeration by the configuration software running on the processor 112 and can be addressed via bus, device, and function. The configuration software, which in some examples is the hypervisor 106, can then configure the desired number of VF instances 150-i from those supported by PF 152 and allocate the resources accordingly (i.e., allocate a portion of memory 118 for the VF instances 150-i by programming BAR 120). Upon completion, the reset registers 116-i are addressable by the processor 112.
[0052] The keyboard controller device driver 122-i in the guest operating system 102-i is able to query the hypervisor 106 to obtain the corresponding reset register base address 160-i, which the keyboard controller device driver 122-i accesses. This allows the keyboard controller device driver 122-i in the guest operating system 102-i to write to the reset register 116-i.
[0053] Each vKBC 128-i can contain reset register write detection logic to detect a write operation by VM i to reset register 116-i. A reset register write to reset register 116-i is routed to the respective vKBC 128-i. In response to a reset register write operation, the vKBC 128-i determines whether a specific value has been written to reset register 116-i. For example, the reset register write detection logic in the vKBC 128-i can compare the value written to reset register 116-i with the specified value; if the written value matches the specified value, a reset port has been activated.
[0054] If the logic for detecting the write of reset registers in the vKBC 128-i detects a write of the specified value to the reset register 116-i, the vKBC 128-1 can send it to the processor 154 ( Fig. 1B) signal an interrupt within the platform controller 108, for example, using a corresponding reset indicator 124-i. The reset indicator 124-i can contain a signal, an interrupt, a command, or any other indication of a reset. The reset indicator 124-i can contain information that identifies which VF 150-i the reset indicator 124-i is assigned to.
[0055] In response to the reset indicator 124-i, machine-readable instructions (e.g., firmware) running on processor 154 can redirect the reset indicator 124-i to hypervisor 106. In other examples, vKBC 128-i contains hardware that redirects the reset indicator 124-i to the hypervisor.
[0056] The redirected reset indication 124-i (or information based on the reset indication 124-i) can be received by the hypervisor 106. In response to the redirected reset indication 124-i, the hypervisor 106 initiates a reset of the corresponding VM i.
[0057] In other examples, instead of providing VFs in a platform controller to emulate reset ports, an ACPI Table 210 (Advanced Configuration and Power Interface) is used, as in Fig. Figure 2B shows how it is used to store reset register-related information according to other implementations of this disclosure. In some examples, ACPI Table 210 is a Fixed ACPI Description Table (FADT). The FADT contains various configuration details related to registers. ACPI Table 210 is part of the memory address space 118 contained in system memory 113.
[0058] According to some implementations of the present disclosure, ACPI table 210 contains several sections 212-1 to 212-n, which are associated with the respective VMs 1 to n. ACPI table section 212-1 contains a reset register address field 1 and a reset value 1, and ACPI table section 212-n contains a reset register address field n and a reset value n. Each reset register address field i (i = 1 to n) in the corresponding ACPI table section 212-i contains the address of a memory location that contains a reset register 214-i for a corresponding VM i. For example, reset register address field 1 contains the memory address of reset register 214-1 for VM 1, and reset register address field n contains the memory address of the reset register for VM n. Reset registers 214-1 through 214-n are similar to reset registers 116-1 through 116-n of Fig. 2A and can each contain registers of vKBCs 128-1 to 128-n, as in Fig. Figure 1A shows the reset registers 214-1 to 214-n, which comprise memory-mapped registers (identified as area 216) that are part of the memory address space 118.
[0059] Each reset value i (i = 1 to n) in the corresponding ACPI table section 212-i contains a reset value which, when written to the corresponding reset register 214-i (to which the reset register address field i in ACPI table section 212-i points), indicates that the respective VM i should be reset.
[0060] In other examples, ACPI table sections 212-1 to 212-n do not contain reset values, but a predefined reset value (e.g., FEh or another value) is used to indicate a reset of a corresponding VM.
[0061] The starting address of area 216 can be specified, for example, by an address contained in a BAR (not shown).
[0062] In some examples, the addresses of the reset registers 214-1 to 214-n can be assigned by the hypervisor 106 ( Fig. 1A). The Hypervisor 106 can write the reset register addresses to the corresponding reset register address fields of ACPI table sections 212-1 to 212-n.
[0063] Hypervisor 106 can also assign the reset values, which are written to the corresponding ACPI table sections 212-1 to 212-n.
[0064] In other examples, the addresses of the reset registers 214-1 to 214-n and the reset values can be assigned by another instance (e.g., a host operating system or a Basic Input / Output System (BIOS)).
[0065] In response to the writing of a reset register 214-i (i = 1 to n), the logic for detecting the writing of a reset register in vKBC 128-i ( Fig. 1A) Determine whether the value written to the reset register 214-i matches a specified reset value, such as the reset value in ACPI table section 210-i or a predefined value.
[0066] If the value written to the reset register 214-i matches the specified reset value, then the reset register write detection logic in vKBC 128-i can generate a reset indication 124-i (similar to the reset indication 124-i of Fig. 1B), which is forwarded from the platform controller 108 to the hypervisor 106 to cause a reset of the corresponding VM i.
[0067] In any of the implementations described above, if a value written to a reset register does not match a specified reset value, platform controller 108 does not output the reset indicator to hypervisor 106, thus preventing hypervisor 106 from being interrupted by reset activity. This means that an infected or malfunctioning VM performing many writes to reset registers would not interrupt hypervisor 106's activity if the writes to the reset registers do not match the specified reset value(s).
[0068] Fig. Figure 3 is a block diagram of a System 300 according to further examples. The System 300 comprises a storage medium 302 (e.g., the system memory 113 of Fig. 1A or other device storage) to store 304 reset port information related to reset ports assigned to the respective VMs. The reset ports may include keyboard controller reset ports.
[0069] In the example of Fig. 1B includes the reset port information 304, the addresses of the reset registers 116-1 to 116-n, which can be derived from BAR 120 or stored elsewhere.
[0070] In the example of Fig. 2B contains the reset port information 304 information in ACPI table sections 212-1 to 212-n, which contain reset register addresses.
[0071] The System 300 also includes a Controller 306 (e.g., the Platform Controller 108 from Fig. 1A) to carry out various tasks.
[0072] The tasks of controller 306 include task 308 for detecting the activation of a reset port, in order to detect, based on the reset port information 304, the activation of a first reset port connected to a first VM.
[0073] The tasks of the controller 306 include a reset indication provisioning task 310 to send an indication 312 of the activation of the first reset port to a hypervisor 314 (e.g., 106 in) in response to the detection of the activation of the first reset port. Fig. 1A) to deliver, which is separate from the controller 306, whereby the display is intended to cause the hypervisor 314 to reset the first VM without the hypervisor 314 emulating a keyboard controller.
[0074] In some examples, the detection of the activation of the first reset port includes the detection of a write operation to a specific address associated with the first reset port (e.g., a write operation to a reset register).
[0075] In some examples, the reset port information includes 304 PCI register information (e.g., the BAR 120 of Fig. 1B or ACPI table sections 212-1 to 212-n of Fig. 2B), which map the reset registers to different memory address positions for the respective VMs.
[0076] In some examples, the reset registers are assigned to the respective PCI VFs, which are assigned to the respective VMs, with the PCI VFs being provided by controller 306.
[0077] In some examples, the reset registers are I / O reset registers. In other examples, the reset registers are memory reset registers.
[0078] Fig. Figure 4 is a block diagram of a non-transitory machine-readable or computer-readable storage medium 400 on which machine-readable instructions are stored which, when executed, cause a controller to perform certain tasks.
[0079] The machine-readable commands contain instructions for accessing reset register information 402 to access information relating to reset registers assigned to the respective VMs.
[0080] The machine-readable instructions also include instructions 404 for resetting register writes, in order to detect, based on the information, a write of a first resetting register associated with a first VM.
[0081] The machine-readable instructions also include instructions to determine the reset value 406, in order to determine whether a particular reset value is written to the first reset register.
[0082] The machine-readable instructions further include instruction 408 to provide a reset indicator in order to deliver a reset indicator to a hypervisor that is separate from the controller in response to the finding that the specified reset value has been written to the first reset register, the reset indicator being intended to cause the hypervisor to reset the first VM.
[0083] Fig. Figure 5 is a flowchart of a Process 500 according to some examples. Process 500 involves detecting (at 502) the activation of the first keyboard controller reset port from a plurality of keyboard controller reset ports by a controller (e.g., 108 in Figure 5). Fig. 1, Fig. 208 in Fig. 2, Fig. 306 in Fig. 3), where the detection is based on information that identifies the addresses of the multitude of keyboard controller reset ports connected to the respective VMs.
[0084] In response to the detection, process 500 includes providing (at 504) a notification of the controller's activation of the first keyboard controller reset port to a hypervisor detached from the controller, the notification including information indicating the first VM.
[0085] Process 500 involves the hypervisor resetting (at 506) the first VM in response to the display.
[0086] The storage medium 400 of Fig.4. The device may contain any or a combination of the following: a semiconductor memory device, such as dynamic or static random-access memory (DRAM or SRAM), erasable and programmable read-only memory (EPROM), electrically erasable and programmable read-only memory (EEPROM), and flash memory; a magnetic disk, such as a hard disk, floppy disk, and removable disk; another magnetic medium, including tape; an optical medium, such as a compact disc (CD) or a digital video disc (DVD); or some other type of storage device. Note that the instructions discussed above may be provided on a single computer- or machine-readable storage medium, or alternatively, on multiple computer- or machine-readable storage media distributed throughout a large system with potentially multiple nodes.Such a computer-readable or machine-readable storage medium or media are considered part of an article (or manufactured item). An article or manufactured item can refer to any single manufactured component or to multiple components. The storage medium or media can be located either in the machine where the machine-readable instructions are executed or at a remote location from which machine-readable instructions can be downloaded over a network for execution.
[0087] The foregoing description includes numerous details to provide an understanding of the subject matter disclosed herein. However, implementations without some of these details are also possible. Other implementations may include modifications and variations of the details described above. The attached claims are intended to cover such modifications and variations.
Claims
[1] A system (100, 300) comprising: a storage medium (113, 302, 400) for storing information (304) relating to reset ports associated with respective virtual machines, VMs, of a plurality of VMs executing in the system (100, 300), wherein the reset ports are emulated by corresponding virtual keyboard controllers, vKBCs (128), and wherein each VM of the plurality of VMs comprises a keyboard controller device driver (122) for communicating with a respective vKBC (128) of the vKBCs (128); a hypervisor (106); and a controller (108) comprising a processor, wherein the controller (108) is configured to: a plurality of virtual functions, VFs (150), wherein each VM of the plurality of VMs is assigned a corresponding VF (150), and wherein each VF (150) implements a vKBC (128) associated with a corresponding VM that emulates a reset port for the corresponding VM; detect, based on the information, an activation of a first reset port associated with a first VM of the plurality of VMs, wherein the activation of the first reset port comprises a write operation to a particular address associated with a first vKBC (128) of the vKBCs (128); and in response to detecting, providing, by the first vKBC (128), an indication of activation of the first reset port to a hypervisor (106) separate from the controller (108); wherein the hypervisor (106) is designed to: to receive the indication of the activation of the first reset port, and reset the first VM in response to the ad. [2] The system (100, 300) of claim 1, wherein the activation of the first reset port occurs in response to an action of the first VM. [3] The system (100, 300) of claim 1, wherein the specified address is an address of a reset register of the first vKBC (128), and wherein the information relates to reset registers at different address locations for the respective VMs, the reset registers being part of the corresponding vKBCs (128). [4] The system (100, 300) of claim 3, wherein the information is to be derived from register information and maps the reset registers to different memory address locations for the respective VMs. [5] The system (100, 300) of claim 4, wherein the information further comprises an ACPI, Advanced Configuration and Power Interface (210) table comprising a plurality of reset register address fields associated with the respective VMs, each respective reset register address field of the plurality of reset register address fields containing an address of a corresponding one of the various memory address locations. [6] The system (100, 300) of claim 5, wherein the ACPI table (210) further comprises reset values to be written to the reset registers to perform resets of the respective VMs. [7] The system (100, 300) of claim 5, wherein the ACPI table (210) is a Fixed ACPI Description Table, FADT. [8] The system (100, 300) of claim 3, wherein the reset registers are input / output (I / O) reset registers. [9] The system (100, 300) of claim 3, wherein the reset registers are memory location reset registers. [10] The system (100, 300) of claim 1, comprising at least one system processor (112) for executing the plurality of VMs and the hypervisor (106), wherein the controller (108) is separate from the at least one system processor (112). [11] The system (100, 300) of claim 1, wherein the controller (108) is configured to provide the indication to cause the hypervisor (106) to reset the first VM without the hypervisor (106) emulating a keyboard controller. [12] The system (100, 300) of claim 1, further comprising a bus (110), wherein the controller (108) comprises a bus device connected to the bus (110). [13] A non-transitory, machine-readable storage medium (113, 302, 400) containing instructions that, when executed, cause a system (100, 300) to: Accessing, by a controller (108), information relating to reset ports associated with respective virtual machines, VMs, of a plurality of VMs executed by at least one processor (112) of the system (100, 300), wherein the controller (108) is separate from the at least one processor (112), wherein the reset ports are emulated by respective virtual keyboard controllers, vKBCs (128), and wherein each VM of the plurality of VMs comprises a keyboard controller device driver (122) for communicating with a respective vKBC (128) of the vKBCs (128); Executing, by the controller (108), a plurality of virtual functions, VFs (150), wherein each VM of the plurality of VMs is assigned a corresponding VF (150), and wherein each VF (150) implements a vKBC (128) associated with a corresponding VM that emulates a reset port for the corresponding VM; Detecting, by the controller (108), an activation of a first reset port associated with a first VM of the plurality of VMs based on the information, wherein the activation of the first reset port comprises a write operation to a particular address associated with a first vKBC (128) of the vKBCs (128); in response to detecting, providing, by the first vKBC (128), an indication that the first reset port has been activated to a hypervisor (106) executed by the at least one processor (112); Receiving, at the hypervisor (106), the indication of the activation of the first reset port; and Reset, by the hypervisor (106), of the first VM in response to the indication. [14] The non-transitory machine-readable storage medium (113, 302, 400) of claim 13, wherein the information comprises a register containing an address for deriving addresses of reset registers corresponding to the reset ports. [15] The non-transitory machine-readable storage medium (113, 302, 400) of claim 14, wherein the reset registers are part of the respective virtual vKBCs (128), and wherein the specified address is an address of a reset register that is part of the first vKBC (128). [16] The non-transitory machine-readable storage medium (113, 302, 400) of claim 13, wherein the information comprises addresses of reset registers in a plurality of segments in a memory, the reset registers corresponding to the reset ports. [17] The non-transitory machine-readable storage medium (113, 302, 400) of claim 16, wherein the information further comprises an ACPI, Advanced Configuration and Power Interface (210) table comprising a plurality of reset register address fields associated with the respective VMs, each respective reset register address field of the plurality of reset register address fields containing an address of a corresponding memory address location containing a respective reset register of the reset registers. [18] A method (500) comprising: Accessing, by a controller (108), information relating to reset ports associated with respective virtual machines, VMs, of a plurality of VMs executed by at least one processor (112) of the system (100, 300), wherein the controller (108) is separate from the at least one processor (112), wherein the reset ports are emulated by respective virtual keyboard controllers, vKBCs (128), and wherein each VM of the plurality of VMs comprises a keyboard controller device driver (122) for communicating with a respective vKBC (128) of the vKBCs (128); Executing, by the controller (108), a plurality of virtual functions, VFs (150), wherein each VM of the plurality of VMs is assigned a corresponding VF (150), and wherein each VF (150) implements a vKBC (128) associated with a corresponding VM that emulates a reset port for the corresponding VM; Detecting (502), by the controller (108), an activation of a first reset port associated with a first VM of the plurality of VMs based on the information, wherein the activation of the first reset port comprises a write operation to a particular address associated with a first vKBC (128) of the vKBCs (128); in response to detecting, providing (504) an indication of activation of the first reset port by the first vKBC (128) to a hypervisor (106) separate from the controller (108), the indication comprising information indicative of the first VM; and Resetting (506) the first VM by the hypervisor (106) in response to the indication. [19] The method (500) of claim 18, wherein the information comprises: a Peripheral Component Interconnect (PCI) register containing an address to be used in deriving addresses of the keyboard controller reset ports, wherein the plurality of VFs (150) comprise PCI virtual functions (114). [20] The method (500) of claim 18, wherein the information comprises: an ACPI, Advanced Configuration and Power Interface (210) table comprising a plurality of address fields associated with the respective VMs, each respective address field of the plurality of address fields including an address of a corresponding memory address location including a respective register associated with a respective keyboard controller reset port of the plurality of keyboard controller reset ports.
Citation Information
Patent Citations
Method and system to enable fast platform restart
US20100125723A1
Method and subsystem for data exchange between a guest operating system and a virtualization layer
US20150160960A1
Access isolation for multi-operating system devices
US20160124751A1
Additional secured execution environment with SR-IOV and XHCI-iov
US20160283425A1
