]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/log
qemu-xen-4.1-testing.git
16 years agoMerge branch 'master' of ../../1/qemu-iwj
Ian Jackson [Fri, 13 Mar 2009 12:09:06 +0000 (12:09 +0000)]
Merge branch 'master' of ../../1/qemu-iwj

Conflicts:

block-raw-posix.c

16 years agoIntroduce and use qemu_paio_fsync
Ian Jackson [Fri, 13 Mar 2009 12:04:21 +0000 (12:04 +0000)]
Introduce and use qemu_paio_fsync

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'upstream'
Ian Jackson [Thu, 12 Mar 2009 19:18:57 +0000 (19:18 +0000)]
Merge branch 'upstream'

Conflicts:

.gitignore
Makefile.target
block-vpc.c
console.c
console.h
hw/cirrus_vga.c
hw/ide.c
hw/pc.c
hw/pc.h
hw/pci.h
hw/vga.c
hw/vga_int.h
sdl.c
target-ppc/translate_init.c
vl.c
vnc.c

16 years agoMinor post-merge compilation fixes.
Ian Jackson [Thu, 12 Mar 2009 17:33:51 +0000 (17:33 +0000)]
Minor post-merge compilation fixes.

It still does not compile, and we are going to merge up again before
we fix that.

16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 12 Mar 2009 17:29:18 +0000 (17:29 +0000)]
Merge branch 'qemu'

Conflicts:

.gitignore
Makefile
Makefile.target
block-raw-posix.c
bswap.h
console.c
hw/cirrus_vga.c
hw/ide.c
hw/iommu.c
hw/lsi53c895a.c
hw/ne2000.c
hw/pc.c
hw/pc.h
hw/pci.c
hw/ppc_chrp.c
hw/ppc_oldworld.c
hw/ppc_prep.c
hw/rtl8139.c
hw/scsi-disk.c
hw/usb-hid.c
hw/vga.c
hw/vga_int.h
sdl.c
sysemu.h
vl.c
vnc.c

16 years agoOverride default cache mode for disk images to write-back
Ian Jackson [Mon, 2 Mar 2009 11:21:51 +0000 (11:21 +0000)]
Override default cache mode for disk images to write-back

Upstream qemu changed the default cache mode to write-through (ie,
O_DSYNC) which is much slower.  We do not need this as we have
explicit control of cacheing with the IDE cache control commands.

Original patch by Yang Zhang modified by Ian Jackson.

Signed-off-by: Yang Zhang <yang.zhang@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomake various functions in i386-dm/helper2.c static
Ian Jackson [Mon, 2 Mar 2009 11:16:16 +0000 (11:16 +0000)]
make various functions in i386-dm/helper2.c static

These functions don't seem to be used outside of i386-dm/helper2.c

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agowake up PCI passthru device on boot
Ian Jackson [Mon, 2 Mar 2009 11:15:37 +0000 (11:15 +0000)]
wake up PCI passthru device on boot

Commit 8c771eb6294afc5b3754a9e3de51568d4e5986c2 enables a guest
OS to program D0-D3hot states, thus PCI passsthru devices transit
into D3hot state when the guest Windows shutdown.
That disables reboot from passthru devices because the device is
not active in the POST phase. Actually, the option ROM can't be read
from the guest bios.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agopassthrough: MSI-X mask bit acceleration
Ian Jackson [Mon, 2 Mar 2009 11:13:44 +0000 (11:13 +0000)]
passthrough: MSI-X mask bit acceleration

Read MSI-X mask bit directly from the device, since buffered version
may not be up-to-date when MSI-X mask bit interception is working.
Also rebind every MSI-X vector on guest PCI BAR rebalancing so that
MSI-X mask bit intercept handler can get the correct gpa

[ Also, fix declaration of pt_msix_update_remap in pt-msi.h, which
  was misspelled pt_msi_update_remap. -iwj ]

Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agohw/pass-through.c: fix a leak on error in pt_init()
Ian Jackson [Tue, 24 Feb 2009 12:32:01 +0000 (12:32 +0000)]
hw/pass-through.c: fix a leak on error in pt_init()

vslots needs to be freed on error

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: remove ACPI_PHP_SLOT_NUM
Ian Jackson [Mon, 23 Feb 2009 09:33:48 +0000 (09:33 +0000)]
[PATCH] ioemu: piix4acpi.c: remove ACPI_PHP_SLOT_NUM

