]> git.proxmox.com Git - qemu.git/commit
kvm: support using KVM_MEM_READONLY flag for regions
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 29 May 2013 08:27:26 +0000 (01:27 -0700)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 29 May 2013 13:15:36 +0000 (08:15 -0500)
commit235e8982ad393e5611cb892df54881c872eea9e1
treed49ba2f8d4f9bfd950aaf6e8d23fc621c5ca934d
parentdf9c8b758a04825e23f82427001028342b92d0cf
kvm: support using KVM_MEM_READONLY flag for regions

For readonly memory regions and rom devices in romd_mode,
we make use of the KVM_MEM_READONLY. A slot that uses
KVM_MEM_READONLY can be read from and code can execute from the
region, but writes will exit to qemu.

For rom devices with !romd_mode, we force the slot to be
removed so reads or writes to the region will exit to qemu.
(Note that a memory region in this state is not executable
within kvm.)

v7:
 * Update for readable => romd_mode rename (5f9a5ea1)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> (v4)
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> (v5)
Message-id: 1369816047-16384-4-git-send-email-jordan.l.justen@intel.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm-all.c