sdk/emulator/qemu.git
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 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 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 agolayout: improve logging for XML parsing
GiWoong Kim [Tue, 1 Dec 2015 05:54:05 +0000 (14:54 +0900)]
layout: improve logging for XML parsing

- apply indenting
- clean up

Change-Id: Ibdf00cb60329a7d2f2eeedc29f7d1cca909c83b9
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoinstall: change sudoers rule on ubuntu
Munkyu Im [Fri, 27 Nov 2015 04:59:00 +0000 (13:59 +0900)]
install: change sudoers rule on ubuntu

Typically /etc/sudoers is under control of
your distribution's package manager.
So, it's not a good way to modify this file directly.
To avoid this,
place emulator's changes into a file in the /etc/sudoers.d/
Also simplify rule to one line.

- old version
User_Alias QEMUERS=${USERS}
Cmnd_Alias QEMU=${FILES}
QEMUERS ALL=(ALL) NOPASSWD: QEMU

- new version
ALL ALL=(ALL) NOPASSWD: ${FILES}

Change-Id: I8d17dc4f8cb6d7c4a3bbba1e3ca9c5225452deb8
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agoskin: clean up skin resource
GiWoong Kim [Mon, 30 Nov 2015 05:57:37 +0000 (14:57 +0900)]
skin: clean up skin resource

- delete unnecessary files
- modify layout version element

Change-Id: If69bf2ee55913cb41c8ec028c1a4f68b55f52878
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agogui: standardize tooltip style for controller
GiWoong Kim [Mon, 30 Nov 2015 04:48:17 +0000 (13:48 +0900)]
gui: standardize tooltip style for controller

black font, white background, black 1px border

Change-Id: I4be70904a18ab48c08fd61052f218ddede94bfda
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agonet: fix failure of launching multiple VMs consecutively
Munkyu Im [Tue, 24 Nov 2015 07:41:00 +0000 (16:41 +0900)]
net: fix failure of launching multiple VMs consecutively

There was a gap between check_port_bind_listen()
and ecs_socket_listen()
The socket fd for checking port was closed and
created it again as ECS(Emulator Control Sever) socket.
If user launches both VM1 and VM2 at the same time,
the below case can be happen.

1. VM1: launch and search base port - 26100
2. VM1: close socket fd
3. VM2: launch and search base port - 26100
4. VM2: close socket fd
5. VM1: try to create ecs socket for 26100 + 3
6. VM2: try to create ecs socket for 26100 + 3 (failure)

To fix this problem, ECS re-uses the port created on check_port_bind_listen().

Change-Id: Ib60a4f15d63bba57c68583228753310d5b467677
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agomenu: reduce the entry of VM Info from Detailed Info dialog
GiWoong Kim [Fri, 27 Nov 2015 07:35:38 +0000 (16:35 +0900)]
menu: reduce the entry of VM Info from Detailed Info dialog

combine Display Resolution item with Display Density item
ex) Display: 480x800 (233 ppi)

Change-Id: If96b01408040f7d5ff18b78b123bcdd8fcbe1d8e
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoQt: offGuideImage hides while Move function is active
Jihye Won [Fri, 13 Nov 2015 01:23:29 +0000 (10:23 +0900)]
Qt: offGuideImage hides while Move function is active

So far, Move function is canceled just before offGuideImage shows
while a user activate the function.
For improving user experience of using Move function,
offGuideImage hides while Move function is active.
Therefore, the user can move Emulator without interruption of offGuideImage

Change-Id: I2fe51ec70026c9086a79aee88b06aee1205ae35d
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
8 years agoaudio: apply IN feature to coreaudio
bk0121.shin [Wed, 25 Nov 2015 02:53:53 +0000 (11:53 +0900)]
audio: apply IN feature to coreaudio

The original coreaudio does not support audio-in feature.
To support this feature, I ported coreaudio from tizen_2.4.
There are 3 different following points;

1. Audio in callbacks are added.
2. Init callback has drv_opaque argument.
3. The new logging API is applied.

Change-Id: I36a3d772e038a11ee3592cde2ee9c5e277ac9c8e
Signed-off-by: bk0121.shin <bk0121.shin@samsung.com>
8 years agobuild: prepare for building Win64 emulator binary
SeokYeon Hwang [Wed, 25 Nov 2015 12:01:12 +0000 (21:01 +0900)]
build: prepare for building Win64 emulator binary

Fixed some warnings and errors caused by difference between variable
and pointer size.

get_java_path() is a function for finding 64bit java binary on WoW64.
But callers of get_java_path() should determine whether we are running
on Wow64 or not. So it is modified for all platforms now. It can
determine current plaform inside. Callers just use get_java_path()
anytime they want.

"emulator_configure.sh" becomes more complicated. So some configure
options for Windows are commonized.

Change-Id: Iad83e05fffa6c028b7077cf3a7998722575e5b49
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agomenu: support skin path opening
GiWoong Kim [Mon, 23 Nov 2015 10:53:11 +0000 (19:53 +0900)]
menu: support skin path opening

At Detailed Info dialog, Emulator opens skin path in the appropriate
browser for user's desktop environment if the Skin Name item is double-
clicked.

Change-Id: Ia4c43b1571831874e80a97fd31bd15407d261022
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoUI: supports reboot from context menu
Jinhyung Choi [Wed, 4 Nov 2015 02:33:51 +0000 (11:33 +0900)]
UI: supports reboot from context menu

When a malfunction of emulator occurs, such as no response from the guest OS,
what a developer can do is selecting "force close"
and restarting from emulator manager.

In order to avoid the inconvenience of doing it, reboot menu is added.
It is working directly to hardware after requesting sync() to guest OS

         ----------------
         | Context menu |
         ----------------
         |   reboot     |
         ----------------                         ----------
                |                                 | emuld  |
     ------------------------                     ----------
     | 1. send sync message |   ------------->    | sync() |
     | 2. start a timer     |                     ----------
     ------------------------
               | The timer expires after 1s
   -------------------------------
   | qemu_system_reset_request() |
   -------------------------------

Conflicts:
tizen/src/extension/ui/resource/skins/tv-1080x1920/layout.xml
tizen/src/extension/ui/resource/skins/tv-1920x1080/layout.xml
tizen/src/extension/ui/resource/skins/tv-2560x1080/layout.xml

Change-Id: I3c3c31c2cc19065f53b620d83c79e68e0183db53
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
(cherry picked from commit 14fc61baff1e8b48cbcb810a8392a1ac601f2511)

8 years agomenu: modified title of VM info's item on Detailed Info
GiWoong Kim [Mon, 23 Nov 2015 08:11:34 +0000 (17:11 +0900)]
menu: modified title of VM info's item on Detailed Info

- "CPU" -> "CPU Arch"
- "File Sharing Path" -> "Directory Sharing

Change-Id: Id00e17af7a4c3dd8cd476292e803d4329c8ce864
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agocontroller: modify parent widget for general-purpose controller
GiWoong Kim [Fri, 20 Nov 2015 06:33:04 +0000 (15:33 +0900)]
controller: modify parent widget for general-purpose controller

GeneralPurposeCon gets constrained by FloatingController's
geometry while floating. So, FloatingConView should be replaced
by the FloatingController as a proper parent widget.

Change-Id: Ic670b163b63d2777b3413a5c1f159c4c7e6ff11a
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
8 years agoui/cocoa: fix for warning on MacOS X 10.10
SeokYeon Hwang [Sun, 22 Nov 2015 07:52:08 +0000 (16:52 +0900)]
ui/cocoa: fix for warning on MacOS X 10.10

Under some environment on MacOS X 10.10, the Objective-C compiler confuse
which object's setDelegate is used actually when we use just 'NSApp'.
It is not fixed perfectly by commit 2a4c8c53dabf564142d5329b9ff8a82468324fd6.

So we should specify delegate protocol.

Change-Id: Ia5638d3169ae9251522eab6308ff0ba5d8a28874
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agohds: introduce unmodifiable level of control
Jinhyung Choi [Sun, 15 Nov 2015 09:55:40 +0000 (18:55 +0900)]
hds: introduce unmodifiable level of control

A user can mount and unmount freely with ECP UI and ECP CLI.
However, certain directories, such as IDE workspaces, are
not allowed to unmount it for normal usage. So, ECP CLI with
special arguments sets unmodifiable level.
The level is used 1 for unmodifiable and 0 for normal usage.

Change-Id: Ic8c35e27193fa54e5acc508a5700f6fb342b6960
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
9 years agokvm: remove permission setting with setfacl
Munkyu Im [Tue, 17 Nov 2015 10:25:40 +0000 (19:25 +0900)]
kvm: remove permission setting with setfacl

Udev already supports this with "TAG+=uaccess" tag.
It's located to /lib/udev/rules.d/70-uaccess.rules

Change-Id: I4a1228c82d26d16ac2868b997e1bd7c7f6b9fb1e
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
9 years agoemulator: use cocoa UI as a default
SeokYeon Hwang [Tue, 17 Nov 2015 08:37:38 +0000 (17:37 +0900)]
emulator: use cocoa UI as a default

Use cocoa UI as a default when a user wants to use a default console
provided by QEMU. It is mostly used with non-tizen disk images.

Change-Id: Ia9377f032bfdc79344a9b5e3c0163478c24d4640
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agovhost-net: enable vhost-net kernel module
Munkyu Im [Wed, 7 Oct 2015 10:35:55 +0000 (19:35 +0900)]
vhost-net: enable vhost-net kernel module

When user uses bridge network on ubuntu,
qemu supports vhost-net automatically now.
But, vhost kernel driver needs root permission.
So, adds modprobe and udev rule for user to access vhost-net.

Change-Id: Ib7220fcb49f1bf62bca56413393d15c4b239b4f8
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
9 years agopackage: update version (2.4.4)
SeokYeon Hwang [Wed, 18 Nov 2015 05:32:11 +0000 (14:32 +0900)]
package: update version (2.4.4)

Change-Id: Ifd0d848431f4f2056c89c08331afff5fa09f77b9
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoinstall: remove ditto job
Munkyu Im [Wed, 11 Nov 2015 07:13:07 +0000 (16:13 +0900)]
install: remove ditto job

It is common job, so I move it to tuntaposx install script.
Also, it does not need to be executed with privilege mode.

Change-Id: I33c471120c3f9a5270ddd2217543516490e000d3
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
9 years agoui: modify class name
GiWoong Kim [Tue, 17 Nov 2015 02:00:18 +0000 (11:00 +0900)]
ui: modify class name

UIUtil -> UiUtil

Change-Id: Ib9dc133c740266eb63a8d39ad766664268ef30a5
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agomenu: open the popup menu without any focus
GiWoong Kim [Mon, 16 Nov 2015 11:03:09 +0000 (20:03 +0900)]
menu: open the popup menu without any focus

On MacOS, right-click cannot bring up the popup menu without a
window focus. This behavior is inconvenient to user. So, to improve
this issue, I added raise() function call before the menu displaying.
This call makes that emulator window can keep focusing and open the
popup menu immediately.

Change-Id: I342121e4e6922f9b7009776ee5391589b9a4e0c1
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoskin: empty pressed-image handling
GiWoong Kim [Mon, 16 Nov 2015 05:38:52 +0000 (14:38 +0900)]
skin: empty pressed-image handling

Empty image should be considered in HW key related logics.
The "pressedImage" element can be empty from XML schema.
This element is not a mandatory option for Emulator layout.

Change-Id: Idf0e15d0d5cabdcc3b639d400044ca7a8a639c69
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agooslib-win32: use localtime_r/gmtime_r that is provided by MinGW
SeokYeon Hwang [Mon, 16 Nov 2015 05:40:42 +0000 (14:40 +0900)]
oslib-win32: use localtime_r/gmtime_r that is provided by MinGW

Recent MinGW-w64 contains their own localtime_r() and gmtime_r(). But
it is only enabled under specific including order.
This issue is resolved by 4d9310f427b477a126f6f2006c3a73b9764948b6 in
upstream. But it is dependent on other commits that contain complex
modifications.
So now, we choose simple solution for it - just re-arrange header
including order.

Change-Id: Ie1a8d46baa9a5e8f1140362faa81567b1ba257a5
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoemulator: print Qt version which is linked runtime
SeokYeon Hwang [Sat, 14 Nov 2015 07:44:56 +0000 (16:44 +0900)]
emulator: print Qt version which is linked runtime

print_system_info() is called under any circumstances. So it should
contains runtime informataion as many as possible. Now we can
recognize Qt version which is linked runtime even though emulator
rashes before Qt GUI is initialized.

In addition, Logged version format is standardized.

Change-Id: I671861a350e2c2deedae366a7662bf382a00e60a
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agopackage: remove ARM guest packaging that was aleady commented out
SeokYeon Hwang [Sat, 14 Nov 2015 04:38:57 +0000 (13:38 +0900)]
package: remove ARM guest packaging that was aleady commented out

Change-Id: I39b82d1126f05862f6eed807ad98d834ceee508d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoRevert "device_hotplug: supported various image type sdcard"
ChulHo Song [Fri, 13 Nov 2015 07:37:43 +0000 (16:37 +0900)]
Revert "device_hotplug: supported various image type sdcard"

This reverts commit 7e8d41619b251177196f62a6c44ecdce047aaadc.

Removal of the driver option occur error case.

Change-Id: I0f91bbfdd1f5a855b59941e57057e8999591e1a3
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
9 years agoXML: print specified error cases while parsing
GiWoong Kim [Wed, 11 Nov 2015 11:09:45 +0000 (20:09 +0900)]
XML: print specified error cases while parsing

- UnexpectedElementError
- NotWellFormedError
- PrematureEndOfDocumentError

Change-Id: Iaf80dfb40cc0167636fa190172991ef10a4f8f9a
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoqt5_msgbox: fix condition for checking empty message
Jihye Won [Fri, 13 Nov 2015 02:06:34 +0000 (11:06 +0900)]
qt5_msgbox: fix condition for checking empty message

It is simple way to check whether message[1] is NULL
instead of checking the length of the message is 1.
Also, the level of error log is changed from ERROR into WARN.

Change-Id: I9f65e7ed037ee92fcb017255455e2e68dbc45cfa
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
9 years agoskin: wearable skin pacakging
GiWoong Kim [Fri, 13 Nov 2015 02:33:10 +0000 (11:33 +0900)]
skin: wearable skin pacakging

- add wearable-360x360-1btn
- add wearableO-360x360-2btn

Change-Id: I886421bb20edd38316b86320d0ee9fe0d8ed23a3
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoKeySequence: activatedAmbiguously() signal handling
GiWoong Kim [Wed, 11 Nov 2015 07:22:48 +0000 (16:22 +0900)]
KeySequence: activatedAmbiguously() signal handling

When a key sequence is being typed at the keyboard, it is said
to be ambiguous as long as it matches the start of more than one shortcut.
When a shortcut's key sequence is completed, activatedAmbiguously() is
emitted if the key sequence is still ambiguous (i.e., it is the start of
one or more other shortcuts). The activated() signal is not emitted in this case.

A warning message box will show up in Emulator when
conflicted shortcut key is typed by user.

Change-Id: I62538ed48ec02786f70565652c7cd734992ec06a
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years ago9pfs: fix bug of reading host directory path
ChulHo Song [Tue, 20 Oct 2015 11:22:03 +0000 (20:22 +0900)]
9pfs: fix bug of reading host directory path

On Windows host, if the user selected the root directory as Host
Directory Sharing path, the emulator launching failure could occur.

There was a code that remove the last backslash of entered path on
Windows implementation. By the way, stat() function could not read the
path when root path like 'c:\' had entered and been removed the last
backslash(the result was 'c:').
So we change the code to remove the backslash only if the entered path
is not a root directory.

We should check the stat() working mechanism about reading pathes
including backslash on Windows later.

Change-Id: I7a155520af1f008f927e6dc67408e930c0f73ab1
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
(cherry picked from commit 20be828e348259146208ee67f13c1b340a8eaff8)

9 years agoKeySequence: remove unnecessary function and etc
GiWoong Kim [Tue, 10 Nov 2015 11:36:02 +0000 (20:36 +0900)]
KeySequence: remove unnecessary function and etc

- remove unnecessary function
- modify some variable names

Change-Id: Ia9988078c47a2d934d1aacb845b1100df168d7b3
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agopackage: version up(2.4.3)
SeokYeon Hwang [Wed, 11 Nov 2015 05:24:40 +0000 (14:24 +0900)]
package: version up(2.4.3)

2.4.3

Change-Id: I88fe9dd4ccdfb50d1e470424c3953e68f4f4b1b5
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agohax: remove redundant comparison
SeokYeon Hwang [Tue, 10 Nov 2015 13:21:41 +0000 (22:21 +0900)]
hax: remove redundant comparison

"(hax_enabled() && hax_ug_platform())" is always false when
tcg is enabled.

Change-Id: I1fed39c6e4e45b915792130882d5a3971583b3ed
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoMerge tag 'v2.4.1' into tizen_3.0_develop
SeokYeon Hwang [Tue, 10 Nov 2015 13:09:17 +0000 (22:09 +0900)]
Merge tag 'v2.4.1' into tizen_3.0_develop

v2.4.1

Change-Id: I8d62d785e1d693dc2ce29ddc3bdaf4e5ad30da61
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agomenu: improve CPU architecture information on Detailed Info
GiWoong Kim [Tue, 10 Nov 2015 07:45:30 +0000 (16:45 +0900)]
menu: improve CPU architecture information on Detailed Info

- guest 32bit CPU: "x86 (32bit)"
- guest 64bit CPU: "x86 (64bit)"

Change-Id: I73d233c534e1e2d89e56b0c01f33996aa832eea7
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoosutil-win32: get JavaHome path of current JRE
jinhyung.jo [Thu, 5 Nov 2015 06:08:19 +0000 (15:08 +0900)]
osutil-win32: get JavaHome path of current JRE

Currently, the emulator gets the java path by traverses the registry
subkeys of "\\SOFTWARE\\JavaSoft\\Java Runtime Environment".
This can cause side effects.
So modified to get the java path in the normal way.
It gets the JavaHome path of the CurrentVersion.

Change-Id: Ibfa41f3c939f01f3b0ffd5fe4cfa2bdb575be76a
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoui: remove unnecessary blank space in window
GiWoong Kim [Mon, 9 Nov 2015 02:35:28 +0000 (11:35 +0900)]
ui: remove unnecessary blank space in window

To remove blank space, add none boder-style to QGraphicView.
And it should not be overwritten.

Change-Id: I50f6fad3a65d191faa4effd0c969c23b0821a140
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agomenu: delete some unnecessary lines in SWT GUI
GiWoong Kim [Mon, 9 Nov 2015 07:35:11 +0000 (16:35 +0900)]
menu: delete some unnecessary lines in SWT GUI

There is no need to consider CPU architecture on
Detailed Info Dialog.

Change-Id: I97ac80a5cee32d382ac93d60e01740a87a8de8d6
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agopackage: version up(2.4.2)
jinhyung.jo [Fri, 6 Nov 2015 05:32:17 +0000 (14:32 +0900)]
package: version up(2.4.2)

2.4.2

Change-Id: I07da5c679ce952a781776f42c59b7c87a47f63c0
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoQt: set new menu icons of Always On Top and Move
Jihye Won [Mon, 2 Nov 2015 09:28:47 +0000 (18:28 +0900)]
Qt: set new menu icons of Always On Top and Move

As setting two icons of "Always On Top" and "Move" in emulator context menu,
the context menu will look nice.
Specifically, each indentation of the context menu becomes equal in MacOSX.
Also, new icons will help users recognize what does menu mean at a glance.

Change-Id: I0114f9f064f069c1553c0f59983cf8131a6133ad
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
9 years agoQt: destroy transWidget before offGuideImage shows
Jihye Won [Tue, 3 Nov 2015 06:51:28 +0000 (15:51 +0900)]
Qt: destroy transWidget before offGuideImage shows

When emulator does not receive any event,
offGuideImage is loaded on the top of the screen.
The problem is that offGuideImage shows with transparent widget
created for Move function.
To resolve the problem, transparent widget should be deleted
just before offGuidImage shows.

Change-Id: Ia2ceb186034d4e37bff3c1f22c206202a20b7e8b
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
9 years agodebug: fix a bug about reading debugch name
Sooyoung Ha [Sun, 1 Nov 2015 10:49:53 +0000 (19:49 +0900)]
debug: fix a bug about reading debugch name

The legacy code designed that DEBUGCH file always has a newline
character end of it, code tried to remove(means changed it to null char)
the last char. But surely, DEBUGCH file might not have the newline, it
could cause the unexpected behavior. So I add the newline check code.

Change-Id: Id5eb667adcdeef7fa3920069afc1e936100107ce
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
9 years agoYaGL: Version bump
jinhyung.jo [Fri, 6 Nov 2015 05:11:08 +0000 (14:11 +0900)]
YaGL: Version bump

For the 64bit addressing
(commit id: 6f60a05179838f69e095cd6425a5f1ac8b0bd2e2)
Be sure synchronize with the kernel & platform yagl packages.

Change-Id: I39de2627754b7f70efc0a0fbfd3b2101be9b009d
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoDIBS: build on DIBS in the same way on local
SeokYeon Hwang [Fri, 6 Nov 2015 02:33:32 +0000 (11:33 +0900)]
DIBS: build on DIBS in the same way on local

Using TIZEN_SDK_DEV_PATH instead of overriding PKG_CONFIG_PATH.

Change-Id: Ib99c9e6149cbca93c278e84873b8a93de6f436e0
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoconfigure: change default TIZEN_SDK_DEV_PATH for cross compiling
SeokYeon Hwang [Thu, 5 Nov 2015 12:38:09 +0000 (21:38 +0900)]
configure: change default TIZEN_SDK_DEV_PATH for cross compiling

If CROSS_PREFIX is specified, we use "~/tizen-sdk-dev/$CROSS_PREFIX/"
as a default instead of "~/$CROSS_PREFIX-tizen-sdk-dev/".

Change-Id: I86e825ca2b1749be240e8850478de2c185b2cb8e
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoutil: remove unused utility sources
SeokYeon Hwang [Thu, 5 Nov 2015 12:20:10 +0000 (21:20 +0900)]
util: remove unused utility sources

check-* is moved to emulator-supplements. So it is useless now.

Change-Id: I52a0fbe884a37d1fd570dff3febd029e3afad869
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agovl.c: do not use deprecated glib API g_mem_set_vtable()
SeokYeon Hwang [Thu, 5 Nov 2015 12:12:36 +0000 (21:12 +0900)]
vl.c: do not use deprecated glib API g_mem_set_vtable()

g_mem_set_vtable() has been deprecated since glib version 2.46. So,
compiler complain about it "-Wdeprecated-declarations".
We should not use g_mem_set_vtable() when glib is newer than 2.46.

Change-Id: I0fcf76fa1b18e544341c679307aa5418cf619367
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoXML: removed returning allocated memory in parser
GiWoong Kim [Tue, 3 Nov 2015 08:15:17 +0000 (17:15 +0900)]
XML: removed returning allocated memory in parser

Change-Id: I5e63849a513e7f53b0a414742e3c21a935f7046b
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoXML: minor cleanup
GiWoong Kim [Tue, 3 Nov 2015 07:21:27 +0000 (16:21 +0900)]
XML: minor cleanup

- declare a makeGeneralCon function
- call by reference
- add some logs

Change-Id: Ic14a41b222be25ff8e3c9b773ded17c8e6cc7dda
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agodisplay: added masking for screen off guide
GiWoong Kim [Wed, 4 Nov 2015 08:58:06 +0000 (17:58 +0900)]
display: added masking for screen off guide

Change-Id: If3bcf54f83f779e32490bfee12668d94facd928d
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoskin: fix the incorrect decision logic for VM color
GiWoong Kim [Tue, 3 Nov 2015 06:31:34 +0000 (15:31 +0900)]
skin: fix the incorrect decision logic for VM color

Decision logic for VM color(which is used by Pair Tag on skin)
is depended on base port number. The port number is
increased by 10 from 26100.

Change-Id: I8744e837eb77773e9dedf2155abca346498ae211
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agocheck-net: fix duplicated http_proxy
Munkyu Im [Tue, 3 Nov 2015 07:16:18 +0000 (16:16 +0900)]
check-net: fix duplicated http_proxy

replace duplicated "http_proxy=" with "https_proxy="
It is typo error.

Change-Id: Ic02493790ddcc52367a179c4a7d51d5812b46517
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
9 years agopackage: version up(2.4.1)
jinhyung.jo [Thu, 5 Nov 2015 03:11:18 +0000 (12:11 +0900)]
package: version up(2.4.1)

up to 2.4.1

Change-Id: I9cb76d4cdbad96f30d985e5ad26c1b33d1fbf714
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoYaGL: Patches for the 64bit memory addressing
jinhyung.jo [Wed, 4 Nov 2015 09:25:17 +0000 (18:25 +0900)]
YaGL: Patches for the 64bit memory addressing

Tizen 3.0 supports a 64bit guest.
However current yagl is implemented by assumed to use the 32bit address.
So modify the address related parts.
I will also update the yagl platform sources.

Change-Id: I5f56915fa68f8170d81c96e8f426f60ddc9d98e5
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoYaGL: Modified the process state for the 64bit guest
SeokYeon Hwang [Tue, 3 Nov 2015 07:04:10 +0000 (16:04 +0900)]
YaGL: Modified the process state for the 64bit guest

If the guest image is 64bit, 'yagl_mem_get' function fails.
So the host yagl can not access the guest memory.
The failure occurs in the 'cpu_get_phys_page_debug'.
(<qemu>/target-i386.helper.c:820 if (env->hflags & HF_LMA_MASK))
Becuase the yagl process state does not have the flag like above,
it does not proceed as a normal routine in Ubuntu 64bit.
Therefore add the 'hflags' to the yagl process state.

Change-Id: Ia1dfa8d7ca51211893149612f400365199fe16b5
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoskin: masking for non-alpha channel image format
GiWoong Kim [Mon, 2 Nov 2015 05:31:24 +0000 (14:31 +0900)]
skin: masking for non-alpha channel image format

Removes any mask set on main window when emulator uses
a non-alpha channel image as a skin.

Change-Id: I64293c35f07a36fb3bbbff140a06412f09b6084c
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agoUpdate version for 2.4.1 release
Michael Roth [Thu, 29 Oct 2015 18:49:30 +0000 (13:49 -0500)]
Update version for 2.4.1 release

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovirtio: sync the dataplane vring state to the virtqueue before virtio_save
Pavel Butsykin [Mon, 26 Oct 2015 11:42:57 +0000 (14:42 +0300)]
virtio: sync the dataplane vring state to the virtqueue before virtio_save

When creating snapshot with the dataplane enabled, the snapshot file gets
not the actual state of virtqueue, because the current state is stored in
VirtIOBlockDataPlane. Therefore, before saving snapshot need to sync
the dataplane vring state to the virtqueue. The dataplane will resume its
work at the next notify virtqueue.

When snapshot loads with loadvm we get a message:
VQ 0 size 0x80 Guest index 0x15f5 inconsistent with Host index 0x0:
    delta 0x15f5
error while loading state for instance 0x0 of device
    '0000:00:08.0/virtio-blk'
Error -1 while loading VM state

to reproduce the error I used the following hmp commands:
savevm snap1
loadvm snap1

qemu parameters:
--enable-kvm -smp 4 -m 1024 -drive file=/var/lib/libvirt/images/centos6.4.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0 -set device.virtio-disk0.x-data-plane=on

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Message-id: 1445859777-2982-1-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: "Michael S. Tsirkin" <mst@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 10a06fd65f667a972848ebbbcac11bdba931b544)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agotarget-xtensa: add window overflow check to L32E/S32E
Max Filippov [Sun, 19 Jul 2015 07:02:37 +0000 (10:02 +0300)]
target-xtensa: add window overflow check to L32E/S32E

Despite L32E and S32E primary use is for window underflow and overflow
exception handlers they are just normal instructions, and thus need to
check for window overflow.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
(cherry picked from commit f822b7e497fa6a662094b491f86441015f363362)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agonet: don't set native endianness
Michael S. Tsirkin [Wed, 14 Oct 2015 09:11:27 +0000 (12:11 +0300)]
net: don't set native endianness

commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991
    vhost-net: tell tap backend about the vnet endianness
makes vhost net always try to set LE - even if that matches the
native endian-ness.

This makes it fail on older kernels on x86 without TUNSETVNETLE support.

To fix, make qemu_set_vnet_le/qemu_set_vnet_be skip the
ioctl if it matches the host endian-ness.

Reported-by: Marcel Apfelbaum <marcel@redhat.com>
Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
(cherry picked from commit 052bd52fa978d3f04bc476137ad6e1b9a697f9bd)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoaudio: disable audio on Windows to avoid Windows audio problem
SeokYeon Hwang [Fri, 30 Oct 2015 04:18:31 +0000 (13:18 +0900)]
audio: disable audio on Windows to avoid Windows audio problem

QEMU dsound audio backend is not stabilized now and it can cause
emuulator crash. Until we solve the problem, we should disable
audio in Windows.

Change-Id: I5acb6f955fa03868b34ca27be8fc0fec63c7dda1
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoaudio: remove W/A codes for winwaveaudio
bk0121.shin [Thu, 29 Oct 2015 07:53:24 +0000 (16:53 +0900)]
audio: remove W/A codes for winwaveaudio

When sound is played without connecting of speaker on Windows,
because winwaveaudio made process lock-up, the W/A were applied.
However, qemu of tizen_3.0 does not support winwaveaudio,
but, dsoundaudio for Windows host.
And, as audio codes of qemu are updated, the W/A is no more valid code.
Therefore, the W/A codes are removed.

Change-Id: I63f4d73646f09b2af41238ce34102667f05f1d5e
Signed-off-by: bk0121.shin <bk0121.shin@samsung.com>
9 years agoui: initialize class-member variables
GiWoong Kim [Mon, 26 Oct 2015 02:40:16 +0000 (11:40 +0900)]
ui: initialize class-member variables

1. initialize class-member variables
2. delete unnecessary null checking

Change-Id: Ie20dfc5789f7d9be8cb08487c7bfe460507bcb2c
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agodevice-introspect-test: New, covering device introspection
Markus Armbruster [Thu, 1 Oct 2015 08:59:56 +0000 (10:59 +0200)]
device-introspect-test: New, covering device introspection

The test doesn't check that the output makes any sense, only that QEMU
survives.  Useful since we've had an astounding number of crash bugs
around there.

In fact, we have a bunch of them right now: a few devices crash or
hang, and some leave dangling pointers behind.  The test skips testing
the broken parts.  The next commits will fix them up, and drop the
skipping.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1443689999-12182-8-git-send-email-armbru@redhat.com>
(cherry picked from commit 2d1abb850fd15fd6eb75a92290be5f93b2772ec5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agolibqtest: New hmp() & friends
Markus Armbruster [Thu, 1 Oct 2015 08:59:55 +0000 (10:59 +0200)]
libqtest: New hmp() & friends

New convenience function hmp() to facilitate use of
human-monitor-command in tests.  Use it to simplify its existing uses.

To blend into existing libqtest code, also add qtest_hmpv() and
qtest_hmp().  That, and the egregiously verbose GTK-Doc comment format
make this patch look bigger than it is.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1443689999-12182-7-git-send-email-armbru@redhat.com>
(cherry picked from commit 5fb48d9673b76fc53507a0e717a12968e57d846e)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agotests: Fix how qom-test is run
Markus Armbruster [Thu, 1 Oct 2015 08:59:53 +0000 (10:59 +0200)]
tests: Fix how qom-test is run

We want to run qom-test for every architecture, without having to
manually add it to every architecture's list of tests.  Commit 3687d53
accomplished this by adding it to every architecture's list
automatically.

However, some architectures inherit their tests from others, like this:

    check-qtest-x86_64-y = $(check-qtest-i386-y)
    check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
    check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)

For such architectures, we ended up running the (slow!) test twice.
Commit 2b8419c attempted to avoid this by adding the test only when
it's not already present.  Works only as long as we consider adding
the test to the architectures on the left hand side *after* the ones
on the right hand side: x86_64 after i386, microblazeel after
microblaze, xtensaeb after xtensa.

Turns out we consider them in $(SYSEMU_TARGET_LIST) order.  Defined as

    SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
       $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))

On my machine, this results in the oder xtensa, x86_64, microblazeel,
microblaze, i386.  Consequently, qom-test runs twice for microblazeel
and x86_64.

Replace this complex and flawed machinery with a much simpler one: add
generic tests (currently just qom-test) to check-qtest-generic-y
instead of check-qtest-$(target)-y for every target, then run
$(check-qtest-generic-y) for every target.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-Id: <1443689999-12182-5-git-send-email-armbru@redhat.com>
(cherry picked from commit e253c287153c6f3ce4177686ac12c196f9bd8292)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agomacio: move DBDMA_init from instance_init to realize
Paolo Bonzini [Thu, 1 Oct 2015 08:59:52 +0000 (10:59 +0200)]
macio: move DBDMA_init from instance_init to realize

DBDMA_init is not idempotent, and calling it from instance_init
breaks a simple object_new/object_unref pair.  Work around this,
pending qdev-ification of DBDMA, by moving the call to realize.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1443689999-12182-4-git-send-email-armbru@redhat.com>
(cherry picked from commit c7104402353bf32ac1d3a276e3619a20e910506b)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agohw: do not pass NULL to memory_region_init from instance_init
Paolo Bonzini [Thu, 1 Oct 2015 08:59:51 +0000 (10:59 +0200)]
hw: do not pass NULL to memory_region_init from instance_init

This causes the region to outlive the object, because it attaches the
region to /machine.  This is not nice for the "realize" method, but
much worse for "instance_init" because it can cause dangling pointers
after a simple object_new/object_unref pair.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1443689999-12182-3-git-send-email-armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 81e0ab48dda611e9571dc2e166840205a4208567)

Conflicts:
hw/display/cg3.c
hw/display/tcx.c

* removed context dependencies on &error_fatal/&error_abort

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agomemory: allow destroying a non-empty MemoryRegion
Paolo Bonzini [Thu, 1 Oct 2015 08:59:50 +0000 (10:59 +0200)]
memory: allow destroying a non-empty MemoryRegion

This is legal; the MemoryRegion will simply unreference all the
existing subregions and possibly bring them down with it as well.
However, it requires a bit of care to avoid an infinite loop.
Finalizing a memory region cannot trigger an address space update,
but memory_region_del_subregion errs on the side of caution and
might trigger a spurious update: avoid that by resetting mr->enabled
first.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1443689999-12182-2-git-send-email-armbru@redhat.com>
(cherry picked from commit 2e2b8eb70fdb7dfbec39f3a19b20f9a73f2f813e)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoupdate-linux-headers: Rename SW_MAX to SW_MAX_
Markus Armbruster [Thu, 8 Oct 2015 16:11:39 +0000 (18:11 +0200)]
update-linux-headers: Rename SW_MAX to SW_MAX_

The next commit will compile hw/input/virtio-input.c and
hw/input/virtio-input-hid.c even when CONFIG_LINUX is off.  These
files include both "include/standard-headers/linux/input.h" and
<windows.h> then.  Doesn't work, because both define SW_MAX.  We don't
actually use it.  Patch input.h to define SW_MAX_ instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1444320700-26260-2-git-send-email-armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit ac98fa849e834f48e5a64cf4b22218ba4047e142)

Conflicts:
scripts/update-linux-headers.sh

* remove dependency on eddb4de3

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agotrace: remove malloc tracing
Paolo Bonzini [Wed, 16 Sep 2015 15:38:44 +0000 (17:38 +0200)]
trace: remove malloc tracing

The malloc vtable is not supported anymore in glib, because it broke
when constructors called g_malloc.  Remove tracing of g_malloc,
g_realloc and g_free calls.

Note that, for systemtap users, glib also provides tracepoints
glib.mem_alloc, glib.mem_free, glib.mem_realloc, glib.slice_alloc
and glib.slice_free.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 1442417924-25831-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 98cf48f60aa4999f5b2808569a193a401a390e6a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoQt: initialize the docking controller view status
Jihye Won [Sun, 25 Oct 2015 10:15:47 +0000 (19:15 +0900)]
Qt: initialize the docking controller view status

When DockingConView object is created,
the mouse button state is naturally relased.
So, conViewStat should be initialized
as CONVIEW_RELEASED in the constructor of DockingConView.

Change-Id: I849582317075c10d2126c478ac7f6eec51f0dd3a
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
9 years agohax: expand error popup cases
Sooyoung Ha [Sun, 18 Oct 2015 11:28:15 +0000 (20:28 +0900)]
hax: expand error popup cases

We had only one popup "No accelerator found." when haxm had failed to
load. It was not enough to describe why users could not launch emulator
clearly. So I expand the error popup strings for some cases. This patch
could help users to understand their status.

Change-Id: Ie4818308255be4cb4c82e0b5f790cfe365f9e0d2
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
9 years agoskin: remove memory leak
GiWoong Kim [Fri, 23 Oct 2015 12:22:05 +0000 (21:22 +0900)]
skin: remove memory leak

1. remove resource leak in SkinPainter object
2. delete unnecessary null checking

Change-Id: I141116cfd68dcd242bd2581c6deff01c82bf266c
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
9 years agopackage: version up (2.4.0)
SeokYeon Hwang [Thu, 22 Oct 2015 02:42:26 +0000 (11:42 +0900)]
package: version up (2.4.0)

2.4.0

Change-Id: I9963206f9bf71c6105d67929694d5c3ce071037f
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoosutil: get_java_path() move to osutil-win32.c
SeokYeon Hwang [Thu, 22 Oct 2015 07:23:56 +0000 (16:23 +0900)]
osutil: get_java_path() move to osutil-win32.c

qemu_oom_check() uses new QT5 dialog for reporting errors. Finally,
get_java_path() is called by tizen specific logics only. Then it
can move to tizen specific utility now.

Change-Id: I9f2d0dd26715059734bc8242320de01c539a331c
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoerror: use new qt5 dialog instead of legacy java dialog
SeokYeon Hwang [Thu, 22 Oct 2015 06:19:47 +0000 (15:19 +0900)]
error: use new qt5 dialog instead of legacy java dialog

Change-Id: I3682bd91063ffe2393207ed9c6a7d2d4d003a46c
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agohax-all: just use compiler's builtin ffsl()
SeokYeon Hwang [Thu, 22 Oct 2015 05:04:40 +0000 (14:04 +0900)]
hax-all: just use compiler's builtin ffsl()

Toolchains of some platforms don't have ffsl() function. To solve
it, just use compiler's builtin ffsl().

Change-Id: I176aabe730b0bf8afbd5a5d9323e73b203855cdb
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agobuild: clean DIBS build scripts up
SeokYeon Hwang [Wed, 21 Oct 2015 07:49:22 +0000 (16:49 +0900)]
build: clean DIBS build scripts up

Specific operations for MacOS move to macos-64 script.
Routines checking whether TARGET_OS is valid or not is added.

Change-Id: I7aadff447dcd7e7cbe6f55de9f4f6f319c21c2f3
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
9 years agoMerge tag 'v2.4.0.1' into tizen_3.0_develop
SeokYeon Hwang [Thu, 22 Oct 2015 02:34:15 +0000 (11:34 +0900)]
Merge tag 'v2.4.0.1' into tizen_3.0_develop

v2.4.0.1

CVE-only release (see commit log for CVE numbers)

9 years agovirtio-net: correctly drop truncated packets
Jason Wang [Fri, 25 Sep 2015 05:21:30 +0000 (13:21 +0800)]
virtio-net: correctly drop truncated packets

When packet is truncated during receiving, we drop the packets but
neither discard the descriptor nor add and signal used
descriptor. This will lead several issues:

- sg mappings are leaked
- rx will be stalled if a lots of packets were truncated

In order to be consistent with vhost, fix by discarding the descriptor
in this case.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 0cf33fb6b49a19de32859e2cdc6021334f448fb3)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovirtio: introduce virtqueue_discard()
Jason Wang [Fri, 25 Sep 2015 05:21:29 +0000 (13:21 +0800)]
virtio: introduce virtqueue_discard()

This patch introduces virtqueue_discard() to discard a descriptor and
unmap the sgs. This will be used by the patch that will discard
descriptor when packet is truncated.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 29b9f5efd78ae0f9cc02dd169b6e80d2c404bade)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovirtio: introduce virtqueue_unmap_sg()
Jason Wang [Fri, 25 Sep 2015 05:21:28 +0000 (13:21 +0800)]
virtio: introduce virtqueue_unmap_sg()

Factor out sg unmapping logic. This will be reused by the patch that
can discard descriptor.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Andrew James <andrew.james@hpe.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit ce317461573bac12b10d67699b4ddf1f97cf066c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovirtio-input: ignore events until the guest driver is ready
Gerd Hoffmann [Fri, 16 Oct 2015 11:33:07 +0000 (13:33 +0200)]
virtio-input: ignore events until the guest driver is ready

Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit d9460a7557672af9c4d9d4f153200d1075ed5a78)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoMigration: Generate the completed event only when we complete
Dr. David Alan Gilbert [Tue, 13 Oct 2015 11:21:27 +0000 (12:21 +0100)]
Migration: Generate the completed event only when we complete

The current migration-completed event is generated a bit too early,
which means that an eager libvirt that's ready to go as soon
as it sees the event ends up racing with the actual end of migration.

This corresponds to RH bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1271145

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
xSigned-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit ed1f3e0090069dcb9458aa9e450df12bf8eba0b0)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoutil/qemu-config: fix missing machine command line options
Tony Krowiak [Mon, 12 Oct 2015 15:36:21 +0000 (11:36 -0400)]
util/qemu-config: fix missing machine command line options

Commit 0a7cf217 ("util/qemu-config: fix regression of
qmp_query_command_line_options") aimed to restore parsing of global
machine options, but missed two: "aes-key-wrap" and
"dea-key-wrap" (which were present in the initial version of that
patch). Let's add them to the machine_opts again.

Fixes: 0a7cf217 ("util/qemu-config: fix regression of
                  qmp_query_command_line_options")
CC: Marcel Apfelbaum <marcel@redhat.com>
CC: qemu-stable@nongnu.org
Signed-off-by: Tony Krowiak <akrowiak@linux.vnet.ibm.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <1444664181-28023-1-git-send-email-akrowiak@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit 5bcfa0c543b42a560673cafd3b5225900ef617e1)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agos390x/kvm: Fix vector validity bit in device machine checks
Christian Borntraeger [Wed, 7 Oct 2015 08:29:42 +0000 (10:29 +0200)]
s390x/kvm: Fix vector validity bit in device machine checks

Device hotplugs trigger a crw machine check. All machine checks
have validity bits for certain register types. With vector support
we also have to claim that vector registers are valid.
This is a band-aid suitable for stable. Long term we should
create the full  mcic value dynamically depending on the active
features in the kernel interrupt handler.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit 2ab75df38e34fe9bc271b5115ab52114e6e63a89)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agomisc: zynq_slcr: Fix MMIO writes
Peter Crosthwaite [Fri, 16 Oct 2015 10:14:53 +0000 (11:14 +0100)]
misc: zynq_slcr: Fix MMIO writes

The /4 for offset calculation in MMIO writes was happening twice giving
wrong write offsets. Fix.

While touching the code, change the if-else to be a short returning if
and convert the debug message to a GUEST_ERROR, which is more accurate
for this condition.

Cc: qemu-stable@nongnu.org
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit c209b0537203c58a051e5d837320335cea23e494)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoRevert "qdev: Use qdev_get_device_class() for -device <type>,help"
Markus Armbruster [Thu, 1 Oct 2015 08:59:59 +0000 (10:59 +0200)]
Revert "qdev: Use qdev_get_device_class() for -device <type>,help"

This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6.

The reverted commit changed qdev_device_help() to reject abstract
devices and devices that have cannot_instantiate_with_device_add_yet
set, to fix crash bugs like -device x86_64-cpu,help.

Rejecting abstract devices makes sense: they're purely internal, and
the implementation of the help feature can't cope with them.

Rejecting non-pluggable devices makes less sense: even though you
can't use them with -device, the help may still be useful elsewhere,
for instance with -global.  This is a regression: -device FOO,help
used to help even for FOO that aren't pluggable.

The previous two commits fixed the crash bug at a lower layer, so
reverting this one is now safe.  Fixes the -device FOO,help
regression, except for the broken devices marked
cannot_even_create_with_object_new_yet.  For those, the error message
is improved.

Example of a device where the regression is fixed:

    $ qemu-system-x86_64 -device PIIX4_PM,help
    PIIX4_PM.command_serr_enable=bool (on/off)
    PIIX4_PM.multifunction=bool (on/off)
    PIIX4_PM.rombar=uint32
    PIIX4_PM.romfile=str
    PIIX4_PM.addr=int32 (Slot and optional function number, example: 06.0 or 06)
    PIIX4_PM.memory-hotplug-support=bool
    PIIX4_PM.acpi-pci-hotplug-with-bridge-support=bool
    PIIX4_PM.s4_val=uint8
    PIIX4_PM.disable_s4=uint8
    PIIX4_PM.disable_s3=uint8
    PIIX4_PM.smb_io_base=uint32

Example of a device where it isn't fixed:

    $ qemu-system-x86_64 -device host-x86_64-cpu,help
    Can't list properties of device 'host-x86_64-cpu'

Both failed with "Parameter 'driver' expects pluggable device type"
before.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1443689999-12182-11-git-send-email-armbru@redhat.com>
(cherry picked from commit 33fe96833015cf15f4c0aa5bf8d34f60526e0732)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoqdev: Protect device-list-properties against broken devices
Markus Armbruster [Thu, 1 Oct 2015 08:59:58 +0000 (10:59 +0200)]
qdev: Protect device-list-properties against broken devices

Several devices don't survive object_unref(object_new(T)): they crash
or hang during cleanup, or they leave dangling pointers behind.

This breaks at least device-list-properties, because
qmp_device_list_properties() needs to create a device to find its
properties.  Broken in commit f4eb32b "qmp: show QOM properties in
device-list-properties", v2.1.  Example reproducer:

    $ qemu-system-aarch64 -nodefaults -display none -machine none -S -qmp stdio
    {"QMP": {"version": {"qemu": {"micro": 50, "minor": 4, "major": 2}, "package": ""}, "capabilities": []}}
    { "execute": "qmp_capabilities" }
    {"return": {}}
    { "execute": "device-list-properties", "arguments": { "typename": "pxa2xx-pcmcia" } }
    qemu-system-aarch64: /home/armbru/work/qemu/memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
    Aborted (core dumped)
    [Exit 134 (SIGABRT)]

Unfortunately, I can't fix the problems in these devices right now.
Instead, add DeviceClass member cannot_destroy_with_object_finalize_yet
to mark them:

* Hang during cleanup (didn't debug, so I can't say why):
  "realview_pci", "versatile_pci".

* Dangling pointer in cpus: most CPUs, plus "allwinner-a10", "digic",
  "fsl,imx25", "fsl,imx31", "xlnx,zynqmp", because they create such
  CPUs

* Assert kvm_enabled(): "host-x86_64-cpu", host-i386-cpu",
  "host-powerpc64-cpu", "host-embedded-powerpc-cpu",
  "host-powerpc-cpu" (the powerpc ones can't currently reach the
  assertion, because the CPUs are only registered when KVM is enabled,
  but the assertion is arguably in the wrong place all the same)

Make qmp_device_list_properties() fail cleanly when the device is so
marked.  This improves device-list-properties from "crashes, hangs or
leaves dangling pointers behind" to "fails".  Not a complete fix, just
a better-than-nothing work-around.  In the above reproducer,
device-list-properties now fails with "Can't list properties of device
'pxa2xx-pcmcia'".

This also protects -device FOO,help, which uses the same machinery
since commit ef52358 "qdev-monitor: include QOM properties in -device
FOO, help output", v2.2.  Example reproducer:

    $ qemu-system-aarch64 -machine none -device pxa2xx-pcmcia,help

Before:

    qemu-system-aarch64: .../memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.

After:

    Can't list properties of device 'pxa2xx-pcmcia'

Cc: "Andreas Färber" <afaerber@suse.de>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Anthony Green <green@moxielogic.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Jia Liu <proljc@gmail.com>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: qemu-ppc@nongnu.org
Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1443689999-12182-10-git-send-email-armbru@redhat.com>
(cherry picked from commit 4c315c27661502a0813b129e41c0bf640c34a8d6)

Conflicts:
hw/arm/fsl-imx25.c
hw/arm/fsl-imx31.c
target-tilegx/cpu.c
tests/device-introspect-test.c

* removed hunks pertaining to devices/tests not in 2.4

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agoqmp: Fix device-list-properties not to crash for abstract device
Markus Armbruster [Thu, 1 Oct 2015 08:59:57 +0000 (10:59 +0200)]
qmp: Fix device-list-properties not to crash for abstract device

Broken in commit f4eb32b "qmp: show QOM properties in
device-list-properties", v2.1.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-Id: <1443689999-12182-9-git-send-email-armbru@redhat.com>
(cherry picked from commit edb1523d90415cb79f60f83b4028ef3820d15612)

Conflicts:
tests/device-introspect-test.c

* removed hunk specific to QAPI introspection (not in 2.4)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovmxnet3: Drop net_vmxnet3_info.can_receive
Fam Zheng [Wed, 1 Jul 2015 02:26:27 +0000 (10:26 +0800)]
vmxnet3: Drop net_vmxnet3_info.can_receive

Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the
semantics around .can_receive for sockets to now require the device to
flush queued pkts when transitioning to a .can_receive=true state. But
it's OK to drop incoming packets when the link is not active.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 2734a20b8161831ba68c9166014e00522599d1e2)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovirtio-net: unbreak self announcement and guest offloads after migration
Jason Wang [Fri, 11 Sep 2015 08:01:56 +0000 (16:01 +0800)]
virtio-net: unbreak self announcement and guest offloads after migration

After commit 019a3edbb25f1571e876f8af1ce4c55412939e5d ("virtio: make
features 64bit wide"). Device's guest_features was actually set after
vdc->load(). This breaks the assumption that device specific load()
function can check guest_features. For virtio-net, self announcement
and guest offloads won't work after migration.

Fixing this by defer them to virtio_net_load() where guest_features
were guaranteed to be set. Other virtio devices looks fine.

Fixes: 019a3edbb25f1571e876f8af1ce4c55412939e5d
       ("virtio: make features 64bit wide")
Cc: qemu-stable@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit 1f8828ef573c83365b4a87a776daf8bcef1caa21)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9 years agovirtio: avoid leading underscores for helpers
Cornelia Huck [Mon, 17 Aug 2015 09:48:29 +0000 (11:48 +0200)]
virtio: avoid leading underscores for helpers

Commit ef546f1275f6563e8934dd5e338d29d9f9909ca6 ("virtio: add
feature checking helpers") introduced a helper __virtio_has_feature.
We don't want to use reserved identifiers, though, so let's
rename __virtio_has_feature to virtio_has_feature and virtio_has_feature
to virtio_vdev_has_feature.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 95129d6fc9ead97155627a4ca0cfd37282883658)
* prereq for 1f8828e
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>