qemu
15 years agoFix MXCC printf warning (based on patch by Robert Reif)
blueswir1 [Thu, 2 Oct 2008 18:06:50 +0000 (18:06 +0000)]
Fix MXCC printf warning (based on patch by Robert Reif)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5393 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd missing parenthesis in qemu_ram_alloc()
ths [Thu, 2 Oct 2008 17:34:21 +0000 (17:34 +0000)]
Add missing parenthesis in qemu_ram_alloc()

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5392 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoppc: fix crash in ppc system single step support
aurel32 [Wed, 1 Oct 2008 22:01:37 +0000 (22:01 +0000)]
ppc: fix crash in ppc system single step support

There was a bogus case where two system debug ops get generated.  This
patch removes the broken system debug op. This was a left over after
making some changes to correctly generate debug ops on branch
operations inside gen_goto_tb();

The test case against this patch is to turn on single stepping with
timers, boot a linux kernel, set a breakpoint a do_fork and in gdb
execute "si 3000".  Then qemu-system-ppc will fault executing a debug
op, which should not have been executed.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5391 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoReset CPU on INIT IPI
aurel32 [Wed, 1 Oct 2008 22:01:28 +0000 (22:01 +0000)]
Reset CPU on INIT IPI

INIT IPI should reset CPU. Also non boot CPU should be halted. It will
be un-halted by SIPI.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5390 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix cscope filelist by removing leading ./
aurel32 [Wed, 1 Oct 2008 21:46:58 +0000 (21:46 +0000)]
Fix cscope filelist by removing leading ./

(Ryan Harper, Laurent Desnogues)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5389 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd inotify syscall family
aurel32 [Wed, 1 Oct 2008 21:46:50 +0000 (21:46 +0000)]
Add inotify syscall family

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5388 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd mincore syscall
aurel32 [Wed, 1 Oct 2008 21:46:41 +0000 (21:46 +0000)]
Add mincore syscall

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5387 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd fadvise64 stubs
aurel32 [Wed, 1 Oct 2008 21:46:32 +0000 (21:46 +0000)]
Add fadvise64 stubs

Since these are only hints, we happily fake them for now
to make applications not barf on ENOSYS.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5386 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: improve scsi dma speed by increasing the dma buffer size
aurel32 [Wed, 1 Oct 2008 21:46:23 +0000 (21:46 +0000)]
qemu: improve scsi dma speed by increasing the dma buffer size

taken from Xen 17267:f4a92f0db20f, original patch by Samuel Thibault.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5385 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomonitor: add sendkey support for comma, dot and slash
aurel32 [Wed, 1 Oct 2008 21:46:15 +0000 (21:46 +0000)]
monitor: add sendkey support for comma, dot and slash

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5384 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu-doc: document use of raw values with sendkey
aurel32 [Wed, 1 Oct 2008 21:46:07 +0000 (21:46 +0000)]
qemu-doc: document use of raw values with sendkey

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5383 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohw/apic.c: use bsr and bsf on x86_64
aurel32 [Wed, 1 Oct 2008 21:45:59 +0000 (21:45 +0000)]
hw/apic.c: use bsr and bsf on x86_64

(C.W. Betts)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5382 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agofix default size handling in monitor
aurel32 [Wed, 1 Oct 2008 21:45:51 +0000 (21:45 +0000)]
fix default size handling in monitor

If /i format is used once (with x/xp/p command) default_fmt_size is set
to -1 and subsequent commands of the form /x outputs nothing. Included
patched fixes this by setting default_fmt_size only if the command is
not of format /i.

Signed-off-by: Gleb Natapov <gleb@qumranet.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5381 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix computation of XER.{CA, OV} in addme, subfme
aurel32 [Wed, 1 Oct 2008 21:45:37 +0000 (21:45 +0000)]
target-ppc: fix computation of XER.{CA, OV} in addme, subfme

(Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5380 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix mullw/mullwo
aurel32 [Wed, 1 Oct 2008 21:45:18 +0000 (21:45 +0000)]
target-ppc: fix mullw/mullwo

Based on patch by Julian Seward.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5379 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix warning about variables used uninitialized
blueswir1 [Wed, 1 Oct 2008 19:39:40 +0000 (19:39 +0000)]
Fix warning about variables used uninitialized

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5378 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMake some variables static
blueswir1 [Wed, 1 Oct 2008 19:38:09 +0000 (19:38 +0000)]
Make some variables static

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5377 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMake some variables static
blueswir1 [Wed, 1 Oct 2008 19:06:48 +0000 (19:06 +0000)]
Make some variables static

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5376 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoChange some qualifiers to static
blueswir1 [Wed, 1 Oct 2008 18:13:13 +0000 (18:13 +0000)]
Change some qualifiers to static

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5375 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove unused variables
blueswir1 [Wed, 1 Oct 2008 18:08:41 +0000 (18:08 +0000)]
Remove unused variables

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5374 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix warning about incompatible types
blueswir1 [Wed, 1 Oct 2008 18:02:50 +0000 (18:02 +0000)]
Fix warning about incompatible types

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5373 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove unused functions
blueswir1 [Wed, 1 Oct 2008 17:58:26 +0000 (17:58 +0000)]
Remove unused functions

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5372 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove unused variable
blueswir1 [Wed, 1 Oct 2008 17:57:26 +0000 (17:57 +0000)]
Remove unused variable

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5371 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-alpha: update STATUS
aurel32 [Wed, 1 Oct 2008 07:07:59 +0000 (07:07 +0000)]
target-alpha: update STATUS

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5370 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoCheck that asynchronous (DMA) submission succeeds (Ian Jackson).
balrog [Wed, 1 Oct 2008 01:43:16 +0000 (01:43 +0000)]
Check that asynchronous (DMA) submission succeeds (Ian Jackson).

If it does not, abort the command immediately rather than dropping
it on the floor.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5369 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoActually check read/write errors in IDE (Ian Jackson).
balrog [Wed, 1 Oct 2008 01:13:37 +0000 (01:13 +0000)]
Actually check read/write errors in IDE (Ian Jackson).

This patch makes the ide emulation actually take notice of
error returns from bdrv_write and bdrv_aio_{read,write}.

(Cherry picked from qemu-xen e0e7a0afe0e324a1f7d64c240f567b15dbe454cf,
 first posted to qemu-devel Wed, 20 Feb 2008 15:26:41 +0000)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5368 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agox86 pextrw destination operand can be r64.
balrog [Wed, 1 Oct 2008 00:14:39 +0000 (00:14 +0000)]
x86 pextrw destination operand can be r64.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5367 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoHandle MSR_IA32_PERF_STATUS in rdmsr (Alexander Graf).
balrog [Tue, 30 Sep 2008 23:35:18 +0000 (23:35 +0000)]
Handle MSR_IA32_PERF_STATUS in rdmsr (Alexander Graf).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5366 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDisable bluetooth proxy compilation on win32.
balrog [Tue, 30 Sep 2008 23:31:35 +0000 (23:31 +0000)]
Disable bluetooth proxy compilation on win32.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5365 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAvoid (some) ppc cross-compilation problems
malc [Tue, 30 Sep 2008 19:44:32 +0000 (19:44 +0000)]
Avoid (some) ppc cross-compilation problems

[..snip..]

A recent kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

[..snip..]

The patch is based on Hollis's Blanchard idea.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5364 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd some missing static qualifiers
blueswir1 [Tue, 30 Sep 2008 18:18:27 +0000 (18:18 +0000)]
Add some missing static qualifiers

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5363 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoSilence some warnings about uninitialized variables
blueswir1 [Tue, 30 Sep 2008 18:16:09 +0000 (18:16 +0000)]
Silence some warnings about uninitialized variables

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5362 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFew compile time warnings removed (Stefano Stabellini)
blueswir1 [Tue, 30 Sep 2008 18:12:18 +0000 (18:12 +0000)]
Few compile time warnings removed (Stefano Stabellini)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5361 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-alpha: convert palcode ops to TCG
aurel32 [Tue, 30 Sep 2008 06:45:44 +0000 (06:45 +0000)]
target-alpha: convert palcode ops to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5360 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-alpha: convert locked load/store to TCG
aurel32 [Tue, 30 Sep 2008 06:45:34 +0000 (06:45 +0000)]
target-alpha: convert locked load/store to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5359 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMake sure bluez programs (cross-)compile, add missing statics.
balrog [Tue, 30 Sep 2008 02:27:44 +0000 (02:27 +0000)]
Make sure bluez programs (cross-)compile, add missing statics.

Spotted by Blue Swirl.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5358 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix SS-2 crash
blueswir1 [Mon, 29 Sep 2008 18:24:38 +0000 (18:24 +0000)]
Fix SS-2 crash

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5357 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoTARGET_MAP_xx macros: clean and alpha specific values
aurel32 [Mon, 29 Sep 2008 17:23:09 +0000 (17:23 +0000)]
TARGET_MAP_xx macros: clean and alpha specific values

- Clean TARGET_MAP_xx macros to avoid nested #if #endif
- Add alpha specific values

Based on a patch by Tristan Gingold

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5356 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-alpha: misc fixes
aurel32 [Mon, 29 Sep 2008 17:21:37 +0000 (17:21 +0000)]
target-alpha: misc fixes

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5355 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-alpha: convert FP ops to TCG
aurel32 [Mon, 29 Sep 2008 17:21:28 +0000 (17:21 +0000)]
target-alpha: convert FP ops to TCG

- Convert FP ops to TCG
- Fix S format
- Implement F and G formats (untested)
- Fix MF_FPCR an MT_FPCR
- Fix FTOIS, FTOIT, ITOFF, ITOFS, ITOFT
- Fix CPYSN, CPYSE

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5354 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-alpha: factorize load/store code
aurel32 [Mon, 29 Sep 2008 17:21:17 +0000 (17:21 +0000)]
target-alpha: factorize load/store code

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5353 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRefactor QEMUFile for live migration
aliguori [Mon, 29 Sep 2008 16:25:16 +0000 (16:25 +0000)]
Refactor QEMUFile for live migration

To support live migration, we override QEMUFile so that instead of writing to
disk, the save/restore state happens over a network connection.

This patch makes QEMUFile read/write operations function pointers so that we
can override them for live migration.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5352 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix save/restore regression introduced by r5318
aliguori [Mon, 29 Sep 2008 16:09:07 +0000 (16:09 +0000)]
Fix save/restore regression introduced by r5318

sysenter_cs is a u32 and is loaded as a u32.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5351 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMy core2duo patch introduced a vague statement of "missing features" in
pbrook [Mon, 29 Sep 2008 13:55:36 +0000 (13:55 +0000)]
My core2duo patch introduced a vague statement of "missing features" in
the CPUID specification. This patch addresses this by specifying exactly
what is missing.
While going along the missing CPUID entries I also stumbled across
invalid and missing CPUID #defines while comparing them to the Intel
Documentation. This patch also addresses these. I found them too minor
to split them up in a separate patch.

Furthermore I looked through CPUID functions > 5 and realized that it
should be safe to bump the level to 10. I tried booting Linux with that
and it worked fine.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5350 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoEmulate a USB bluetooth dongle (or HCI Transport layer).
balrog [Mon, 29 Sep 2008 00:40:44 +0000 (00:40 +0000)]
Emulate a USB bluetooth dongle (or HCI Transport layer).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5349 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse VHCI to allow the host os to participate in a qemu bluetooth "vlan".
balrog [Mon, 29 Sep 2008 00:31:41 +0000 (00:31 +0000)]
Use VHCI to allow the host os to participate in a qemu bluetooth "vlan".

This does the reverse of bt-host.c, proxying from guest to host.
Appears to be more reliable.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5348 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoBluetooth HIDP emulation on top of usb-hid.c and L2CAP and SDP.
balrog [Mon, 29 Sep 2008 00:25:17 +0000 (00:25 +0000)]
Bluetooth HIDP emulation on top of usb-hid.c and L2CAP and SDP.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5347 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd L2CAP logic and a virtual SDP server for use in emulated devices.
balrog [Mon, 29 Sep 2008 00:14:22 +0000 (00:14 +0000)]
Add L2CAP logic and a virtual SDP server for use in emulated devices.

Note that the L2CAP flow-controlled mode is not fully supported.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5346 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd a virtual HCI.
balrog [Mon, 29 Sep 2008 00:02:34 +0000 (00:02 +0000)]
Add a virtual HCI.

This implements most of the logic of a real HCI (at least the pieces
marked as mandatory).  It doesn't support keys, authentication etc.
It works on top of the LMP layer, which is not fully emulated because
software never has direct access to it.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5345 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement a HCI passthrough to host.
balrog [Sun, 28 Sep 2008 23:49:55 +0000 (23:49 +0000)]
Implement a HCI passthrough to host.

This allows using a host's physical HCI as one of the HCIs attached
to the virtual machine.  This brings various limitations because not
all commands/events are passed through by Linux kernel, some are
interpreted by the host's kernel for a speed gain.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5344 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoEmulate a serial bluetooth HCI with H4+ extensions and attach to n8x0's UART.
balrog [Sun, 28 Sep 2008 23:34:13 +0000 (23:34 +0000)]
Emulate a serial bluetooth HCI with H4+ extensions and attach to n8x0's UART.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5343 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd a "null" bluetooth HCI and a header file for bluetooth.
balrog [Sun, 28 Sep 2008 23:19:47 +0000 (23:19 +0000)]
Add a "null" bluetooth HCI and a header file for bluetooth.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5342 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRename -cpu atom to -cpu n270.
balrog [Sun, 28 Sep 2008 22:02:30 +0000 (22:02 +0000)]
Rename -cpu atom to -cpu n270.

As noticed by Alexander Graf Atom is a name of a series with varying
features.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5341 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix warning, based on patches by Zeev Tarantov and Jindrich Makovicka
blueswir1 [Sun, 28 Sep 2008 20:00:14 +0000 (20:00 +0000)]
Fix warning, based on patches by Zeev Tarantov and Jindrich Makovicka

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5340 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd to machine structure a flag to use SCSI drives instead of IDE: fixes SS-20
blueswir1 [Sun, 28 Sep 2008 18:55:17 +0000 (18:55 +0000)]
Add to machine structure a flag to use SCSI drives instead of IDE: fixes SS-20

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5339 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix dots per clock value, cleanup and "optimize"
malc [Sun, 28 Sep 2008 02:43:18 +0000 (02:43 +0000)]
Fix dots per clock value, cleanup and "optimize"

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5338 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix more r5087 breakage
malc [Sun, 28 Sep 2008 00:42:15 +0000 (00:42 +0000)]
Fix more r5087 breakage

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5337 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoOptional "precise" VGA retrace support
malc [Sun, 28 Sep 2008 00:42:12 +0000 (00:42 +0000)]
Optional "precise" VGA retrace support

Selected via: -vga <name>,retrace=precise

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5336 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoChange the way video graphics adapter is selected
malc [Sun, 28 Sep 2008 00:42:05 +0000 (00:42 +0000)]
Change the way video graphics adapter is selected

Instead of having (current)three command line switches -std-vga,
-cirrusvga and -vmwarevga, provide one -vga switch which takes
an argument, so that:
qemu -std-vga   becomes qemu -vga std
qemu -cirrusvga becomes qemu -vga cirrus
qemu -vmwarevga becomes qemu -vga vmware

Update documentation accordingly.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5335 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMake compatfd fallback more robust
aliguori [Sat, 27 Sep 2008 20:58:43 +0000 (20:58 +0000)]
Make compatfd fallback more robust

Be more friendly when signalfd() fails, and also add configure checks to detect
that syscall(SYS_signalfd) actually works.  malc pointed out that some installs
do not have /usr/include/linux headers that are in sync with the glibc headers
so why SYS_signalfd is defined, it's #defined to _NR_signalfd which is not
defined in the /usr/include/linux header.

While this is a distro bug, it doesn't hurt to do a more thorough job in
detection.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5334 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix whitespace damage in compatfd
aliguori [Sat, 27 Sep 2008 20:41:11 +0000 (20:41 +0000)]
Fix whitespace damage in compatfd

Spotted by malc.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5333 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd mmu tlb demap support (Igor Kovalenko)
blueswir1 [Sat, 27 Sep 2008 19:43:18 +0000 (19:43 +0000)]
Add mmu tlb demap support (Igor Kovalenko)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5332 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAllocate code gen buffer properly on FreeBSD
aliguori [Sat, 27 Sep 2008 15:32:41 +0000 (15:32 +0000)]
Allocate code gen buffer properly on FreeBSD

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5331 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix definition of EMX bit in cpuid (Jens Axboe).
balrog [Fri, 26 Sep 2008 21:03:37 +0000 (21:03 +0000)]
Fix definition of EMX bit in cpuid (Jens Axboe).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5330 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd a generic Niagara machine
blueswir1 [Fri, 26 Sep 2008 19:48:58 +0000 (19:48 +0000)]
Add a generic Niagara machine

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5329 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement some UA2007 block ASIs
blueswir1 [Fri, 26 Sep 2008 18:07:24 +0000 (18:07 +0000)]
Implement some UA2007 block ASIs

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5328 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement UA2005 hypervisor traps
blueswir1 [Fri, 26 Sep 2008 18:05:23 +0000 (18:05 +0000)]
Implement UA2005 hypervisor traps

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5327 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMove also DEBUG_PCALL (see r5085)
blueswir1 [Fri, 26 Sep 2008 18:02:48 +0000 (18:02 +0000)]
Move also DEBUG_PCALL (see r5085)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5326 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoReally fix the BSD build this time
aliguori [Fri, 26 Sep 2008 16:12:14 +0000 (16:12 +0000)]
Really fix the BSD build this time

struct aioinit isn't defined on BSD it appears so we need to guard everything
in an #if defined(__linux__).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5325 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix build on non-Linux unices
aliguori [Fri, 26 Sep 2008 16:04:40 +0000 (16:04 +0000)]
Fix build on non-Linux unices

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5324 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement an fd pool to get real AIO with posix-aio
aliguori [Fri, 26 Sep 2008 15:59:29 +0000 (15:59 +0000)]
Implement an fd pool to get real AIO with posix-aio

This patch implements a simple fd pool to allow many AIO requests with
posix-aio.  The result is significantly improved performance (identical to that
reported for linux-aio) for both cache=on and cache=off.

The fundamental problem with posix-aio is that it limits itself to one thread
per-file descriptor.  I don't know why this is, but this patch provides a simple
mechanism to work around this (duplicating the file descriptor).

This isn't a great solution, but it seems like a reasonable intermediate step
between posix-aio and a custom thread-pool to replace it.

Ryan Harper will be posting some performance analysis he did comparing posix-aio
with fd pooling against linux-aio.  The size of the posix-aio thread pool and
the fd pool were largely determined by him based on this analysis.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5323 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix build on FreeBSD
aliguori [Fri, 26 Sep 2008 15:52:17 +0000 (15:52 +0000)]
Fix build on FreeBSD

__GLIBC_PREREQ is defined in such a way that the ! cannot be used in front of
it on FreeBSD.  Also, -lpthread is not implied by the build and we definitely
use it for compatfd support.

While at it, I added a default initialization for posix-aio that seems to
perform well in our testing.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5322 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r5274 which breaks savevm/loadvm
blueswir1 [Thu, 25 Sep 2008 20:24:19 +0000 (20:24 +0000)]
Revert r5274 which breaks savevm/loadvm

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5321 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd a simple SSSE3 test.
balrog [Thu, 25 Sep 2008 18:41:28 +0000 (18:41 +0000)]
Add a simple SSSE3 test.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5320 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd Atom (x86) cpu identification.
balrog [Thu, 25 Sep 2008 18:31:12 +0000 (18:31 +0000)]
Add Atom (x86) cpu identification.

Also add SSSE3 to Core2 features.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5319 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoSYSENTER/SYSEXIT IA-32e implementation (Alexander Graf).
balrog [Thu, 25 Sep 2008 18:16:18 +0000 (18:16 +0000)]
SYSENTER/SYSEXIT IA-32e implementation (Alexander Graf).

On Intel CPUs, sysenter and sysexit are valid in 64-bit mode. This patch
makes both 64-bit aware and enables them for Intel CPUs.
Add cpu save/load for 64-bit wide sysenter variables.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5318 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoCore 2 Duo specification (Alexander Graf).
balrog [Thu, 25 Sep 2008 18:11:30 +0000 (18:11 +0000)]
Core 2 Duo specification (Alexander Graf).

This patch adds a Core 2 Duo CPU to the available CPU types. The CPU
definition tries to resemble a real CPU as good as possible, whilst not
exposing features qemu does not implement.
The patch also includes some minor additions that Core 2 Duo CPUs have:

- New MSR: MSR_IA32_PERF_STATUS
- CPUID up to level 5 (cache info and mwait)

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5317 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoClean up vendor identification (Alexander Graf).
balrog [Thu, 25 Sep 2008 18:08:05 +0000 (18:08 +0000)]
Clean up vendor identification (Alexander Graf).

Right now CPU vendor identification contains a lot of magic numbers. The
patch cleans them up to defines, so we can identify the CPU later on
without copying magic numbers.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5316 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement x86 SSSE3 instructions.
balrog [Thu, 25 Sep 2008 18:01:46 +0000 (18:01 +0000)]
Implement x86 SSSE3 instructions.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5315 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse qemu_free() on env instead of free.
balrog [Thu, 25 Sep 2008 03:47:59 +0000 (03:47 +0000)]
Use qemu_free() on env instead of free.

Fixes a glibc Abort on qemu-x86_64 -cpu foo.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5314 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agofix bug in block-qcow2.c:alloc_cluster_offset() (Shahar Frank)
aliguori [Wed, 24 Sep 2008 16:52:15 +0000 (16:52 +0000)]
fix bug in block-qcow2.c:alloc_cluster_offset() (Shahar Frank)

During the debugging of the new revision of the zero dedup patch I
stepped on the following bug in block-qcow2.c:alloc_cluster_offset(). I
am not sure what the exact damage this bug can do, but it may be very
nasty because you way not notice it effects until you will do some
snapshot operations or similar actions that rely on the reference
counting.

The bug is easy to spot using the new "check" verb I added to the
qemu-img in one of the previous patches. I will resend the qemu-img
patch again with the new version of the zero dedup.

Signed-off-by: Shahar Frank <shaharf@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5313 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix compiler warning when _VNC_DEBUG isn't defined.
ths [Wed, 24 Sep 2008 15:17:57 +0000 (15:17 +0000)]
Fix compiler warning when _VNC_DEBUG isn't defined.

Signed-off-by: Thiemo Seufer <ths@networkno.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5312 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agopflash: Add missing parenthesis in error message.
ths [Wed, 24 Sep 2008 14:33:07 +0000 (14:33 +0000)]
pflash: Add missing parenthesis in error message.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5311 c046a42c-6fe2-441c-8c8c-71466251a162

15 years ago64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)
aliguori [Wed, 24 Sep 2008 14:10:36 +0000 (14:10 +0000)]
64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)

Don't truncate code_gen_buffer_size calculation to int, as it will give
unpredicted results on 64 bit systems when booting large guests.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5310 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoReintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
balrog [Wed, 24 Sep 2008 03:32:33 +0000 (03:32 +0000)]
Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.

This partially reverts r4812 to fix an issue highlighted by Ryan Harper
with all vc's being fixed size which prevented backends with resizable
window (curses) from displaying okay.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5309 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDon't use ds->dpy_copy directly from hw/ (Jan Niehusmann).
balrog [Wed, 24 Sep 2008 02:21:24 +0000 (02:21 +0000)]
Don't use ds->dpy_copy directly from hw/ (Jan Niehusmann).

I left a TODO in the code because this still doesn't definitely
fix all issues.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5308 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd missing dependencies for qemu-doc.* (Stefan Weil)
aliguori [Wed, 24 Sep 2008 01:13:40 +0000 (01:13 +0000)]
Add missing dependencies for qemu-doc.* (Stefan Weil)

This patch fixes some items in Makefile:

* remove duplicate entries from .PHONY
* add missing entries to .PHONY
* sort entries in .PHONY alphabetically
* add missing dependencies for qemu-doc.* targets

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5307 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix tcg_gen_concat32_i64 on 64-bit hosts.
pbrook [Tue, 23 Sep 2008 22:31:10 +0000 (22:31 +0000)]
Fix tcg_gen_concat32_i64 on 64-bit hosts.

