Commit Graph

6282 Commits

Author SHA1 Message Date
Hervé Poussineau d180589621 sonic: fix typo
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-02 10:50:56 +00:00
Markus Armbruster 7e62255a4b ccid: Fix buffer overrun in handling of VSC_ATR message
ATR size exceeding the limit is diagnosed, but then we merrily use it
anyway, overrunning card->atr[].

The message is read from a character device.  Obvious security
implications unless the other end of the character device is trusted.

Spotted by Coverity.  CVE-2011-4111.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 16:20:53 -06:00
Aneesh Kumar K.V 2507718baf 9pfs: improve portability to older systems
I guess we can also make sure we don't  call local_ioc_getversion at
all.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 16:19:57 -06:00
Stefan Weil c16ada980f eepro100: Fix alignment requirement for statistical counters
According to Intel's Open Source Software Developer Manual,
the dump counters address must be Dword aligned.

The new code enforces this alignment, so s->statsaddr may now
be used with stw_le_pci_dma() and stl_le_pci_dma().

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 11:36:34 -06:00
Paolo Bonzini ad0c93328d virtio: add and use virtio_set_features
vdev->guest_features is not masking features that are not supported by
the guest.  Fix this by introducing a common wrapper to be used by all
virtio bus implementations.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 11:36:28 -06:00
Paolo Bonzini ae0f940e6b 9pfs: improve portability to older systems
Small requirements on "new" features have percolated to virtio-9p-local.c.
In particular, the utimensat wrapper actually only supports dirfd = AT_FDCWD
and flags = AT_SYMLINK_NOFOLLOW in the fallback code.  Remove the arguments
so that virtio-9p-local.c will not use AT_* constants.

At the same time, fail local_ioc_getversion if the ioctl is not supported
by the host.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 11:36:27 -06:00
Anthony Liguori 13bd0b5026 Merge remote-tracking branch 'kwolf/block-stable' into staging 2011-11-28 11:15:10 -06:00
Anthony Liguori f04303743a Merge remote-tracking branch 'kraxel/usb.32' into staging 2011-11-28 11:12:39 -06:00
Avi Kivity f44336c594 omap_l4: rename omap_l4_attach_region() to omap_l4_attach()
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:40:49 +02:00
Avi Kivity a6dbd3c836 omap_l4: remove omap_l4_attach()
No longer used.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:47 +02:00
Benoît Canet 7487813909 omap_i2c: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:47 +02:00
Benoît Canet 30af1ec729 omap_lcdc: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:47 +02:00
Benoît Canet 1a0726900e omap_spi: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:47 +02:00
Benoît Canet ba1580299d omap_sx1: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:46 +02:00
Benoît Canet 3892f842c9 omap_l4: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:46 +02:00
Avi Kivity 4852e5d8c3 omap_dss: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:45 +02:00
Avi Kivity 011a98a15b omap2: convert to memory API (part II)
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:45 +02:00
Avi Kivity 9bac7d6c15 omap2: convert to memory API (part I)
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:45 +02:00
Avi Kivity 750ecd444f sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:45 +02:00
Avi Kivity 3f7f1c8067 sysbus: remove sysbus_init_mmio()
No longer used - replaced by sysbus_init_mmio_region().

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet 9a542a4821 bonito: convert cop to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet def344a6ea bonito: convert ldma to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet 845cbeb8e3 bonito: convert south bridge pci config to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet 183e1d40db bonito: convert north bridge pci config to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet 89200979aa bonito: convert north bridge register mapping to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet 0aa27efa93 lm32_sys: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:43 +02:00
Benoît Canet 5f2be17af1 lm32_uart: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:42 +02:00
Benoît Canet 663d94467a mcf_intc: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:42 +02:00
Benoît Canet c65fc1dff3 mcf_fec: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:42 +02:00
Benoît Canet aa6e4986b8 mcf_uart: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:42 +02:00
Benoît Canet 653fa85c9a mcf5206: convert to memory API
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:42 +02:00
Avi Kivity 9244b42dea omap_gpio: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:41 +02:00
Avi Kivity 7405165e26 omap_dma: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:41 +02:00
Avi Kivity 6a0148e7b5 omap_sdrc: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:41 +02:00
Avi Kivity 9832b74c14 omap_gp_timer: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:41 +02:00
Avi Kivity fcb40162bf omap_synctimer: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:41 +02:00
Avi Kivity 0a9ee1a7d5 omap_tap: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:41 +02:00
Avi Kivity c304fed7eb omap_mmc: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:40 +02:00
Avi Kivity f32261498c omap_l4: add memory API variant of omap_l4_attach()
Also add omap_l4_region_size(), since memory API functions need
the size during initialization.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:40 +02:00
Avi Kivity a56e423c7c omap: eliminate l4_register_io_memory
This is a trivial wrapper around cpu_register_io_memory(), adding
no value.  Inline it into all callers.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:40 +02:00
Avi Kivity 92c0bba9a9 omap: remove L4_MUX_HACK
This was introduced apparently to overcome a limitation on the number of
cpu_register_io_memory() calls.  477b24ef91 (July 2008) removed use
of the hack, but retained the code.  This patch removes the code as well.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:39 +02:00
Avi Kivity aee39503df omap_uart: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-28 15:38:39 +02:00
Avi Kivity f81138ce97 prep_pci: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Avi Kivity cd5cba7941 ppce500_pci: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Avi Kivity da726e5e06 ppc4xx_pci: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Avi Kivity d09510b276 lm32_timer: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Benoît Canet 9a9d0b816b sh_serial: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Benoît Canet b279e5efc0 sh_intc: convert interrupt controller to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Benoît Canet 89e2945140 sh_timer: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Benoît Canet 1a4004c772 sh7750: convert cache and tlb to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Benoît Canet 382863e2c6 sh7750: convert memory controller/ioport to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:03 +02:00
Benoît Canet a3d12d073e slavio_timer: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet 8bb5ef333a slavio_intctl: convert slaves interrupt controllers to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet 13c89a1125 slavio_intctl: convert master interrupt controller to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet 40ce02fcd1 slavio_misc: convert aux2 to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet cccd43c544 slavio_misc: convert aux1 to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet cd64a524fa slavio_misc: convert system control to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet aca23c71d3 slavio_misc: convert leds to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet 2e66ac3d47 slavio_misc: convert modem to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet 96891e593e slavio_misc: convert diagnostic to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:02 +02:00
Benoît Canet dd703aae47 slavio_misc: convert configuration to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Benoît Canet 9c48dee672 slavio_misc: convert apc to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity 0dc31f3b32 xilinx_axienet: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity f810bc4ab6 xilinx_axidma: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity 1ce2c9cdfe sun4c_intctl: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity d224136c7b sun4m_iommu: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity 847b52c107 grlib_irqmp: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity cde844fa76 grlib_gptimer: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity 6281f7d11f grlib_apbuart: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity 4f5c947982 musicpal: avoid call to sysbus_init_mmio()
Instead of calling sysbus_init_mmio() with a null region,
create a dummy region using the memory API.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:01 +02:00
Avi Kivity cffac71b7c bitbang_i2c: avoid call to sysbus_init_mmio()
Instead of calling sysbus_init_mmio() with a null region,
create a dummy region using the memory API.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity d6c5f066ab sparc32_dma: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 00049a1221 pxa2xx_dma: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 838335ecf3 axis_dev88: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 7ef57cca57 eccmemctl: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity b0a941b02a empty_slot: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 1c7af35f96 mpc8544_guts: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 561e182755 fw_cfg: convert to memory API
Because the new API doesn't allow overlapping regions with just different
access sizes, we have to create a new "combined" region for both control
and data, when the two share an ioport offset.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 67bb53149f esp: convert to memory API
[benoit: fix]

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:32:00 +02:00
Avi Kivity 5a31cd68ba m48t59: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Avi Kivity 871321acb3 ds1225y: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Avi Kivity 024e5bb664 dp8393x: convert to memory API
Fixes address space leak on hotunplug.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Avi Kivity df182043ab cs4321: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Avi Kivity 9d7f1b9aa5 ide/mmio: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Avi Kivity e977aa3704 hpet: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Avi Kivity 3054434d61 rc4030: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Benoît Canet 5a6fdd91ce pxa2xx_lcd: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Benoît Canet 2bf90458a0 pxa2xx_mmci: convert to memory API
Convert mechanicaly; the access size of the old_mmio fields
seems odd.

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:59 +02:00
Benoît Canet 90e8e5a32c pxa2xx_pic: convert to memory API
The ARM documentation say transfers between the cpu and the
coprocessor are 32 bits wide.
Use 4 as size for coprocessor read and writes.

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet b755bde386 pxa2xx_timer: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet 6cd816b83f pxa2xx_keypad: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet 59aee13c82 pxa2xx_pcmcia.c: convert io memory space to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet 4beeaa718c pxa2xx_pcmcia.c: convert attribute memory space to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet 354a8c0676 pxa2xx_pcmcia.c: convert common memory space to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet 55a8b801a4 pxa2xx_gpio: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet af687ddc61 syborg_virtio: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:58 +02:00
Benoît Canet 7d5ebaf002 syborg_timer: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet a8a008223c syborg_serial: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 43b8c30da2 syborg_rtc: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 9ca9e358e2 syborg_pointer: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 6620cb3cc5 syborg_keyboard: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 9cc600761a syborg_interrupt: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 0520a04969 syborg_fb: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet b9441ebbff mst_fpga: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet e2ba99e9cd marvell_88x8618_audio: convert to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 2443fa274c stellaris: convert gptm to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:57 +02:00
Benoît Canet 71a2df0557 stellaris: convert adc to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Benoît Canet 8ea72f384a stellaris: convert i2c to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Benoît Canet 5699301fe2 stellaris: convert sys to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Benoît Canet 0c36493e51 integratorcp: convert control to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Benoît Canet 61074e46de integratorcp: convert icp pic to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Benoît Canet 71d9bc50ce integratorcp: convert core to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Jan Kiszka 4d5bf5f651 ioapic: Convert to memory API
This maintains the old imprecise access size handling.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Jan Kiszka 1a440963b9 ioapic: Reject non-dword accesses to IOWIN register
Aligns the model with the spec.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Avi Kivity cfee758cc7 sbi: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Avi Kivity dc6c1b3732 fdc: convert to memory API
FIXME: instance ID for migration

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:56 +02:00
Avi Kivity 7f8293bf63 pl190: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity ca45842ab6 pl181: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity 1a6b31cec7 pl110: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity 63b02e041b pl080: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity 3cf89f8a27 pl061: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity b8f7a73878 pl050: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity 9edbe481bf pl031: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity 02a59c37b4 pl022: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity 4848475794 pl011: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:55 +02:00
Avi Kivity e71ceafc7d zaurus: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity 63858cd992 parallel: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity c601785091 jazz_led: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity 0af58e58a1 shix: convert to memory API
RAM wasn't actually allocated, only used, so fix that as well.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity 333b13fc3c virtex_ml507: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity e6d17b056d vexpress: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity 62ceeb2c22 versatilepb: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Avi Kivity 04d6668997 tosa: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-24 18:31:54 +02:00
Gerd Hoffmann 335b8d2068 usb-ehci: add register names
The mmio register name list only had the names for four port status
registers.  We emulate a EHCI adapter with six ports though, the last
two ones are listed as "unknown" in traces.  Fix it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-23 16:24:06 +01:00
Gerd Hoffmann aac882e7ce usb-ehci: codestyle fixups
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-23 16:24:05 +01:00
Gerd Hoffmann 20d183b6f0 usb-hub: implement reset
based on a patch from hkran@linux.vnet.ibm.com

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-23 16:24:05 +01:00
Julian Pidancet 4abf12f4ea rtl8139: Fix invalid IO access alignment
This patch makes iPXE work with the rtl8139 emulation. The rtl8139
driver in iPXE issues a 16bit access on the ChipCmd register
(offset 0x37) to check the status of the rx buffer. The offset of the
ioport access was getting fixed up to 0x36 in qemu, causing the value
read in iPXE to be invalid.

This fixes an issue with iPXE reporting timeouts during TFTP transfers.

Reposting this here because it is trivial enough and the original post
on qemu-devel didn't attract much attention.

Also, the inw() which was causing the issue has been replaced with an
inb() in upstream iPXE:
https://git.ipxe.org/ipxe.git/commit/91dd64ad25baa27954a7518e73df4fca8a2d0c93

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-23 10:36:59 +00:00
Gerd Hoffmann be35cbbc88 usb-hub: wakeup on detach too.
When detaching devices from the usb hub we must wakeup too,
otherwise the host misses the detach event.

Commit 4a33a9ea06 does the
same for device attach.

Found by hkran@linux.vnet.ibm.com

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-22 14:12:36 +01:00
Gerd Hoffmann f462141f18 usb: fix usb_qdev_init error handling.
qdev doesn't call the ->exit callback on ->init failures, so we have to
take care ourself that we cleanup property on errors.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-22 14:12:32 +01:00
Gerd Hoffmann 2af2a1b8d0 usb: make usb_create_simple catch and pass up errors.
Use qdev_init() instead of qdev_init_nofail(), usb device initialization
can fail, most common case being port and device speed mismatch.  Handle
failures correctly and pass up NULL pointers then.

Also fixup usb_create_simple() callers (only one was buggy) to properly
check for NULL pointers before referncing the usb_create_simple() return
value.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-22 13:38:12 +01:00
Paolo Bonzini 28b77657cf scsi-generic: add as boot device
There is no reason why a scsi-generic device cannot boot if it has
the right type, and indeed it provides already a bootindex property.
So register those devices too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-11-22 10:33:30 +01:00
Paolo Bonzini 795928f61d scsi: fix fw path
The pre-1.0 firmware path for SCSI devices already included the LUN
using the suffix argument to add_boot_device_path.  Avoid that it is
included twice, and convert the colons to commas for consistency with
other kinds of devices

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-11-22 10:33:30 +01:00
Paolo Bonzini ce4e7e4661 usb-msd: do not register twice in the boot order
USB mass storage devices are registered twice in the boot order.
To avoid having to keep the two paths in sync, pass the bootindex
property down to the scsi-disk device and let it register itself.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-11-22 10:33:30 +01:00
Paolo Bonzini 3a395142ba virtio-blk: fix cross-endian config space
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-11-22 10:33:30 +01:00
Hongyong Zang ff51a738cf ivshmem: fix PCI BAR2 registration during initialization
Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest.
As for pci_register_bar(), parameter MemoryRegion should be s->bar instead of s->ivshmem.

