qemu
15 years agoUse the DMA api to map virtio elements.
aliguori [Sat, 28 Mar 2009 17:46:18 +0000 (17:46 +0000)]
Use the DMA api to map virtio elements.

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

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

15 years agovirtio-blk: use generic vectored I/O APIs (Christoph Hellwig)
aliguori [Sat, 28 Mar 2009 17:46:14 +0000 (17:46 +0000)]
virtio-blk: use generic vectored I/O APIs (Christoph Hellwig)

Use the generic bdrv_aio_readv/bdrv_aio_writev APIs instead of linearizing
buffers directly.  This enables using the future native preadv/pwritev
support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoadd qemu_iovec_init_external (Christoph Hellwig)
aliguori [Sat, 28 Mar 2009 17:46:10 +0000 (17:46 +0000)]
add qemu_iovec_init_external (Christoph Hellwig)

Allow to initialize a QEMUIOVector from an externally allocated iovec.
qiov->nalloc is initialized to -1 to indicate external storage for qiov->iov
and all functions dealing with memory management assert on the iovec beeing
an internally managed first.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoClean some PCI defines (Stefan Weil)
aliguori [Sat, 28 Mar 2009 17:29:07 +0000 (17:29 +0000)]
Clean some PCI defines (Stefan Weil)

this patch adds some more defines from linux/pci_regs.h to
hw/pci.h. There is now no longer a need to define them in
eepro100.c, so they were removed there.

Some defines from linux/pci_regs.h had similar, but not
the same defines in hw/pci.h (PCI_REVISION_ID / PCI_REVISION,
PCI_SUBSYSTEM_VENDOR_ID / PCI_SUBVENDOR_ID,
PCI_SUBSYSTEM_ID / PCI_SUBDEVICE_ID).

I suggest to use the "standard" from linux/pci_regs.h and
replace the "old" Qemu ones. To facilitate the migration,
my patch does not remove the old defines but marks them
as obsolete. After a migration to the "standard" defines,
pci.h could use linux/pci_regs.h which is far more complete.

The patch is needed for an updated maintainer version of
hw/eepro100.c which I'd like to see in Qemu stable.

 * Remove declarations already declared in header file from eepro100.c
 * Add missing declarations from pci_regs.h to pci.h
 * Mark "non-standard" declarations in pci.h as obsolete

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

15 years agoFix monitor command (screendump) (Stefan Weil)
aliguori [Sat, 28 Mar 2009 17:29:02 +0000 (17:29 +0000)]
Fix monitor command (screendump) (Stefan Weil)

starting with r6839, the monitor command 'screendump'
raises a nullpointer memory access which crashs Qemu.

Fix crash when calling screendump from monitor.

This was a regression introduced with r6839:
DisplayAllocator interface (Stefano Stabellini)

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

15 years agoRemove nodisk_ok machine feature (Jan Kiszka)
aliguori [Sat, 28 Mar 2009 17:28:58 +0000 (17:28 +0000)]
Remove nodisk_ok machine feature (Jan Kiszka)

All archs have some kind of firmware to load and can be fine with it
already. So there is not much use in enforcing the presence of a disk.
If the system setup requires one, the user will notice it anyway once
the firmware/bios fails to boot from it.

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

15 years agomusicpal: Fix regression caused by 6839 (Jan Kiszka)
aliguori [Sat, 28 Mar 2009 17:28:53 +0000 (17:28 +0000)]
musicpal: Fix regression caused by 6839 (Jan Kiszka)