Signed-off-by: Paul Brook <paul@codesourcery.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5306 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoscsi-generic: decode correctly SCSI tape commands (Laurent Vivier)
aliguori [Tue, 23 Sep 2008 13:38:44 +0000 (13:38 +0000)]
scsi-generic: decode correctly SCSI tape commands (Laurent Vivier)

This patch allows to use a "real" SCSI tape with qemu using
"-drive /dev/sgX,if=scsi".

It allows to decode correctly transfer length when the type of the
device is a tape.

Some issues remain when the application reading the tape tries to go
beyond the end of the stream (but they must be corrected at the SCSI
controller level).

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5305 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRelax posix-aio restrictions on newer glibcs
aliguori [Tue, 23 Sep 2008 02:57:00 +0000 (02:57 +0000)]
Relax posix-aio restrictions on newer glibcs

RedHat 9 shipped glibc 2.3.  Modern versions of glibc do not have the aio thread
exit issue that the comment references.  This patch adjusts the check to only
limit aio_init on glibc versions < 2.4.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5304 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse concet TCG instructions in the MIPS target.
ths [Mon, 22 Sep 2008 21:54:00 +0000 (21:54 +0000)]
Use concet TCG instructions in the MIPS target.

Signed-off-by: Thiemo Seufer <ths@networkno.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5303 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoCRIS: Improve ASID related TLB flushes.
edgar_igl [Mon, 22 Sep 2008 20:51:28 +0000 (20:51 +0000)]
CRIS: Improve ASID related TLB flushes.