Reviewed-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Hongyong Zang <zanghongyong@huawei.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-21 15:05:59 -06:00
Michael S. Tsirkin ae392c416c msix: avoid mask updates if mask is unchanged
Check pending bit only if vector mask status changed.
This is not really important for qemu.git but helps
fix a bug in qemu-kvm.git.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-21 15:05:59 -06:00
Michael S. Tsirkin 9a93b61730 msix: Prevent bogus mask updates on MMIO accesses
>From: Jan Kiszka <jan.kiszka@siemens.com>

Only accesses to the MSI-X table must trigger a call to
msix_handle_mask_update, otherwise the vector
value might be out of range.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-21 15:05:59 -06:00
Michael S. Tsirkin 50322249fd msix: track function masked in pci device state
Only go over the table when function is masked.
This is not really important for qemu.git but helps
fix a bug in qemu-kvm.git.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-21 15:05:59 -06:00
Paolo Bonzini 930b588395 9p: pass dotl flags to the unlinkat method
AT_REMOVEDIR is not defined on all systems.  Pass the raw flags from the
9p protocol, which are always there.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-21 14:58:49 -06:00
Paolo Bonzini f565403949 9p: allow compiling the dummy virtio-9p-handle.c code on Linux
Avoid a conflict on the definition of struct file_handle by
using a replacement name.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-21 14:58:48 -06:00