Pass correct DisplayState field to is_surface_bgr().

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agogdbstub: Drop redundant memset after qemu_mallocz (Jan Kiszka)
aliguori [Sat, 28 Mar 2009 17:28:49 +0000 (17:28 +0000)]
gdbstub: Drop redundant memset after qemu_mallocz (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@6897 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoget roms more room. (Glauber Costa)
aliguori [Sat, 28 Mar 2009 17:28:45 +0000 (17:28 +0000)]
get roms more room. (Glauber Costa)

This patch increases by 50 % the size available for option roms.
The main motivator is that some roms grew bigger than the 64k we
currently allocate for them (Hey, it's 2009!)

One example is the gpxe project, that produces some roms with 69k,
70k, etc. The space proposed by this patch actually makes it as
big as 84k. Probably still a fit for some time.

But there is no free lunch. This space must come from somewhere,
and we take it from vga rom space. Currently, our vga roms are
around 35k in size. With this patch, option rom space will begin
just after vga ends, aligned to the next 2k boundary.

Technicaly, we could do the same with the uper space (the bios itself),
but since bochs bios is already 128 k in size, I don't see an
urgent need to do it.

[ fix case for vgabioses smaller than 30k, by Carl-Daniel Hailfinger ]

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agonew scsi-generic abstraction, use SG_IO (Christoph Hellwig)
aliguori [Sat, 28 Mar 2009 17:28:41 +0000 (17:28 +0000)]
new scsi-generic abstraction, use SG_IO (Christoph Hellwig)

Okay, I started looking into how to handle scsi-generic I/O in the
new world order.

I think the best is to use the SG_IO ioctl instead of the read/write
interface as that allows us to support scsi passthrough on disk/cdrom
devices, too.  See Hannes patch on the kvm list from August for an
example.

Now that we always do ioctls we don't need another abstraction than
bdrv_ioctl for the synchronous requests for now, and for asynchronous
requests I've added a aio_ioctl abstraction keeping it simple.

Long-term we might want to move the ops to a higher-level abstraction
and let the low-level code fill out the request header, but I'm lazy
enough to leave that to the people trying to support scsi-passthrough
on a non-Linux OS.

Tested lightly by issuing various sg_ commands from sg3-utils in a guest
to a host CDROM device.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoDocument sun ID PROM contents
blueswir1 [Sat, 28 Mar 2009 16:17:50 +0000 (16:17 +0000)]
Document sun ID PROM contents

Signed-off-by: Robert Reif <reif@earthlink.net>

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

15 years agoFix DMA API when handling an immediate error from block layer (Avi Kivity)
aliguori [Sat, 28 Mar 2009 16:11:25 +0000 (16:11 +0000)]
Fix DMA API when handling an immediate error from block layer (Avi Kivity)

The block layer may signal an immediate error on an asynchronous request
by returning NULL.  The DMA API did not handle this correctly, returning
an AIO request which would never complete (and which would crash if
cancelled).

Fix by detecting the failure and propagating it.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoFix vectored aio bounce handling immediate errors (Avi Kivity)
aliguori [Sat, 28 Mar 2009 16:11:20 +0000 (16:11 +0000)]
Fix vectored aio bounce handling immediate errors (Avi Kivity)

If a bounced vectored aio fails immediately (the inner aio submission
returning NULL) then the bounce handler erronously returns an aio
request which will never be completed (and which crashes when cancelled).

Fix by detecting that the inner request has failed and propagating the
error.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agohost_device_remove: remove incorrect check for device name (Eduardo Habkost)
aliguori [Sat, 28 Mar 2009 15:58:58 +0000 (15:58 +0000)]
host_device_remove: remove incorrect check for device name (Eduardo Habkost)

There is no need to check for valid prefixes on the the device name
when removing it. If the device name is found on the vlan client list,
it can be removed, regardless of the prefix used on its name.

To reproduce the bug, just run this on the monitor:

 (qemu) host_net_add user name=foobar
 (qemu) host_net_remove 0 foobar
 invalid host network device foobar
 (qemu)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoFreeBSD host physical cdrom fixes
blueswir1 [Sat, 28 Mar 2009 08:37:13 +0000 (08:37 +0000)]
FreeBSD host physical cdrom fixes

This improves physical cdrom support on FreeBSD hosts to be almost as
good as on Linux, with the only notable exception that you still need to
either have the guest itself eject the disc if you want to take it
out/change it, or do a change command in the monitor after taking out
a disc in case a guest cannot eject it itself - otherwise the guest may
continue using state (like size) of the old disc.

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

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

15 years agoFix warning in vl.c
blueswir1 [Sat, 28 Mar 2009 08:24:44 +0000 (08:24 +0000)]
Fix warning in vl.c

vl.c calls dma_helper_init, so it needs to include dma.h to get a
definition for it, otherwise we get compiler warnings like:

/home/hch/work/qemu/vl.c: In function 'main':
/home/hch/work/qemu/vl.c:5518: warning: implicit declaration of function 'dma_helper_init'

Signed-off-by: Christoph Hellwig <hch@lst.de>

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

15 years agoFix out of tree compilation
blueswir1 [Sat, 28 Mar 2009 08:14:42 +0000 (08:14 +0000)]
Fix out of tree compilation

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

15 years agoFix compile problems with r6884
blueswir1 [Sat, 28 Mar 2009 08:13:56 +0000 (08:13 +0000)]
Fix compile problems with r6884

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

15 years agoSyncing documentation vs. -help vs. qemu_options table
blueswir1 [Sat, 28 Mar 2009 06:44:27 +0000 (06:44 +0000)]
Syncing documentation vs. -help vs. qemu_options table

Try to keep documentation about command line switches, -help text and
qemu_options table synchronized.

In true Qemu tradition, an include file is generated from single .hx file
containing all relevant information in one place. The include file is
parsed once for getting the enums, another time for getopt tables and
hird time for help messages. Texi documentation for the options is
generated from the same .hx file.

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

15 years agoFix absolute mouse events generated by SDL frontend.
balrog [Sat, 21 Mar 2009 01:09:16 +0000 (01:09 +0000)]
Fix absolute mouse events generated by SDL frontend.

In r6839 ("DisplayAllocator interface") the "width" and "height" globals
stopped ever being assigned.  Note that last time absolute input stopped
working was for the same reason.

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

15 years agoMove block dma helpers aiocb to store dma state (Avi Kivity)
aliguori [Fri, 20 Mar 2009 18:26:16 +0000 (18:26 +0000)]
Move block dma helpers aiocb to store dma state (Avi Kivity)

Use the dedicated dma aiocb to store intermediate state for dma block
transactions.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoUse vectored aiocb storage to store vector translation state (Avi Kivity)
aliguori [Fri, 20 Mar 2009 18:26:12 +0000 (18:26 +0000)]
Use vectored aiocb storage to store vector translation state (Avi Kivity)

Now that we have a dedicated acb pool for vector translation acbs, we can
store the vector translation state in the acbs instead of in an external
structure.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoImplement cancellation method for dma async I/O (Avi Kivity)
aliguori [Fri, 20 Mar 2009 18:26:07 +0000 (18:26 +0000)]
Implement cancellation method for dma async I/O (Avi Kivity)

Move the dma helpers to a private aio pool, and implement a cancellation
method for them.  Should prevent issues when cancelling I/O while dma is
in progress.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoConvert vectored aio emulation to use a dedicated pool (Avi Kivity)
aliguori [Fri, 20 Mar 2009 18:26:03 +0000 (18:26 +0000)]
Convert vectored aio emulation to use a dedicated pool (Avi Kivity)

This allows us to remove a hack in the vectored aio cancellation code.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoRefactor aio callback allocation to use an aiocb pool (Avi Kivity)
aliguori [Fri, 20 Mar 2009 18:25:59 +0000 (18:25 +0000)]
Refactor aio callback allocation to use an aiocb pool (Avi Kivity)

Move the AIOCB allocation code to use a dedicate structure, AIOPool.  AIOCB
specific information, such as the AIOCB size and cancellation routine, is
moved into the pool.

At present, there is exactly one pool per block format driver, maintaining
the status quo.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agovirtio: Allow guest to defer VIRTIO_F_NOTIFY_ON_EMPTY (Alex Williamson)
aliguori [Fri, 20 Mar 2009 16:13:50 +0000 (16:13 +0000)]
virtio: Allow guest to defer VIRTIO_F_NOTIFY_ON_EMPTY (Alex Williamson)

There may be cases where the guest does not want the avail queue
interrupt, even when it's empty.  For the virtio-net case, the
guest may use a different buffering scheme or decide polling for
used buffers is more efficient.  This can be accomplished by simply
checking for whether the guest has acknowledged the existing notify
on empty flag.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoe1000: Fix RX descriptor low threshold interrupt logic (Alex Williamson)
aliguori [Fri, 20 Mar 2009 16:13:47 +0000 (16:13 +0000)]
e1000: Fix RX descriptor low threshold interrupt logic (Alex Williamson)

The RXDMT0 interrupt is supposed to fire when the number of free
RX descriptors drops to some fraction of the total descriptors.
However in practice, it seems like we're adding this interrupt
cause on every RX.  Fix the logic to treat (tail - head) as the
number of free entries rather than the number of used entries.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agox86: Add NULL check to lsl (Jan Kiszka)
aliguori [Fri, 20 Mar 2009 16:13:41 +0000 (16:13 +0000)]
x86: Add NULL check to lsl (Jan Kiszka)

According to the Intel specs, lsl performs a check against NULL for the
provided selector, just like lar does. helper_lar() includes the
corresponding code, helper_lsl() was lacking it so far.

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

15 years agovnc: throttle screen updates. (Gerd Hoffmann)
aliguori [Fri, 20 Mar 2009 15:59:24 +0000 (15:59 +0000)]
vnc: throttle screen updates. (Gerd Hoffmann)

This patch makes the vnc server code skip screen refreshes in case
there is data in the output buffer.  This reduces the refresh rate to
throttle the bandwidth needed in case the network link is saturated.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agovnc: fix printf warnings showing up with VNC_DEBUG enabled. (Gerd Hoffmann)
aliguori [Fri, 20 Mar 2009 15:59:18 +0000 (15:59 +0000)]
vnc: fix printf warnings showing up with VNC_DEBUG enabled. (Gerd Hoffmann)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agovnc: cleanup surface handling, fix screen corruption bug. (Gerd Hoffmann)
aliguori [Fri, 20 Mar 2009 15:59:14 +0000 (15:59 +0000)]
vnc: cleanup surface handling, fix screen corruption bug. (Gerd Hoffmann)

This patch killes the old_data hack in the qemu server and replaces
it with a clean separation of the guest-visible display surface and
the vnc server display surface.  Both guest and server surface have
their own dirty bitmap for tracking screen updates.

Workflow is this:

(1) The guest writes to the guest surface.  With shared buffers being
    active the guest writes are directly visible to the vnc server code.
    Note that this may happen in parallel to the vnc server code running
    (today only in xenfb, once we have vcpu threads in qemu also for
    other display adapters).

(2) vnc_update() callback tags the specified area in the guest dirty
    map.

(3) vnc_update_client() will first walk through the guest dirty map.  It
    will compare guest and server surface for all regions tagged dirty
    and in case the screen content really did change the server surface
    and dirty map are updated.
    Note: old code used old_data in a simliar way, so this does *not*
    introduce an extra memcpy.

(4) Then vnc_update_cient() will send the updates to the vnc client
    using the server surface and dirty map.
    Note: old code used the guest-visible surface instead, causing
    screen corruption in case of guest screen updates running in
    parallel.

The separate dirty bitmap also has the nice effect that forced screen
updates can be done cleanly by simply tagging the area in both guest and
server dirty map.  The old, hackish way was memset(old_data, 42, size)
to trick the code checking for screen changes.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoRemove dead code
malc [Thu, 19 Mar 2009 02:14:10 +0000 (02:14 +0000)]
Remove dead code

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

15 years agoFix VGA issue introduced by r6349
malc [Tue, 17 Mar 2009 16:05:50 +0000 (16:05 +0000)]
Fix VGA issue introduced by r6349

Thanks to Robert Riebisch for bisection

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

15 years agoFix ARM quadword VDUP (core register).
pbrook [Tue, 17 Mar 2009 12:19:58 +0000 (12:19 +0000)]
Fix ARM quadword VDUP (core register).

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

15 years agoDelete some unused macros detected with -Wp,-Wunused-macros use
blueswir1 [Mon, 16 Mar 2009 16:33:01 +0000 (16:33 +0000)]
Delete some unused macros detected with -Wp,-Wunused-macros use

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

15 years agoMake the ELF loader aware of backwards compatibility
blueswir1 [Fri, 13 Mar 2009 21:16:24 +0000 (21:16 +0000)]
Make the ELF loader aware of backwards compatibility

Most 64 bit architectures I'm aware of support running 32 bit code
of the same architecture as well.

So x86_64 can run i386 code easily and ppc64 can run ppc code.

Unfortunately, the current checks are pretty strict. So you can only
load e.g. an x86_64 elf binary on qemu-system-x86_64, but no i386 one.

This can get really annoying. I first encountered this issue with
my multiboot patch, where qemu-system-x86_64 was unable to load an
i386 elf binary because the elf loader rejected it.

The same thing happened again on PPC64 now. The firmware we're loading
is a PPC32 elf binary, as it's shared with PPC32. But the platform is
PPC64.

Right now there is a hack for this in the ppc cpu.h definition, that
simply sets the type to PPC32 in system emulation mode. While that
works fine for the firmware, it's no good if you also want to load a
PPC64 kernel with -kernel.

So in order to solve this mess, I figured the easiest way is to make
the elf loader aware of platforms that are backwards compatible. For
now I was only sure that x86_64 does i386 and ppc64 does ppc32, but
maybe there are other combinations too.

This patch is a prerequisite for having a working -kernel option on
PPC64.

Signed-off-by: Alexander Graf <alex@csgraf.de>

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

15 years agotemporarily disable logging around pci config writes (Avi Kivity)
aliguori [Fri, 13 Mar 2009 18:10:13 +0000 (18:10 +0000)]
temporarily disable logging around pci config writes (Avi Kivity)

A pci config write may remap the vga linear frame buffer, confusing the
memory slot dirty logging logic.

Fixed Windows with -vga std.

Signed-off-by: Avi Kivity <avi@redhat.com>
Sigend-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agostop dirty logging while updating cirrus bank memory (Glauber Costa)
aliguori [Fri, 13 Mar 2009 18:09:59 +0000 (18:09 +0000)]
stop dirty logging while updating cirrus bank memory (Glauber Costa)

Otherwise, slot tracking gets confused.

This fixes a screen corruption bug with Ubuntu guest installation.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoAdd missing file
aliguori [Fri, 13 Mar 2009 16:27:31 +0000 (16:27 +0000)]
Add missing file

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

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

15 years agoUpdate changelog
aliguori [Fri, 13 Mar 2009 16:22:41 +0000 (16:22 +0000)]
Update changelog

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

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

15 years agoqemu:virtio-net: Check return size on the correct sg list (Alex Williamson)
aliguori [Fri, 13 Mar 2009 15:04:02 +0000 (15:04 +0000)]
qemu:virtio-net: Check return size on the correct sg list (Alex Williamson)

When checking that the size of the control virtqueue return field
is sufficient, use the correct sg list.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agomake qemu_announce_self handle non contiguous net tables (Marcelo Tosatti)
aliguori [Fri, 13 Mar 2009 15:03:58 +0000 (15:03 +0000)]
make qemu_announce_self handle non contiguous net tables (Marcelo Tosatti)

With hotplug nd_table might contain holes.

Noticed by Eduardo Habkost.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoReplace asprintf() with snprintf() in vnc.c ("Daniel P. Berrange")
aliguori [Fri, 13 Mar 2009 15:03:27 +0000 (15:03 +0000)]
Replace asprintf() with snprintf() in vnc.c ("Daniel P. Berrange")

As previously discussed, this patch removes the non-portable use of
asprintf(), replacing it with malloc+snprintf instead

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agomonitor: Provide empty command as final history entry (Jan Kiszka)
aliguori [Fri, 13 Mar 2009 15:02:28 +0000 (15:02 +0000)]
monitor: Provide empty command as final history entry (Jan Kiszka)

Provide an empty line as last entry in command line history, just like
bash e.g. does.

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

15 years agoAdd and use remaining #defines for PCI device IDs (Stuart Brady)
aliguori [Fri, 13 Mar 2009 15:02:23 +0000 (15:02 +0000)]
Add and use remaining #defines for PCI device IDs (Stuart Brady)

This patch adds and uses #defines for the remaining hardcoded PCI
device IDs.  It also moves definitions taken from linux/pci_ids.h
into a separate header (hw/pci_ids.h), removes the 'RTL' from
PCI_DEVICE_ID_REALTEK_RTL8029, and renames PCI_DEVICE_ID_FSL_E500
to PCI_DEVICE_ID_MPC8533E to match Linux's definition.

Changes in v2:
 * Don't use C99-style comments
 * Move definitions from linux/pci_ids.h into a separate header
 * Rename PCI_DEVICE_ID_FSL_E500 to PCI_DEVICE_ID_MPC8533E

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoremove is_graphic_console from vga.c (Stefano Stabellini)
aliguori [Fri, 13 Mar 2009 15:02:18 +0000 (15:02 +0000)]
remove is_graphic_console from vga.c (Stefano Stabellini)

Hi all,
since vga_draw_graphic is only called by vga_hw_update when the console
associated with the graphic card is active, we don't need to check if
the current console is active using is_graphic_console.

I suspect I introduced these checks when the console switching mechanism
didn't work as it does now.

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

15 years agoDisplayAllocator interface (Stefano Stabellini)
aliguori [Fri, 13 Mar 2009 15:02:13 +0000 (15:02 +0000)]
DisplayAllocator interface (Stefano Stabellini)

Hi all,
this patch adds a DisplayAllocator interface that allows display
frontends (sdl in particular) to provide a preallocated display buffer
for the graphical backend to use.

Whenever a graphical backend cannot use
qemu_create_displaysurface_from because its own internal pixel format
cannot be exported directly (text mode or graphical mode with color
depth 8 or 24), it creates another display buffer in memory using
qemu_create_displaysurface and does the conversion.
This new buffer needs to be blitted into the sdl surface buffer every time
we need to update portions of the screen.
We can avoid this using the DisplayAllocator interace: sdl provides its
own implementation of qemu_create_displaysurface, giving back the sdl
surface buffer directly (as we used to do before the DisplayState
changes).
Since the buffer returned by sdl could be in bgr format we need to put
back in the handlers of that case.

This approach is good if the two following conditions are true:

1) the sdl surface is a software surface that resides in main memory;

2) the host display color depth is either 16 or 32 bpp.

If first condition is false we can have bad performances using sdl
and vnc together.
If the second condition is false performances are certainly not going to
improve but they shouldn't get worse either.

The first condition is always true, at least on linux/X11 systems; but I
believe is true also on other platforms.
The second condition is true in the vast majority of the cases.

This patch should also have the good side effect of solving the sdl
2D slowness malc was reporting on MacOS, because SDL_BlitSurface is not
going to be called anymore when the guest is in text mode or 24bpp.
However the root problem is still present so I suspect we may
still see some slowness on MacOS when the guest is in 32 or 16 bpp.

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

15 years agotcg/x86_64: add bswap16_i{32,64} and bswap32_i64 ops
aurel32 [Fri, 13 Mar 2009 09:35:55 +0000 (09:35 +0000)]
tcg/x86_64: add bswap16_i{32,64} and bswap32_i64 ops

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

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

15 years agotcg/x86: add bswap16_i32 ops
aurel32 [Fri, 13 Mar 2009 09:35:49 +0000 (09:35 +0000)]
tcg/x86: add bswap16_i32 ops

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

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

15 years agotarget-i386: use the new bswap* TCG ops
aurel32 [Fri, 13 Mar 2009 09:35:41 +0000 (09:35 +0000)]
target-i386: use the new bswap* TCG ops

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

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