* Speedup and correct ASID (PID) related TLB flushes.
* Use 64bit tcg load/stores to emulate movem.
* Remove unused helpers and other minor cleanups.

Signed-off-by: Edgar E. Iglesias <edgar@axis.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5302 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix formatting of documentation (Stefan Weil)
aliguori [Mon, 22 Sep 2008 20:41:57 +0000 (20:41 +0000)]
Fix formatting of documentation (Stefan Weil)

Fix formatting for documentation of nbd command line options.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5301 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoETRAX-FS: Correct ethernet PHY diagnostics register reads.
edgar_igl [Mon, 22 Sep 2008 20:34:18 +0000 (20:34 +0000)]
ETRAX-FS: Correct ethernet PHY diagnostics register reads.

* Correct ethernet PHY diagnostics register reads.
* Add friendly names for the speed/duplex fields.
* Report duplex mismatches between MAC and PHY.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5300 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd software and timer interrupt support
blueswir1 [Mon, 22 Sep 2008 19:50:28 +0000 (19:50 +0000)]
Add software and timer interrupt support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5299 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agofixing keymap for Windows keys (Stefano Stabellini)
aliguori [Mon, 22 Sep 2008 19:45:36 +0000 (19:45 +0000)]
fixing keymap for Windows keys (Stefano Stabellini)

Fixing Windows keys mapping (CS 15446 form xen-unstable).

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5298 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRefactor AIO to allow multiple AIO implementations
aliguori [Mon, 22 Sep 2008 19:17:18 +0000 (19:17 +0000)]
Refactor AIO to allow multiple AIO implementations

This patch refactors the AIO layer to allow multiple AIO implementations.  It's
only possible because of the recent signalfd() patch.

Right now, the AIO infrastructure is pretty specific to the block raw backend.
For other block devices to implement AIO, the qemu_aio_wait function must
support registration.  This patch introduces a new function,
qemu_aio_set_fd_handler, which can be used to register a file descriptor to be
called back.  qemu_aio_wait() now polls a set of file descriptors registered
with this function until one becomes readable or writable.

This patch should allow the implementation of alternative AIO backends (via a
thread pool or linux-aio) and AIO backends in non-traditional block devices
(like NBD).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5297 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix arguments used in cas/casx, thanks to Igor Kovalenko for spotting
blueswir1 [Mon, 22 Sep 2008 16:52:28 +0000 (16:52 +0000)]
Fix arguments used in cas/casx, thanks to Igor Kovalenko for spotting

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5296 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd comment to windows SCSI hack.
pbrook [Mon, 22 Sep 2008 16:30:29 +0000 (16:30 +0000)]
Add comment to windows SCSI hack.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5295 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove unnecessary call to qemu_aio_init (called from bdrv_init)
blueswir1 [Mon, 22 Sep 2008 16:29:18 +0000 (16:29 +0000)]
Remove unnecessary call to qemu_aio_init (called from bdrv_init)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5294 c046a42c-6fe2-441c-8c8c-71466251a162