ACPI_PHP_SLOT_NUM is equivalent to PHP_SLOT_LEN and both
are used inside piix4acpi.c. So for the sake of consistency
remove ACPI_PHP_SLOT_NUM.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: remove unnecessary assignment of pci_slots to local variables
Ian Jackson [Mon, 23 Feb 2009 09:33:00 +0000 (09:33 +0000)]
[PATCH] ioemu: piix4acpi.c: remove unnecessary assignment of pci_slots to local variables

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots
Ian Jackson [Mon, 23 Feb 2009 09:32:11 +0000 (09:32 +0000)]
[PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots

Some instances were cast and others were not.
This patch makes all instances not cast opaque into PHPSlots.

Also consistently use hotplug_slots as the variable to which
opaque is assigned.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: Simplfy PHPSlots structure
Ian Jackson [Mon, 23 Feb 2009 09:31:31 +0000 (09:31 +0000)]
[PATCH] ioemu: piix4acpi.c: Simplfy PHPSlots structure

The anonymouys structure inside PHPSlots only has one element,
so things can be simplified by moving the element into PHPSlots
and removing the anonymous structure.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PCI passthrough] Fix the segfault on assigning device without PM capability
Ian Jackson [Mon, 23 Feb 2009 16:29:49 +0000 (16:29 +0000)]
[PCI passthrough] Fix the segfault on assigning device without PM capability

This patch fixes the segmentation fault on assigning device without
Power Management Capability Structure.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoCleanup PCI passthrough code
Ian Jackson [Mon, 23 Feb 2009 11:33:56 +0000 (11:33 +0000)]
Cleanup PCI passthrough code

The patch cleanups the code of PCI passthrough.

- Use LIST_FOREACH(). Don't use lh_first, le_next directly.
- Use pci_{read, write}_block instead of "switch(len) case [124]
  pci_{read, write}_{byte, word, long}();".
- Eliminate duplicate codes using PT_MEARGE_VALUE macro.
- Define PCI_ERR_* macro in pass-through.h if libpci is old.
- Remove the unreasonable loop from pt_aer_reg_{save,restore}.
- Enable pt_aer_reg_{save,restore}, even if libpci is old.
- Fix ro_mask and remove unnecessary pt_xxx_reg_write functions.
- Add "Error:" or "Warning:" to messages.
- Remove verbose messages.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agohw/passthrough.[ch], pt-msi.[ch]: remove trailing whitespace
Ian Jackson [Mon, 23 Feb 2009 11:32:31 +0000 (11:32 +0000)]
hw/passthrough.[ch], pt-msi.[ch]: remove trailing whitespace

Trailing whitespace does not survive some people's mailers, with the
result that their patches do not apply.  Therefore in this commit I'm
removing it from the pass-through code, which is currently entirely in
the Xen tree.

This change is the result of this rune:
 perl -i~ -pe 's/[\t ]*$//' hw/pass-through.[ch] hw/pt-msi.[ch]

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agofix raw_aio_remove list walk bug (really)
Ian Jackson [Mon, 23 Feb 2009 11:29:14 +0000 (11:29 +0000)]
fix raw_aio_remove list walk bug (really)

Fix typo in my backport of Stefano's fix, which broke the build
in 8adde1cbba18de2704a30a76f20855f89c664a88.

16 years agofix raw_aio_remove list walk bug
Ian Jackson [Thu, 19 Feb 2009 17:55:54 +0000 (17:55 +0000)]
fix raw_aio_remove list walk bug

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cherry picked and cross-ported by Ian Jackson
from Stefano's submission to qemu-devel, 18 Feb 2009 16:56:16 GMT.

16 years agoblock-vbd: Fix vbd_aio_flush() no-op case
Ian Jackson [Thu, 19 Feb 2009 17:40:03 +0000 (17:40 +0000)]
block-vbd: Fix vbd_aio_flush() no-op case

Call the completion function if flush features are not supported in blkfront.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agofix memory/fd leak in pt_msix_init()
Ian Jackson [Mon, 9 Feb 2009 10:40:12 +0000 (10:40 +0000)]
fix memory/fd leak in pt_msix_init()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agofix error recovery in pass-through.c
Ian Jackson [Mon, 9 Feb 2009 10:34:50 +0000 (10:34 +0000)]
fix error recovery in pass-through.c

return NULL when error. fix error recovery path.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agohw/pass-through.c: workaround for old libpci
Ian Jackson [Fri, 6 Feb 2009 16:16:06 +0000 (16:16 +0000)]
hw/pass-through.c: workaround for old libpci

Old versions of libpci (including the ones on the automatic tests
which control Xen staging propagation) do not define
PCI_LIB_VERSION or the PCI_ERR_{UNCOR_MASK,...} constants.

This means that change 8c771eb6294afc5b3754a9e3de51568d4e5986c2 breaks
the build.  In this changeset I apply what is intended to be a
workaround for this problem but it may not be completely correct; this
is therefore perhaps an interim fix.

The potential problem is that the save/restore of some PCI passthrough
error handling registers (across suspend/resume) may not work properly
with old versions of libpci.  However non-passthrough and non-suspect
use cases should now be fine.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoSlightly improve error check in xenstore_vm_write()
Ian Jackson [Thu, 5 Feb 2009 16:26:24 +0000 (16:26 +0000)]
Slightly improve error check in xenstore_vm_write()

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoEnable guest OS to program D0-D3hot states of an assigned device
Ian Jackson [Thu, 5 Feb 2009 15:54:13 +0000 (15:54 +0000)]
Enable guest OS to program D0-D3hot states of an assigned device

This patch enables guest OS to program D0-D3hot states of assigned
device.

This patch is revised version based on the review comments.

- Use LIST_FOREACH(). Don't use lh_first, le_next directly.
- Use pci_{read, write}_block instead of "switch(len) case [124]
  pci_{read, write}_{byte, word, long}():".

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoclean up piix3_reset() (no more need to set 0x61..0x63 in pci config)
Ian Jackson [Thu, 5 Feb 2009 14:50:07 +0000 (14:50 +0000)]
clean up piix3_reset() (no more need to set 0x61..0x63 in pci config)

Now #ifdef CONFIG_DM part become bogus because of
477afee37ca29e156e3309874d100de0bf4e6fd0.
So remove it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agofix PCI ROM handling problem in passthrough
Ian Jackson [Thu, 5 Feb 2009 14:48:50 +0000 (14:48 +0000)]
fix PCI ROM handling problem in passthrough

The ROM BAR doesn't get updated after writing '1' to the
/sys/bus/pci/devices/.../rom which causes ROM mapping problem.

This fix makes the ROM enabling revert to old mechanism (write
ROM BAR directly).

Kouya, thank you for testing the fix!

Reported-by: Kouya Shimura <kouya@jp.fujitsu.com>
Tested-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Thu, 5 Feb 2009 14:48:10 +0000 (14:48 +0000)]
Merge branch 'master' of ../qemu-iwj

16 years agofix raw_aio_read/write error handling
Ian Jackson [Thu, 5 Feb 2009 14:45:25 +0000 (14:45 +0000)]
fix raw_aio_read/write error handling

Currently when qemu_paio_read or qemu_paio_write return an error we call
qemu_aio_release without removing the request from the list.
I know that in the current implementation qemu_paio_write/read don't return
any error, but still the behavior is wrong, especially considering
that the implementation of these two functions is likely to change in is
the future.
This patch fixes the problem adding a raw_aio_remove function that
removes the callback from the queue and also calls qemu_aio_release.
raw_aio_remove is called by raw_aio_read, raw_aio_write and
raw_aio_cancel.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Backported-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agotarget-ppc: add vrlogefp instruction
aurel32 [Thu, 5 Feb 2009 13:42:57 +0000 (13:42 +0000)]
target-ppc: add vrlogefp instruction

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6519 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agosoft-float: add float32_log2() and float64_log2()
aurel32 [Thu, 5 Feb 2009 13:42:47 +0000 (13:42 +0000)]
soft-float: add float32_log2() and float64_log2()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6518 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoProperly initialize len argument of sysctl and include stdio.h (perror)
malc [Wed, 4 Feb 2009 20:39:09 +0000 (20:39 +0000)]
Properly initialize len argument of sysctl and include stdio.h (perror)

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

16 years agotarget-ppc: fix previous commit
aurel32 [Wed, 4 Feb 2009 14:08:08 +0000 (14:08 +0000)]
target-ppc: fix previous commit

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6516 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: use the new float constants
aurel32 [Wed, 4 Feb 2009 13:52:39 +0000 (13:52 +0000)]
target-ppc: use the new float constants

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6515 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agosoftfloat: add a 1.0 constant for float32 and float64
aurel32 [Wed, 4 Feb 2009 13:52:27 +0000 (13:52 +0000)]
softfloat: add a 1.0 constant for float32 and float64

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6514 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd vcf{u,s}x instructions
aurel32 [Wed, 4 Feb 2009 13:52:17 +0000 (13:52 +0000)]
Add vcf{u,s}x instructions

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6513 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd vrfi{m,n,p,z} instructions
aurel32 [Wed, 4 Feb 2009 13:52:03 +0000 (13:52 +0000)]
Add vrfi{m,n,p,z} instructions

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6512 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd various NaN-handling macros
aurel32 [Wed, 4 Feb 2009 09:05:53 +0000 (09:05 +0000)]
Add various NaN-handling macros