15 years agotarget-ppc: use the new bswap* TCG ops
aurel32 [Fri, 13 Mar 2009 09:35:34 +0000 (09:35 +0000)]
target-ppc: use the new bswap* TCG ops

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

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

15 years agotcg: update README wrt recent bswap changes
aurel32 [Fri, 13 Mar 2009 09:35:26 +0000 (09:35 +0000)]
tcg: update README wrt recent bswap changes

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

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

15 years agotcg: add _tl aliases to bswap16/32/64 TCG ops
aurel32 [Fri, 13 Mar 2009 09:35:19 +0000 (09:35 +0000)]
tcg: add _tl aliases to bswap16/32/64 TCG ops

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

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

15 years agotcg: add bswap16_i64 and bswap32_i64 TCG ops
aurel32 [Fri, 13 Mar 2009 09:35:12 +0000 (09:35 +0000)]
tcg: add bswap16_i64 and bswap32_i64 TCG ops

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

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

15 years agotcg: optimize tcg_gen_bswap16_i32
aurel32 [Fri, 13 Mar 2009 09:35:03 +0000 (09:35 +0000)]
tcg: optimize tcg_gen_bswap16_i32

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

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

15 years agotcg: allow bswap16_i32 to be implemented by TCG backends
aurel32 [Fri, 13 Mar 2009 09:34:56 +0000 (09:34 +0000)]
tcg: allow bswap16_i32 to be implemented by TCG backends

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

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

15 years agotcg: rename bswap_i32/i64 functions
aurel32 [Fri, 13 Mar 2009 09:34:48 +0000 (09:34 +0000)]
tcg: rename bswap_i32/i64 functions

Rename bswap_i32 into bswap32_i32 and bswap_i64 into bswap64_i64

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

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

15 years agoFix regression introduced by r6824
aliguori [Fri, 13 Mar 2009 03:12:03 +0000 (03:12 +0000)]
Fix regression introduced by r6824

The changes introduced by r6824 broke a subtle, and admittedly obscure, aspect
of the block API.  While bdrv_{pread,pwrite} return the number of bytes read
or written upon success, bdrv_{read,write} returns a zero upon success.

When using bdrv_pread for bdrv_read, special care must be taken to handle this
case.

This fixes certain guest images (notably linux-0.2 provided on the qemu
website).

Reported-by: malc <av1474@comtv.ru>
Reported-by: Herve Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoFrom 67e94ae77f8de4d5d822917f1723cefa7ebfb64d Mon Sep 17 00:00:00 2001
aliguori [Thu, 12 Mar 2009 20:25:12 +0000 (20:25 +0000)]
From 67e94ae77f8de4d5d822917f1723cefa7ebfb64d Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Tue, 3 Mar 2009 13:33:13 +0800
Subject: [PATCH] Split ioapic logic from the current apic.

Add a new ioapic.c to hold ioapic's logic, and also
make it work for ia64.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 Makefile.target |    2 +-
 hw/apic.c       |  237 +++----------------------------------------------
 hw/ioapic.c     |  263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/pc.h         |    5 +-
 4 files changed, 281 insertions(+), 226 deletions(-)
 create mode 100644 hw/ioapic.c

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

15 years agomonitor: sync from kvm state before generating output (Jan Kiszka)
aliguori [Thu, 12 Mar 2009 20:12:57 +0000 (20:12 +0000)]
monitor: sync from kvm state before generating output (Jan Kiszka)

Ported from the KVM tree: Synchronize the qemu cpu state with kvm's
before invoking various monitor info commands (like 'info registers').

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

15 years agoGuest debugging support for KVM (Jan Kiszka)
aliguori [Thu, 12 Mar 2009 20:12:48 +0000 (20:12 +0000)]
Guest debugging support for KVM (Jan Kiszka)

This is a backport of the guest debugging support for the KVM
accelerator that is now part of the KVM tree. It implements the reworked
KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
not yet part of any mainline kernel but will probably be 2.6.30 stuff.
So far supported is x86, but PPC is expected to catch up soon.

Core features are:
 - unlimited soft-breakpoints via code patching
 - hardware-assisted x86 breakpoints and watchpoints

Changes in this version:
 - use generic hook cpu_synchronize_state to transfer registers between
   user space and kvm
 - push kvm_sw_breakpoints into KVMState

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

15 years agoDrop internal bdrv_pread()/bdrv_pwrite() APIs (Avi Kivity)
aliguori [Thu, 12 Mar 2009 19:57:16 +0000 (19:57 +0000)]
Drop internal bdrv_pread()/bdrv_pwrite() APIs (Avi Kivity)

Now that scsi generic no longer uses bdrv_pread() and bdrv_pwrite(), we can
drop the corresponding internal APIs, which overlap bdrv_read()/bdrv_write()
and, being byte oriented, are unnatural for a block device.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoAdd internal scsi generic block API (Avi Kivity)
aliguori [Thu, 12 Mar 2009 19:57:12 +0000 (19:57 +0000)]
Add internal scsi generic block API (Avi Kivity)

Add an internal API for the generic block layer to send scsi generic commands
to block format driver.  This means block format drivers no longer need
to consider overloaded nb_sectors parameters.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoAdd specialized block driver scsi generic API (Avi Kivity)
aliguori [Thu, 12 Mar 2009 19:57:08 +0000 (19:57 +0000)]
Add specialized block driver scsi generic API (Avi Kivity)

When a scsi device is backed by a scsi generic device instead of an
ordinary host block device, the block API is abused in a couple of annoying
ways:

 - nb_sectors is negative, and specifies a byte count instead of a sector count
 - offset is ignored, since scsi-generic is essentially a packet protocol

This overloading makes hacking the block layer difficult.  Remove it by
introducing a new explicit API for scsi-generic devices.  The new API
is still backed by the old implementation, but at least the users are
insulated.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoRevert r6404
aliguori [Wed, 11 Mar 2009 20:05:37 +0000 (20:05 +0000)]
Revert r6404

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

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

15 years agoRevert r6405
aliguori [Wed, 11 Mar 2009 20:05:33 +0000 (20:05 +0000)]
Revert r6405

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

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

15 years agoRevert r6406
aliguori [Wed, 11 Mar 2009 20:05:29 +0000 (20:05 +0000)]
Revert r6406

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

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

15 years agoRevert r6407
aliguori [Wed, 11 Mar 2009 20:05:25 +0000 (20:05 +0000)]
Revert r6407

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

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

15 years agoRevert r6408
aliguori [Wed, 11 Mar 2009 20:05:20 +0000 (20:05 +0000)]
Revert r6408

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

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

15 years agotcg: move {not,neg}_i{32,64} definitions at the right place
aurel32 [Wed, 11 Mar 2009 11:00:49 +0000 (11:00 +0000)]
tcg: move {not,neg}_i{32,64} definitions at the right place

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

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

15 years agotcg: fix commit r6805
aurel32 [Wed, 11 Mar 2009 02:57:30 +0000 (02:57 +0000)]
tcg: fix commit r6805

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

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

15 years agoClean build: Add bt-host.h
aurel32 [Tue, 10 Mar 2009 21:43:35 +0000 (21:43 +0000)]
Clean build: Add bt-host.h

Silence compiler warning by providing proper CONFIG_BLUEZ-independent
header for the bt-host API.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agotcg-arm: fix qemu_ld64
aurel32 [Tue, 10 Mar 2009 21:43:25 +0000 (21:43 +0000)]
tcg-arm: fix qemu_ld64

Emulating fldl on arm doesn't seem to work too well. It's the way
qemu_ld64 is translated to arm instructions.

        tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
        tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);

Consider case where data_reg==0, data_reg2==1, and addr_reg==0. First load
overwrited addr_reg. So let's put an if (data_ref==addr_reg).

(Pablo Virolainen)

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

15 years agotcg: update TODO
aurel32 [Tue, 10 Mar 2009 19:37:56 +0000 (19:37 +0000)]
tcg: update TODO

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

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

15 years agotcg/x86: add not/neg/extu/bswap/rot i32 ops
aurel32 [Tue, 10 Mar 2009 19:37:46 +0000 (19:37 +0000)]
tcg/x86: add not/neg/extu/bswap/rot i32 ops

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

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

15 years agotcg: optimize logical operations
aurel32 [Tue, 10 Mar 2009 19:37:39 +0000 (19:37 +0000)]
tcg: optimize logical operations

Simplify nand/nor/eqv and move their optimizations to and/or/xor

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

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

15 years agotarget-ppc: fix commit r6789
aurel32 [Tue, 10 Mar 2009 19:37:28 +0000 (19:37 +0000)]
target-ppc: fix commit r6789

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

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

15 years agomusicpal: Reorganize IO memory handling (Jan Kiszka)
malc [Tue, 10 Mar 2009 19:25:13 +0000 (19:25 +0000)]
musicpal: Reorganize IO memory handling (Jan Kiszka)

The new MMIO interface requires non-overlapping slots. Reorganize the
musicpal accordingly, fixing a regression for the Ethernet emulation.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>

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

15 years agoFix tcg after commit 6800
aurel32 [Tue, 10 Mar 2009 10:29:45 +0000 (10:29 +0000)]
Fix tcg after commit 6800

The introduction of TCGV_EQUAL and not op is slightly broken.
The definition of DEBUG_TCGV shows that.

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agotarget-mips: use nor instead of or + not
aurel32 [Tue, 10 Mar 2009 09:03:18 +0000 (09:03 +0000)]
target-mips: use nor instead of or + not

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

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

15 years agotcg: use TCGV_EQUAL_I{32,64}
aurel32 [Tue, 10 Mar 2009 08:57:16 +0000 (08:57 +0000)]
tcg: use TCGV_EQUAL_I{32,64}

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

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

