summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2013-06-17Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori2-3/+5
# By Luiz Capitulino # Via Luiz Capitulino * luiz/queue/qmp: qerror: drop QERR_OPEN_FILE_FAILED macro block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED savevm: qmp_xen_save_devices_state(): use error_setg_file_open() dump: qmp_dump_guest_memory(): use error_setg_file_open() cpus: use error_setg_file_open() blockdev: use error_setg_file_open() block: mirror_complete(): use error_setg_file_open() rng-random: use error_setg_file_open() error: add error_setg_file_open() helper Message-id: 1371484631-29510-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-17NVMe: Initial commit for new storage interfaceKeith Busch1-0/+1
Initial commit for emulated Non-Volatile-Memory Express (NVMe) pci storage device. NVMe is an open, industry driven storage specification defining an optimized register and command set designed to deliver the full capabilities of non-volatile memory on PCIe SSDs. Further information may be found on the organizations website at: http://www.nvmexpress.org/ This commit implements the minimum from the specification to work with existing drivers. Cc: Keith Busch <keith.busch@gmail.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-17qerror: drop QERR_OPEN_FILE_FAILED macroLuiz Capitulino1-3/+0
Not used since the last commit. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2013-06-17error: add error_setg_file_open() helperLuiz Capitulino1-0/+5
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
2013-06-17Merge remote-tracking branch 'pmaydell/configury.next' into stagingAnthony Liguori1-36/+0
# By Paolo Bonzini (4) and others # Via Peter Maydell * pmaydell/configury.next: ppc: Remove CONFIG_FDT conditionals microblaze: Remove CONFIG_FDT conditionals arm: Remove CONFIG_FDT conditionals configure: Require libfdt for arm, ppc, microblaze softmmu targets configure: dtc: Probe for libfdt_env.h build: drop TARGET_TYPE main: use TARGET_ARCH only for the target-specific #define build: do not use TARGET_ARCH build: rename TARGET_ARCH2 to TARGET_NAME Add a stp file for usage from build directory Message-id: 1371221594-11556-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-15Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpuBlue Swirl8-39/+54
* 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu: qdev: Drop FROM_QBUS() macro isa: QOM'ify ISADevice isa: QOM'ify ISABus i8259: Convert PICCommonState to use QOM realizefn kvm/i8259: QOM'ify some more i8259: QOM'ify some more i8254: Convert PITCommonState to QOM realizefn kvm/i8254: QOM'ify some more i8254: QOM'ify some more isa: Use realizefn for ISADevice cs4231a: QOM'ify some more gus: QOM'ify some more
2013-06-14configure: dtc: Probe for libfdt_env.hPeter Crosthwaite1-36/+0
Currently QEMU provides a local clone of the file libfdt_env.h in /include. This file is supposed to come with the libfdt package and is only needed for broken installs of libfdt. Now that we have submodule dtc, just ignore these broken installs and prompt for the dtc submodule install instead. QEMU's local libfdt_env.h is removed accordingly. Manifests as a bug when building QEMU with modern libfdt. The new version of libfdt does not compile when QEMUs libfdt_env.h takes precedence over the hosts. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 9b6a3a52e3f46cfbc1ded9ab56385ec045e46705.1369628289.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-14smbios: Clean up smbios_add_field() parametersMarkus Armbruster1-1/+1
Having size precede the associated pointer is odd. Swap them, and fix up the types. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com> Message-id: 1370610036-10577-5-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14log.h: Supply missing includesMarkus Armbruster1-0/+3
<stdio.h> has always been missing. Rest missed in commit eeacee4. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com> Message-id: 1370610036-10577-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14error-report.h: Supply missing includeMarkus Armbruster1-0/+1
Missed in commit e5924d8. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com> Message-id: 1370610036-10577-2-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14Merge remote-tracking branch 'mjt/trivial-patches-next' into stagingAnthony Liguori3-24/+8
# By Michael Tokarev (4) and others # Via Michael Tokarev * mjt/trivial-patches-next: (26 commits) piix: fix some printf errors when debug is enabled cputlb: fix debug logs create qemu_openpty_raw() helper function and move it to a separate file main-loop: do not include slirp/slirp.h, use libslirp.h instead libcacard/vscclient: fix leakage of socket on error paths linux-headers: Update to v3.10-rc5 KVM: PPC: Add dummy kvm_arch_init_irq_routing() KVM: S390: Add dummy kvm_arch_init_irq_routing() KVM: ARM: Add dummy kvm_arch_init_irq_routing() ivshmem: add missing error exit(2) hw/xen: Use g_free instead of free and fix potential memory leaks target-sparc: Replace free by g_free hw/scsi: Don't increment a boolean value device tree: Fix cppcheck warning Makefile: Install qemu-img and qemu-nbd man pages only if built Unbreak -no-quit for GTK, validate SDL options gtk: implement -full-screen char/serial: serial_ioport_write: Factor out common code char/serial: Use generic Fifo8 char/serial: cosmetic fixes. ... Message-id: 1371207042-17980-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori4-12/+57
# By Andreas Färber (12) and others # Via Andreas Färber * afaerber/qom-cpu: spapr_rtas: Abstract rtas_start_cpu() with qemu_get_cpu() spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu() memory_mapping: Improve qemu_get_guest_memory_mapping() error reporting dump: Abstract dump_init() with cpu_synchronize_all_states() cpu: Change default for CPUClass::get_paging_enabled() dump: Drop qmp_dump_guest_memory() stub and build for all targets memory_mapping: Drop qemu_get_memory_mapping() stub cpu: Turn cpu_get_memory_mapping() into a CPUState hook memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.h cpu: Turn cpu_paging_enabled() into a CPUState hook monitor: Simplify do_inject_mce() with qemu_get_cpu() target-i386: cpu: Fix potential buffer overrun in get_register_name_32() target-i386: Set level=4 on Conroe/Penryn/Nehalem target-i386: Update model values on Conroe/Penryn/Nehalem CPU models pc: Create pc-*-1.6 machine-types pc: Fix crash when attempting to hotplug CPU with negative ID dump: Move stubs into libqemustub.a
2013-06-14Merge remote-tracking branch 'pmaydell/tcg-aarch64.next' into stagingAnthony Liguori2-1/+133
# By Claudio Fontana (9) and others # Via Peter Maydell * pmaydell/tcg-aarch64.next: MAINTAINERS: add tcg/aarch64 maintainer configure: permit compilation on arm aarch64 tcg/aarch64: implement user mode qemu ld/st user-exec.c: aarch64 initial implementation of cpu_signal_handler tcg/aarch64: implement sign/zero extend operations tcg/aarch64: implement byte swap operations tcg/aarch64: implement AND/TEST immediate pattern tcg/aarch64: improve arith shifted regs operations tcg/aarch64: implement new TCG target for aarch64 include/elf.h: add aarch64 ELF machine and relocs configure: Drop CONFIG_ATFILE test linux-user: Drop direct use of openat etc syscalls linux-user: Allow getdents to be provided by getdents64 Message-id: 1371052645-9006-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14Merge remote-tracking branch 'rth/tcg-for-anthony' into stagingAnthony Liguori1-1/+1
# By Richard Henderson # Via Richard Henderson * rth/tcg-for-anthony: tcg: Remove redundant tcg_target_init checks tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITS Message-id: 1370437167-11278-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14create qemu_openpty_raw() helper function and move it to a separate fileMichael Tokarev1-13/+2
In two places qemu uses openpty() which is very system-dependent, and in both places the pty is switched to raw mode as well. Make a wrapper function which does both steps, and move all the system-dependent complexity into a separate file, together with static/local implementations of openpty() and cfmakeraw() from qemu-char.c. It is in a separate file, not part of oslib-posix.c, because openpty() often resides in -lutil which is not linked to every program qemu builds. This change removes #including of <pty.h>, <termios.h> and other rather specific system headers out of qemu-common.h, which isn't a place for such specific headers really. This version has been verified to build correctly on Linux, OpenBSD, FreeBSD and OpenIndiana. On the latter it lets qemu to be built with gtk gui which were not possible there due to missing openpty() and cfmakeraw(). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Tested-by: Andreas Färber <andreas.faerber@web.de>
2013-06-12tcg/aarch64: implement new TCG target for aarch64Claudio Fontana1-1/+4
add preliminary support for TCG target aarch64. Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 51A5C596.3090108@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-12include/elf.h: add aarch64 ELF machine and relocsClaudio Fontana1-0/+129
we will use the 26bit relative relocs in the aarch64 tcg target. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 51A5C52A.4080001@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-11gtk: implement -full-screenPeter Wu1-1/+1
Aiming for GTK as replacement for SDL, a feature like -full-screen should also be implemented. Bringing the window into full-screen mode is done by activating the "Fullscreen" menu item. This is done after showing the windows to make the cursor and menu hidden. v2: drop -no-frame implementation, use booleans instead of ints and ensure consistency between ui state and menu. Signed-off-by: Peter Wu <lekensteyn@gmail.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11char/serial: Use generic Fifo8Peter Crosthwaite1-10/+5
Use the generic Fifo8 helper provided by QEMU, rather than re-implement privately. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11memory_mapping: Improve qemu_get_guest_memory_mapping() error reportingAndreas Färber1-7/+1
Pass any Error out into dump_init() and have it actually stop on errors. Whether it is unsupported on a certain CPU can be checked by looking for a NULL CPUClass::get_memory_mapping field. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Reverted changes to CPU loops] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11cpu: Turn cpu_get_memory_mapping() into a CPUState hookAndreas Färber2-2/+13
Change error reporting from return value to Error argument. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Fixed cpu_get_memory_mapping() documentation] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.hAndreas Färber2-2/+5
This will avoid issues with hwaddr and ram_addr_t when including sysemu/memory_mapping.h for CONFIG_USER_ONLY, e.g., from qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11cpu: Turn cpu_paging_enabled() into a CPUState hookAndreas Färber2-1/+10
Relocate assignment of x86 get_arch_id to have all hooks in one place. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10target-i386: Set level=4 on Conroe/Penryn/NehalemEduardo Habkost1-0/+12
The CPUID level value on Conroe, Penryn, and Nehalem are too low. This causes at least one known problem: the -smp "threads" option doesn't work as expect if level is < 4, because thread count information is provided to the guest on CPUID[EAX=4,ECX=2].EAX Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10target-i386: Update model values on Conroe/Penryn/Nehalem CPU modelsEduardo Habkost1-0/+16
The CPUID model values on Conroe, Penryn, and Nehalem are too conservative and don't reflect the values found on real Conroe, Penryn, and Nehalem CPUs. This causes at least one known problems: Windows XP disables sysenter when (family == 6 && model <= 2), but Skype tries to use the sysenter instruction anyway because it is reported as available on CPUID, making it crash. This patch sets appropriate model values that correspond to real Conroe, Penryn, and Nehalem CPUs. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10qemu-char: don't issue CHR_EVENT_OPEN in a BHMichael Roth1-1/+1
When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET, and it was issued as a bottom-half: 86e94dea5b740dad65446c857f6959eae43e0ba6 Which we basically used to print out a greeting/prompt for the monitor. AFAICT the only reason this was ever done in a BH was because in some cases we'd modify the chr_write handler for a new chardev backend *after* the site where we issued the reset (see: 86e94d:qemu_chr_open_stdio()) At some point this event was renamed to CHR_EVENT_OPENED, and we've maintained the use of this BH ever since. However, due to 9f939df955a4152aad69a19a77e0898631bb2c18, we schedule the BH via g_idle_add(), which is causing events to sometimes be delivered after we've already begun processing data from backends, leading to: known bugs: QMP: session negotation resets with OPENED event, in some cases this is causing new sessions to get sporadically reset potential bugs: hw/usb/redirect.c: can_read handler checks for dev->parser != NULL, which may be true if CLOSED BH has not been executed yet. In the past, OPENED quiesced outstanding CLOSED events prior to us reading client data. If it's delayed, our check may allow reads to occur even though we haven't processed the OPENED event yet, and when we do finally get the OPENED event, our state may get reset. qtest.c: can begin session before OPENED event is processed, leading to a spurious reset of the system and irq_levels gdbstub.c: may start a gdb session prior to the machine being paused To fix these, let's just drop the BH. Since the initial reasoning for using it still applies to an extent, work around that by deferring the delivery of CHR_EVENT_OPENED until after the chardevs have been fully initialized, toward the end of qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This defers delivery long enough that we can be assured a CharDriverState is fully initialized before CHR_EVENT_OPENED is sent. Also, rather than requiring each chardev to do an explicit open, do it automatically, and allow the small few who don't desire such behavior to suppress the OPENED-on-init behavior by setting a 'explicit_be_open' flag. We additionally add missing OPENED events for stdio backends on w32, which were previously not being issued, causing us to not recieve the banner and initial prompts for qmp/hmp. Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Message-id: 1370636393-21044-1-git-send-email-mdroth@linux.vnet.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-07qdev: Drop FROM_QBUS() macroAndreas Färber1-2/+0
Use QOM cast macros I2C_BUS(), SSI_BUS(), PCI_BUS() instead. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07isa: QOM'ify ISADeviceAndreas Färber3-20/+29
Rename its parent field and use DEVICE() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07isa: QOM'ify ISABusAndreas Färber1-1/+4
Rename its parent field and use ISA_BUS() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07i8259: Convert PICCommonState to use QOM realizefnAndreas Färber1-1/+1
Instead of having the parent provide PICCommonClass::init, let the children override DeviceClass::realize themselves. This pushes the responsibility of saving and calling the parent's realizefn to the children. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07i8254: Convert PITCommonState to QOM realizefnAndreas Färber1-1/+0
Instead of having the parent provide PITCommonClass::init, let the children override DeviceClass::realize themselves. This pushes the responsibility for saving and calling the parent's realizefn to the children. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07kvm/i8254: QOM'ify some moreAndreas Färber1-5/+8
Introduce type constant and cast macro to obsolete DO_UPCAST(). Prepares for PIT realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07i8254: QOM'ify some moreAndreas Färber1-7/+11
Introduce type constant and avoid DO_UPCAST(). Prepares for PIT realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07qmp: add ImageInfo in BlockDeviceInfo used by query-blockWenchao Xia1-1/+3
Now image info will be retrieved as an embbed json object inside BlockDeviceInfo, backing chain info and all related internal snapshot info can be got in the enhanced recursive structure of ImageInfo. New recursive member *backing-image is added to reflect the backing chain status. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07block: add image info query function bdrv_query_image_info()Wenchao Xia1-3/+3
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07block: add snapshot info query function bdrv_query_snapshot_info_list()Wenchao Xia1-1/+3
This patch adds function bdrv_query_snapshot_info_list(), which will retrieve snapshot info of an image in qmp object format. The implementation is based on the code moved from qemu-img.c with modification to fit more for qmp based block layer API. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07isa: Use realizefn for ISADeviceAndreas Färber2-2/+1
Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-06blkdebug: Add BLKDBG_FLUSH_TO_OS/DISK eventsKevin Wolf1-0/+3
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06qemu-io: Interface cleanupKevin Wolf1-0/+46
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06qemu-io: Move qemu_strsep() to cutils.cKevin Wolf1-0/+1
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06cutils: Support 'P' and 'E' suffixes in strtosz()Kevin Wolf1-0/+2
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-05tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITSRichard Henderson1-1/+1
Rather than a hand-coded version of the same thing. Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-06-04Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into stagingAnthony Liguori2-5/+3
* sstabellini/xen_fixes_20130603: xen: use pc_init_pci instead of pc_init_pci_no_kvmclock xen: remove xen_vcpu_init xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional) xen_machine_pv: do not create a dummy CPU in machine->init main_loop: do not set nonblocking if xen_enabled() xen: simplify xen_enabled Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-04Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori4-28/+100
# By Stefan Hajnoczi (6) and others # Via Kevin Wolf * kwolf/for-anthony: block: dump snapshot and image info to specified output block: move qmp and info dump related code to block/qapi.c block: move snapshot code in block.c to block/snapshot.c block: drop bs_snapshots global variable qemu-iotests: make create_image() common qemu-iotests: make compare_images() common qemu-iotests: make cancel_and_wait() common qemu-iotests: make assert_no_active_block_jobs() common block: add block driver read only whitelist qemu-iotests: fix 054 cluster size help output Message-id: 1370349940-4703-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-04Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori5-11/+15
pci: misc cleanups This includes some pci-related cleanups, and fw cfg cleanups which will be useful for on-going pci related work. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 02 Jun 2013 02:46:52 PM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Michael S. Tsirkin (8) and Laszlo Ersek (1) # Via Michael S. Tsirkin * mst/tags/for_anthony: pvpanic: use FWCfgState explicitly fw_cfg: fw_cfg is a singleton fw_cfg: add API to find FW cfg object fw_cfg: move typedef to qemu/typedefs.h refer to FWCfgState explicitly apic: rename apic specific bitopts firmware_abi: move to include/hw/nvram/ dec.c - move to pci-bridge q35: set fw_name Message-id: 1370202787-3712-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-04block: dump snapshot and image info to specified outputWenchao Xia1-2/+4
bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now, some internal buffers are still used for format control, which have no chance to be truncated. As a result, these two functions have no more issue of truncation, and they can be used by both qemu and qemu-img with correct parameter specified. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-04block: move qmp and info dump related code to block/qapi.cWenchao Xia3-9/+42
This patch is a pure code move patch, except following modification: 1 get_human_readable_size() is changed to static function. 2 dump_human_image_info() is renamed to bdrv_image_info_dump(). 3 in qmp_query_block() and qmp_query_blockstats, use bdrv_next(bs) instead of direct traverse of global array 'bdrv_states'. 4 collect_snapshots() and collect_image_info() are renamed, unused parameter *fmt in collect_image_info() is removed. 5 code style fix. To avoid conflict and tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H. Now block.h and snapshot.h are at the same level in include path, block_int.h and qapi.h will both include them. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-04block: move snapshot code in block.c to block/snapshot.cWenchao Xia2-21/+58
All snapshot related code, except bdrv_snapshot_dump() and bdrv_is_snapshot(), is moved to block/snapshot.c. bdrv_snapshot_dump() will be moved to another file later. bdrv_is_snapshot() is not related with internal snapshot. It also fixes small code style errors reported by check script. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-04block: drop bs_snapshots global variableStefan Hajnoczi1-1/+0
The bs_snapshots global variable points to the BlockDriverState which will be used to save vmstate. This is really a savevm.c concept but was moved into block.c:bdrv_snapshots() when it became clear that hotplug could result in a dangling pointer. While auditing the block layer's global state I came upon bs_snapshots and realized that a variable is not necessary here. Simply find the first BlockDriverState capable of internal snapshots each time this is needed. The behavior of bdrv_snapshots() is preserved across hotplug because new drives are always appended to the bdrv_states list. This means that calling the new find_vmstate_bs() function is idempotent - it returns the same BlockDriverState unless it was hot-unplugged. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-04block: add block driver read only whitelistFam Zheng1-1/+2
We may want to include a driver in the whitelist for read only tasks such as diagnosing or exporting guest data (with libguestfs as a good example). This patch introduces a readonly whitelist option, and for backward compatibility, the old configure option --block-drv-whitelist is now an alias to rw whitelist. Drivers in readonly list is only permitted to open file readonly, and returns -ENOTSUP for RW opening. E.g. To include vmdk readonly, and others read+write: ./configure --target-list=x86_64-softmmu \ --block-drv-rw-whitelist=qcow2,raw,file,qed \ --block-drv-ro-whitelist=vmdk Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>