summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-30seccomp: add the asynchronous I/O syscalls to the whitelistPaul Moore1-1/+4
In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist. Signed-off-by: Paul Moore <pmoore@redhat.com> Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Message-id: 20130529203001.20939.83322.stgit@localhost Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-30gdbstub: do not restart crashed guestPaolo Bonzini1-1/+3
If a guest has crashed with an internal error or similar, detaching gdb (or any other debugger action) should not restart it. Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1369912840-18577-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-30qdev: fix get_fw_dev_path to support to add nothing to fw_dev_pathAmos Kong2-1/+15
Recent virtio refactoring in QEMU made virtio-bus become the parent bus of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation, typename will be added to fw_dev_path by default, the new fw_dev_path could not be identified by seabios. It causes that bootindex parameter of scsi device doesn't work. This patch implements get_fw_dev_path() in BusClass, it will be called if bus doesn't implement the method, tyename will be added to fw_dev_path. If the implemented method returns NULL, nothing will be added to fw_dev_path. It also implements virtio_bus_get_fw_dev_path() to return NULL. Then QEMU will still pass original style of fw_dev_path to seabios. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1369814202-10346-1-git-send-email-akong@redhat.com -- v2: only add nothing to fw_dev_path when get_fw_dev_path() is implemented and returns NULL. then it will not effect other devices don't have get_fw_dev_path() implementation. v3: implement default get_fw_dev_path() in BusClass Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29virtio-pci: drop unused wmb macroMichael S. Tsirkin1-6/+0
The implementation is wrong for kvm, and it's unused anyway. Drop it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20130528102023.GA30055@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29tests: set MALLOC_PERTURB_ to expose memory bugsStefan Hajnoczi2-2/+6
glibc wipes malloc(3) memory when the MALLOC_PERTURB_ environment variable is set. The value of the environment variable determines the bit pattern used to wipe memory. For more information, see http://udrepper.livejournal.com/11429.html. Set MALLOC_PERTURB_ for gtester and qemu-iotests. Note we pick a random value from 1 to 255 to expose more bugs. If you need to reproduce a crash use 'show environment' in gdb to extract the MALLOC_PERTURB_ value from a core dump. Both make check and qemu-iotests pass with MALLOC_PERTURB_ enabled. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1369661331-28041-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29pc_sysfw: allow flash (-pflash) memory to be used with KVMJordan Justen1-19/+31
When pc-sysfw.rom_only == 0, flash memory will be usable with kvm. In order to enable flash memory mode, a pflash device must be created. (For example, by using the -pflash command line parameter.) Usage of a flash memory device with kvm requires KVM_CAP_READONLY_MEM, and kvm will abort if a flash device is used with an older kvm which does not support this capability. If a flash device is not used, then qemu/kvm will operate in the original rom-mode. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1369816047-16384-5-git-send-email-jordan.l.justen@intel.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29kvm: support using KVM_MEM_READONLY flag for regionsJordan Justen1-9/+28
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>
2013-05-29kvm: add kvm_readonly_mem_enabledJordan Justen3-0/+17
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1369816047-16384-3-git-send-email-jordan.l.justen@intel.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)Jordan Justen2-5/+16
The isapc machine with seabios currently requires the BIOS region to be read/write memory rather than read-only memory. KVM currently cannot support the BIOS as a ROM region, but qemu in non-KVM mode can. Based on this, isapc machine currently only works with KVM. To work-around this isapc issue, this change avoids marking the BIOS as readonly for isapc. This change also will allow KVM to start supporting ROM mode via KVM_CAP_READONLY_MEM. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1369816047-16384-2-git-send-email-jordan.l.justen@intel.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29Merge remote-tracking branch 'aneesh/for-upstream' into stagingAnthony Liguori3-9/+47
# By Aneesh Kumar K.V (3) and Gabriel de Perthuis (1) # Via Aneesh Kumar K.V * aneesh/for-upstream: hw/9pfs: Be robust against paths without FS_IOC_GETVERSION hw/9pfs: Use O_NOFOLLOW when opening files on server hw/9pfs: use O_NOFOLLOW for mapped readlink operation hw/9pfs: Fix segfault with 9p2000.u Message-id: 87zjvevx4s.fsf@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29Merge remote-tracking branch 'afaerber-or/cocoa-for-upstream' into stagingAnthony Liguori1-20/+32
# By Peter Maydell # Via Andreas Färber * afaerber-or/cocoa-for-upstream: cocoa: Avoid deprecated NSOpenPanel beginSheetForDirectory cocoa: Avoid deprecated NSOpenPanel filename method cocoa: Avoid deprecated CPS* functions cocoa: Fix leaks of NSScreen and NSConcreteMapTable
2013-05-29Merge remote-tracking branch 'kraxel/chardev.6' into stagingAnthony Liguori1-2/+3
# By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/chardev.6: chardev: fix "info chardev" output Revert "chardev: Get filename for new qapi backend" Message-id: 1369722844-24345-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29Merge remote-tracking branch 'kraxel/seabios-1.7.2.2' into stagingAnthony Liguori3-1/+1
# By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/seabios-1.7.2.2: update seabios to release 1.7.2.2 Revert "roms: switch oldnoconfig to olddefconfig" Message-id: 1369736932-16627-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29cocoa: Avoid deprecated NSOpenPanel beginSheetForDirectoryPeter Maydell1-1/+15
In MacOSX 10.6 and above the NSOpenPanel beginSheetForDirectory method is deprecated. Use the preferred replacements instead. We retain the original code for use on earlier MacOSX versions because the replacement methods don't exist before 10.6. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-29cocoa: Avoid deprecated NSOpenPanel filename methodPeter Maydell1-1/+1
Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6) in favour of using the URL method and extracting the path from the resulting NSUrl object. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-29cocoa: Avoid deprecated CPS* functionsPeter Maydell1-17/+6
The functions CPSGetCurrentProcess and CPSEnableForegroundOperation are deprecated in newer versions of MacOSX and cause warning messages to be logged to the system log. Instead, use the new preferred method of promoting our console process up to a graphical app with menubar and Dock icon, which is TransformProcessType. (This function came in with MacOSX 10.3, so there's no need to retain the old method as we don't support anything earlier than 10.3 anyway.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-29cocoa: Fix leaks of NSScreen and NSConcreteMapTablePeter Maydell1-1/+10
On MacOSX 10.8 QEMU provokes system log messages: 11/03/2013 17:03:29.998 qemu-system-arm[42586]: objc[42586]: Object 0x7ffbf9c2f3b0 of class NSScreen autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug 11/03/2013 17:03:29.999 qemu-system-arm[42586]: objc[42586]: Object 0x7ffbf9c3a010 of class NSConcreteMapTable autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug This is because we call back into Cocoa from threads other than the UI thread (specifically from the CPU thread). Since we created these threads via the POSIX API rather than NSThread, they don't have automatically created autorelease pools. Guard all the functions where QEMU can call back into the Cocoa UI code with autorelease pools so that we don't leak any Cocoa objects. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-28update seabios to release 1.7.2.2Gerd Hoffmann2-0/+0
git shortlog from 1.7.2.1 Asias He (2): virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} virtio-scsi: Set _DRIVER_OK flag before scsi target scanning Kevin O'Connor (1): Cache boot-fail-wait to avoid romfile access after POST. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-28Revert "roms: switch oldnoconfig to olddefconfig"Gerd Hoffmann1-1/+1
This reverts commit a5519b42cfd6c00e9f8b31c5aad7682e7a9f1181. Breaks "make bios" in roms/ as the kconfig version in seabios doesn't support olddefconfig. Must have been be totally untested. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-28hw/9pfs: Be robust against paths without FS_IOC_GETVERSIONGabriel de Perthuis1-0/+4
9P optionally uses the FS_IOC_GETVERSION ioctl to get information about a file's version (sometimes called generation number). The code checks for supported filesystems at mount time, but some paths may come from other mounted filesystems. Change it to treat unsupported paths the same as unsupported filesystems, returning 0 in both cases. Note: ENOTTY is the error code for an unsupported ioctl. This fix allows booting a linux kernel with the same / filesystem as the host; otherwise the boot fails when mounting devtmpfs. Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-28hw/9pfs: Use O_NOFOLLOW when opening files on serverAneesh Kumar K.V1-7/+41
9p server should never follow a symlink. So use O_NOFOLLOW with all open syscall Tested-by: "M. Mohan Kumar" <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-28hw/9pfs: use O_NOFOLLOW for mapped readlink operationAneesh Kumar K.V1-1/+1
With mapped security models like mapped-xattr and mapped-file, we save the symlink target as file contents. Now if we ever expose a normal directory with mapped security model and find real symlinks in export path, never follow them and return proper error. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-28hw/9pfs: Fix segfault with 9p2000.uAneesh Kumar K.V1-1/+1
When guest tries to chmod a block or char device file over 9pfs, the qemu process segfaults. With 9p2000.u protocol we use wstat to change mode bits and client don't send extension information for chmod. We need to check for size field to check whether extension info is present or not. Reported-by: Michael Tokarev <mjt@tls.msk.ru> Acked-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-27chardev: fix "info chardev" outputGerd Hoffmann1-0/+3
Fill unset CharDriverState->filename with the backend name, so 'info chardev' will return at least the chardev type. Don't touch it in case the chardev init function filled it already, like the socket+pty chardevs do for example. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-27Revert "chardev: Get filename for new qapi backend"Gerd Hoffmann1-2/+0
Does not handle chardevs created via chardev-add monitor command. This reverts commit 2b220025993e76d4116781ca91a4fabc5ad9c722. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-26Remove Sun4c, Sun4d and a few CPUsBlue Swirl6-955/+6
Sun4c and Sun4d architectures and related CPUs are not fully implemented (especially Sun4c MMU) and there has been no interest for them. Likewise, a few CPUs (Cypress, Ross etc) are only half implemented. Remove the machines and CPUs, they can be re-added if needed later. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26Remove OSS support for OpenBSDBrad Smith2-7/+2
Remove the OSS support for OpenBSD. The OSS API has not been usable for quite some time. Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove gen_{ld,st}* definitionsPeter Maydell1-46/+0
All the uses of the gen_{ld,st}* functions are gone now, so remove the functions themselves. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove gen_{ld,st}* from thumb2 decoderPeter Maydell1-10/+20
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove gen_{ld,st}* from Thumb insnsPeter Maydell1-25/+46
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove gen_{ld,st}* from basic ARM insnsPeter Maydell1-32/+69
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove use of gen_{ld,st}* from ldrex/strexPeter Maydell1-13/+18
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove uses of gen_{ld,st}* from Neon codePeter Maydell1-18/+28
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove uses of gen_{ld,st}* from iWMMXt codePeter Maydell1-8/+10
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Remove gen_ld64() and gen_st64()Peter Maydell1-15/+4
gen_ld64() and gen_st64() are used only in one place, so just expand them out. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26target-arm: Don't use TCGv when we mean TCGv_i32Peter Maydell1-224/+229
TCGv changes size depending on the compile time value of TARGET_LONG_BITS. This is useful for generating code for MIPS style "instructions are the same but the register width changes" CPUs, and also for the generic bits of QEMU which operate on "width of a virtual address" values, but mostly in the ARM target code we were using it purely as a shorthand for "any 32 bit value". This needs to change in preparation for AArch64 support, since an AArch64-capable v8 core will have 64 bit virtual addresses but still use 32 bit values for the 32 bit instruction set. This patch mechanically converts all the occurrences of TCGv, tcg_temp_new(), tcg_temp_free(), tcg_temp_local_new() and TCGV_UNUSED() to their explicitly 32 bit counterparts. This is correct for everything except the arguments to tcg_gen_qemu_{ld,st}*, which really do need to be TCGv and so will require a 32-to-64 conversion when building the 32 bit code for AArch64. Those changes will be in a separate patch for easier review. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-24Merge remote-tracking branch 'bonzini/iommu-for-anthony' into stagingAnthony Liguori14-118/+103
# By Paolo Bonzini (11) and others # Via Paolo Bonzini * bonzini/iommu-for-anthony: memory: clean up phys_page_find memory: populate FlatView for new address spaces memory: limit sections in the radix tree to the actual address space size s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62 memory: fix address space initialization/destruction memory: make memory_global_sync_dirty_bitmap take an AddressSpace memory: do not duplicate memory_region_destructor_none memory: Rename readable flag to romd_mode memory: Replace open-coded memory_region_is_romd memory: allow memory_region_find() to run on non-root memory regions memory: assert that PhysPageEntry's ptr does not overflow exec: eliminate stq_phys_notdirty exec: make qemu_get_ram_ptr private exec: eliminate qemu_put_ram_ptr exec: remove obsolete comment Message-id: 1369414987-8839-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-24Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori2-1/+5
# By Alasdair McLeay (1) and Stefan Hajnoczi (1) # Via Stefan Hajnoczi * stefanha/net: rtl8139: flush queued packets when RxBufPtr is written net: support for bridged networking on Mac OS X Message-id: 1369406295-20411-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-24Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori12-159/+361
# By Wenchao Xia (5) and others # Via Stefan Hajnoczi * stefanha/block: coroutine: stop using AioContext in CoQueue coroutine: protect global pool with a mutex qemu-iotests: Try creating huge qcow2 image qcow2.py: Subcommand for changing header fields qemu-io: Fix 'map' output blockdev: Rename BlockdevAction -> TransactionAction block: make all steps in qmp_transaction() as callback block: package rollback code in qmp_transaction() block: package committing code in qmp_transaction() block: move input parsing code in qmp_transaction() block: package preparation code in qmp_transaction() Message-id: 1369405947-14818-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-24memory: clean up phys_page_findPaolo Bonzini1-6/+2
Remove the goto. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: populate FlatView for new address spacesPaolo Bonzini1-1/+2
Even a new address space might have a non-empty FlatView. In order to initialize it properly, address_space_init should (a) call memory_region_transaction_commit after the address space is inserted into the list; (b) force memory_region_transaction_commit to do something. This bug was latent so far because all address spaces started empty, including the PCI address space where the bus master region is initially disabled. However, the target address space of an IOMMU is usually rooted at get_system_memory(), which might not be empty at the time the IOMMU is created. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: limit sections in the radix tree to the actual address space sizeAvi Kivity2-1/+15
The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS. If a larger memory region is registered, it will overflow. Fix by limiting any section in the radix tree to the supported size. This problem was not observed earlier since artificial regions (containers and aliases) are eliminated by the memory core, leaving only device regions which have reasonable sizes. An IOMMU however cannot be eliminated by the memory core, and may have an artificial size. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi.kivity@gmail.com> [ Fail the build if TARGET_PHYS_ADDR_SPACE_BITS is too large - Paolo ] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62Paolo Bonzini1-1/+4
With the next patch, the memory API will complain if the TARGET_PHYS_ADDR_SPACE_BITS gets dangerously close to an overflow. s390x can handle up to 64 bit of physical address space from its page tables, but we never use that much. Just decrease the value. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: fix address space initialization/destructionAvi Kivity1-0/+3
A couple of fields were left uninitialized. This was not observed earlier because all address spaces were statically allocated. Also free allocation for those fields. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi.kivity@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: make memory_global_sync_dirty_bitmap take an AddressSpacePaolo Bonzini3-7/+5
Since this is a MemoryListener operation, it only makes sense on an AddressSpace granularity. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: do not duplicate memory_region_destructor_nonePaolo Bonzini1-5/+0
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: Rename readable flag to romd_modeJan Kiszka4-30/+30
"Readable" is a very unfortunate name for this flag because even a rom_device region will always be readable from the guest POV. What differs is the mapping, just like the comments had to explain already. Also, readable could currently be understood as being a generic region flag, but it only applies to rom_device regions. So rename the flag and the function to modify it after the original term "ROMD" which could also be interpreted as "ROM direct", i.e. ROM mode with direct access. In any case, the scope of the flag is clearer now. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: Replace open-coded memory_region_is_romdJan Kiszka1-1/+1
Improves readability. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2013-05-24memory: allow memory_region_find() to run on non-root memory regionsPaolo Bonzini2-14/+34
memory_region_find() is similar to registering a MemoryListener and checking for the MemoryRegionSections that come from a particular region. There is no reason for this to be limited to a root memory region. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24memory: assert that PhysPageEntry's ptr does not overflowPaolo Bonzini1-0/+6
While sized to 15 bits in PhysPageEntry, the ptr field is ORed into the iotlb entries together with a page-aligned pointer. The ptr field must not overflow into this page-aligned value, assert that it is smaller than the page size. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>