summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* hw/onenand: program actions can only clear bitsJuha Riihimäki2011-07-301-29/+106
| | | | | | | | | | | | | | | The program actions onenand_prog_main() and onenand_prog_spare() can only set bits. This implies a rewrite of onenand_erase() to not use the program functions, since erase does need to set bits. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* onenand: Handle various ID fields separatelyJuha Riihimäki2011-07-303-14/+23
| | | | | | | | | | | | | | Handle the manufacturer, device and version IDs separately rather than smooshing them all together into a single uint32_t. Note that the ID registers are actually 16 bit, even though typically the top bits are 0 and the Read Identification Data command only returns the bottom 8 bits. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* onenand: Pass BlockDriverState to init functionPeter Maydell2011-07-303-10/+12
| | | | | | | | Pass the BlockDriverState to the onenand init function so it doesn't need to look up the drive itself. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: qdevifyJuha Riihimäki2011-07-305-81/+103
| | | | | | | | | | | Qdevify the NAND device. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Writing to NAND can only clear bitsPeter Maydell2011-07-301-4/+13
| | | | | | | | Writing to a NAND device cannot set bits, it can only clear them; implement this rather than simply copying the data. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Support multiple reads following READ STATUSJuha Riihimäki2011-07-301-3/+8
| | | | | | | | | | | | After receiving READ STATUS command all subsequent IO reads should return the status register value until another command is issued. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Support devices wider than 8 bitsJuha Riihimäki2011-07-302-34/+88
| | | | | | | | | | | Support NAND devices which are wider than 8 bits. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* nand: Bump vmstate version after changing structure.Andrzej Zaborowski2011-07-301-3/+3
| | | | Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Support large NAND devicesJuha Riihimäki2011-07-301-21/+27
| | | | | | | | | | | Add support for NAND devices of over 1Gb. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Pass block device state to init functionPeter Maydell2011-07-305-10/+15
| | | | | | | | Pass the BlockDeviceState to the nand_init() function rather than having it look it up via drive_get() itself. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* lm832x: Take DeviceState pointer in lm832x_key_event()Peter Maydell2011-07-303-7/+6
| | | | | | | | | | | | | Since lm832x has been qdev'ified, its users will generally have a DeviceState pointer rather than an i2c_slave pointer, so adjust lm832x_key_event's prototype to suit. This allows the n810 (its only user) to actually pass a correct pointer to it rather than NULL. The effect is that we no longer segfault when a key is pressed. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_gpio.c: Convert to qdevJuha Riihimäki2011-07-306-173/+218
| | | | | | | | | | | Convert the OMAP GPIO module to qdev. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_clk: Add the clock for the OMAP2430-specific fifth GPIO modulePeter Maydell2011-07-301-1/+5
| | | | | | | | The OMAP2430 has a fifth GPIO module which earlier OMAP2 models lack; add the clock definition for it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_l4.c: Add helper function omap_l4_region_baseJuha Riihimäki2011-07-302-0/+8
| | | | | | | | | | | | Add helper function omap_l4_region_base() to return the base address of a particular region of an L4 target agent. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-07-294-5/+30
|\
| * xen_mapcache: remove unused variableJuan Quintela2011-07-271-2/+1
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * Makefile: add missing deps on $(GENERATED_HEADERS)Michael Roth2011-07-271-1/+3
| | | | | | | | | | | | | | | | | | This fixes a build issue with make -j6+ due to qapi-generated files being built before $(GENERATED_HEADERS) have been created. Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * qmp: fix efect -> effect typo in qmp-commands.hxZhi Yong Wu2011-07-271-1/+1
| | | | | | | | | | Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * slirp: Fix unusual "comments" in unused codeStefan Weil2011-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck detected two rather strange comments which were not correctly written as C comments. They did not cause any harm because they were framed by #ifdef notdef ... #endif, so they were never compiled. Fix them nevertheless (we could also remove the unused code). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * Makefile: Minor cscope fixupsAlexandre Raymond2011-07-271-1/+1
| | | | | | | | | | | | | | | | | | Create cscope symbols for assembly files in addition to .c/.h files. Create cscope database with full path instead of relative path so cscope can be used with CSCOPE_DB in any directory. Signed-off-by: Alexandre Raymond <cerbere@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * vhost build fix for i386Wolfgang Mauerer2011-07-271-0/+23
| | | | | | | | | | | | | | | | | | vhost.c uses __sync_fetch_and_and(), which is only available for -march=i486 and above (see https://bugzilla.redhat.com/show_bug.cgi?id=624279). Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'alon/pull-libcacard.afe' into stagingAnthony Liguori2011-07-294-78/+224
|\ \
| * | libcacard: add pc file, install it + includesAlon Levy2011-07-263-3/+42
| | | | | | | | | | | | | | | | | | Additionally: + add --includedir configure parameters + make install-libcacard install vscclient as well
| * | libcacard: replace copy_string with strndupChristophe Fergeau2011-07-221-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | copy_string reimplements strndup, this commit removes it and replaces all copy_string uses with strndup. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
| * | libcacard: introduce NEXT_TOKEN macroChristophe Fergeau2011-07-221-47/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vcard_emul_options now has repetitive code to read the current token and advance to the next. After the previous changes, this repetitive code can be moved in a NEXT_TOKEN macro to avoid having this code duplicated. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
| * | libcacard: fix soft=... parsing in vcard_emul_optionsChristophe Fergeau2011-07-221-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous parser had copy and paste errors when computing vname_length and type_params_length, "name" was used instead of respectively vname and type_params. This led to length that could be bigger than the input string, and to access out of the array bounds when trying to copy these strings. valgrind rightfully complained about this. It also didn't handle empty fields correctly, Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
| * | libcacard: s/strip(args++)/strip(args+1)Christophe Fergeau2011-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vcard_emul_options used args = strip(args++) a few times, which was not returning the expected result since the rest of the code expected args to be increased by at least 1, which is not the case if *args is not a blank space when this function is called. Replace these calls by "strip(args+1)" which will do what we expect. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
| * | libcacard: don't leak vcard_emul_alloc_arrays memChristophe Fergeau2011-07-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vcard_emul_mirror_card and vcard_emul_init use vcard_emul_alloc_arrays to allocate memory for temporary arrays which will contain elements that in the end will be used one by one in cac_card_init. The arrays themselves are never stored anywhere, they are only used as temporary containers. Hence the memory that was allocated for these arrays should be freed after use or they will be leaked.
| * | libcacard/vcard_emul_nss: support cards lying about CKM_RSA_X_509 supportRobert Relyea2011-07-221-6/+127
| | | | | | | | | | | | | | | | | | | | | | | | Some tokens claim to do CKM_RSA_X_509, but then choke when they try to do the actual operations. Try to detect those cases and treat them as if the token didn't claim support for X_509. Signed-off-by: Robert Relyea <rrelyea@redhat.com>
* | | Merge remote-tracking branch 'agraf/xen-next' into stagingAnthony Liguori2011-07-2910-33/+162
|\ \ \
| * | | xen: implement unplug protocol in xen_platformStefano Stabellini2011-07-264-2/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unplug protocol is necessary to support PV drivers in the guest: the drivers expect to be able to "unplug" emulated disks and nics before initializing the Xen PV interfaces. It is responsibility of the guest to make sure that the unplug is done before the emulated devices or the PV interface start to be used. We use pci_for_each_device to walk the PCI bus, identify the devices and disks that we want to disable and dynamically unplug them. Changes in v2: - use PCI_CLASS constants; - replace pci_unplug_device with qdev_unplug; - do not import hw/ide/internal.h in xen_platform.c; Changes in v3: - introduce piix3-ide-xen, that support hot-unplug; - move the unplug code to hw/ide/piix.c; - just call qdev_unplug from xen_platform.c to unplug the IDE disks; Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | vl.c: Check the asked ram_size later.Anthony PERARD2011-07-261-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a Xen guest can have more than 2GB of RAM on a 32bit host, we move the conditions after than we now if we run one Xen or not. [agraf] separate xen branch from ram_size check Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | xen: Fix the memory registration to reflect of what is done by Xen.Anthony PERARD2011-07-261-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Xen guest memory is allocated by libxc. But this memory is not allocated continuously, instead, it leaves the VGA IO memory space not allocated, same for the MMIO space (at HVM_BELOW_4G_MMIO_START of size HVM_BELOW_4G_MMIO_LENGTH). So to reflect that, we do not register the physical memory for this two holes. But we still keep only one RAMBlock for the all RAM as it is more easier than have two separate blocks (1 above 4G). Also this prevent QEMU from use the MMIO space for a ROM. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | cpu-common: Have a ram_addr_t of uint64 with Xen.Anthony PERARD2011-07-263-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Xen case, memory can be bigger than the host memory. that mean a 32bits host (and QEMU) should be able to handle a RAM address of 64bits. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | xen: make xen_enabled even more cleverAlexander Graf2011-07-262-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using xen_enabled() we're currently only checking if xen is enabled at all during the build. But what if you want to build multiple targets out of which only one can potentially run xen code? That means that for generic code we'll still have to fall back to the variable and potentially slow the code down, but it's not as important as that is mostly xen device emulation which is not touched for non-xen targets. The target specific code however can with this patch see that it's unable to ever execute xen code. We can thus always return 0 on xen_enabled(), giving gcc enough hints to evict the mapcache code from the target memory management code. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
| * | | xen: remove CONFIG_XEN_MAPCACHEAlexander Graf2011-07-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We were still exporting CONFIG_XEN_MAPCACHE, even though it's completely unused by now. Remove it. Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | exec.c: Use ram_addr_t in cpu_physical_memory_rw(...).Anthony PERARD2011-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the variable pd and addr1 inside the function cpu_physical_memory_rw are mean to handle a RAM address, they should be of the ram_addr_t type instead of unsigned long. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | xen: Fix xen_enabled().Anthony PERARD2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the "host" CONFIG_ define instead of the "target" one. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | xen: introduce xen_change_state_handlerAnthony PERARD2011-07-261-7/+18
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the call to xenstore_record_dm_state from xen_main_loop_prepare that is HVM specific. Add a new vm_change_state_handler shared between xen_pv and xen_hvm machines to record the VM state to xenstore. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | | Merge remote-tracking branch 'kraxel/migration.2' into stagingAnthony Liguori2011-07-299-0/+52
|\ \ \
| * | | usb-serial doesn't support migrationGerd Hoffmann2011-07-201-0/+7
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb-net doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb-bt doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb-wacom doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb storage: first migration support bits.Gerd Hoffmann2011-07-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag vmstate as unmigratable for the time being, to be removed when mgration support is finished. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | ehci doesn't support migrationGerd Hoffmann2011-07-201-0/+7
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | ahci doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | vmstate: add no_migrate flag to VMStateDescriptionGerd Hoffmann2011-07-202-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to easily tag devices as non-migratable, so any attempt to migrate a virtual machine with the device in question active will make migration fail. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | | monitor: fix build breakage with --disable-vncTeLeMan2011-07-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The breakage was introduced by the commit 13661089810d3e59931f3e80d7cb541b99af7071 Signed-off-by: TeLeMan <geleman@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | Allow to leave type on default in -machineJan Kiszka2011-07-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to specify -machine options without setting an explicit machine type. We will pick the default machine in this case. Requesting the list of available machines is still possible via '-machine ?' e.g. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud