Data processing apparatus and memory protection method
AssigneeRenesas Electronics Corporation
InventorYasuhiro Sugita
Life of this patent
Estimating the term…
Abstract
The data processing apparatus includes a memory protection setting storage unit capable of storing a plurality of address sections as memory protection setting targets, a plurality of first determination units provided for each of the address sections stored in the memory protection setting storage unit and provisionally determining whether or not an access request is permitted based on whether or not an access destination address specified by the access request corresponds to the address section acquired from the memory protection setting storage unit, and a second determination unit finally determining whether or not the access request is permitted based on the classification information and the results of provisional determinations by the first determination unit.
Claims8
A data processing apparatus comprising:
- a memory protection setting storage storing a plurality of entries, wherein each of the plurality of entries stores setting information for memory protection, wherein the setting information for memory protection is set by 1) a virtual machine monitor or 2) a virtual machine, wherein a sum of a number of entries storing the setting information for memory protection set by the virtual machine monitor and a number of entries storing the setting information for memory protection set by the virtual machine equates to a total number of the plurality of entries in the memory protection setting storage, and wherein the number of entries storing the setting information for memory protection set by the virtual machine monitor and the number of entries storing the setting information for memory protection set by the virtual machine are configured to dynamically change;
- a plurality of first determination circuits provided for the entries in the memory protection setting storage, respectively, wherein each of the first determination circuits provisionally determines whether an access request is permitted based on the setting information for memory protection stored in one of the entries in the memory protection setting storage, wherein the one of the entries corresponds to an access destination address of the access request;
- and
- a second determination circuit that determines whether the access request is permitted based on 1) a result of provisional determination by each of the first determination circuits, 2) an access source information indicating the access request is an access by the virtual machine monitor or the virtual machine, and 3) entry boundary information indicating the number of entries storing the setting information for memory protection set by the virtual machine monitor and the number of entries storing the setting information for memory protection set by the virtual machine in the memory protection setting storage,
- wherein, for the access information indicating that the access request is the access by the virtual machine monitor, the second determination circuit permits the access request, when any provisional determination result indicates that the access destination address of the access request corresponds to the entry for memory protection set by the virtual machine monitor,
- wherein, for the access information indicating that the access request is an access by the virtual machine, the second determination circuit is configured to permit the access request, when any provisional determination result indicates that the access destination address of the access request corresponds to the entry for memory protection set by the virtual machine, and when any provisional determination result indicates that the access destination address of the access request corresponds to the entry for memory protection set by the virtual machine monitor,
- wherein the data processing apparatus switches an operation mode between 1) a first mode in which the virtual machine operates and 2) a second mode in which the virtual machine monitor operates,
- wherein the data processing apparatus further comprises a sequencer that:
- saves, into a memory, information stored in the memory protection setting storage, wherein the information stored in the memory protection setting storage includes i) the setting information set by the virtual machine monitor and ii) the setting information set by the virtual machine;
- and
- restores the information saved in the memory to the memory protection setting storage according to the operation mode of the data processing apparatus,
- wherein, during the first mode, the sequencer restores, from the memory to the memory protection setting storage, the setting information set by the virtual machine without restoring the setting information set by the virtual machine from the memory to the memory monitor, and
- wherein, during the second mode, the sequencer restores, from the memory to the memory protection setting storage, i) the setting information set by the virtual machine monitor and ii) the setting information set by the virtual machine.
A memory protection method comprising:
- storing, in a memory protection setting storage, a plurality of entries, wherein each of the plurality of entries stores setting information for memory protection, wherein the setting information for memory protection is set by 1) a virtual machine monitor or 2) a virtual machine, wherein a sum of a number of entries storing the setting information for memory protection set by the virtual machine monitor and a number of entries storing the setting information for memory protection set by the virtual machine equates to a total number of the plurality of entries in the memory protection setting storage, and wherein the number of entries storing the setting information for memory protection set by the virtual machine monitor and the number of entries storing the setting information for memory protection set by the virtual machine are configured to dynamically change;
- provisionally determining whether an access request is permitted based on the setting information for memory protection stored in one of the entries in the memory protection setting storage, wherein the one of the entries corresponds to an access destination address of the access request;
- and
- determining whether the access request is permitted based on 1) a result of the provisional determination, 2) an access source information indicating the access request is an access by the virtual machine monitor or the virtual machine, and 3) entry boundary information indicating the number of entries storing the setting information for memory protection set by the virtual machine monitor and the number of entries storing the setting information for memory protection set by the virtual machine in the memory protection setting storage,
- wherein, for the access information indicating that the access request is the access by the virtual machine monitor, the access request is permitted, when any provisional determination result indicates that the access destination address of the access request corresponds to the entry for memory protection set by the virtual machine monitor,
- wherein, for the access information indicating that the access request is an access by the virtual machine, the access request is permitted, when any provisional determination result indicates that the access destination address of the access request corresponds to the entry for memory protection set by the virtual machine, and when any provisional determination result indicates that the access destination address of the access request corresponds to the entry for memory protection set by the virtual machine monitor, and
- wherein the method further comprises:
- saving, into a memory, information stored in the memory protection setting storage, wherein the information stored in the memory protection setting storage includes i) the setting information set by the virtual machine monitor and ii) the setting information set by the virtual machine;
- during a period in which the access by the virtual machine is permitted, restoring, from the memory to the memory protection setting storage, the setting information set by the virtual machine without restoring the setting information set by the virtual machine monitor from the memory to the memory;
- and
- during a period in which the access by the virtual machine monitor is permitted, restoring, from the memory to the memory protection setting storage, i) the setting information set by the virtual machine monitor and ii) the setting information set by the virtual machine.
Dependencies are inferred from the claim text.