summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* net: fix qemu_can_send_packet logicVincent Palatin2011-03-051-3/+3
| | | | | | | | | | | | | | | | | | | | If any of the clients is not ready to receive (ie it has a can_receive callback and can_receive() returns false), we don't want to start sending, else this client may miss/discard the packet. I got this behaviour with the following setup : the emulated machine is using an USB-ethernet adapter, it is connected to the network using SLIRP and I'm dumping the traffic in a .pcap file. As per the following command line : -net nic,model=usb,vlan=1 -net user,vlan=1 -net dump,vlan=1,file=/tmp/pkt.pcap Every time that two packets are coming in a row from the host, the usb-net code will receive the first one, then returns 0 to can_receive call since it has a 1 packet long queue. But as the dump code is always ready to receive, qemu_can_send_packet will return true and the next packet will discard the previous one in the usb-net code. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* net: fix trace when debug is activated in slirpVincent Palatin2011-03-051-1/+1
| | | | | | | make the code compile correctly when DEBUG is activated. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: fix compile failure if !CONFIG_USE_GUEST_BASEPeter Maydell2011-03-031-0/+4
| | | | | | | | | | | | If CONFIG_USE_GUEST_BASE is not defined, gcc complains: linux-user/mmap.c:235: error: comparison of unsigned expression >= 0 is always true because RESERVED_VA is #defined to 0. Since mmap_find_vma_reserved() will never be called anyway if RESERVED_VA is always 0, fix this by simply #ifdef'ing away the function and its callsite. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* virtio-net: Fix lduw_p() pointer argument of wrong sizeStefan Hajnoczi2011-03-031-2/+2
| | | | | | | | | | | | | | | | A pointer to a size_t variable was passed as the void * pointer to lduw_p() in virtio_net_receive(). Instead of acting on the 16-bit value this caused failure on big-endian hosts. Avoid this issue in the future by using stw_p() instead. In general we should use ld*_p() for loading from target memory and st*_p() for storing to target memory anyway, not the other way around. Also tighten up a correct use of lduw_p() when stw_p() should be used instead in virtio_net_get_config(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: move intr_at_halt out of cpu_halted()Aurelien Jarno2011-03-034-4/+4
| | | | | | | | | | | | | | All targets except SH4 have the same cpu_halted() routine, and it has only one caller. It is therefore a good candidate for inlining. The difference is the handling of the intr_at_halt, which is necessary to ignore SR.BL when sleeping. Move intr_at_halt handling out of it, by setting this variable while executing the sleep instruction, and clearing it when the CPU has been woken-up by an interrupt, whatever the state of SR.BL. Also rename this variable in_sleep. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* pxa2xx: port pxa2xx_rtc to using qdev/vmstateAndrzej Zaborowski2011-03-032-101/+100
| | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pxa2xx_dma: Get rid of a forward declaration.Andrzej Zaborowski2011-03-031-26/+24
|
* pxa2xx_dma: port to qdev/vmstateAndrzej Zaborowski2011-03-034-111/+152
| | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* vmstate: move VMSTATE_PCIE_AER_ERRS to hw/hw.hDmitry Eremin-Solenikov2011-03-032-11/+21
| | | | | | | | | | VMSTATE_PCIE_AER_ERRS is indeed useful for other emulation drivers. Move it to hw/hw.h under the name of VMSTATE_STRUCT_VARRAY_POINTER_UINT16. Also add VMSTATE_STRUCT_VARRAY_POINTER_INT32 which is more or less the same as _UINT16 macro, except the fact it uses int32_t internally. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pxa2xx_dma: drop unused pxa2xx_dma_handler_t/handler fieldDmitry Eremin-Solenikov2011-03-031-5/+0
| | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pxa2xx_timer: Store relevant irq line in each timer.Andrzej Zaborowski2011-03-031-7/+8
|
* pxa2xx_timer: switch to using qdev/vmstateDmitry Eremin-Solenikov2011-03-033-109/+154
| | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pxa2xx_timer: change info struct name to comply with guidelinesDmitry Eremin-Solenikov2011-03-031-14/+14
| | | | | | | | It should be PXA2xxTimerInfo, not pxa2xx_timer_info. Replace all occurences of old name with the new one. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pxa2xx_pic: Set base address for sysbus device.Andrzej Zaborowski2011-03-031-0/+2
| | | | | Thid device's registration was broken since e1f8c729fa890c67bb4532f22c22ace6fb0e1aaf, this should fix it.
* vmstate: add VMSTATE_STRUCT_ARRAY_TESTDmitry Eremin-Solenikov2011-03-031-8/+13
| | | | | | | | This is a _TEST variant of VMSTATE_STRUCT_ARRAY, necessary e.g. for future patch changing pxa2xx_timer to use vmstate. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* microblaze: Correct copy+paste:o in defconfigsEdgar E. Iglesias2011-03-012-2/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* HACKING: Update status of format checkingStefan Weil2011-02-251-3/+0
| | | | | | | | | | | | | | | Hopefully all functions with printf like arguments now use format checking. This was tested with default build configuration on linux and windows hosts (including some cross compilations), so chances are good that there remain few (if any) functions without format checking. Therefore the last comment in HACKING is no longer valid but misleading. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: fix a memory leak in threaded vnc serverCorentin Chary2011-02-251-0/+2
| | | | | | | | | | | | | | VncJobQueue's buffer is intended to be used for as the output buffer for all operations in this queue, but unfortunatly. vnc_async_encoding_start() is in charge of setting this buffer as the current output buffer, but vnc_async_encoding_end() was not writting the changes back to VncJobQueue, resulting in a big and ugly memleak. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Use sigwait instead of sigwaitinfo.Tristan Gingold2011-02-251-18/+18
| | | | | | | Fix compilation failure on Darwin. Signed-off-by: Tristan Gingold <gingold@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* bitops: fix error on OpenBSD and mingw32Blue Swirl2011-02-251-1/+1
| | | | | | | | | Fix this error: CC bitops.o In file included from /src/qemu/bitops.c:14: /src/qemu/bitops.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned' Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* bitops: fix test_and_change_bit()Corentin Chary2011-02-251-1/+1
| | | | | | | ./bitops.h:192: warning: ‘old’ is used uninitialized in this function Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* slirp: Remove some type casts caused by bad declaration of x.tp_bufStefan Weil2011-02-252-8/+8
| | | | | | | | | | | | | | x.tp_buf was declared as a uint8_t array, but always used as a char array (which needed a lot of type casts). The patch includes these changes: * Fix declaration of x.tp_buf and remove all type casts. * Use offsetof() to get the offset of x.tp_buf. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fixing tap adapter for win32Pavel Dovgaluk2011-02-251-1/+1
| | | | | | | | | This fix allows connection of internal VLAN to the external TAP interface. If tap_win32_write function always returns 0, the TAP network interface in QEMU is disabled. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fixing network over sockets implementation for win32Pavel Dovgaluk2011-02-251-1/+1
| | | | | | | | | | | MSDN includes the following in WSAEALREADY error description for connect() function: "To preserve backward compatibility, this error is reported as WSAEINVAL to Winsock applications that link to either Winsock.dll or Wsock32.dll". So check of this error code was added to allow network connections through the sockets in Windows. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pxa2xx_pic: update to use qdevDmitry Eremin-Solenikov2011-02-256-92/+112
| | | | | | | | | | Use qdev/sysbus framework to handle pxa2xx-pic. Instead of exposing IRQs via array, reference them via qdev_get_gpio_in(). Patch has been modified by the committer. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* mst_fpga: correct irq level settingsDmitry Eremin-Solenikov2011-02-251-2/+2
| | | | | | | | | | | Final corrections for IRQ levels that are set by mst_fpga: * Don't retranslate IRQ if previously IRQ was masked. * After setting or clearing IRQs through register, apply mask before setting parent IRQ level. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* ui/vnc-enc-tight.c: Fix compile failure if CONFIG_VNC_JPEG not definedPeter Maydell2011-02-241-0/+4
| | | | | | | | Add some missing #ifdefs to fix compilation failures in the !CONFIG_VNC_JPEG case introduced by commit ce702e93. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-serial: kill VirtIOSerialDeviceGerd Hoffmann2011-02-243-27/+14
| | | | | | | | | | | | | VirtIOSerialDevice is like VirtIOSerialPort with just the first two fields, which makes it pretty pointless. Using VirtIOSerialPort directly works equally well and is less confusing. [Amit: - rebase - rename 'dev' to 'port' in function params in virtio-serial.h ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add TAGS and *~ to .gitignoreDavid Gibson2011-02-241-0/+2
| | | | | | | | | | | | | | Add the etags output generated by "make TAGS" and editor backup files to .gitignore. This patch has previously appeared in my series of patches to add pSeries emulation support. However, it obviously has no real connection to that, and can be applied seperately. Please apply. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-arm: fix support for VRSQRTE.Christophe Lyon2011-02-241-10/+113
| | | | | | | | Now use the same algorithm as described in the ARM ARM. Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-arm: fix support for VRECPE.Christophe Lyon2011-02-241-12/+71
| | | | | | | | Now use the same algorithm as described in the ARM ARM. Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-arm: Introduce float64_256 and float64_512 constants.Christophe Lyon2011-02-241-0/+5
| | | | | | | | | These two constants will be used by helper functions such as recpe_f32 and rsqrte_f32. Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* softfloat: add _set_sign(), _infinity and _half for 32 and 64 bits floats.Christophe Lyon2011-02-241-0/+15
| | | | | | | | | | These constants and utility function are needed to implement some helpers. Defining constants avoids the need to re-compute them at runtime. Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* softfloat: move all default NaN definitions to softfloat.h.Christophe Lyon2011-02-242-68/+69
| | | | | | | | | These special values are needed to implement some helper functions, which return/use these values in some cases. Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/sd.c: Add missing state change for SD_STATUS, SEND_NUM_WR_BLOCKSPeter Maydell2011-02-241-0/+2
| | | | | | | | | | | | The SD_STATUS and SEND_NUM_WR_BLOCKS commands are supposed to cause the card to send data back to the host. However sd.c was missing the state change to sd_sendingdata_state for these commands, with the effect that the Linux driver would either hang indefinitely waiting for nonexistent data (pl181) or read zeroes and provoke a qemu warning message (omap). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* vnc: Fix fatal crash with vnc reverse modeStefan Weil2011-02-231-0/+1
| | | | | | | | | | | | | | | Reverse mode is unusable: qemu -vnc localhost:5500,reverse crashes in vnc_refresh_server_surface because some pointers are NULL. Fix this by calling vnc_dpy_resize (which initializes these pointers) before calling vnc_refresh. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: add a non-adaptive optionCorentin Chary2011-02-234-5/+20
| | | | | | | This option allow to disable adaptive behaviors in some encodings. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: tight: tweak adaptive tight settingsCorentin Chary2011-02-231-10/+10
| | | | | | | The force_jpeg threshold was too low. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: don't try to send bigger updates that client heightCorentin Chary2011-02-231-5/+5
| | | | | | | Respect client size if it doesn't not support desktop resizing. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: use the new generic bitmap functionsCorentin Chary2011-02-232-73/+25
| | | | | | | | Switch to bitmap.h and bitops.h instead of redefining our own bitmap helpers. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* bitmap: add a generic bitmap and bitops libraryCorentin Chary2011-02-236-0/+897
| | | | | | | | | | | | | | | | | | Add most used bitmap and bitops functions into bitmap.c and bitops.c. Theses functions are mostly copied from Linux kernel source. Some of these functions are already redefined in the VNC server. Some of them could be used for some block stuff. The yet yo be submitted NUMA work also need bitmaps. bitops_ffsl() and bitops_flsl() are here because bitops/bitmap works on unsigned long, not int, and we can't use current code because: * ffs only works on int * qemu_fls only works on int * ffsl is a GNU extension Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: fix lossy rect refreshingCorentin Chary2011-02-231-4/+8
| | | | | | | | | The for loop in send_lossy_rect was totally wrong, and we can't call vnc_set_bits() because it does not really do what it should. Use vnc_set_bit() directly instead. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: fix uint8_t comparisons with negative valuesCorentin Chary2011-02-232-3/+4
| | | | | Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: Add ZRLE and ZYWRLE encodings.Corentin Chary2011-02-239-1/+1541
| | | | | | | | | | | | Add ZRLE [1] and ZYWRLE [2] encodings. The code is inspire^W stolen from libvncserver (again), but have been rewriten to match QEMU coding style. [1] http://www.realvnc.com/docs/rfbproto.pdf [2] http://micro-vnc.jp/research/remote_desktop_ng/ZYWRLE/publications/ Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: palette: and fill and color calls.Corentin Chary2011-02-232-0/+35
| | | | | | | These two helpers are needed for zrle and zywrle. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: palette: add palette_init callsCorentin Chary2011-02-232-1/+8
| | | | | | | | This allow to use palette on the stack instead of always allocating them. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: palette: use a pool to reduce memory allocationsCorentin Chary2011-02-232-17/+4
| | | | | | | | We now that the palette will never have more than 256 elements. Let's use a pool to reduce malloc calls. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: tight: use the update frequency to choose between lossy and losslessCorentin Chary2011-02-231-13/+62
| | | | | | | | Use the new update frequency infrastructure to use jpeg for regions with high update frequency. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: refresh lossy rect after a given timeoutCorentin Chary2011-02-233-3/+69
| | | | | | | | | | If an adaptive encoding has choosen to send a lossy update based on the result of vnc_update_freq(), then it should advertise it with vnc_sent_lossy_rect(). This will allow to automatically refresh this rect once it's static again. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: add a way to get the update frequency for a given regionCorentin Chary2011-02-232-0/+120
| | | | | | | | | | | | | | | This patch compute the update frequency (in Hz) for each 64x64 rects. Any adaptive encoding can get this value using vnc_update_freq(), and switch to a lossy encoding if the value is too high. The frequency is pre-calculated every 500ms, based on the last 10 updates per 64x64 rect. If a 64x64 rect was not updated in the last 2 second, then the frequency became 0, and all the stored timestamp are reseted. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud