Igor Mammedov [Tue, 23 Apr 2013 08:29:37 +0000 (10:29 +0200)]
cpu: Introduce cpu_resume(), for single CPU
Also add a stub for it, to make possible to use it in qom/cpu.c,
which is shared with user emulators.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Igor Mammedov [Tue, 23 Apr 2013 08:29:36 +0000 (10:29 +0200)]
cpu: Call cpu_synchronize_post_init() from DeviceClass::realize()
If hotplugged, synchronize CPU state to KVM.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Igor Mammedov [Tue, 23 Apr 2013 08:29:35 +0000 (10:29 +0200)]
cpu: Make kvm-stub.o available outside softmmu
It will provide stubs for *-user targets once softmmu-specific calls
are attempted from common CPU code.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Jason Wang [Thu, 25 Apr 2013 07:26:54 +0000 (15:26 +0800)]
virtio-net: count VIRTIO_NET_F_MAC when calculating config_len
Commit
14f9b664 (hw/virtio-net.c: set config size using host features) tries to
calculate config size based on the host features. But it forgets the
VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config
len for virtio-net device when both VIRTIO_NET_F_STATUS and VIRTIO_NET_F_MQ were
disabled form command line. Then qemu will crash when user tries to read the
config of virtio-net.
Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least contains
the mac address.
Cc: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-id:
1366874814-2658-1-git-send-email-jasowang@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael S. Tsirkin [Tue, 30 Apr 2013 09:41:50 +0000 (12:41 +0300)]
sysemu: drop register_devices from header
No user in sight.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-id:
20130430094149.GA29094@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jesse Larrew [Mon, 29 Apr 2013 15:52:52 +0000 (10:52 -0500)]
libqtest: only call fclose() on open files
libqtest.c can segfault when calling fclose() if the pidfile wasn't
opened successfully. This patch fixes the issue.
Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1367250772-17928-1-git-send-email-jlarrew@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Christian Borntraeger [Fri, 26 Apr 2013 03:24:47 +0000 (11:24 +0800)]
Wire up disabled wait a panicked event on s390
On s390 the disabled wait state indicates a state of attention.
For example Linux uses that state after a panic. Lets
put the system into panicked state.
An alternative implementation would be to state
disabled-wait <address> instead of pause in the action field.
(e.g. z/OS, z/VM and other classic OSes use the address of the
disabled wait to indicate an error code).
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-id:
6cf41156322e27e81a727b69f03728dbc225d5bb.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:46 +0000 (11:24 +0800)]
pvpanic: create pvpanic by default for machine 1.5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
f840042f0e1205041f8feaf0d39ca639884f3a00.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:45 +0000 (11:24 +0800)]
pvpanic: add document of pvpanic
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
a5db4ce406647e8f4663b639eae62d880531df8b.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:44 +0000 (11:24 +0800)]
pvpanic: pass configurable ioport to seabios
This lets seabios patch the corresponding SSDT entry.
Also add fw_cfg object to /machine/fw_cfg so we can reference
it elsewhere.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
60c65d95fe2b23b12bea67099126566010a11a1a.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:43 +0000 (11:24 +0800)]
fw_cfg: add required header files
If fw_cfg.h is included alone, gcc gives error messages like these:
error: unknown type name ‘uint32_t’
error: unknown type name ‘size_t’
error: unknown type name ‘hwaddr’
...
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
d63f8bcdbfbec8135b1b57f9247c513a3e25762c.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:42 +0000 (11:24 +0800)]
introduce a new qom device to deal with panicked event
pvpanic device is used to send guest panic event from guest to qemu.
When guest panic happens, pvpanic device driver will write a event
number to IO port 0x505(which is the IO port occupied by pvpanic device,
by default). On receiving the event, pvpanic device will pause guest
cpu(s), and send a qmp event QEVENT_GUEST_PANICKED.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
b66077a40235b3531632a05a6ff373850afc7d2e.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:41 +0000 (11:24 +0800)]
add a new qevent: QEVENT_GUEST_PANICKED
This event will be emited when qemu detects guest panic.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
cf0bc45ecf9ecd3699bc72dc39f8cbab8ed79d8c.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Hu Tao [Fri, 26 Apr 2013 03:24:40 +0000 (11:24 +0800)]
add a new runstate: RUN_STATE_GUEST_PANICKED
The guest will be in this state when it is panicked.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
0255f263ffdc2a3716f73e89098b96fd79a235b3.
1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Mon, 29 Apr 2013 12:35:08 +0000 (14:35 +0200)]
qdev: Report errors collected during device realization
Better than just releasing the error object silently.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-id:
517E68FC.
6030400@siemens.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Dunrong Huang [Mon, 29 Apr 2013 14:52:12 +0000 (22:52 +0800)]
rules.mk: Fix build breakage
The following error occurs when building dtc module:
CHK version_gen.h
CC libfdt/fdt.o
cc1: error: dtc: No such file or directory [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [libfdt/fdt.o] Error 1
make: *** [subdir-dtc] Error 2
In rules.mak, "-I$(<D) -I$(@D)" was expanded to "-Idtc -I." when
building submodule dct. Due to the using of "-Wmissing-include-dirs,
a warning would be rarsed. To avoid it, add "-I$(<D) -I$(@D)" to
QEMU_INCLUDES instead of QEMU_CFLAGS so that QEMU_CFLAGS does not
contain the "-Idtc".
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1367247132-19622-1-git-send-email-riegamaths@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alexander Graf [Tue, 30 Apr 2013 13:02:16 +0000 (15:02 +0200)]
QOM: Fail casts for unknown types
When we try to cast an object to an unknown type, fail the cast. Today
we would simply run into an assert().
This fixes a bug on qemu-system-s390x for me that gets triggered by the
audio code looking for PCI and ISA buses.
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1367326936-28539-1-git-send-email-agraf@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Tue, 30 Apr 2013 14:00:32 +0000 (16:00 +0200)]
pc_piix: remove undesired change in pc_init1
Introduced when applying commit
f81222b (audio: look for the ISA and
PCI buses, 2013-04-18).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1367330432-14417-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:44:04 +0000 (18:44 +0200)]
audio: enable PCI audio cards for all PCI-enabled targets
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-9-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:44:03 +0000 (18:44 +0200)]
audio: look for the ISA and PCI buses
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-8-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:44:02 +0000 (18:44 +0200)]
qom: do not return root for empty path
An empty path will return the sole object of that type in the
QOM tree. This is different from "/", which returns the root.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-7-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:44:01 +0000 (18:44 +0200)]
audio: replace audio card configuration with default-configs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-6-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:44:00 +0000 (18:44 +0200)]
audio: remove CONFIG_* symbols
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:43:59 +0000 (18:43 +0200)]
audio: remove HAS_AUDIO
Several targets can have wavcapture/-soundhw support via PCI cards.
HAS_AUDIO is a useless limitation, remove it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-4-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:43:58 +0000 (18:43 +0200)]
audio: remove the need for audio card CONFIG_* symbols
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Thu, 18 Apr 2013 16:43:57 +0000 (18:43 +0200)]
adlib: qdev-ify
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366303444-24620-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Lei Li [Thu, 25 Apr 2013 05:29:12 +0000 (13:29 +0800)]
doc: document the Pseudo-encoding of LED state
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366867752-11578-5-git-send-email-lilei@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Lei Li [Thu, 25 Apr 2013 05:29:11 +0000 (13:29 +0800)]
vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATE
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366867752-11578-4-git-send-email-lilei@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Lei Li [Thu, 25 Apr 2013 05:29:10 +0000 (13:29 +0800)]
vnc: Support for LED state extension
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366867752-11578-3-git-send-email-lilei@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Lei Li [Thu, 25 Apr 2013 05:29:09 +0000 (13:29 +0800)]
vnc: Add SCROLL lock key to kbd_leds
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366867752-11578-2-git-send-email-lilei@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sun, 28 Apr 2013 16:45:47 +0000 (18:45 +0200)]
libqos: Convert fw_cfg values to host endianness
The fw_cfg ABI is Little Endian, so byte-swap the generically read
byte array to host endianness.
This unbreaks the fw_cfg tests on ppc.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367167547-19931-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:55 +0000 (22:18 +0200)]
wdt_ib700: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-21-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:54 +0000 (22:18 +0200)]
vmport: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Drop reserved underscore from struct name while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-20-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:53 +0000 (22:18 +0200)]
vmmouse: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST() and
container_of(). Prepares for ISA realizefn.
Remove reserved underscore from struct name while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-19-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:52 +0000 (22:18 +0200)]
vga-isa: QOM'ify ISA VGA
Introduce type constant and cast macro to obsolete DO_UPCAST() and
container_of(). Prepares for ISA realizefn.
Unify function naming scheme while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-18-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:51 +0000 (22:18 +0200)]
sga: QOM'ify
Introduce type constant and cast macro.
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-17-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:50 +0000 (22:18 +0200)]
serial: QOM'ify ISA serial
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-16-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:49 +0000 (22:18 +0200)]
sb16: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-15-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:48 +0000 (22:18 +0200)]
pcspk: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-14-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:47 +0000 (22:18 +0200)]
pckbd: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-13-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:46 +0000 (22:18 +0200)]
pc: QOM'ify port 92
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-12-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:45 +0000 (22:18 +0200)]
parallel: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-11-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:44 +0000 (22:18 +0200)]
ne2000-isa: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-10-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:43 +0000 (22:18 +0200)]
mc146818rtc: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-9-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:42 +0000 (22:18 +0200)]
m48t59: QOM'ify ISA M48T59 NVRAM
Introduce type constant and cast macro to obsolete DO_UPCAST() and
container_of().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-8-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:41 +0000 (22:18 +0200)]
ide: QOM'ify ISA IDE
Introduce type constant and cast macro to obsolete DO_UPCAST().
Add missing braces.
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-7-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:40 +0000 (22:18 +0200)]
i8259: QOM cleanups
Eliminate DO_UPCAST() for PICCommonState. Prepares for ISA realizefn.
Also give the i8259_common type registration functions unique names
while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-6-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:39 +0000 (22:18 +0200)]
i82374: QOM'ify
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-5-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:38 +0000 (22:18 +0200)]
fdc: QOM'ify ISA floppy controller
Introduce type constant and cast macro to obsolete DO_UPCAST().
Reuse type constant for PC machine compatibility settings.
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-4-git-send-email-afaerber@suse.de
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:37 +0000 (22:18 +0200)]
cirrus_vga: QOM'ify ISA Cirrus VGA
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-3-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Sat, 27 Apr 2013 20:18:36 +0000 (22:18 +0200)]
applesmc: QOM'ify
Add a typedef for the state struct and rename from Status to State.
Add type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1367093935-29091-2-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jason Wang [Thu, 25 Apr 2013 07:24:23 +0000 (15:24 +0800)]
virtio-net: unbreak the minix guest
Multiqueue patchset conditionally add control vq only when guest negotiate the
feature. Though the spec is not clear on this but it breaks the minix guest
since it will identify the ctrl vq even if it does not support it. Though this
behavior seems a violation on the spec "If the VIRTIO_NET_F_CTRL_VQ feature bit
is negotiated, identify the control virtqueue.", to keep the backward
compatibility, always add the ctrl vq at end of the queues.
Reported-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-id:
1366874663-2566-1-git-send-email-jasowang@redhat.com
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 29 Apr 2013 13:26:47 +0000 (08:26 -0500)]
Merge remote-tracking branch 'bonzini/migration-writev' into staging
# By Paolo Bonzini
# Via Paolo Bonzini
* bonzini/migration-writev:
win32: add readv/writev emulation
win32: generate console executable again
win32: move Makefile dependencies on version-obj-y to rules.mak
win32: add generic RC rules to rules.mak
Message-id:
1367230284-24612-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 29 Apr 2013 13:26:39 +0000 (08:26 -0500)]
Merge remote-tracking branch 'alon/libcacard_ccid.2' into staging
# By Cole Robinson
# Via Alon Levy
* alon/libcacard_ccid.2:
ccid: Fix crash when backend isn't specified
Message-id:
20130426234357.GA12457@garlic.tami
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Sun, 21 Apr 2013 10:01:06 +0000 (12:01 +0200)]
win32: add readv/writev emulation
Commit
e9d8fbf (qemu-file: do not use stdio for qemu_fdopen, 2013-03-27)
introduced a usage of writev, which mingw32 does not have. Even though
qemu_fdopen itself is not used on mingw32, the future-proof solution is
to add an implementation of it. This is simple and similar to how we
emulate sendmsg/recvmsg in util/iov.c.
Some files include osdep.h without qemu-common.h, so move the definition
of iovec to osdep.h too, and include osdep.h from qemu-common.h
unconditionally (protection against including files when NEED_CPU_H is
defined is not needed since the removal of AREG0).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Artyom Tarasenko [Sat, 27 Apr 2013 05:55:13 +0000 (07:55 +0200)]
sparc64: use direct interrupt mapping for PCI devices
Every PCI Slot in PBM has 4 directly mapped IRQ lines.
Use the IRQ routing schema 0bssnn (Bus, Slot, interrupt Number)
described in Section 19.3.3 of UltraSPARC™-IIi User's Manual.
Please note that this patch requires the OpenBIOS counterpart patch.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Artyom Tarasenko [Sat, 27 Apr 2013 05:55:12 +0000 (07:55 +0200)]
sparc64: fix loosing interrupts
- clear interrupts only on writing to the interrupt clear registers
- don't overwrite a currently active interrupt request
- use the correct addresses for the interrupt clear registers
(section 19.3.3.3 of the UltraSPARC™-IIi User’s Manual)
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Artyom Tarasenko [Sat, 27 Apr 2013 05:55:11 +0000 (07:55 +0200)]
sparc64: allow 64 IRQ lines
According to UltraSPARC™-IIi User’s Manual, PBM has 64 IRQ lines.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Richard Henderson [Tue, 23 Apr 2013 20:07:40 +0000 (13:07 -0700)]
tcg-arm: Remove long jump from tcg_out_goto_label
Branches within a TB will always be within 16MB.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 13 Mar 2013 22:24:33 +0000 (15:24 -0700)]
tcg-arm: Convert to CONFIG_QEMU_LDST_OPTIMIZATION
Move the slow path out of line, as the TODO's mention.
This allows the fast path to be unconditional, which can
speed up the fast path as well, depending on the core.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 13 Mar 2013 20:40:43 +0000 (13:40 -0700)]
tcg-arm: Use movi32 + blx for calls on v7
Work better with branch predition when we have movw+movt,
as the size of the code is the same. Perhaps re-evaluate
when we have a proper constant pool.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 23 Apr 2013 15:38:50 +0000 (08:38 -0700)]
tcg-arm: Delete the 'S' constraint
After the previous patch, 's' and 'S' are the same.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 13 Mar 2013 06:18:30 +0000 (23:18 -0700)]
tcg-arm: Improve scheduling of tcg_out_tlb_read
The schedule was fully serial, with no possibility for dual issue.
The old schedule had a minimal issue of 7 cycles; the new schedule
has a minimal issue of 5 cycles.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 13 Mar 2013 01:18:07 +0000 (18:18 -0700)]
tcg-arm: Split out tcg_out_tlb_read
Share code between qemu_ld and qemu_st to process the tlb.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 22:06:53 +0000 (15:06 -0700)]
tcg-arm: Cleanup most primitive load store subroutines
Use even more primitive helper functions to avoid lots of duplicated code.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 17:34:18 +0000 (10:34 -0700)]
tcg-arm: Cleanup multiply subroutines
Make the code more readable by only having one copy of the magic
numbers, swapping registers as needed prior to that. Speed the
compiler by not applying the rd == rn avoidance for v6 or later.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 16:50:25 +0000 (09:50 -0700)]
tcg-arm: Use R12 for the tcg temporary
R12 is call clobbered, while R8 is call saved. This change
gives tcg one more call saved register for real data.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 16:49:04 +0000 (09:49 -0700)]
tcg-arm: Use TCG_REG_TMP name for the tcg temporary
Don't hard-code R8.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 05:11:30 +0000 (22:11 -0700)]
tcg-arm: Implement division instructions
An armv7 extension implements division, present on Cortex A15.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 5 Mar 2013 05:12:30 +0000 (21:12 -0800)]
tcg-arm: Implement deposit for armv7
We have BFI and BFC available for implementing it.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 5 Mar 2013 07:16:24 +0000 (23:16 -0800)]
tcg-arm: Improve constant generation
Try fully rotated arguments to mov and mvn before trying movt
or full decomposition. Begin decomposition with mvn when it
looks like it'll help. Examples include
-: mov r9, #0x00000fa0
-: orr r9, r9, #0x000ee000
-: orr r9, r9, #0x0ff00000
-: orr r9, r9, #0xf0000000
+: mvn r9, #0x0000005f
+: eor r9, r9, #0x00011000
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 02:51:56 +0000 (19:51 -0700)]
tcg-arm: Handle constant arguments to add2/sub2
We get to re-use the _rIN and _rIK subroutines to handle the various
combinations of add vs sub. Fold the << 21 into the opcode enum values
so that we can explicitly add TO_CPSR as desired.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 01:21:59 +0000 (18:21 -0700)]
tcg-arm: Use tcg_out_dat_rIN for compares
This allows us to emit CMN instructions.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 12 Mar 2013 01:04:14 +0000 (18:04 -0700)]
tcg-arm: Allow constant first argument to sub
This allows the generation of RSB instructions.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 5 Mar 2013 06:06:21 +0000 (22:06 -0800)]
tcg-arm: Handle negated constant arguments to and/sub
This greatly improves code generation for addition of small
negative constants.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 5 Mar 2013 05:36:45 +0000 (21:36 -0800)]
tcg-arm: Use bic to implement and with constant
This greatly improves the code we can produce for deposit
without armv7 support.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sun, 31 Mar 2013 20:15:19 +0000 (13:15 -0700)]
tcg: Log the contents of the prologue with -d out_asm
This makes it easier to verify changes to the code
generating the prologue.
[Aurelien: change the format from %i to %zu]
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Cole Robinson [Sun, 14 Apr 2013 20:06:59 +0000 (16:06 -0400)]
ccid: Fix crash when backend isn't specified
Reproducer:
./x86_64-softmmu/qemu-system-x86_64 -device usb-ccid,id=ccid0 -usb -device ccid-card-emulated -monitor stdio
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Richard Henderson [Wed, 13 Mar 2013 00:11:40 +0000 (17:11 -0700)]
tcg-arm: Fix local stack frame
We were not allocating TCG_STATIC_CALL_ARGS_SIZE, so this meant that
any helper with more than 4 arguments would clobber the saved regs.
Realizing that we're supposed to have this memory pre-allocated means
we can clean up the tcg_out_arg functions, which were trying to do
more stack allocation.
Allocate stack memory for the TCG temporaries while we're at it.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Aurelien Jarno [Sat, 20 Apr 2013 22:42:56 +0000 (00:42 +0200)]
tcg: fix deposit_i64 op on 32-bit targets
On 32-bit TCG targets, when emulating deposit_i64 with a mov_i32 +
deposit_i32, care should be taken to not overwrite the low part of
the second argument before the deposit when it is the same the
destination.
This fixes the shld instruction in qemu-system-x86_64, which in turns
fixes booting "system rescue CD version 2.8.0" on this target.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Fri, 26 Apr 2013 22:37:46 +0000 (00:37 +0200)]
target-ppc: slightly optimize lfiwax
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Fri, 26 Apr 2013 22:33:23 +0000 (00:33 +0200)]
Merge branch 'ppc-for-upstream' of git://github.com/agraf/qemu
* 'ppc-for-upstream' of git://github.com/agraf/qemu: (30 commits)
target-ppc: add support for extended mtfsf/mtfsfi forms
target-ppc: emulate store doubleword pair instructions
target-ppc: emulate load doubleword pair instructions
target-ppc: emulate lfiwax instruction
target-ppc: emulate fcpsgn instruction
target-ppc: emulate prtyw and prtyd instructions
target-ppc: emulate cmpb instruction
target-ppc: add instruction flags for Book I 2.05
disas: Disassemble all ppc insns for the guest
target-ppc: optimize fabs, fnabs, fneg
PPC: Fix dcbz for linux-user on 970
powerpc: correctly handle fpu exceptions.
pseries: Generate device paths for VIO devices
pseries: Convert VIO code to QOM style type safe(ish) casts
target-ppc: Synchronize VPA state with KVM
pseries: Fix some small errors in XICS logic
target-ppc: Add more stubs for POWER7 PMU registers
pseries: Fixes and enhancements to L1 cache properties
pseries: Fix incorrect calculation of RMA size in certain configurations
PPC: Fix compile with profiling enabled
...
Paolo Bonzini [Wed, 24 Apr 2013 20:57:59 +0000 (22:57 +0200)]
win32: generate console executable again
The -mwindows option is not anymore in LIBS at this point of the Makefile,
it is only in libs_softmmu. Check the right variable.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Fri, 26 Apr 2013 22:27:48 +0000 (00:27 +0200)]
win32: move Makefile dependencies on version-obj-y to rules.mak
This makes the test on $(LIBTOOL) work. Otherwise, LIBTOOL
is /bin/false by the time the test is done.
Fixes Win32 compilation without a working cross-libtool.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Fri, 26 Apr 2013 22:25:31 +0000 (00:25 +0200)]
win32: add generic RC rules to rules.mak
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:22 +0000 (08:56 +0000)]
target-ppc: add support for extended mtfsf/mtfsfi forms
Power ISA 2.05 adds support for extended mtfsf/mtfsfi form, with a new
W field to select the upper part of the FPCSR register.
For that the helper is changed to handle 64-bit input values and mask with
up to 16 bits. The mtfsf/mtfsfi instructions do not have the W bit
marked as invalid anymore. Instead this is checked in the helper, which
therefore needs to access to the insns/insns_flags2. They are added in
the DisasContext struct. Finally change all accesses to the opcode fields
through extract helpers, prefixed with FP for consistency.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:21 +0000 (08:56 +0000)]
target-ppc: emulate store doubleword pair instructions
Needed for Power ISA version 2.05 compliance. The check for odd register
pairs is done using the invalid bits.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:20 +0000 (08:56 +0000)]
target-ppc: emulate load doubleword pair instructions
Needed for Power ISA version 2.05 compliance. The check for odd register
pairs is done using the invalid bits.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:19 +0000 (08:56 +0000)]
target-ppc: emulate lfiwax instruction
Needed for Power ISA version 2.05 compliance.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
[agraf: fix tcg debug error]
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:18 +0000 (08:56 +0000)]
target-ppc: emulate fcpsgn instruction
Needed for Power ISA version 2.05 compliance.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:17 +0000 (08:56 +0000)]
target-ppc: emulate prtyw and prtyd instructions
Needed for Power ISA version 2.05 compliance.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
[agraf: fix 32-bit host compile, simplify code]
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:16 +0000 (08:56 +0000)]
target-ppc: emulate cmpb instruction
Needed for Power ISA version 2.05 compliance.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:15 +0000 (08:56 +0000)]
target-ppc: add instruction flags for Book I 2.05
.. and enable it on POWER7 CPU.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:14 +0000 (08:56 +0000)]
disas: Disassemble all ppc insns for the guest
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno [Sat, 20 Apr 2013 08:56:13 +0000 (08:56 +0000)]
target-ppc: optimize fabs, fnabs, fneg
fabs, fnabs and fneg are just flipping the bit sign of an FP register,
this can be implemented in TCG instead of using softfloat.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Fri, 26 Apr 2013 07:18:58 +0000 (09:18 +0200)]
PPC: Fix dcbz for linux-user on 970
The default with linux-user for dcbz on 970 is to emulate 32 byte clears.
However, redoing the dcbzl support we added a check to not honor the bit
in HID5 that sets this.
Remove the #ifdef check on linux user, so that we get 32 byte clears again.
Reported-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Alexander Graf <agraf@suse.de>
Tristan Gingold [Tue, 9 Apr 2013 05:00:55 +0000 (05:00 +0000)]
powerpc: correctly handle fpu exceptions.
Raise the exception on the first occurence, do not wait for the next
floating point operation.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
David Gibson [Sun, 7 Apr 2013 19:08:17 +0000 (19:08 +0000)]
pseries: Generate device paths for VIO devices
This patch implements a get_dev_path qdev hook for the pseries paravirtual
VIO bus. With upcoming savevm support, this will become very important for
scsi disks hanging of VIO virtual SCSI adapters. scsibus_get_dev_path
uses the get_dev_path of the parent adapter if available, but otherwise
just uses a local channel/target/lun number to identify the device. So if
two disks are present in the system having the same target and lun on
seperate VIO scsi adapters, savevm cannot distinguish them. Since the
conventional way of using VSCSI adapters is to have just one disk per
adapter, such a conflict is very likely.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
David Gibson [Sun, 7 Apr 2013 19:08:16 +0000 (19:08 +0000)]
pseries: Convert VIO code to QOM style type safe(ish) casts
Curerntly the pseries VIO device code contains quite a few explicit
uses of DO_UPCAST and plain C casts. This is (obviously) type unsafe,
and not the conventional way of doing things in the QOM model. This
patch converts the code to use the QOM convention of per-type macros
to do verified casts with OBJECT_CHECK().
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
David Gibson [Sun, 7 Apr 2013 19:08:22 +0000 (19:08 +0000)]
target-ppc: Synchronize VPA state with KVM
For PAPR guests, KVM tracks the various areas registered with the
H_REGISTER_VPA hypercall. For full emulation, of course, these are tracked
within qemu. At present these values are not synchronized. This is a
problem for reset (qemu's reset of the VPA address is not pushed to KVM)
and will also be a problem for savevm / migration.
The kernel now supports accessing the VPA state via the ONE_REG interface,
this patch adds code to qemu to use that interface to keep the qemu and
KVM ideas of the VPA state synchronized.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>