Christoph Hellwig [Tue, 4 May 2010 10:44:52 +0000 (12:44 +0200)]
cloop: use qemu block API
Use bdrv_pwrite to access the backing device instead of pread, and
convert the driver to implementing the bdrv_open method which gives
it an already opened BlockDriverState for the underlying device.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Christoph Hellwig [Tue, 4 May 2010 10:44:38 +0000 (12:44 +0200)]
cloop: use pread
Use pread instead of lseek + read in preparation of using the qemu
block API.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Ryota Ozaki [Sun, 2 May 2010 21:50:25 +0000 (06:50 +0900)]
qemu-nbd: Improve error reporting
- use err(3) instead of errx(3) if errno is available
to report why failed
- let fail prior to daemon(3) if opening a nbd file
is likely to fail after daemonizing to avoid silent
failure exit
- add missing 'ret = 1' when unix_socket_outgoing failed
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Stefan Hajnoczi [Sat, 1 May 2010 06:23:32 +0000 (07:23 +0100)]
block: Remove semicolon in BDRV_SECTOR_MASK macro
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Blue Swirl [Sun, 16 May 2010 08:33:02 +0000 (08:33 +0000)]
sparc: move DT and QT defines to op_helper.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Sun, 16 May 2010 00:11:29 +0000 (04:11 +0400)]
sparc64: fix TT_WOTHER value
- fix off by one error in spill trap number bit for other window (must be bit 5)
- fixes invalid instruction issue with HelenOS
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Sun, 16 May 2010 00:11:24 +0000 (04:11 +0400)]
sparc64: fix mmu demap operand typo
- must use store address operand to demap, not store value
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sat, 15 May 2010 17:52:49 +0000 (17:52 +0000)]
Blue Swirl [Sat, 15 May 2010 17:36:13 +0000 (17:36 +0000)]
Trim unnecessary includes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:24 +0000 (16:29 +0900)]
mc146818rtc: remove #ifdef DEBUG_CMOS.
remove #ifdef DEBUG_CMOS by using macro.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:23 +0000 (16:29 +0900)]
apm: remove #ifdef DEBUG.
remove #ifdef DEBUG by using macro.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:22 +0000 (16:29 +0900)]
acpi_piix4: remove #ifdef DEBUG.
removed #ifdef DEBUG by using macro.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:21 +0000 (16:29 +0900)]
pm_smbus: remove #ifdef DEBUG.
remove #ifdef DEBUG by using macro.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:20 +0000 (16:29 +0900)]
pci hotadd, acpi_piix4: remove global variables
remove global variables, gpe and pci0_status by moving them
into PIIX4PMState.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:19 +0000 (16:29 +0900)]
pci hotplug: add argument to pci hot plug callback.
Add argument, DeviceState*, to pci hot plug callback.
The argument will be used later to remove global variable.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:18 +0000 (16:29 +0900)]
acpi_piix4: qdevfy.
qdevfy acpi_piix4.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:17 +0000 (16:29 +0900)]
rtc: make rtc_xxx accept/return ISADevice instead of RTCState.
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice
instead of RTCState.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:16 +0000 (16:29 +0900)]
pc: move rtc declarations from pc.h into a dedicated header file.
Move rtc_xxx declarations from pc.h into mc146818rtc.h.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:15 +0000 (16:29 +0900)]
pc: split out piix specific part from pc.c into pc_piix.c
Finally, we can safely split out the piix specific part from pc.c
into pc_piix.c.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:14 +0000 (16:29 +0900)]
pc: split out pci device init from pc_init1() into pc_pci_device_init()
Split out pci device initialization from pc_init1() into pc_pci_device_init().
and removed unnecessary braces.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:13 +0000 (16:29 +0900)]
pc: split out basic device init from pc_init1() into pc_basic_device_init()
Split out basic device, i.e. legacy devices like floppy, initialization
from pc_init1() into pc_basic_device_init().
Later it will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:12 +0000 (16:29 +0900)]
pc: split out vga initialization from pc_init1() into pc_vga_init().
Split out vga initialization which is independent of piix
from pc_init1() as pc_vga_init().
Later it will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:11 +0000 (16:29 +0900)]
pc: split out memory allocation from pc_init1() into pc_memory_init()
Split out memory allocation and rom/bios loading which doesn't depend
on piix from pc_init1() into pc_memory_init().
Later it will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:10 +0000 (16:29 +0900)]
pc: split out cpu initialization from pc_init1() into pc_cpus_init().
split out cpu initialization which is piix independent from pc_init1()
into pc_cpus_init(). Later it will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:09 +0000 (16:29 +0900)]
pc: make pc_init1() not refer ferr_irq directly.
By introducing a registering function, make pc_init1() not refer to
ferr_irq directly in order to make ferr_irq piix independent.
Later pc_init1() will be split out into another file keeping ferr_irq
static.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:08 +0000 (16:29 +0900)]
pc: introduce a function to allocate cpu irq.
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq
in order to make pic_irq_request() piix independent.
Later piix code will be split out to another file keeping pic_irq_request()
static.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:07 +0000 (16:29 +0900)]
pc: remove global variable rtc_state by using qemu_irq.
Remove the reference to the global variable, rtc_state, by passing
function argument to cmos_init_hd(), cmos_init().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Paolo Bonzini <bonzini@gnu.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:06 +0000 (16:29 +0900)]
pc: remove a global variable, floppy_controller.
Remove a global variable, floppy_controller.
Since it is unnecessarily global, make it local and pass it as
a function argument.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:05 +0000 (16:29 +0900)]
pc: make an unnecessary global variable, pit, local.
remove unnecessary global static variables, pit.
Make it local.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:04 +0000 (16:29 +0900)]
pc, i440fx: Make smm enable/disable function i440fx independent.
make cpu_smm_update() generic to be independent on i440fx by
registering a callback.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:03 +0000 (16:29 +0900)]
pc: initialize ioapic before use.
The changeset of
2c8d9340203c7f19265fd4cb2341f568217a3af6
prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic.
However it would be better to initialize the member before reference.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:02 +0000 (16:29 +0900)]
acpi: split acpi.c into the common part and the piix4 part.
Split acpi.c into the common part and the piix4 specific part.
The common part will be used later.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:01 +0000 (16:29 +0900)]
acpi: add acpi constants from linux header files and use them.
add acpi constants from linux header files and
replace the old constants with them.
The acpi constants will be used by other file.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:29:00 +0000 (16:29 +0900)]
acpi: split out apm register emulation from acpi.c
Split out apm register emulation for acpi.c into apm.c.
The apm emulation will be used later.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Isaku Yamahata [Fri, 14 May 2010 07:28:59 +0000 (16:28 +0900)]
acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c
Split out piix4 smbus routines from acpi.c into pm_smbus.c and
use it.
The split out smbus emulation will be used later.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Jan Kiszka [Sat, 15 May 2010 11:32:43 +0000 (13:32 +0200)]
mc146818rtc: Register vmstate via qdev
After defining the required alias ID, we can push vmstate registration
of mc146818rtc to qdev.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Jan Kiszka [Sat, 15 May 2010 11:32:42 +0000 (13:32 +0200)]
fdc: Register vmstate via qdev
Establish vmstate containers for ISA and sysbus variant, define the
iobase as instance ID alias, and let qdev do the vmstate registration
work.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Jan Kiszka [Sat, 15 May 2010 11:32:41 +0000 (13:32 +0200)]
serial: Register vmstate via qdev
At least for isa-serial, we can already let qdev do the vmstate
registration for us. It just takes wrapping vmstate for the
encapsulating ISASerialState and defining the proper instance ID
aliases.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Jan Kiszka [Sat, 15 May 2010 11:32:40 +0000 (13:32 +0200)]
vmstate: Add support for alias ID
Some legacy users (mostly PC devices) of vmstate_register manage
instance IDs on their own, and that unfortunately in a way that is
incompatible with automatically generated ones. This so far prevents
switching those users to vmstates that are registered by qdev.
To establish a migration path, this patch introduces the concept of
alias IDs. They can be passed to an extended vmstate registration
service, and qdev provides a set service to be used during device init.
find_se will consider the alias in addition to the default ID. We can
then start generating the default ID automatically and writing it on
vmsave, thus converting that format without breaking support for upward
migration.
The user is required specify the highest vmstate version for which the
alias is required. Once this version falls behind the minimum required
for a specific vmstate, an assertion triggers to motivate cleaning up
the obsolete alias.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Jan Kiszka [Sat, 15 May 2010 11:32:39 +0000 (13:32 +0200)]
vmstate: Drop unused post_save handler
No device makes use of it anymore.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Shin-ichiro KAWASAKI [Sat, 15 May 2010 12:25:39 +0000 (21:25 +0900)]
sh: sm501: add 2D engine support
In linux kernel v2.6.33, sm501 frame buffer driver modified to support
2D graphics engine on sm501 chip. One example is "fill rectangle" operation.
But current qemu's sm501 emulation doesn't support it. This results in
graphics console disturbance.
This patch introduces sm501 2D graphics engine emulation and solve this problem.
Add SM501 2D hardware engine support.
- Add 2D engine register set read/write handlers.
- Support 'fill rectangle'. Other operations are left for future work.
- Update SM501 support status comment.
Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Andrzej Zaborowski [Sat, 15 May 2010 12:31:27 +0000 (14:31 +0200)]
tmp105: update the register in post_load where it needs updating.
This was the only user of .post_save as noticed by Jan Kiszka and
seems to have been added there wrongly during conversion to
VMStateDescription.
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
Blue Swirl [Fri, 14 May 2010 19:32:21 +0000 (19:32 +0000)]
cpus: add one 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 14 May 2010 19:32:18 +0000 (19:32 +0000)]
e1000: make some tables 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 14 May 2010 19:32:14 +0000 (19:32 +0000)]
ide: make a table 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 14 May 2010 19:32:11 +0000 (19:32 +0000)]
vga: make some tables 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 14 May 2010 19:31:53 +0000 (19:31 +0000)]
Compile virtio-9p-debug and virtio-9p-local once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Anthony Liguori [Fri, 14 May 2010 15:56:56 +0000 (10:56 -0500)]
Merge remote branch 'qemu-kvm/uq/master' into staging
Anthony Liguori [Tue, 11 May 2010 12:56:30 +0000 (07:56 -0500)]
Update SeaBIOS
- 7d09d0e Fix virtio compile errors on various gcc versions.
- 89acfa3 Support for booting from virtio disks
- 6d66316 smbios: avoid counting io hole as ram
- e5cd945 Fix error causing USB HID "boot" protocol to not be enabled.
- 0e88576 Add support for USB mice.
- dd5a8a6 When USB keyboard active, don't send keyboard commands to ps2 port.
- 5718d56 Document usb-hid.c functions.
- e438b0c Further parallelize init when using CONFIG_THREAD_OPTIONROMS.
- f59b5ac Handle unknown function addresses in tools/checkstack.py.
- 9ba1dea Simplify build by manually resolving external symbols in layoutrom.py.
- 698d3f9 USB EHCI should yield() whil waiting for controller to ack reset.
- f9a774c Add __attribute__((__malloc__)) declaration to internal malloc funcs.
- b7045ce Minor - remove redundant check from ata_try_dma.
- 67f6d37 Fix possible unitialized variable issue in usb msc.
- a7eb8fc Some improvements to optionrom preemption support.
- d28b0fe Refactor USB hub code.
- ba28541 Prep version for next release.
- 12bffd5 Update version to 0.6.0.
- 87ab2fb Improve USB EHCI timing.
- d705e5a Disable inlining on old compilers.
- bca0736 Force use of indirect function calls in inline assembler.
- d7eb27e Don't move EBDA while an optionrom is running (CONFIG_THREAD_OPTIONROMS).
- 7415270 Call to int1552 (from int1346) should set regs->dl.
- 9dc243e Adjust debug levels of device discovery.
- d9c9361 Default CONFIG_COREBOOT_FLASH on; make depend on CONFIG_COREBOOT.
- c35e1e5 Restore segment limits in handle_1589 code.
- 11cc662 Extend time for rtc to be ready.
- 4ed378a Backup and restore registers when calling out to user funcs.
- 68c5139 Enable irqs in kbd/clock calls that caller might "spin" on.
- f628244 Process event on ps2 keyboard irq even if event already read.
- a5d8458 Revert "Unify ps2 port data processing."
- b9ed5e2 Handle variable length return of ps2 port GETID command.
- 67a9eec Prevent ps2 irqs from messing up ps2 init.
- 6704cf9 Revert "Rework disabling of ps2 port irqs."
- 808939c Fix smp cpu detect on gcc 4.5.
- a979c1c Improvements to tools/checkstack.py.
- 190cc62 Add USB EHCI controller support.
- 0770d67 Some USB UHCI and OHCI fixes and cleanups.
- bfe7ca7 Minor - USB OHCI interrupt queue should be one larger.
- 09e2f7c Reduce size of USB 'struct uhci_td'.
- 406fad6 Dynamically allocate USB controller structures.
- 4547eb9 Replace USB encoded 'u32 endp' scheme with explicit struct fields.
- 8ebcac0 Further parallelize USB init by launching a thread per usb port.
- e908665 Introduce simple "mutex" locking code.
- 3b79f8b Only compile usb-hub.c and paravirt.c with 32bit code.
- 357bdfa Prefer passing a USB "pipe" structure over a USB endp encoding.
- 7fb8ba8 Add a generic "internal error" warning function.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Blue Swirl [Wed, 12 May 2010 19:27:23 +0000 (19:27 +0000)]
pckbd: don't use any static state
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Wed, 12 May 2010 19:27:23 +0000 (19:27 +0000)]
apb: don't use any static state
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Wed, 12 May 2010 18:34:39 +0000 (20:34 +0200)]
target-sparc: Fix wrong printf argument
cpu_get_ccr() returns a target_ulong, so a type cast is needed to avoid
wrong output on big endian hosts. We could also use TARGET_FMT_lx,
but that would print 8 instead of 2 digits.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Wed, 12 May 2010 18:57:14 +0000 (18:57 +0000)]
Update OpenBIOS images to r771
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Gleb Natapov [Tue, 11 May 2010 06:41:25 +0000 (09:41 +0300)]
kvm: fix
80000001.EDX supported bit filtering
On AMD some bits from 1.EDX are reported in
80000001.EDX. The mask used
to copy bits from 1.EDX to
80000001.EDX is incorrect resulting in
unsupported features passed into a guest.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Gleb Natapov [Mon, 10 May 2010 08:21:34 +0000 (11:21 +0300)]
Do not stop VM if emulation failed in userspace.
Continue vcpu execution in case emulation failure happened while vcpu
was in userspace. In this case #UD will be injected into the guest
allowing guest OS to kill offending process and continue.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:27 +0000 (09:45 -0300)]
kvm: enable smp > 1
Process INIT/SIPI requests and enable -smp > 1.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Jan Kiszka [Tue, 4 May 2010 12:45:26 +0000 (09:45 -0300)]
kvm: validate context for kvm cpu get/put operations
Validate that KVM vcpu state is only read/written from cpu thread itself
or that cpu is stopped.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:25 +0000 (09:45 -0300)]
move stop/stopped CPU_COMMON fields after area zeroed by reset
cpu_reset zeroes CPUState upto breakpoints member. Contents of
stop/stopped should not be zeroed on cpu_reset.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:24 +0000 (09:45 -0300)]
add cpu_is_stopped helper
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Jan Kiszka [Tue, 4 May 2010 12:45:23 +0000 (09:45 -0300)]
kvm: synchronize state from cpu context
It is not safe to retrieve the KVM internal state of a given cpu
while its potentially modifying it.
Queue the request to run on cpu context, similarly to qemu-kvm.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:22 +0000 (09:45 -0300)]
port qemu-kvm's on_vcpu code
run_on_cpu allows to execute work on a given CPUState context.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:21 +0000 (09:45 -0300)]
standardize on qemu_cpu_kick for signalling cpu thread(s)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:20 +0000 (09:45 -0300)]
make SIG_IPI to tcg vcpu thread reliable
Store tcg loop exit request on a global variable, and transfer it to
per-CPUState exit_request after assignment of cpu_single_env.
This makes exit request signal from robust. Drop the timedlock hack.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Tue, 4 May 2010 12:45:19 +0000 (09:45 -0300)]
kvm: set cpu_single_env around KVM_RUN ioctl
Zero cpu_single_env before leaving global lock protection, and
restore on return.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Marcelo Tosatti [Mon, 3 May 2010 21:12:23 +0000 (18:12 -0300)]
Fix -mem-path with hugetlbfs
Fallback to qemu_vmalloc in case file_ram_alloc fails.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Markus Armbruster [Tue, 4 May 2010 11:20:33 +0000 (13:20 +0200)]
doc: Clean up monitor command function index
Remove bogus entries "count", "format" and "size". Accidentally added
in commit
70fcbbe7.
Add missing entry "qmp_capabilities". Was forgotten in commit
4a7e1190.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Tue, 4 May 2010 11:20:32 +0000 (13:20 +0200)]
doc: Heading for monitor command cpu got lost, restore it
Broken in commit
2313086a.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Tue, 4 May 2010 11:20:31 +0000 (13:20 +0200)]
doc: Fix acl monitor command documentation
Commit
15dfcd45 added acl_add and acl_reset, but fat-fingered their
documentation to read acl_allow and acl_remove.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Tue, 4 May 2010 11:20:30 +0000 (13:20 +0200)]
doc: Fix host forwarding monitor command documentation
Commit
f3546deb replaced host_net_redir by hostfwd_add,
hostfwd_remove, but neglected to update documentation.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Tue, 4 May 2010 12:21:03 +0000 (14:21 +0200)]
lsi: Handle removal of selected devices
We must not store references to selected devices as they may be
hot-removed. Instead, look up the device based on its tag right before
using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Tue, 4 May 2010 12:21:02 +0000 (14:21 +0200)]
lsi: Adjust some register reset values
According to the LSI spec, the reset value of dcmd, dstat, and ctest2
were wrong, and sdid as well as ssid require zero initialization. There
are surely more discrepancies, this is just another increment.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Tue, 4 May 2010 12:21:01 +0000 (14:21 +0200)]
lsi: Purge message queue on reset
Declare the input message queue empty and initialize the related state
machine properly on controller reset. This fixes unrecoverable errors
when the controller was reset during ongoing requests.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Tue, 4 May 2010 12:21:00 +0000 (14:21 +0200)]
scsi-disk: Clear aiocb on read completion
Once the I/O completion callback returned, aiocb will be released by the
controller. So we have to clear the reference not only in
scsi_write_complete, but also in scsi_read_complete. Otherwise we risk
inconsistencies when a reset hits us before the related request is
released.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Tue, 4 May 2010 12:20:59 +0000 (14:20 +0200)]
SCSI: Add disk reset handler
Ensure that pending requests of an SCSI disk are purged on system reset
and also restore max_lba. The latter is no only present in the reset
handler as that one is called after init as well.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Tue, 4 May 2010 11:09:07 +0000 (16:39 +0530)]
iov: Move from hw/ to topdir
The iov functions can be useful to other code as well.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Corentin Chary [Tue, 4 May 2010 12:01:58 +0000 (14:01 +0200)]
vnc: set the right prefered encoding
message is a hint by the client as to its preference (the first
encoding specified being most preferred)"
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Blue Swirl [Sun, 9 May 2010 20:19:04 +0000 (20:19 +0000)]
sparc: Fix lazy flag calculation on interrupts, refactor
Recalculate Sparc64 CPU flags on interrupts, otherwise some earlier
flags could be stored to pstate.
Refactor PSR/CCR/CWP handling: concentrate the actual
functions to op_helper.c.
Thanks to Igor Kovalenko for reporting.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 9 May 2010 15:40:24 +0000 (15:40 +0000)]
sparc: lazy C flag calculation
Calculate only the carry flag for ADDX/SUBX instead of full
set of flags.
Thanks to Igor Kovalenko for spotting a bug with an earlier
version.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Fri, 7 May 2010 21:20:56 +0000 (23:20 +0200)]
mips-dis: Add missing static attributes
mips_abi_choices and mips_arch_choices are only used locally.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Fri, 7 May 2010 17:47:31 +0000 (19:47 +0200)]
tcg: Add missing 'static' attribute
tcg_out_reloc is only used locally (in */target.c which is
included in tcg.c).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Kevin Wolf [Fri, 7 May 2010 10:43:46 +0000 (12:43 +0200)]
qcow2: Remove static forward declaration
OpenBSDs gcc is said to generate warnings for this declaration, so don't
reference bdrv_qcow2 directly, but look it up using bdrv_find_format.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Kevin Wolf [Fri, 7 May 2010 10:43:45 +0000 (12:43 +0200)]
Revert "Fix OpenBSD build"
This reverts commit
20d97356c9df6d68fbd37d6334fdb7063f24eab6.
The BlockDriver definition should stay at the end of source files.
Conflicts:
block/qcow2.c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Richard Henderson [Fri, 7 May 2010 16:52:51 +0000 (09:52 -0700)]
Fill in unassigned mem read/write callbacks.
Implement the "functions may be omitted with NULL pointer"
interface mentioned in the function block comment by transforming
NULL entries in the read/write arrays into calls to the
unassigned_mem family of functions.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Thu, 6 May 2010 20:19:20 +0000 (22:19 +0200)]
darwin-user: Add missing static attribute
Function usage is only used locally, so add "static".
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Thu, 6 May 2010 20:17:54 +0000 (22:17 +0200)]
Add missing 'static' attribute
Function usage() is only used locally.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 7 May 2010 16:14:59 +0000 (16:14 +0000)]
sparc64: fix build with older gccs
Fix errors missed in
2065061ede22d401aae2ce995c3af54db9d28639:
CC sparc64-softmmu/helper.o
cc1: warnings being treated as errors
/src/qemu/target-sparc/helper.c: In function 'get_physical_address':
/src/qemu/target-sparc/helper.c:426: warning: 'context' may be used uninitialized in this function
/src/qemu/target-sparc/helper.c:426: note: 'context' was declared here
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Mon, 3 May 2010 07:29:44 +0000 (11:29 +0400)]
sparc64: handle asi referencing nucleus and secondary MMU contexts
- increase max supported MMU modes to 6
- handle nucleus context asi
- handle secondary context asi
- handle non-faulting loads from secondary context
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Tue, 4 May 2010 19:15:41 +0000 (23:15 +0400)]
sparc64: implement global translation table entries v1
- match global tte against any context
- show global tte in MMU dump
v0->v1: added default case to switch statement in demap_tlb
- should fix gcc warning about uninitialized context variable
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Mon, 3 May 2010 07:29:34 +0000 (11:29 +0400)]
sparc64: more ultrasparc asi extensions for disassembler
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Michael S. Tsirkin [Tue, 6 Apr 2010 11:18:19 +0000 (14:18 +0300)]
qemu: address todo comment in exec.c
exec.c has a comment 'XXX: optimize' for lduw_phys/stw_phys,
so let's do it, along the lines of stl_phys.
The reason to address 16 bit accesses specifically is that virtio relies
on these accesses to be done atomically, using memset as we do now
breaks this assumption, which is reported to cause qemu with kvm
to read wrong index values under stress.
https://bugzilla.redhat.com/show_bug.cgi?id=525323
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Mon, 29 Mar 2010 17:54:42 +0000 (10:54 -0700)]
Fix zero-length write(2).
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paul Brook [Wed, 5 May 2010 15:32:59 +0000 (16:32 +0100)]
Better default guest_base
Avoid loading linux-user applications in address space already used/reserved
by the host.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Wed, 5 May 2010 15:32:59 +0000 (16:32 +0100)]
Remove PAGE_RESERVED
The usermode PAGE_RESERVED code is not required by the current mmap
implementation, and is already broken when guest_base != 0.
Unfortunately the bsd emulation still uses the old mmap implementation,
so we can't rip it out altogether.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Wed, 5 May 2010 15:32:59 +0000 (16:32 +0100)]
Avoid libaio for usermode
Linux AIO is aonly used by system emulation, so should not be linked into
the userspace emulatior.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Richard Henderson [Wed, 28 Apr 2010 23:07:57 +0000 (16:07 -0700)]
Enable -d cpu logging by default.
When -d cpu logging was handled by target-foo/translate.c,
it was controled by DEBUG_DISAS, which is enabled by default.
Use the same condition in cpu_exec.
At the same time, reduce the if-deffery by assuming no flags
update is required for the target.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Mon, 5 Apr 2010 22:58:20 +0000 (15:58 -0700)]
target-sh4: Remove duplicate CPU log.
Logging for -d cpu is done in generic code.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Mon, 5 Apr 2010 22:57:41 +0000 (15:57 -0700)]
target-ppc: Remove duplicate cpu log.
Logging for -d cpu is done in generic code.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Mon, 5 Apr 2010 22:56:51 +0000 (15:56 -0700)]
target-mips: Remove duplicate CPU log.
Logging for -d cpu is done in generic code.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Sun, 4 Apr 2010 18:40:44 +0000 (11:40 -0700)]
target-i386: Remove duplicate CPU log.
The proper logging for -d cpu is done in generic code.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Tue, 4 May 2010 19:55:35 +0000 (19:55 +0000)]
Fix cpu list("-cpu ?") breakage, spotted by TeLeMan
Fix breakage by
04c9a0cbc2bf496889cef6da2d61bf00ef190a4f.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>