15 years agotcg: define TCGV_EQUAL_I{32,64}
aurel32 [Tue, 10 Mar 2009 08:56:30 +0000 (08:56 +0000)]
tcg: define TCGV_EQUAL_I{32,64}

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

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

15 years agotcg: optimize nor(X, Y, Y), used on PPC for not(X, Y)
aurel32 [Mon, 9 Mar 2009 22:35:22 +0000 (22:35 +0000)]
tcg: optimize nor(X, Y, Y), used on PPC for not(X, Y)

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

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

15 years agoImplement TCG not ops for x86-64
aurel32 [Mon, 9 Mar 2009 22:35:13 +0000 (22:35 +0000)]
Implement TCG not ops for x86-64

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

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

15 years agotcg: don't define TCG rotation ops if they are not supported
aurel32 [Mon, 9 Mar 2009 21:58:46 +0000 (21:58 +0000)]
tcg: don't define TCG rotation ops if they are not supported

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

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

15 years agoImplement TCG rotation ops for x86-64
aurel32 [Mon, 9 Mar 2009 18:50:53 +0000 (18:50 +0000)]
Implement TCG rotation ops for x86-64

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

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

15 years agotarget-mips: optimize mflo and mfhi
aurel32 [Mon, 9 Mar 2009 18:50:43 +0000 (18:50 +0000)]
target-mips: optimize mflo and mfhi

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

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

15 years agotarge-ppc: optimize mfcr and mtcrf
aurel32 [Mon, 9 Mar 2009 18:50:24 +0000 (18:50 +0000)]
targe-ppc: optimize mfcr and mtcrf

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

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

15 years agofread_targphys(): Do not cut off the tail.
blueswir1 [Mon, 9 Mar 2009 18:08:56 +0000 (18:08 +0000)]
fread_targphys(): Do not cut off the tail.

loader.c:fread_targphys() read file by 4096 byte chunks and store them to
memory. But did not store the last chunk if its size was not 4096.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>

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

15 years agoconfigure sensitive to user locale
blueswir1 [Mon, 9 Mar 2009 17:36:50 +0000 (17:36 +0000)]
configure sensitive to user locale

On German Fedora 9, no KVM errors are displayed.
This is because configure greps for "error:", which is locale-sensitive.

Use LANG=C for configure to find and display errors as expected.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>

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

15 years agotarget-ppc: free a tcg temp variable
aurel32 [Mon, 9 Mar 2009 06:27:24 +0000 (06:27 +0000)]
target-ppc: free a tcg temp variable

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

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

15 years agotarget-ppc: add support for reading/writing spefscr
aurel32 [Mon, 9 Mar 2009 06:27:14 +0000 (06:27 +0000)]
target-ppc: add support for reading/writing spefscr

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

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

15 years agoqemu-img: fix help message
aurel32 [Sun, 8 Mar 2009 19:49:51 +0000 (19:49 +0000)]
qemu-img: fix help message

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

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

15 years agoqemu-img: accept sizes with decimal values
aurel32 [Sun, 8 Mar 2009 19:49:44 +0000 (19:49 +0000)]
qemu-img: accept sizes with decimal values

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

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

15 years agoCall Perl directly instead of relying on shebang
blueswir1 [Sun, 8 Mar 2009 19:26:53 +0000 (19:26 +0000)]
Call Perl directly instead of relying on shebang

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

15 years agoMulti-key completion for sendkey
blueswir1 [Sun, 8 Mar 2009 17:42:02 +0000 (17:42 +0000)]
Multi-key completion for sendkey

Allow completion of concatenated key strings for the sendkey command.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

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

15 years agoFix windows build and clean up use of <windows.h>
aliguori [Sun, 8 Mar 2009 16:26:59 +0000 (16:26 +0000)]
Fix windows build and clean up use of <windows.h>

We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so
let's do it in OS_CFLAGS.

Then, we can pepper in windows.h includes where using #includes that require it.

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

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

15 years agoRename one more _BSD to HOST_BSD (spotted by Hasso Tepper)
blueswir1 [Sun, 8 Mar 2009 15:58:00 +0000 (15:58 +0000)]
Rename one more _BSD to HOST_BSD (spotted by Hasso Tepper)

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

15 years agoRemove unnecessary prefix on SDL_syswm.h. This fixes the build for certain
aliguori [Sun, 8 Mar 2009 15:04:07 +0000 (15:04 +0000)]
Remove unnecessary prefix on SDL_syswm.h.  This fixes the build for certain
installs of SDL.

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

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

15 years agoPrune unused TCG_AREGs
blueswir1 [Sun, 8 Mar 2009 14:45:45 +0000 (14:45 +0000)]
Prune unused TCG_AREGs

Remove definitions for TCG_AREGs corresponding to AREG definitions
removed in r6778.

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>

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