These simplify the implementation of the floating-point Altivec
instructions and reduce clutter.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6511 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPartialy fix mmap at EOF for large pagesize targets in user-mode.
edgar_igl [Tue, 3 Feb 2009 23:06:34 +0000 (23:06 +0000)]
Partialy fix mmap at EOF for large pagesize targets in user-mode.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6510 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRemove accidental addition of local patch.
aliguori [Tue, 3 Feb 2009 22:45:00 +0000 (22:45 +0000)]
Remove accidental addition of local patch.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6509 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMake mtvscr use a helper
aurel32 [Tue, 3 Feb 2009 19:56:09 +0000 (19:56 +0000)]
Make mtvscr use a helper

Do this so we can set float statuses once per mtvscr, rather than once
per Altivec instruction.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6508 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd calls to initialize VSCR on appropriate machines
aurel32 [Tue, 3 Feb 2009 19:55:59 +0000 (19:55 +0000)]
Add calls to initialize VSCR on appropriate machines

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6507 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRename spe_status to vec_status
aurel32 [Tue, 3 Feb 2009 19:55:51 +0000 (19:55 +0000)]
Rename spe_status to vec_status

Only one of Altivec and SPE will be available on a given chip.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6506 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd f field to ppc_avr_t
aurel32 [Tue, 3 Feb 2009 19:55:43 +0000 (19:55 +0000)]
Add f field to ppc_avr_t

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6505 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: Fix warning when compiling sh7750_regnames.c
aurel32 [Tue, 3 Feb 2009 19:55:35 +0000 (19:55 +0000)]
SH4: Fix warning when compiling sh7750_regnames.c

This patch fixes a warning when compiling sh7750_regnames.c which is
caused by sh7750_regnames.h (which contains the prototype of regname())
not being included.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6504 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: Remove incorrect break;
aurel32 [Tue, 3 Feb 2009 19:55:26 +0000 (19:55 +0000)]
linux-user: Remove incorrect break;

Reported-By: Laurent Desnogues <laurent.desnogues@gmail.com>
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@6503 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix compilation of PPC64 targets with DEBUG_TCGV enabled
aurel32 [Tue, 3 Feb 2009 19:55:13 +0000 (19:55 +0000)]
Fix compilation of PPC64 targets with DEBUG_TCGV enabled

The attached patch fixes compilation of PPC64 targets with DEBUG_TCGV
enabled.

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6502 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd phenom CPU descriptor (Alexander Graf)
aliguori [Mon, 2 Feb 2009 17:10:57 +0000 (17:10 +0000)]
Add phenom CPU descriptor (Alexander Graf)

As part of my ongoing effort to make nested SVM useful, I started working to get
VMware ESX run inside KVM.

VMware couples itself pretty tightly to the CPUID, so it's a good idea to emulate
a machine that officially supports SVM and should thus exploit the powers of
nested virtualization.

This patch adds a Phenom CPU identifier, that resembles a real-world phenom
CPU as closely as possible.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6501 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoImplement FFXSR (Alexander Graf)
aliguori [Mon, 2 Feb 2009 17:10:52 +0000 (17:10 +0000)]
Implement FFXSR (Alexander Graf)

Newer AMD CPUs have the FFXSR capability. This leaves out XMM
register in FXSAVE/FXRESTORE when in CPL=0 and 64-bit mode.

This is required for Hyper-V.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6500 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd zlib encoding support (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:54 +0000 (15:58 +0000)]
Add zlib encoding support (Alexander Graf)

This patch adds zlib encoding support for VNC. It basically runs
the raw traffic through zlib, providing a pretty good compression
ratio.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6499 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMove the framebuffer update package out (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:51 +0000 (15:58 +0000)]
Move the framebuffer update package out (Alexander Graf)

Currently the send_framebuffer_update_raw and send_framebuffer_update_hextile
respectively send a send_framebuffer_update packet themselves. We need to reuse
send_framebuffer_update_raw for zlib encoding though, so let's move it out.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6498 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMove buffer functions up (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:47 +0000 (15:58 +0000)]
Move buffer functions up (Alexander Graf)

We will need to use buffer functions in code that will end up being
below the current buffer functions. In order to not introduce any
function stub defines, let's just move them up.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6497 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd some tight awareness to vnc.c (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:43 +0000 (15:58 +0000)]
Add some tight awareness to vnc.c (Alexander Graf)

This patch enables the vnc server to understand fundamental tight extensions.
It changes from a "Hextile or not" scheme when sending framebuffer updates to
a "preferred encoding", namely the last one set.

While this is not perfect, as actually a list of "preferred encodings" should
be kept, it's good enough for now.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6496 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix invalid #if in vnc.c when debugging is enabled (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:38 +0000 (15:58 +0000)]
Fix invalid #if in vnc.c when debugging is enabled (Alexander Graf)

While running with debugging enabled, I found an #if testing for
an undefined value, not defined(value). This patch fixes that.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6495 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse VNC protocol defines (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:29 +0000 (15:58 +0000)]
Use VNC protocol defines (Alexander Graf)

Now that we have nice defines for all sorts of constants, let's
use them!

This patch also takes the "feature variables", currently called has_*
into a single feature int. This way adding new features is a lot
easier and doesn't clutter the VncState struct.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6494 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSplit VNC defines to vnc.h (Alexander Graf)
aliguori [Mon, 2 Feb 2009 15:58:25 +0000 (15:58 +0000)]
Split VNC defines to vnc.h (Alexander Graf)

The VNC protocol contains quite some constants, some of which are
currently hardcoded in the vnc.c code. This is not exactly pretty.

Let's move all those constants out to vnc.h, so they are clearly
separated. While at it, I also included other defines that will be
used later in this patch series.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6493 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoReplace noreturn with QEMU_NORETURN
malc [Sun, 1 Feb 2009 22:19:27 +0000 (22:19 +0000)]
Replace noreturn with QEMU_NORETURN

Thanks to Robert Riebisch for analysis [1]

