sdk/emulator/qemu.git
8 years agopackage: update version (2.5.1)
SeokYeon Hwang [Tue, 26 Jan 2016 08:08:46 +0000 (17:08 +0900)]
package: update version (2.5.1)

Change-Id: Ia4e204f96c0a027f12a5692f93839e6e6760b6fa
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoosutil: change locking mechanism
SeokYeon Hwang [Wed, 6 Jan 2016 10:00:49 +0000 (19:00 +0900)]
osutil: change locking mechanism

Using file lock mechanism instead of shared memory. Emulator-manager
can share same file lock for checking whether same VM is running or not.

On Linux and MacOSX, POSIX file lock is used. If it is failed to lock file
and the file is not locked with valid type and record, it will try again to
lock file after sleeping.

On Windows, emulator will stop before checking lock because platform
image file and kernel log file are aleady opened with exclusive write
lock by pre-executed emulator. But it is still useful for
emulator-manager.

In addition, header files are cleaned up.

Change-Id: Ibedfac3503fb0d19956a7fbed6736337be8f2223
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Signed-off-by: Sangho Park <sangho.p@samsung.com>
8 years agomenu: refactoring for Move function
GiWoong Kim [Fri, 15 Jan 2016 07:47:28 +0000 (16:47 +0900)]
menu: refactoring for Move function

- cancel the moving mode before the layout changing
- use override functions instead of event filter
- delete unnecessary functions
- modify function and variable names

Change-Id: I0e97f3c9816ab4f107796bba0616a6ab590184ff
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agokeyboard: ignore key events while the display is off
Jihye Won [Mon, 11 Jan 2016 04:28:46 +0000 (13:28 +0900)]
keyboard: ignore key events while the display is off

There was a bug when a user presses the HW key shortcut in display-off mode.
The reason is that the guest OS receives key events while the display is off.
After applying this commit, the emulator ignores key events while the display is off.

Change-Id: I97f2e21f1d0aaaa9aa4ddba9c18518a5a5df74bc
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
(cherry picked from commit 36cec4673a2927d99696122ef795eec01da723a9)

8 years agoshortcuts: changed the shortcut for Power function
Jihye Won [Fri, 15 Jan 2016 06:52:04 +0000 (15:52 +0900)]
shortcuts: changed the shortcut for Power function

According to the version of OS or Platform, the previous shortcut
for Power function(Ctrl+Shift+F7) did not work well.
After performing tests on MacOS 10.10, 10.11, Ubuntu, Windows 7 and Windows 10,
I confirmed the new shorcut(Ctrl+shift+F8) operates correctly.

Change-Id: I0a12216a066cd46a604a5060ed88a75dda29c3bc
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
(cherry picked from commit afbc265908c2319d03e596bd9f568a5d96e56004)

8 years agoshortcuts: change Scale function shortcuts
Jihye Won [Mon, 11 Jan 2016 03:41:26 +0000 (12:41 +0900)]
shortcuts: change Scale function shortcuts

I changed Scale function shortcuts because MacOSX
uses Control+Shift+Arrows Keys for Mission Control Shortcuts.
Mission Control Shortcuts are enable as the default setting on MacOSX.
So, I changed shortcuts for Scale function to avoid the system shortcuts.

Change-Id: I8a4fe87e79e0a216058d17e320e1fb22c682f2ab
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
8 years agoqt5_msgbox: fix the bug of an abnormal execution in Windows
Won Jihye [Wed, 16 Dec 2015 08:44:54 +0000 (17:44 +0900)]
qt5_msgbox: fix the bug of an abnormal execution in Windows

_spawnv function was changed into CreateProcess function
to execute the program(qt5_msgbox).
_spawnv eventually call CreateProcess because CreateProcess is Win32 API function.
Also, CreateProcess gives us more control over the child processes.
Although I can not find out the exact reason of the bug, I fixed the bug by using CreateProcess.

Change-Id: Ib8d53df65da93460a2ac6c8e57bff660d14021ca
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
8 years agogui: delete meaningless lines
GiWoong Kim [Wed, 13 Jan 2016 11:15:51 +0000 (20:15 +0900)]
gui: delete meaningless lines

QWidget's showEvent function is empty.

Change-Id: I55feb0a06e7e3aa374ec62667f62009d6d9c4c2c
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agocontroller: make fixed size floating controller
GiWoong Kim [Wed, 13 Jan 2016 06:20:43 +0000 (15:20 +0900)]
controller: make fixed size floating controller

Sets both the minimum and maximum sizes of the widget to
initial value, thereby preventing it from ever growing or
shrinking.

Change-Id: I6afc0150255b51ea42575bd881d2b9e06f5a316c
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agocontroller: consider elided text for key buttons
GiWoong Kim [Tue, 12 Jan 2016 07:28:59 +0000 (16:28 +0900)]
controller: consider elided text for key buttons

If the string text is wider than button width, use
an elided version of the string.

Change-Id: I458b04d794db717e6a428b78ddbe9e38a083db30
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agopackage: update version (2.5.0)
SeokYeon Hwang [Wed, 13 Jan 2016 08:23:14 +0000 (17:23 +0900)]
package: update version (2.5.0)

Rebased on QEMU 2.5.0

Change-Id: I97488a8595de890f4238bf1e2ad2486595f6be24
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoemul_state: delete unnecessary functions
GiWoong Kim [Fri, 8 Jan 2016 11:29:19 +0000 (20:29 +0900)]
emul_state: delete unnecessary functions

Change-Id: I86f25232bb0f5739c52b58c0d44ef686e6fa1204
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoextra package: skip installing duplicate packages
ChulHo Song [Fri, 4 Dec 2015 07:56:11 +0000 (16:56 +0900)]
extra package: skip installing duplicate packages

Do not install same version of the packages. Newer version of the
packages will be upgraded, older version of the packages will be
failed to install.

Change-Id: Ib5cc8b781aee56d39447b6cb46689e948b68045c
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
(cherry picked from commit 58a790efcd2d468ef01987cde3866276ffa445fd)

8 years agokeyboard: remove dependency with emul_state
GiWoong Kim [Fri, 8 Jan 2016 07:46:51 +0000 (16:46 +0900)]
keyboard: remove dependency with emul_state

Change-Id: I6ec7994b07f65c27476ce09cf7e68375d3cc5b64
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit f74921d45a3b25e6c21d5524235ca0a4dfa49ca7)

8 years agogui: prevent moving to position out of monitor range
GiWoong Kim [Mon, 11 Jan 2016 06:42:34 +0000 (15:42 +0900)]
gui: prevent moving to position out of monitor range

Change-Id: I755b7d8700e99fd3f4f1889159113e32a8ceb1dc
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agodisplay: minor cleanup for input
GiWoong Kim [Fri, 8 Jan 2016 05:31:00 +0000 (14:31 +0900)]
display: minor cleanup for input

move each duplicated code to its parent class

Change-Id: I7eeb29892bd23264eb688a72d6583fc9d4460755
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit 9ca2ddeccd7c8e00beffe1e4fc044314e5ae8701)

8 years agocamera: define common pixel format type for Mac
sungmin ha [Fri, 8 Jan 2016 07:59:18 +0000 (16:59 +0900)]
camera: define common pixel format type for Mac

Change-Id: I9a1c7361e145d9dc7d06c1b61c4f429444b6ad05
Signed-off-by: sungmin ha <sungmin82.ha@samsung.com>
8 years agomenu: improve VM information from Detailed Info
GiWoong Kim [Thu, 7 Jan 2016 05:38:31 +0000 (14:38 +0900)]
menu: improve VM information from Detailed Info

- reorder VM info contents
- add emulator version
- add network connection type
- remove kernel and file info

Change-Id: Idd305385ba21eb0f9240ee0c5f73cb1b8cc3e8ac
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agohds: check available PCI slot before mounts
Jinhyung Choi [Thu, 7 Jan 2016 05:55:58 +0000 (14:55 +0900)]
hds: check available PCI slot before mounts

PCI slot max is 32 and reserved slot for hidden is 4.
ECS sends the number of available PCI slot when the status is requested.
Also, it checks the available PCI slot before HDS tries to attach 9p device.

Change-Id: I24b12bf07574420753de2330ac8dbde6b6547915
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agohwkey: establish priorities for tooltip definition of Key Window
GiWoong Kim [Thu, 7 Jan 2016 11:01:20 +0000 (20:01 +0900)]
hwkey: establish priorities for tooltip definition of Key Window

priority)
1. In XML file, declared tooltip text for HW key
2. preset shortcut key for HW key

Change-Id: I31a305603e5cbf08a3d466734da21deb3d436be7
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agopackage: remove unused lines for java UI
SeokYeon Hwang [Thu, 7 Jan 2016 11:18:48 +0000 (20:18 +0900)]
package: remove unused lines for java UI

Change-Id: I4e6533ce8ebbf3dc4ae18a306fcd2c2ec19e374b
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agohds: change the policy from unmodifiable to hidden
Jinhyung Choi [Wed, 6 Jan 2016 12:35:39 +0000 (21:35 +0900)]
hds: change the policy from unmodifiable to hidden

ECP UI did not allow unmount when unmodifiable level is chosen.
But, it is changed to hide.

Change-Id: Ib33a61a3a0217f015676cd76e10878799818a4d7
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agohds: not allow duplicated host & guest path
Jinhyung Choi [Wed, 6 Jan 2016 12:25:32 +0000 (21:25 +0900)]
hds: not allow duplicated host & guest path

Change-Id: Ia282cf951ac9dd87c659ae3ed20f3de5092a93b1
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agoecs: reduce header definition for ecs.h
Jinhyung Choi [Wed, 6 Jan 2016 04:55:10 +0000 (13:55 +0900)]
ecs: reduce header definition for ecs.h

- clean-up and re-arrange the definitions and inclusion
- remove unused function definition

Change-Id: Ic54e9d81da2e91f6e534c45f9c7064a53d7e54cc
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agoemul_state: guest IP and host IP getters/setters are refined
SeokYeon Hwang [Wed, 6 Jan 2016 06:49:53 +0000 (15:49 +0900)]
emul_state: guest IP and host IP getters/setters are refined

Change-Id: I2a7b3bed1fb653855c21e61da79a85b35dfae524
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agosudoers: set sudoers' permission
Munkyu Im [Thu, 7 Jan 2016 05:52:58 +0000 (14:52 +0900)]
sudoers: set sudoers' permission

according to man page of sudoers, the default file mode is 0440.
(readable by owner and group, writable by none).

Change-Id: Id3402f391b976ee490318d55b068c565172e6e87
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agogui: delete deprecated SWT GUI
GiWoong Kim [Tue, 5 Jan 2016 07:40:35 +0000 (16:40 +0900)]
gui: delete deprecated SWT GUI

- maru_sdl, maru_shm options
- related source code

Change-Id: I5d2444982753e909170af6b5a15eb688d916eadf
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoemulator: clean-up emulator network initialization
SeokYeon Hwang [Mon, 4 Jan 2016 10:28:26 +0000 (19:28 +0900)]
emulator: clean-up emulator network initialization

Do port forwarding and base port initialization at once.
Some emul_state getters/setters are refined.
"sdb.c" is "net_helper.c" now and it use new_debug_channel.

Change-Id: I0659b35e231a8f60bd3707a2d04b09213a9cb830
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agonet: clean-up tap handling logic
SeokYeon Hwang [Mon, 4 Jan 2016 10:38:25 +0000 (19:38 +0900)]
net: clean-up tap handling logic

Tizen emulator specific logic is extracted to independent source file.
Tap interface prefix is changed to "tap-tizen".

Change-Id: I38e218936003e8bc8de51a4d0b3413872defe4c3
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agoconfigure: disable gcrypt, nettle, vte by default
SeokYeon Hwang [Wed, 30 Dec 2015 08:28:02 +0000 (17:28 +0900)]
configure: disable gcrypt, nettle, vte by default

Detaching unnecessary library dependencies.

Change-Id: I37cea8fae1cdb8860a7736628682452964afed7d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agocontroller: define fixed size for controller view
GiWoong Kim [Wed, 23 Dec 2015 05:36:06 +0000 (14:36 +0900)]
controller: define fixed size for controller view

Emulator window obtains a consistent display result by define
fixed size for controller view. The controller of emulator does
not have to adjustable size.

Change-Id: I79b206b19aff46e7a5088de23cae250bfec9765b
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit 8972ab7c2910549bf023930b4bf6be47b58a5a50)

8 years agovl.c: improve error handling while display option parsing
GiWoong Kim [Tue, 29 Dec 2015 03:53:41 +0000 (12:53 +0900)]
vl.c: improve error handling while display option parsing

Change-Id: I359d40e206815b66cfcc52f5890b4cf74aaf2723
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agopackage: update version (2.4.9)
SeokYeon Hwang [Wed, 30 Dec 2015 07:36:41 +0000 (16:36 +0900)]
package: update version (2.4.9)

Change-Id: Idef6a6c6bff2c5b7f8e3726ecb46b2967a576a13
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agonet: check if sdb/gdb port is available
Munkyu Im [Tue, 29 Dec 2015 08:20:11 +0000 (17:20 +0900)]
net: check if sdb/gdb port is available

It is an additional port checking to improve stability.

Change-Id: I6124fd6f1479b40b5c803f4a1b495e994c63f51f
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agohwkey: modified HW key's tooltip on MacOS
GiWoong Kim [Tue, 29 Dec 2015 04:59:05 +0000 (13:59 +0900)]
hwkey: modified HW key's tooltip on MacOS

Change-Id: I2913cb6f0957dc829b73201625fd35305c273846
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit 6ca2c76322b03537bc2df8f95a6ce68d9d39f2de)

8 years agomenu: add platform image version info to Detailed Info dialog
GiWoong Kim [Tue, 29 Dec 2015 07:28:16 +0000 (16:28 +0900)]
menu: add platform image version info to Detailed Info dialog

Change-Id: I527b54aa134a5dacbf34c1f3030a2038336185d8
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit 18c5e6c2adbea54e4628a2207c1a23777bb94bdf)

8 years agoconfigure: support branch specific TIZEN_SDK_DEV directory
SeokYeon Hwang [Tue, 29 Dec 2015 02:29:41 +0000 (11:29 +0900)]
configure: support branch specific TIZEN_SDK_DEV directory

We can support different TIZEN_SDK_DEV directory per branch now. It is
useful when specific branch needs different lib dev packages.
If "branch" directory is not exist, it uses default directory.

Change-Id: I86bf7e31fe8538c620eb9b0bebdb7481618a93cf
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agonet: close socket after checking available port
Munkyu Im [Wed, 30 Dec 2015 02:04:11 +0000 (11:04 +0900)]
net: close socket after checking available port

fixed check_port_bind_listen() in 6ae322880b2a6f4de42bd25c9f19ccce870136cd
But one caller of this function was skipped closing socket.
So, this commit adds socket close.

Change-Id: Id204f7e3bd15111019ae86cbacaa75111edd59fd
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agoshortcut: correct wrong Reboot shortcut
Jihye Won [Mon, 28 Dec 2015 09:35:08 +0000 (18:35 +0900)]
shortcut: correct wrong Reboot shortcut

The correct shortcut of Reboot is not Ctrl+Shift+F4 but Ctrl+Shift+Del.

Change-Id: Ib1166308d8a74bdd06e589829469708f8e36e0f2
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
8 years agoemulator_options: fix critical bug
SeokYeon Hwang [Tue, 29 Dec 2015 04:52:03 +0000 (13:52 +0900)]
emulator_options: fix critical bug

Variable value is contaminated during it is processed. We fix this
issue and prevent a recurrence of this issue by using "const" keyword.

Change-Id: I7d50a82a10a6b43b203e78b5394bf3eb8e0231a2
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoMerge branch 'tizen_3.0_qemu_2.5' into tizen_3.0_develop
SeokYeon Hwang [Wed, 30 Dec 2015 02:24:57 +0000 (11:24 +0900)]
Merge branch 'tizen_3.0_qemu_2.5' into tizen_3.0_develop

Change-Id: I2fe88ade2a861c3c07bfa8c9d3aafb6fb59a3ac2
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoecs: fix build errors
SeokYeon Hwang [Tue, 22 Dec 2015 04:01:10 +0000 (13:01 +0900)]
ecs: fix build errors

Change-Id: Iebe782bd96e3a16ef28ad7030ae8ce3835d71401
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
8 years agohds: count available pci slots
Jinhyung Choi [Fri, 18 Dec 2015 09:25:43 +0000 (18:25 +0900)]
hds: count available pci slots

PCI slots are limited as PCI_SLOT_MAX which is 32.
For the stability of using HDS, the max connection should be set.
This function will be used by ECS for it.

Change-Id: Id67a2550ddfffff24feb1df04a7b8b2e912237b8
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agoMerge tag 'v2.5.0' into tizen_3.0_qemu_2.5
SeokYeon Hwang [Mon, 21 Dec 2015 09:00:30 +0000 (18:00 +0900)]
Merge tag 'v2.5.0' into tizen_3.0_qemu_2.5

v2.5.0 release

Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agomouse: add MouseHelper class
GiWoong Kim [Wed, 16 Dec 2015 07:59:48 +0000 (16:59 +0900)]
mouse: add MouseHelper class

- extract input related codes from Display class
- clean up some lines

Change-Id: I90e9db61dbfffd1ee85aa578a5de9225921d7b55
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agopackage: update version (2.4.8)
SeokYeon Hwang [Thu, 17 Dec 2015 04:31:34 +0000 (13:31 +0900)]
package: update version (2.4.8)

Change-Id: I75cd5155eb0a735cf49b7e83641653c11b7662bb
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agobuild: use script file for correcting PC's prefix
SeokYeon Hwang [Fri, 18 Dec 2015 03:07:58 +0000 (12:07 +0900)]
build: use script file for correcting PC's prefix

Now emulator-lib-dev package provide script for correcting PC's prefix. So
we use it instead of embedded one.

Change-Id: I57501207c49d81516acd2d3354d160580d6b2a45
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agobuild: clean macos-64 libraries up
SeokYeon Hwang [Thu, 17 Dec 2015 04:31:18 +0000 (13:31 +0900)]
build: clean macos-64 libraries up

Change-Id: Ifec7d8bef21d9c78bff4189201b91a6d1f1f6178
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agocontroller: fix the bug on the event of dockingconview
Jihye Won [Thu, 10 Dec 2015 05:34:41 +0000 (14:34 +0900)]
controller: fix the bug on the event of dockingconview

Because handling the mouse event of dockingconview is incorrect,
the controller could be moved unintenionally in certain case.
Therefore, I added codes for setting dockingconview's status correctly.
Also the enumeration like CONVIEW_* is designed to react the left mouse button.

Change-Id: I8fbe0951bd3804b7edd843aeec03624770498329
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit 8c0cb0b479bed1550a69730459574adbb0db46f0)

8 years agoshortcut: change all shortcuts with Ctrl+Shift
Jihye Won [Tue, 15 Dec 2015 11:30:49 +0000 (20:30 +0900)]
shortcut: change all shortcuts with Ctrl+Shift

To improve usuability, we changed all shortcuts with
a combination of Ctrl key and Shift key.

Change-Id: Ie8cd2ba5bd9bfad01f0c140462e70677a899f705
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
(cherry picked from commit 2cb5dfc576b22efe5452cfd1d5f7e73701f4596c)

8 years agoUpdate version for v2.5.0 release
Peter Maydell [Wed, 16 Dec 2015 16:10:14 +0000 (16:10 +0000)]
Update version for v2.5.0 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agopackage: update version (2.4.7)
SeokYeon Hwang [Wed, 16 Dec 2015 12:57:28 +0000 (21:57 +0900)]
package: update version (2.4.7)

Change-Id: I732d9da90c2ebe01100f9f3bd4a043cf3ef45974
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoconfigure: disable curl as a default
SeokYeon Hwang [Tue, 15 Dec 2015 08:41:00 +0000 (17:41 +0900)]
configure: disable curl as a default

"curl" is used as a block device in QEMU. And now we disable curl support
since we never use it.

Change-Id: I83c9b01b0db88655f84c143c382f7201f6614005
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoshortcut: make default shortcut keys with "Control key" on MacOS
GiWoong Kim [Tue, 15 Dec 2015 11:01:07 +0000 (20:01 +0900)]
shortcut: make default shortcut keys with "Control key" on MacOS

QKeySequence Note - On Mac OS X, references to "Ctrl", Qt::CTRL, Qt::Control and
Qt::ControlModifier correspond to the Command keys on the Macintosh keyboard,
and references to "Meta", Qt::META, Qt::Meta and Qt::MetaModifier correspond to
the Control keys. Developers on Mac OS X can use the same shortcut descriptions
across all platforms, and their applications will automatically work as expected
on Mac OS X.

According to Qt note, "Ctrl" will be treated as command key. This is not what we
want. To be recognized as control key on MacOS, XML Parser should replace "Ctrl"
with "Meta" text.

Change-Id: Id26972ba7236df1b33d7d2409fcf58115ebf163c
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agolayout: use enum type variables for menu parsing
GiWoong Kim [Fri, 11 Dec 2015 08:03:14 +0000 (17:03 +0900)]
layout: use enum type variables for menu parsing

Change-Id: I65785ee1fbf3c3b3352e5c9c7eb4d4ad30c49252
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoUpdate version for v2.5.0-rc4 release
Peter Maydell [Fri, 11 Dec 2015 16:37:55 +0000 (16:37 +0000)]
Update version for v2.5.0-rc4 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoblockdev: Mark {insert, remove}-medium experimental
Max Reitz [Fri, 11 Dec 2015 15:23:05 +0000 (16:23 +0100)]
blockdev: Mark {insert, remove}-medium experimental

While in the long term we want throttling to be its own block filter
BDS, in the short term we want it to be part of the BB instead of a BDS;
even in the long term we may want legacy throttling to be automatically
tied to the BB.

blockdev-insert-medium and blockdev-remove-medium do not retain
throttling information in the BB (deliberately so). Therefore, using
them means tying this information to a BDS, which would break the model
described above. (The same applies to other flags such as
detect_zeroes.) We probably want to move this information to the BB or
its own filter BDS before blockdev-{insert,remove}-medium can be
considered completely stable.

Therefore, mark these functions experimental for the time being.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1449847385-13986-2-git-send-email-mreitz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
[PMM: fixed format nit (underlining) in qmp-commands.hx]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoFix xbzrle vs last_sent_block update
Dr. David Alan Gilbert [Thu, 10 Dec 2015 16:31:46 +0000 (16:31 +0000)]
Fix xbzrle vs last_sent_block update

My fix (84e7b80a) replaced the last_sent_block update that I'd
removed earlier; however it was too aggressive in the xbzrle case.

save_xbzrle_page might return '0' to mean that the page didn't
need sending since it was the same as the last sent version;
in this case we can't update 'last_sent_block' since we didn't
actually send it.

Symptom: 'Illegal RAM offset 1018000' as we try and send a page
        to the wrong RAMBlock;  potentially that could be a data
        corruption if you were really unlucky.

Fixes: 84e7b80a05c0c44b90533c6cd2f1db5c932ccf77

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-id: 1449765106-6528-1-git-send-email-dgilbert@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agomenu: modify some variable names for Always on Top
GiWoong Kim [Fri, 11 Dec 2015 04:58:20 +0000 (13:58 +0900)]
menu: modify some variable names for Always on Top

Change-Id: I9d57e4de836273ac735117895dff41a6ed28ef47
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoUpdate language files for QEMU 2.5.0
Peter Maydell [Thu, 10 Dec 2015 13:34:27 +0000 (13:34 +0000)]
Update language files for QEMU 2.5.0

Update translation files (change created via 'make -C po update').

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1449754467-3496-1-git-send-email-peter.maydell@linaro.org

8 years agosparc: allow CASA with ASI 0xa from user space
Alex Zuepke [Fri, 4 Dec 2015 15:01:02 +0000 (16:01 +0100)]
sparc: allow CASA with ASI 0xa from user space

LEON3 allows the CASA instruction to be used from user space
if the ASI is set to 0xa (user data).

Signed-off-by: Alex Zuepke <azu@sysgo.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMAINTAINERS: add maintainer to virtio-9p
Greg Kurz [Mon, 30 Nov 2015 15:40:16 +0000 (16:40 +0100)]
MAINTAINERS: add maintainer to virtio-9p

As suggested by Paolo, I add myself as maintainer for virtio-9p.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Acked-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Message-id: 20151130154016.20108.79073.stgit@bahia.huguette.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agovirtio-9p-device: add minimal unrealize handler
Greg Kurz [Tue, 8 Dec 2015 15:54:57 +0000 (16:54 +0100)]
virtio-9p-device: add minimal unrealize handler

Since commit 4652f1640e029e1f2433fa77ba6af285 "virtio-9p: add savevm
handlers", if the user hot-unplugs a quiescent 9p device and live
migrates, the source QEMU crashes before migration completetion...
This happens because virtio-9p devices have a realize handler which
calls virtio_init() and register_savevm().  Both calls store pointers
to the device internals, that get dereferenced during migration even
if the device got unplugged.

This patch simply adds an unrealize handler to perform minimal
cleanup and avoid the crash.  Hot unplug of non-quiescent 9p devices
is still not supported in QEMU, and not supported by linux guests
either.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20151208155457.27775.69441.stgit@bahia.huguette.org
[PMM: rewrapped long lines in commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agohwkey: add double keycode type handling
GiWoong Kim [Wed, 9 Dec 2015 05:32:55 +0000 (14:32 +0900)]
hwkey: add double keycode type handling

According to real target behavior, some HW key buttons must
send a press event one more while long pressing. I named this
type of key called "double keycode key". The double keycode
key has same value for long-press and short-press keycode.

Change-Id: Ie7f227bd0836727b9b6683473dd37308a8309b3d
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
(cherry picked from commit 09ff007b6842731e2b86ba89e2d41faf31406cc6)

8 years agolayout: minor improvements for XML parser
GiWoong Kim [Fri, 4 Dec 2015 10:13:50 +0000 (19:13 +0900)]
layout: minor improvements for XML parser

- use const type variables
- delete an unnecessary error popup call
- add some logs

Change-Id: I3662284c0b329f683a4ca0e5f9a3e0748b70f336
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoUpdate version for v2.5.0-rc3 release
Peter Maydell [Mon, 7 Dec 2015 17:47:40 +0000 (17:47 +0000)]
Update version for v2.5.0-rc3 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agosd: Mark brittle abuse of blk_attach_dev() FIXME
Markus Armbruster [Mon, 7 Dec 2015 15:55:10 +0000 (16:55 +0100)]
sd: Mark brittle abuse of blk_attach_dev() FIXME

blk_attach_dev() fails here only when we're working for device
"sdhci-pci" (which already attached the backend), and then we don't
want to attach a second time.  If we ever create another failure mode,
we're setting up ourselves to using the same backend from multiple
frontends, which is likely to end in tears.  Can't clean this up this
close to the release, so mark it FIXME.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1449503710-3707-3-git-send-email-armbru@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agosdhci: Sanitize "sdhci-pci" properties for future qomification
Markus Armbruster [Mon, 7 Dec 2015 15:55:09 +0000 (16:55 +0100)]
sdhci: Sanitize "sdhci-pci" properties for future qomification

We currently fuse controller and card into a single device model, but
we intend qomify things properly and separate the two.  The properties
that really belong to the card would then have to somehow pass-through
to the card's properties.  To avoid that complication, either mark
them experimental or drop them.

Properties "capareg", "maxcurr" and the usual PCI device properties
belong to the controller.  Property "drive" belongs to the card;
rename it to "x-drive".  Properties "logical_block_size",
"physical_block_size", "min_io_size", "opt_io_size",
"discard_granularity" belong to the card, but have no effect; drop
them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1449503710-3707-2-git-send-email-armbru@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agovirtio-blk: Drop x-data-plane option
Fam Zheng [Mon, 7 Dec 2015 10:59:27 +0000 (18:59 +0800)]
virtio-blk: Drop x-data-plane option

The official way of enabling dataplane is through the "iothread"
property that references an iothread object created by "-object
iothread".  Since the old "x-data-plane=on" way now even crashes, it's
probably easier to just drop it:

$ qemu-system-x86_64 -drive file=null-co://,id=d0,if=none \
    -device virtio-blk-pci,drive=d0,x-data-plane=on

ERROR:/home/fam/work/qemu/qom/object.c:1515:
object_get_canonical_path_component: assertion failed: (obj->parent != NULL)
Aborted

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1449485967-19240-1-git-send-email-famz@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
Peter Maydell [Mon, 7 Dec 2015 14:18:31 +0000 (14:18 +0000)]
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging

# gpg: Signature made Mon 07 Dec 2015 14:06:07 GMT using RSA key ID 398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  lan9118: log and ignore access to invalid registers, rather than aborting
  lan9118: fix emulation of MAC address loaded bit in E2P_CMD register
  vmxnet3: silence warning
  pcnet: fix rx buffer overflow(CVE-2015-7512)
  net: pcnet: add check to validate receive data size(CVE-2015-7504)
  e1000: fix hang of win2k12 shutdown with flood ping

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agolan9118: log and ignore access to invalid registers, rather than aborting
Andrew Baumann [Fri, 4 Dec 2015 18:58:50 +0000 (10:58 -0800)]
lan9118: log and ignore access to invalid registers, rather than aborting

With this change, access to invalid/unimplemented device registers are
logged as a "guest error" rather than aborting qemu with
hw_error. This enables drivers for similar devices (e.g. SMSC 9221),
by simply ignoring the unimplemented writes. It's also closer to what
real hardware does.

Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
8 years agolan9118: fix emulation of MAC address loaded bit in E2P_CMD register
Andrew Baumann [Fri, 4 Dec 2015 18:58:49 +0000 (10:58 -0800)]
lan9118: fix emulation of MAC address loaded bit in E2P_CMD register

There appears to have been a longstanding typo in the implementation
of the "MAC address loaded" bit in the E2P_CMD (EEPROM command)
register. The code was using 0x10, but the controller spec says it
should be bit 8 (0x100).

Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
8 years agovmxnet3: silence warning
Michael S. Tsirkin [Mon, 30 Nov 2015 16:26:24 +0000 (18:26 +0200)]
vmxnet3: silence warning

vmxnet3 always produces a warning under qtest.

This is not a user error, don't warn.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
8 years agopcnet: fix rx buffer overflow(CVE-2015-7512)
Jason Wang [Mon, 30 Nov 2015 07:00:06 +0000 (15:00 +0800)]
pcnet: fix rx buffer overflow(CVE-2015-7512)

Backends could provide a packet whose length is greater than buffer
size. Check for this and truncate the packet to avoid rx buffer
overflow in this case.

Cc: Prasad J Pandit <pjp@fedoraproject.org>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
8 years agonet: pcnet: add check to validate receive data size(CVE-2015-7504)
Prasad J Pandit [Fri, 20 Nov 2015 06:20:31 +0000 (11:50 +0530)]
net: pcnet: add check to validate receive data size(CVE-2015-7504)

In loopback mode, pcnet_receive routine appends CRC code to the
receive buffer. If the data size given is same as the buffer size,
the appended CRC code overwrites 4 bytes after s->buffer. Added a
check to avoid that.

Reported by: Qinghao Tang <luodalongde@gmail.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
8 years agoe1000: fix hang of win2k12 shutdown with flood ping
Denis V. Lunev [Fri, 27 Nov 2015 06:48:41 +0000 (09:48 +0300)]
e1000: fix hang of win2k12 shutdown with flood ping

e1000 driver in Win2k12 is really well rotten. It 100% hangs on shutdown
of UP VM under flood ping. The guest checks card state and reinjects
itself interrupt in a loop. This is fatal for UP machine.

There is no good way to fix this misbehavior but to kludge it. The
emulation has interrupt throttling register aka ITR which limits
interrupt rate and allows the guest to proceed this phase.
There is no problem with this kludge for Linux guests - it adjust the
value of it itself.

On the other hand according to the initial research in
    commit e9845f0985f088dd01790f4821026df0afba5795
    Author: Vincenzo Maffione <v.maffione@gmail.com>
    Date:   Fri Aug 2 18:30:52 2013 +0200

    e1000: add interrupt mitigation support

    ...

    Interrupt mitigation boosts performance when the guest suffers from
    an high interrupt rate (i.e. receiving short UDP packets at high packet
    rate). For some numerical results see the following link
    http://info.iet.unipi.it/~luigi/papers/20130520-rizzo-vm.pdf

this should also boost performance a bit.

See https://bugzilla.redhat.com/show_bug.cgi?id=874406 for additional
details.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vincenzo Maffione <v.maffione@gmail.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
8 years agopackage: update version (2.4.6)
SeokYeon Hwang [Sat, 5 Dec 2015 06:39:12 +0000 (15:39 +0900)]
package: update version (2.4.6)

Change-Id: Ic36e5c0753f598d65eef88a6fb64d3201f50c23e
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoMerge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
Peter Maydell [Fri, 4 Dec 2015 18:11:40 +0000 (18:11 +0000)]
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging

QOM infrastructure fixes and device conversions

* Documentation update
* qom-test and related fixes

# gpg: Signature made Fri 04 Dec 2015 17:54:55 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/qom-devices-for-peter:
  qom-test: Fix qmp() leaks
  tests: Use proper functions types instead of void (*fn)
  qom: Update documentation comment of struct Object
  tests: Fix check-report-qtest-% target

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoqom-test: Fix qmp() leaks
Marc-André Lureau [Wed, 2 Dec 2015 20:20:34 +0000 (21:20 +0100)]
qom-test: Fix qmp() leaks

Before this patch ASAN reported:
SUMMARY: AddressSanitizer: 677165875 byte(s) leaked in 1272437 allocation(s)

After this patch:
SUMMARY: AddressSanitizer: 465 byte(s) leaked in 32 allocation(s)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1448551895-871-1-git-send-email-marcandre.lureau@redhat.com>
[Straightforwardly rebased onto the previous patch]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
8 years agotests: Use proper functions types instead of void (*fn)
Markus Armbruster [Wed, 2 Dec 2015 20:20:33 +0000 (21:20 +0100)]
tests: Use proper functions types instead of void (*fn)

We have several function parameters declared as void (*fn).  This is
just a stupid way to write void *, and the only purpose writing it
like that could serve is obscuring the sin of bypassing the type
system without need.

The original sin is commit 49ee359: its qtest_add_func() is a wrapper
for g_test_add_func().  Fix the parameter type to match
g_test_add_func()'s.  This uncovers type errors in ide-test.c; fix
them.

Commit 7949c0e faithfully repeated the sin for qtest_add_data_func().
Fix it the same way, along with a harmless type error uncovered in
vhost-user-test.c.

Commit 063c23d repeated it for qtest_add_abrt_handler().  The screwy
parameter gets assigned to GHook member func, so change its type to
match.  Requires wrapping kill_qemu() to keep the type checker happy.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[AF/armbru: Inline GTestFunc/GTestDataFunc typedef for old GLib]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
8 years agoSDL: use SDL2 instead of SDL1.2 for Windows-32
SeokYeon Hwang [Fri, 4 Dec 2015 12:05:36 +0000 (21:05 +0900)]
SDL: use SDL2 instead of SDL1.2 for Windows-32

Change-Id: I3baed039c792b39f24a76a86272730eb3972517a
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoMerge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-12-04' into...
Peter Maydell [Fri, 4 Dec 2015 10:55:03 +0000 (10:55 +0000)]
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-12-04' into staging

trivial patches for 2015-12-04

# gpg: Signature made Fri 04 Dec 2015 06:40:23 GMT using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"

* remotes/mjt/tags/pull-trivial-patches-2015-12-04:
  bt: check struct sizes
  typedefs: Put them back into alphabetical order
  scsi: remove scsi_req_free prototype
  gt64xxx: fix decoding of ISD register
  configure: use appropriate code fragment for -fstack-protector checks
  crypto: avoid two coverity false positive error reports
  configure: Diagnose broken linkers directly
  bt: avoid unintended sign extension
  util/id: fully allocate names table

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.5-20151204' into staging
Peter Maydell [Fri, 4 Dec 2015 09:49:28 +0000 (09:49 +0000)]
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.5-20151204' into staging

ppc patch queue for 2.5 2015-12-04

This contains some last minute QOM behaviour fixes from Markus
Armbruster.

# gpg: Signature made Fri 04 Dec 2015 06:43:54 GMT using RSA key ID 20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.5-20151204:
  spapr_drc: Change value of property "fdt" from null back to {}
  spapr_drc: Make device "spapr-dr-connector" unavailable with -device
  spapr_drc: Handle visitor errors properly

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agobt: check struct sizes
Paolo Bonzini [Mon, 30 Nov 2015 09:57:25 +0000 (10:57 +0100)]
bt: check struct sizes

See http://permalink.gmane.org/gmane.linux.bluez.kernel/36505.  For historical
reasons these do not use sizeof, and Coverity caught a mistake in
EVT_ENCRYPT_CHANGE_SIZE.

In addition:

- remove status from create_conn_cancel_cp; the "status" field is only
in rp structs.  Note that this means that the OCF_CREATE_CONN_CANCEL
could never have worked (it would have failed the LENGTH_CHECK), but
I am keeping it anyway.

- OCF_READ_LINK_QUALITY similarly could never have worked, but I am
fixing read_link_quality_cp anyway.

- fix inquiry_info which is shorter by one: the kernel has a struct that
is 14 byte long, but not counting the initial num_responses byte which
the kernel parses separately;

- remove extended_inquiry_info altogether, since it's not used and unlike
the other inquiry structs does not have the initial num_responses byte.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agotypedefs: Put them back into alphabetical order
Markus Armbruster [Thu, 19 Nov 2015 12:29:28 +0000 (13:29 +0100)]
typedefs: Put them back into alphabetical order

"Please keep this list in alphabetical order" has been more honoured
in the breach than in the observance.  Clean up.

While there, drop a redundant struct declaration.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoscsi: remove scsi_req_free prototype
Hervé Poussineau [Thu, 12 Nov 2015 21:26:33 +0000 (22:26 +0100)]
scsi: remove scsi_req_free prototype

Function has been deleted in ad2d30f79d3b0812f02c741be2189796b788d6d7.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agogt64xxx: fix decoding of ISD register
Paolo Bonzini [Fri, 6 Nov 2015 15:34:06 +0000 (16:34 +0100)]
gt64xxx: fix decoding of ISD register

The GT64xxx's internal registers can be placed above the first 4 GiB
in the address space, but not above the first 64 GiB.  Correctly cast
the register to a 64-bit integer, and mask away bits above bit 35.

Datasheet at http://pdf.datasheetarchive.com/datasheetsmain/Datasheets-33/DSA-655889.pdf
(bug reported by Coverity).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoconfigure: use appropriate code fragment for -fstack-protector checks
Rodrigo Rebello [Thu, 12 Nov 2015 14:04:28 +0000 (12:04 -0200)]
configure: use appropriate code fragment for -fstack-protector checks

The check for stack-protector support consisted in compiling and linking
the test program below (output by function write_c_skeleton()) with the
compiler flag -fstack-protector-strong first and then with
-fstack-protector-all if the first one failed to work:

  int main(void) { return 0; }

This caused false positives when using certain toolchains in which the
compiler accepted -fstack-protector-strong but no support was provided
by the C library, since for this stack-protector variant the compiler
emits canary code only for functions that meet specific conditions
(local arrays, memory references to local variables, etc.) and the code
fragment under test included none of them (hence no stack protection
code generated, no link failure).

This fix changes the test program used for -fstack-protector checks to
include a function that meets conditions which cause the compiler to
generate canary code in all variants.

Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agocrypto: avoid two coverity false positive error reports
Daniel P. Berrange [Fri, 13 Nov 2015 17:45:27 +0000 (17:45 +0000)]
crypto: avoid two coverity false positive error reports

In qcrypto_tls_creds_get_path() coverity complains that
we are checking '*creds' for NULL, despite having
dereferenced it previously. This is harmless bug due
to fact that the trace call was too early. Moving it
after the cleanup gets the desired semantics.

In qcrypto_tls_creds_check_cert_key_purpose() coverity
complains that we're passing a pointer to a previously
free'd buffer into gnutls_x509_crt_get_key_purpose_oid()
This is harmless because we're passing a size == 0, so
gnutls won't access the buffer, but rather just report
what size it needs to be. We can avoid it though by
explicitly setting the buffer to NULL after free'ing
it.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoconfigure: Diagnose broken linkers directly
Peter Maydell [Tue, 24 Nov 2015 14:55:46 +0000 (14:55 +0000)]
configure: Diagnose broken linkers directly

Currently if the user's compiler works for creating .o files but
their linker is broken such that compiling an executable from a
C file does not work, we will report a misleading error message
about the compiler not supporting __thread (since that happens
to be the first test we run which requires a working linker).
Explicitly check that compile_prog works as well as compile_object,
so that people whose toolchain setup is broken get a more helpful
error message.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agobt: avoid unintended sign extension
Paolo Bonzini [Fri, 27 Nov 2015 12:08:25 +0000 (13:08 +0100)]
bt: avoid unintended sign extension

In the case of a 4-byte length, shifting a value by 24 may cause
an unintended sign extension when converting from int to size_t.
Use a uint32_t variable instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoutil/id: fully allocate names table
John Snow [Wed, 25 Nov 2015 21:03:37 +0000 (16:03 -0500)]
util/id: fully allocate names table

Trivial: this array should be allocated to have ID_MAX entries always.
Otherwise if someone were to forget to expand this table, the assertion
in the id generator won't actually trigger; it will read junk data.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agospapr_drc: Change value of property "fdt" from null back to {}
Markus Armbruster [Thu, 3 Dec 2015 16:37:39 +0000 (17:37 +0100)]
spapr_drc: Change value of property "fdt" from null back to {}

prop_get_fdt() misuses the visitor API: when fdt is null, it doesn't
visit anything.  object_property_get_qobject() happily
object_property_get_qobject().  Amazingly, the latter survives the
misuse.  Turns out we've papered over it long before prop_get_fdt()
existed, in commit 1d10b44.

However, commit 6c2f9a1 changed how we paper over it, and as a side
effect changed qom-get's value from {} to null.  Change it right back
by fixing the visitor misuse.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
8 years agopackage: update version (2.4.5)
SeokYeon Hwang [Fri, 4 Dec 2015 04:38:44 +0000 (13:38 +0900)]
package: update version (2.4.5)

Change-Id: I415091869c7b2ad3da66cbeef7eb32f9ad6d8ed2
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agobuild: make win64 binaries for 64bit Windows
SeokYeon Hwang [Thu, 3 Dec 2015 06:44:56 +0000 (15:44 +0900)]
build: make win64 binaries for 64bit Windows

Change-Id: I92a5970ccbe44f5ff328400c024377d1e8a4315d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agospapr_drc: Make device "spapr-dr-connector" unavailable with -device
Markus Armbruster [Thu, 3 Dec 2015 16:37:40 +0000 (17:37 +0100)]
spapr_drc: Make device "spapr-dr-connector" unavailable with -device

It should only be created via spapr_dr_connector_new().  Attempting to
create it with -device crashes.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
8 years agospapr_drc: Handle visitor errors properly
Markus Armbruster [Thu, 3 Dec 2015 16:37:38 +0000 (17:37 +0100)]
spapr_drc: Handle visitor errors properly

Since prop_get_fdt() is only used with QmpOutputVisitor, errors
shouldn't actually happen, so this is only a latent bug.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
8 years agoqom: Update documentation comment of struct Object
Cao jin [Thu, 5 Nov 2015 07:39:03 +0000 (15:39 +0800)]
qom: Update documentation comment of struct Object

It doesn't have "GSList *interfaces" anymore, drop the paragraph.

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
8 years agotests: Fix check-report-qtest-% target
Andreas Färber [Sat, 21 Nov 2015 01:20:06 +0000 (02:20 +0100)]
tests: Fix check-report-qtest-% target

Commit e253c28 ("tests: Fix how qom-test is run") introduced
$(qtest-generic-y) and used it for check-qtest-% target, but did not
update check-report-qtest-%. This causes check-report-qtest-aarch64.xml
target to fail with a gtester usage error for lack of test arguments.

Fix this by adding $(qtest-generic-y) in check-report-qtest-%.
Also add it in check-clean target, spotted by Markus.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
8 years agoui: vnc: avoid floating point exception
Prasad J Pandit [Thu, 3 Dec 2015 13:24:17 +0000 (18:54 +0530)]
ui: vnc: avoid floating point exception

While sending 'SetPixelFormat' messages to a VNC server,
the client could set the 'red-max', 'green-max' and 'blue-max'
values to be zero. This leads to a floating point exception in
write_png_palette while doing frame buffer updates.

Reported-by: Lian Yihan <lianyihan@360.cn>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>