[1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2

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

16 years agoAdd and use #defines for PCI device classes
blueswir1 [Sun, 1 Feb 2009 19:26:20 +0000 (19:26 +0000)]
Add and use #defines for PCI device classes

This patch adds and uses #defines for PCI device classes and subclases,
using a new pci_config_set_class() function, similar to the recently
added pci_config_set_vendor_id() and pci_config_set_device_id().

Change since v1: fixed compilation of hw/sun4u.c

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUpdate #defines for PCI vendor and device IDs from OpenBIOS and Linux
blueswir1 [Sun, 1 Feb 2009 12:01:04 +0000 (12:01 +0000)]
Update #defines for PCI vendor and device IDs from OpenBIOS and Linux

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

16 years agoPowerPC: IDE DB-DMA support
aurel32 [Fri, 30 Jan 2009 20:39:41 +0000 (20:39 +0000)]
PowerPC: IDE DB-DMA support

This patches allows powermac IDE interface to use DB-DMA.
This implementation uses only synchronous I/O.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6489 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPowerPC: mac-io DB-DMA support
aurel32 [Fri, 30 Jan 2009 20:39:32 +0000 (20:39 +0000)]
PowerPC: mac-io DB-DMA support

This patch adds powermac Descriptor-Based DMA.
It is used by mac-io based IDE, ethernet, sounds and serial devices.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6488 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agopl031: remove unused variable
aurel32 [Fri, 30 Jan 2009 20:15:41 +0000 (20:15 +0000)]
pl031: remove unused variable

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6487 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: fix signal.c warning
aurel32 [Fri, 30 Jan 2009 20:15:32 +0000 (20:15 +0000)]
linux-user: fix signal.c warning

This patch fixes:

linux-user/signal.c:1403: warning: no previous prototype for 'do_sigreturn_v1'
linux-user/signal.c:1473: warning: no previous prototype for 'do_sigreturn_v2'
linux-user/signal.c:1511: warning: no previous prototype for 'do_rt_sigreturn_v1'
linux-user/signal.c:1552: warning: no previous prototype for 'do_rt_sigreturn_v2'

by making the appropriate functions static.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6486 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: identify running binary in /proc/self/exe
aurel32 [Fri, 30 Jan 2009 20:09:01 +0000 (20:09 +0000)]
linux-user: identify running binary in /proc/self/exe

Some applications like to test /proc/self/exe to find
out who they are. Fake the result of readlink() for
them. Use realpath() to return full path to binary
(which the links /proc/self/exe are)

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@6485 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: Add generic env variable handling
aurel32 [Fri, 30 Jan 2009 19:59:17 +0000 (19:59 +0000)]
linux-user: Add generic env variable handling

Adds support for qemu to modify target process environment
variables using -E and -U commandline switches. This replaces
eventually the -drop-ld-preload flag.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6484 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: Fix struct target_stat64 for 32-bit host
aurel32 [Fri, 30 Jan 2009 19:48:32 +0000 (19:48 +0000)]
target-ppc: Fix struct target_stat64 for 32-bit host

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6483 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-sh4: Fix struct target_stat64 for 64-bit host
aurel32 [Fri, 30 Jan 2009 19:48:24 +0000 (19:48 +0000)]
target-sh4: Fix struct target_stat64 for 64-bit host

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6482 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinuw-user fix: read() and acct() on NULL arguments
aurel32 [Fri, 30 Jan 2009 19:48:17 +0000 (19:48 +0000)]
linuw-user fix: read() and acct() on NULL arguments

Returning efault in these cases is not correct. Originally
proposed by Thayne Harbaugh in 2007:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg14658.html

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@6481 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: don't crash with null name
aurel32 [Fri, 30 Jan 2009 19:48:07 +0000 (19:48 +0000)]
linux-user: don't crash with null name

From Thayne Harbaugh.

path() may be called with null string, don't bother trying to
remap in that case.

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@6480 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: return EINVAL on incorrect sockaddr
aurel32 [Fri, 30 Jan 2009 19:47:57 +0000 (19:47 +0000)]
linux-user: return EINVAL on incorrect sockaddr

From: Lauro Ramos Venancio <lauro.venancio@gmail.com>

Fixes ltp test accept01

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@6479 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: fix accept(2) with NULL peer
aurel32 [Fri, 30 Jan 2009 19:47:47 +0000 (19:47 +0000)]
linux-user: fix accept(2) with NULL peer

Based on scratchbox2 patch by Mika Westerberg

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@6478 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAllow usb tablet to be used with vmware-vga hwcursor.
balrog [Thu, 29 Jan 2009 23:29:52 +0000 (23:29 +0000)]
Allow usb tablet to be used with vmware-vga hwcursor.

Assume that in absolute mode the guest cursor always follows host cursor
and there's no need to move host cursor.  This avoids a strange feedback
loop.

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

16 years agoFix absolute mode mice.
balrog [Thu, 29 Jan 2009 23:19:20 +0000 (23:19 +0000)]
Fix absolute mode mice.

width and height were never set which means that host coordinates were
divided by -1 instead of (width - 1) / 0x7fff.

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

16 years agocheck SCSI read/write requests against max LBA (Rik van Riel)
aliguori [Thu, 29 Jan 2009 19:59:04 +0000 (19:59 +0000)]
check SCSI read/write requests against max LBA (Rik van Riel)

The bdrv layer uses a signed offset. Furthermore, block-raw-posix
only seeks when that offset is positive. Passing a negative offset
to block-raw-posix can result in data being written at the current
seek cursor's position.

It may be possible to exploit this to seek to the end of the disk
and extend the virtual disk by writing data to a negative sector
offset.  After a reboot, this could lead to the guest having a
larger disk than it had before.

Close the hole by sanity checking the lba against the size of the
disk.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6475 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix a typo in ext2_feature_name (Carl-Daniel Hailfinger)
aliguori [Thu, 29 Jan 2009 19:45:28 +0000 (19:45 +0000)]
Fix a typo in ext2_feature_name (Carl-Daniel Hailfinger)

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6474 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse new logging API in reset handling (Jan Kiszka)
aliguori [Thu, 29 Jan 2009 17:02:21 +0000 (17:02 +0000)]
Use new logging API in reset handling (Jan Kiszka)

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6473 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMTRR support on x86, part 2 (Carl-Daniel Hailfinger)
aliguori [Thu, 29 Jan 2009 17:02:17 +0000 (17:02 +0000)]
MTRR support on x86, part 2 (Carl-Daniel Hailfinger)

Load and save MTRR state together with machine state.

Add support for the MTRRcap MSR which is used by the latest Bochs BIOS
and some operating systems.

Fix a typo in ext2_feature_name.

With this patch, MTRR emulation should be good enough to not trigger any
sanity checks in well behaved BIOS/kernel code.
Some corner cases for BIOS/firmware usage remain to be implemented, but
that can be deferred to another patch.
Also, MTRR accesses on hardware not supporting MTRRs should cause #GP.
That can be enforced by another patch as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6472 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDon't notify virtio devices before S_DRIVER_OK (Mark McLoughlin)
aliguori [Thu, 29 Jan 2009 17:02:13 +0000 (17:02 +0000)]
Don't notify virtio devices before S_DRIVER_OK (Mark McLoughlin)

Current Linux guests oops if the host notifies of a
config change before a driver has been bound to the
device.

It's pretty pointless for us to do notify of config
changes before status is S_DRIVER_OK anyway, so let's
just not do it.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6471 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agofix raw_aio_read\write error handling (Stefano Stabellini)
aliguori [Thu, 29 Jan 2009 17:02:08 +0000 (17:02 +0000)]
fix raw_aio_read\write error handling (Stefano Stabellini)

Currently when qemu_paio_read or qemu_paio_write return an error we call
qemu_aio_release without removing the request from the list.
I know that in the current implementation qemu_paio_write\read don't return
any error, but still the behavior is wrong, especially considering
that the implementation of these two functions is likely to change in is
the future.
This patch fixes the problem adding a raw_aio_remove function that
removes the callback from the queue and also calls qemu_aio_release.
raw_aio_remove is called by raw_aio_read, raw_aio_write and
raw_aio_cancel.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6470 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSCSI divide capacity by s->cluster_size (Rik van Riel)
aliguori [Wed, 28 Jan 2009 21:58:29 +0000 (21:58 +0000)]
SCSI divide capacity by s->cluster_size (Rik van Riel)

Paul Brook pointed out that the number of sectors reported
by the SCSI read capacity commands needs to be divided by
s->cluster_size, because bdrv_get_geometry reports the number
of 512 byte sectors, while emulated CDROMs report 2048 byte
sectors back to the guest.

This has no consequences for emulated hard disks, which use
a cluster size of 1.

aliguori: fixed typo

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6469 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agosupport >2TB SCSI disks (Rik van Riel)
aliguori [Wed, 28 Jan 2009 21:58:25 +0000 (21:58 +0000)]
support >2TB SCSI disks (Rik van Riel)

Implement SCSI READ(16), WRITE(16) and SAI READ CAPACITY(16) commands,
so SCSI disks larger than 2TB can work with guests that support these
newer SCSI commands.

The cast to (uint64_t) is needed because otherwise gcc will use a
signed int, which gets sign extended into uint64_t lba, resulting
in bad block numbers for READ 10 and READ 16 with block numbers
larger than 2^31.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6468 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agofix signed/unsigned overflows in SCSI disk (Rik van Riel)
aliguori [Wed, 28 Jan 2009 21:58:22 +0000 (21:58 +0000)]
fix signed/unsigned overflows in SCSI disk (Rik van Riel)

Sector numbers can overflow on a virtual scsi disk of over 1TB
in size.  Qemu's bdrv_read expects an int64_t, so fix the overflow
by going to that data type.

On large disks, we clip the capacity to 2TB instead of returning
"capacity modulo 2TB".

Turn sector_count into an unsigned to prevent a signed/unsigned
overflow with SCSI transfers larger than 2TB.  We're unlikely to
ever hit this bug, but fixing it is just one line.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6467 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix qemu_malloc.
malc [Wed, 28 Jan 2009 17:16:56 +0000 (17:16 +0000)]
Fix qemu_malloc.

make {linux,bsd}-user qemu_realloc handle ptr == NULL correctly.
spotted by malc.

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

16 years agoMerge branch 'upstream' into qemu qemu
Ian Jackson [Wed, 28 Jan 2009 17:15:40 +0000 (17:15 +0000)]
Merge branch 'upstream' into qemu

Conflicts:

.gitignore
Makefile
audio/audio.c
block-qcow2.c
block-vvfat.c
block.c
cutils.c
dyngen.c
hw/ide.c
monitor.c
readline.c
target-ppc/translate_init.c
usb-linux.c
vl.c
vnc.c

16 years agoAdd Simba device ID
blueswir1 [Tue, 27 Jan 2009 19:15:31 +0000 (19:15 +0000)]
Add Simba device ID

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

16 years agoblock-vpc: Fix support for images > 4 GB (Kevin Wolf)
aliguori [Tue, 27 Jan 2009 14:29:15 +0000 (14:29 +0000)]
block-vpc: Fix support for images > 4 GB (Kevin Wolf)

This patch fixes the truncation of sector offsets to 32 bits.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6464 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRestore xenfb.h and atkbd_ translation tables for xenfbfront
Ian Jackson [Tue, 27 Jan 2009 12:06:19 +0000 (12:06 +0000)]
Restore xenfb.h and atkbd_ translation tables for xenfbfront

Commit ef21d5fda2be46163d9bc3f65d64a6bfd97dd06e removed xenfb.h but
this broke the stubdom build.  Necessary changes to get the build
working again:
  * un-#if-0 atkbd_set2_keycode and atkbd_unxlate_table in xenfb.c
  * make those two tables not `static'
  * restore xenfb.h, with their declarations
  * adjust the comment in the new xenfb.c

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoGet guest uuid from xenstore
Ian Jackson [Tue, 27 Jan 2009 11:39:10 +0000 (11:39 +0000)]
Get guest uuid from xenstore

xenstore_get_guess_uuid() retrieves the guest uuid by using a sysctl
hypercall through libxc now, but when we use the ioemu-stubdom, the
hcall is not allowed to be invoked.
This patch makes ioemu get the guest uuid from xenstore, instead of
using libxc.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoCRIS: Init the feedback shiftreg used for randomizing TLB sets.
edgar_igl [Mon, 26 Jan 2009 22:21:30 +0000 (22:21 +0000)]
CRIS: Init the feedback shiftreg used for randomizing TLB sets.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6463 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoETRAX: Remove display-state argument from board init.
edgar_igl [Mon, 26 Jan 2009 21:47:27 +0000 (21:47 +0000)]
ETRAX: Remove display-state argument from board init.

Apparently this board was forgotten in the display changes.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6462 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agokvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)
aliguori [Mon, 26 Jan 2009 20:32:22 +0000 (20:32 +0000)]
kvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)

It seems that the conversion of the kernel-delivered eflags state into
qemu's internal split representation was once needed in an older kvm
design (register read-back may have taken place from inside cpu_exec).
Today it is plain wrong and causes incorrect cpu state reporting (gdb,
monitor) and should also corrupt its saving (savevm, migration). Drop
the related lines.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6461 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCheck if the i8254 timer is active before deactivating it (Alexander Graf)
aliguori [Mon, 26 Jan 2009 20:32:18 +0000 (20:32 +0000)]
Check if the i8254 timer is active before deactivating it (Alexander Graf)

The HPET emulation can disable the i8254 when the HPET is
in legacy mode, thus emulating the i8254's behavior.

But if it does, the i8254 doesn't have to be running, so
let's check to see if the timer works and not disable it
if it's not.

This fixes a segmentation fault when running Mac OS X as
guest os.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6460 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-vpc: Create images (Kevin Wolf)
aliguori [Mon, 26 Jan 2009 20:27:06 +0000 (20:27 +0000)]
block-vpc: Create images (Kevin Wolf)

Add an implementation to create VHD images.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6459 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-vpc: Write support (Kevin Wolf)
aliguori [Mon, 26 Jan 2009 20:27:02 +0000 (20:27 +0000)]
block-vpc: Write support (Kevin Wolf)

Add write support for VHD images.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6458 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-vpc: Use the qemu block layer (Kevin Wolf)
aliguori [Mon, 26 Jan 2009 20:26:58 +0000 (20:26 +0000)]
block-vpc: Use the qemu block layer (Kevin Wolf)

Instead of accessing the file directly, use the qemu block layer.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6457 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-vpc: Fix disk size (Kevin Wolf)
aliguori [Mon, 26 Jan 2009 20:26:54 +0000 (20:26 +0000)]
block-vpc: Fix disk size (Kevin Wolf)

VirtualPC bases the virtual disk size on the geometry rather than on
the size stored in the header.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6456 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-vpc: Adapt header structures to official documentation (Kevin Wolf)
aliguori [Mon, 26 Jan 2009 20:26:49 +0000 (20:26 +0000)]
block-vpc: Adapt header structures to official documentation (Kevin Wolf)

The current definition of the VirtualPC headers is incomplete and partly
even wrong. This patch changes the header structs according to the
official VHD specification.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6455 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-vpc: Split up struct vpc_subheader (Kevin Wolf)
aliguori [Mon, 26 Jan 2009 20:26:46 +0000 (20:26 +0000)]
block-vpc: Split up struct vpc_subheader (Kevin Wolf)

struct vpc_subheader currently is a union of two completely different
data structures (the Hard Disk Footer and the Dynamic Disk Header).
That doesn't make too much sense, so split them up.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6454 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agox86: Issue reset on triple faults (Jan Kiszka)
aliguori [Mon, 26 Jan 2009 19:54:36 +0000 (19:54 +0000)]
x86: Issue reset on triple faults (Jan Kiszka)

As discussed a few times on this list: A triple fault causes a system
reset on x86, and some guests make use of this (e.g. 386BSD). To keep
the chance of tracing unexpected resets, log them if CPU_LOG_RESET is
set.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6453 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoLog reset events (Jan Kiszka)
aliguori [Mon, 26 Jan 2009 19:54:31 +0000 (19:54 +0000)]
Log reset events (Jan Kiszka)

Original idea&code by Kevin Wolf, split-up in two patches and added more
archs.

This patch introduces a flag to log CPU resets. Useful for tracing
unexpected resets (such as those triggered by x86 triple faults).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6452 c046a42c-6fe2-441c-8c8c-71466251a162