]> git.proxmox.com Git - qemu.git/log
qemu.git
15 years agoUpdate version for 0.10.3 release v0.10.3
Anthony Liguori [Fri, 1 May 2009 16:57:29 +0000 (11:57 -0500)]
Update version for 0.10.3 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 agoFix hw/acpi.c build w/ DEBUG enabled
Alex Williamson [Wed, 14 May 2008 16:38:46 +0000 (10:38 -0600)]
Fix hw/acpi.c build w/ DEBUG enabled

Trivial build warning/fixes when the local DEBUG define is enabled.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoMake sure not to fall through on error in loadvm
Anthony Liguori [Fri, 1 May 2009 14:36:03 +0000 (09:36 -0500)]
Make sure not to fall through on error in loadvm

This is from the KVM tree

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoPci nic: pci_register_device can fail
Chris Wright [Mon, 21 Apr 2008 23:02:48 +0000 (16:02 -0700)]
Pci nic: pci_register_device can fail

The pci_register_device() call in PCI nic initialization routines can
fail.  Handle this failure and propagate a meaningful error message to
the user instead of generating a SEGV.

Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoFix serial option with -drive
Anthony Liguori [Fri, 1 May 2009 14:26:16 +0000 (09:26 -0500)]
Fix serial option with -drive

This is from the KVM tree.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agosuport device driver initialization model
Glauber Costa [Thu, 23 Apr 2009 19:20:55 +0000 (15:20 -0400)]
suport device driver initialization model

According to PnP specification, Appendix B, Option ROMs
that support DDIM (device driver initialization model) should
have their memory space writeable.

KVM deviates from us here, by removing the IO_MEM_ROM flag,
to allow for PCI option ROMs (they require DDIM). However,
there's absolutely no reason we can't do the same.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Avoid COW if KVM MMU is asynchronous
Jan Kiszka [Sun, 26 Apr 2009 16:03:40 +0000 (18:03 +0200)]
kvm: Avoid COW if KVM MMU is asynchronous

Avi Kivity wrote:
> Suggest wrapping in a function and hiding it deep inside kvm-all.c.
>

Done in v2:

---------->

If the KVM MMU is asynchronous (kernel does not support MMU_NOTIFIER),
we have to avoid COW for the guest memory. Otherwise we risk serious
breakage when guest pages change there physical locations due to COW
after fork. Seen when forking smbd during runtime via -smb.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agovnc: windup keypad keys for qemu console emulation
Gerd Hoffmann [Tue, 28 Apr 2009 10:06:47 +0000 (12:06 +0200)]
vnc: windup keypad keys for qemu console emulation

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoblock-vpc: Don't silently create smaller image than requested (Kevin Wolf)
aliguori [Sat, 18 Apr 2009 15:39:10 +0000 (15:39 +0000)]
block-vpc: Don't silently create smaller image than requested (Kevin Wolf)

The algorithm from the VHD specification for CHS calculation silently limits
images to 127 GB which may confuse a user who requested a larger image. Better
output an error message and abort.

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

15 years agoRegenerate BIOS for stable branch
aliguori [Fri, 17 Apr 2009 21:12:04 +0000 (21:12 +0000)]
Regenerate BIOS for stable branch

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

15 years agoFix non-ACPI Timer Interrupt Routing (Beth Kon)
aliguori [Fri, 17 Apr 2009 21:09:14 +0000 (21:09 +0000)]
Fix non-ACPI Timer Interrupt Routing (Beth Kon)

Replicate ACPI irq0->inti2 override in mp table for non-acpi case.

v1 -> v2 adds comment suggested by Ryan.

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

15 years agohpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)
aliguori [Fri, 17 Apr 2009 21:05:45 +0000 (21:05 +0000)]
hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)

While Intel's spec is not that clear here, latest changes to Linux' HPET
code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
HPET_COUNTER when programming periodic mode") strongly suggest that
HPET_TN_SETVAL rather means: Set _both_ the comparator value and
register.

With this patch applied, I'm again able to boot 2.6.30-rc kernels as
they no longer panic like this (which was due to the comparator
register remaining 0):

ENABLING IO-APIC IRQs
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
..... failed :(.
Kernel panic - not syncing: IO-APIC + timer doesn't work! [...]

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/branches/stable_0_10@7171 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agokvm: Fix cpuid initialization (Jan Kiszka)
aliguori [Fri, 17 Apr 2009 21:05:41 +0000 (21:05 +0000)]
kvm: Fix cpuid initialization (Jan Kiszka)

Fix (more or less) spurious guest boot failures due to corrupted cpuid
states. The reason was insufficient initialization of cpuid entries
before passing them to the kernel.

At this chance also fix improper entry pointer progression and simplify
the code a bit.

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/branches/stable_0_10@7170 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2 corruption: Fix alloc_cluster_link_l2 (Kevin Wolf)
aliguori [Fri, 17 Apr 2009 20:44:41 +0000 (20:44 +0000)]
qcow2 corruption: Fix alloc_cluster_link_l2 (Kevin Wolf)

This patch fixes a qcow2 corruption bug introduced in SVN Rev 5861. L2 tables
are big endian, so entries must be converted before being passed to functions.

This bug is easy to trigger. The following script will create and destroy a
qcow2 image (the header is gone after three loop iterations):

    #!/bin/bash
    qemu-img create -f qcow2 test.qcow 1M
    for i in $(seq 1 10); do
    qemu-system-x86_64 -hda test.qcow -monitor stdio > /dev/null 2>&1 <<EOF
    savevm test-$i
    quit
    EOF
    done

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

15 years agoFree VLANClientState using qemu_free() (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:07:01 +0000 (18:07 +0000)]
Free VLANClientState using qemu_free() (Mark McLoughlin)

It's allocated using qemu_mallocz(), so ...

The name and model strings are strdup() allocated, so free()
is still appropriate for them.

Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
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/branches/stable_0_10@7161 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoIntroduce VLANClientState::cleanup() (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:56 +0000 (18:06 +0000)]
Introduce VLANClientState::cleanup() (Mark McLoughlin)

We're currently leaking memory and file descriptors on device
hot-unplug.

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/branches/stable_0_10@7160 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse NICInfo::model for eepro100 savevm ID string (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:50 +0000 (18:06 +0000)]
Use NICInfo::model for eepro100 savevm ID string (Mark McLoughlin)

NICInfo::model will always be identical to the device name strings
we're currently passing to nic_init(). Just re-use NICInfo::model.

This makes it clear why we use vc->model for unregister_savevm()
in a subsequent patch.

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/branches/stable_0_10@7159 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd unregister_savevm() (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:46 +0000 (18:06 +0000)]
Add unregister_savevm() (Mark McLoughlin)

Currently there's no way to unregister a savevm callback, so
e.g. if a NIC is hot-unplugged and a savevm is issued, we'll
segfault.

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/branches/stable_0_10@7158 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove NICInfo from e1000 and mipsnet state (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:42 +0000 (18:06 +0000)]
Remove NICInfo from e1000 and mipsnet state (Mark McLoughlin)

NICInfo isn't used after initialization, so remove it from the driver
state structures.

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/branches/stable_0_10@7157 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove some useless malloc() checking (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:38 +0000 (18:06 +0000)]
Remove some useless malloc() checking (Mark McLoughlin)

Now that we abort() on malloc, neither qemu_find_vlan() nor
net_tap_fd_init() can fail.

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/branches/stable_0_10@7156 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDon't fail PCI hotplug if no NIC model is supplied (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:34 +0000 (18:06 +0000)]
Don't fail PCI hotplug if no NIC model is supplied (Mark McLoughlin)

It's perfectly fine to not supply a NIC model when adding
a new NIC - we supply the default model to pci_nic_init()
and it uses that if one wasn't explicitly supplied.

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/branches/stable_0_10@7155 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix error handling in net_client_init() (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:31 +0000 (18:06 +0000)]
Fix error handling in net_client_init() (Mark McLoughlin)

We weren't freeing the name string everywhere.

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/branches/stable_0_10@7154 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agostruct iovec is now universally available (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:27 +0000 (18:06 +0000)]
struct iovec is now universally available (Mark McLoughlin)

struct iovec is now defined in qemu-common.h if needed, so we don't need
the tap code to handle !defined(HAVE_IOVEC).

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/branches/stable_0_10@7153 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove stray GSO code from virtio_net (Mark McLoughlin)
aliguori [Fri, 17 Apr 2009 18:06:24 +0000 (18:06 +0000)]
Remove stray GSO code from virtio_net (Mark McLoughlin)

Obviously merged from kvm-userspace accidentally.

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/branches/stable_0_10@7152 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRecognise evdev(xx)_aliases(yy) and xfree86(xx)_aliases(yy) as keymap names.
aliguori [Mon, 13 Apr 2009 13:29:40 +0000 (13:29 +0000)]
Recognise evdev(xx)_aliases(yy) and xfree86(xx)_aliases(yy) as keymap names.

Newer Xorg use these with non-default kemaps (such as the ThinkPad keymap).

aliguori: this is from r7097 in trunk by balrog

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

15 years agoMake PCI config status register read-only
aliguori [Fri, 10 Apr 2009 20:49:44 +0000 (20:49 +0000)]
Make PCI config status register read-only

From the documentation I can find, this register is supposed to be read-only.

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

15 years agoFix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)
aliguori [Fri, 10 Apr 2009 18:36:38 +0000 (18:36 +0000)]
Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)

The vga screen dump function updates last_width and last_height,
but does not change the DisplaySurface that these variables describe.
A consequent vga_draw_graphic() will therefore fail to resize the
surface and crash.

Fix by invalidating the display state after a screen dump, forcing
vga_draw_graphic() to reallocate the DisplaySurface.

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/branches/stable_0_10@7069 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUpdate version for release
aliguori [Tue, 7 Apr 2009 01:57:17 +0000 (01:57 +0000)]
Update version for release

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

15 years agoFix find_device_type() to correctly identify floppy disk devices; (Luca Tettamanti)
aliguori [Tue, 7 Apr 2009 01:46:18 +0000 (01:46 +0000)]
Fix find_device_type() to correctly identify floppy disk devices; (Luca Tettamanti)
they are reported as DRIVE_REMOVABLE by win32.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@7011 c046a42c-6fe2-441c-8c8c-71466251a162

15 years ago Fix savevm after BDRV_FILE size enforcement
aliguori [Sun, 5 Apr 2009 21:07:26 +0000 (21:07 +0000)]
 Fix savevm after BDRV_FILE size enforcement

 We now enforce that you cannot write beyond the end of a non-growable file.
 qcow2 files are not growable but we rely on them being growable to do
 savevm/loadvm.  Temporarily allow them to be growable by introducing a new
 API specifically for savevm read/write operations.

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

15 years agostop dirty tracking just at the end of migration (Glauber Costa)
aliguori [Sun, 5 Apr 2009 19:33:41 +0000 (19:33 +0000)]
stop dirty tracking just at the end of migration (Glauber Costa)

If there is still work to do, it is not safe to assume we
can end the dirty tracking. Specifically, kvm can update the dirty
tracking log inside ram_save_block(), leaving pages still out of sync
if we go with the current code.

Based on a patch by Yaniv Kamay

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/branches/stable_0_10@7002 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agocreate qemu_file_set_error (Glauber Costa)
aliguori [Sun, 5 Apr 2009 19:33:37 +0000 (19:33 +0000)]
create qemu_file_set_error (Glauber Costa)

This is mainly for consistency, since we don't want
anything outside of savevm setting it explicitly. There
are current no users of that in qemu tree, but there
are potential candidates on kvm-userspace. And avi
is a nice guy, let's be nice with him.

Based on a patch by Yaniv Kamay

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/branches/stable_0_10@7001 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agopropagate error on failed completion (Glauber Costa)
aliguori [Sun, 5 Apr 2009 19:33:33 +0000 (19:33 +0000)]
propagate error on failed completion (Glauber Costa)

migrate_fd_put_ready() calls qemu_savevm_state_complete(),
but the later can fail.

If it happens, re-start the vm and propagate the error up

Based on a patch by Yaniv Kamay

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/branches/stable_0_10@7000 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2: fix image creation for large, > ~2TB, images (Chris Wright)
aliguori [Sun, 5 Apr 2009 18:16:10 +0000 (18:16 +0000)]
qcow2: fix image creation for large, > ~2TB, images (Chris Wright)

When creating large disk images w/ qcow2 format, qcow2_create is hard
coded to creating a single refcount block.  This is insufficient for
large images, and will cause qemu-img to segfault as it walks off the
end of the refcount block.  Keep track of the space needed during image
create and create proper number of refcount blocks accordingly.

https://bugzilla.redhat.com/show_bug.cgi?id=491943

Signed-off-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@6988 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agopci_add storage: fix error handling for 'if' parameter (Eduardo Habkost)
aliguori [Sun, 5 Apr 2009 18:16:04 +0000 (18:16 +0000)]
pci_add storage: fix error handling for 'if' parameter (Eduardo Habkost)

This fixes:

 - The error message to show the actual if= argument value. It was showing
   the filename instead, because 'buf' is reaused on the filename parsing.
 - A bug that makes a block device to be created even when an unsupported if= arg
   is passed to pci_add.

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/branches/stable_0_10@6987 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix (at least one cause of) qcow2 corruption. (Nolan Leake)
aliguori [Sun, 5 Apr 2009 18:15:59 +0000 (18:15 +0000)]
Fix (at least one cause of) qcow2 corruption. (Nolan Leake)

qcow2's get_cluster_offset() scans forward in the l2 table to find other
clusters that have the same allocation status as the first cluster.
This is used by (among others) qcow_is_allocated().

Unfortunately, it was not checking to be sure that it didn't fall off
the end of the l2 table.  This patch adds that check.

The symptom that motivated me to look into this was that
bdrv_is_allocated() was returning false when there was in fact data
there.  This is one of many ways this bug could lead to data corruption.

I checked the other place that scans for consecutive unallocated blocks
(alloc_cluster_offset()) and it appears to be OK:
    nb_clusters = MIN(nb_clusters, s->l2_size - l2_index);
appears to prevent the same problem from occurring.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@6986 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix oops on 2.6.25 guest (Rusty Russell)
aliguori [Sun, 5 Apr 2009 18:15:54 +0000 (18:15 +0000)]
Fix oops on 2.6.25 guest (Rusty Russell)

I believe this is behind the following:
https://bugs.edge.launchpad.net/ubuntu/jaunty/+source/linux/+bug/331128

virtio_pci in 2.6.25 didn't do feature negotiation correctly: it acked every
bit.  Fortunately, we can detect this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@6985 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoSH4: Add support for kernel cmdline
aurel32 [Tue, 31 Mar 2009 05:55:16 +0000 (05:55 +0000)]
SH4: Add support for kernel cmdline

Backport of revisions 6792, 6916, 6919 from trunk.

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

15 years agochar: Fix closing of various char devices (Jan Kiszka)
aliguori [Sat, 28 Mar 2009 18:01:29 +0000 (18:01 +0000)]
char: Fix closing of various char devices (Jan Kiszka)

This patch fixes several issues around closing char devices. Affected
were pty (timer was left behind, even running), udp (no close handling
at all) and tcp (missing async IO handler cleanup). The bugs either
caused segfaults or stalled the qemu process. So far, hot-unplugging USB
serial adapters suffered from this.

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/branches/stable_0_10@6912 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohost_device_remove: remove incorrect check for device name (Eduardo Habkost)
aliguori [Sat, 28 Mar 2009 15:51:46 +0000 (15:51 +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/branches/stable_0_10@6890 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoEnable -k option on Win32 (Herve Poussineau)
aliguori [Sat, 28 Mar 2009 15:46:15 +0000 (15:46 +0000)]
Enable -k option on Win32 (Herve Poussineau)

Attached patch enables -k option on Win32. There is no reason to disable it.

Signed-off-by: Herve Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@6889 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoconfigure sensitive to user locale (Andreas Faerber)
aliguori [Sun, 22 Mar 2009 03:01:39 +0000 (03:01 +0000)]
configure sensitive to user locale (Andreas Faerber)

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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@6883 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix VGA issue introduced by r6349 (malc)
aliguori [Sun, 22 Mar 2009 02:59:21 +0000 (02:59 +0000)]
Fix VGA issue introduced by r6349 (malc)

Thanks to Robert Riebisch for bisection

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

15 years agoUpdate version for release
aliguori [Sat, 21 Mar 2009 23:02:41 +0000 (23:02 +0000)]
Update version for release

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

15 years agoRename stable branch
aliguori [Sat, 21 Mar 2009 23:00:32 +0000 (23:00 +0000)]
Rename stable branch

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

15 years agoRestore old stable branch
aliguori [Sat, 21 Mar 2009 22:59:47 +0000 (22:59 +0000)]
Restore old stable branch

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

15 years agoAdd release_0_10_1 tag
aliguori [Sat, 21 Mar 2009 22:34:21 +0000 (22:34 +0000)]
Add release_0_10_1 tag

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

15 years agoUpdate Changelog
aliguori [Fri, 20 Mar 2009 16:22:31 +0000 (16:22 +0000)]
Update Changelog

git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6869 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:18:45 +0000 (16:18 +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/branches/stable_0_10_0@6868 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoe1000: Fix RX descriptor low threshold interrupt logic (Alex Williamson)
aliguori [Fri, 20 Mar 2009 16:18:39 +0000 (16:18 +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/branches/stable_0_10_0@6867 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agox86: Add NULL check to lsl (Jan Kiszka)
aliguori [Fri, 20 Mar 2009 16:18:35 +0000 (16:18 +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/branches/stable_0_10_0@6866 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotemporarily disable logging around pci config writes (Avi Kivity)
aliguori [Fri, 13 Mar 2009 18:11:21 +0000 (18:11 +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/branches/stable_0_10_0@6854 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agostop dirty logging while updating cirrus bank memory (Glauber Costa)
aliguori [Fri, 13 Mar 2009 18:11:17 +0000 (18:11 +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/branches/stable_0_10_0@6853 c046a42c-6fe2-441c-8c8c-71466251a162

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

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6848 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 16:19:04 +0000 (16:19 +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/branches/stable_0_10_0@6847 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomake qemu_announce_self handle non contiguous net tables (Marcelo Tosatti)
aliguori [Fri, 13 Mar 2009 16:18:57 +0000 (16:18 +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/branches/stable_0_10_0@6846 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6404
aliguori [Wed, 11 Mar 2009 20:16:16 +0000 (20:16 +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/branches/stable_0_10_0@6821 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6405
aliguori [Wed, 11 Mar 2009 20:16:12 +0000 (20:16 +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/branches/stable_0_10_0@6820 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6406
aliguori [Wed, 11 Mar 2009 20:16:05 +0000 (20:16 +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/branches/stable_0_10_0@6819 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6407
aliguori [Wed, 11 Mar 2009 20:16:01 +0000 (20:16 +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/branches/stable_0_10_0@6818 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6408
aliguori [Wed, 11 Mar 2009 20:15:55 +0000 (20:15 +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/branches/stable_0_10_0@6817 c046a42c-6fe2-441c-8c8c-71466251a162

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

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6788 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:13 +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/branches/stable_0_10_0@6781 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoClear CPU_INTERRUPT_EXIT on VM load
aurel32 [Sat, 7 Mar 2009 21:08:39 +0000 (21:08 +0000)]
Clear CPU_INTERRUPT_EXIT on VM load

CPU_INTERRUPT_EXIT is not set anymore in env->interrupt_request since
revision 6729. Make sure the bit is cleared on VM load.

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

15 years agoFix race condition on access to env->interrupt_request
aurel32 [Fri, 6 Mar 2009 21:49:37 +0000 (21:49 +0000)]
Fix race condition on access to env->interrupt_request

env->interrupt_request is accessed as the bit level from both main code
and signal handler, making a race condition possible even on CISC CPU.
This causes freeze of QEMU under high load when running the dyntick
clock.

The patch below move the bit corresponding to CPU_INTERRUPT_EXIT in a
separate variable, declared as volatile sig_atomic_t, so it should be
work even on RISC CPU.

We may want to move the cpu_interrupt(env, CPU_INTERRUPT_EXIT) case in
its own function and get rid of CPU_INTERRUPT_EXIT. That can be done
later, I wanted to keep the patch short for easier review.

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

15 years agomonitor: Rework early disk password inquiry (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:40 +0000 (19:42 +0000)]
monitor: Rework early disk password inquiry (Jan Kiszka)

Reading the passwords for encrypted hard disks during early startup is
broken (I guess for quiet a while now):
 - No monitor terminal is ready for input at this point
 - Forcing all mux'ed terminals into monitor mode can confuse other
   users of that channels

To overcome these issues and to lay the ground for a clean decoupling of
monitor terminals, this patch changes the initial password inquiry as
follows:
 - Prevent autostart if there is some encrypted disk
 - Once the user tries to resume the VM, prompt for all missing
   passwords
 - Only resume if all passwords were accepted

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/branches/stable_0_10_0@6699 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomonitor: Report encrypted disks in snapshot mode (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:36 +0000 (19:42 +0000)]
monitor: Report encrypted disks in snapshot mode (Jan Kiszka)

If the backing file is encrypted, 'info block' currently does not report
the disk as encrypted. Fix this by using the standard API to check disk
encryption mode. Moreover, switch to a canonical output format.

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/branches/stable_0_10_0@6698 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomonitor: Use reasonable default virtual console size (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:30 +0000 (19:42 +0000)]
monitor: Use reasonable default virtual console size (Jan Kiszka)

If a target uses a tiny display (like the MusicPal), the default monitor
is currently set to the same size. Fix this by applying the same
defaults like already used serial and virtio consoles.

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/branches/stable_0_10_0@6697 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoblock: Introduce bdrv_get_encrypted_filename (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:19 +0000 (19:42 +0000)]
block: Introduce bdrv_get_encrypted_filename (Jan Kiszka)

Introduce bdrv_get_encrypted_filename service to allow more informative
password prompting.

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/branches/stable_0_10_0@6696 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoblock: Improve bdrv_iterate (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:15 +0000 (19:42 +0000)]
block: Improve bdrv_iterate (Jan Kiszka)

Make bdrv_iterate more useful by passing the BlockDriverState to the
iterator instead of the device name.

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/branches/stable_0_10_0@6695 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoblock: Polish error handling of brdv_open2 (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:11 +0000 (19:42 +0000)]
block: Polish error handling of brdv_open2 (Jan Kiszka)

Make sure that we always delete temporary disk images on error, remove
obsolete malloc error checks and return proper error codes.

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/branches/stable_0_10_0@6694 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agochar-mux: Use separate input buffers (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:07 +0000 (19:42 +0000)]
char-mux: Use separate input buffers (Jan Kiszka)

Currently, the intermediate input buffer of mux'ed character devices
records data across all sub-devices. This has the side effect that we
easily leak data recorded over one sub-devices to another once we switch
the focus. Avoid data loss and confusion by defining exclusive buffers.

Note: In contrast to the original author's claim, the buffering concept
still breaks down when the fifo of the currently active sub-device is
full. As we cannot accept futher data from this point on without risking
to loose it, we will also miss escape sequences, just like without all
that buffering. In short: There is no reliable escape sequence handling
without infinite buffers or the risk of loosing some data.

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/branches/stable_0_10_0@6693 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agochar: Fix initial reset (Jan Kiszka)
aliguori [Thu, 5 Mar 2009 19:42:04 +0000 (19:42 +0000)]
char: Fix initial reset (Jan Kiszka)

Recent changes to the graphical console initialization broke the initial
CHR_EVENT_RESET distribution. The reset BHs generated on char device
initialization are now already consumed during machine init (ide init
... -> qemu_aio_wait -> qemu_bh_poll). Therefore, this patch moves the
initial qemu_chr_reset calls into a separate funtion which is called
after machine init.

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/branches/stable_0_10_0@6692 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix cpuid KVM crash on i386 (Lubomir Rintel)
aliguori [Thu, 5 Mar 2009 19:01:53 +0000 (19:01 +0000)]
Fix cpuid KVM crash on i386 (Lubomir Rintel)

Cpuid should return into vec, not overwrite past address in count.
Changeset 6565 broke this.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6691 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agolsi: add ISTAT1 register read (Ryan Harper)
aliguori [Thu, 5 Mar 2009 19:01:46 +0000 (19:01 +0000)]
lsi: add ISTAT1 register read (Ryan Harper)

SLES10 SP2 installer complains when probing a scsi disk and exits qemu
when failing to read one of the registers.

lsi_scsi: error: readb 0x15

--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

diffstat output:
 lsi53c895a.c |    2 ++
 1 files changed, 2 insertions(+)

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
Subject: [PATCH] lsi: add ISTAT1 register read
From: Ryan Harper <ryanh@us.ibm.com>
Cc: kvm@vger.kernel.org
SLES10 SP2 installer complains when probing a scsi disk and exits qemu when
failing to read one of the registers.

lsi_scsi: error: readb 0x15

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

15 years agoAdd stable branch
aliguori [Thu, 5 Mar 2009 18:52:51 +0000 (18:52 +0000)]
Add stable branch

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

15 years agoAdd property to tag release_0_10_0 v0.10.0
aliguori [Thu, 5 Mar 2009 18:51:35 +0000 (18:51 +0000)]
Add property to tag

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

15 years agoAdd version information for 0.10.0 release.
aliguori [Wed, 4 Mar 2009 22:47:59 +0000 (22:47 +0000)]
Add version information for 0.10.0 release.

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

15 years agoFix "info registers" under kvm.
balrog [Wed, 4 Mar 2009 21:00:07 +0000 (21:00 +0000)]
Fix "info registers" under kvm.

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

15 years agoUpdate cocoa.m to match new DisplayState code (Samuel Benson)
aliguori [Wed, 4 Mar 2009 19:25:22 +0000 (19:25 +0000)]
Update cocoa.m to match new DisplayState code (Samuel Benson)

Version 2 does as follows:

[1]: Corrects endianness on issues by using native BGR to RGB conversion
[2]: Uses DisplayState accessors for obtaining graphics context information,
     which
[3]: Removes now unused variables, and
[4]: Allows reading of varying color modes (32bit/24/16), and converting to
     native colorspace
[5]: Attempts to keep itself centered on screen (as opposed to bottom right,
     which immediately goes off screen after bios load) on context changes
    (window resizes)

Testing working on i386 (gentoo, Windows 2000) and PPC (debian) guests on PPC
and x86 Macs.

In regards to [4], Windows 2000 displays fine on quick tests, but on the lowest
setting I could test, 16bit color depth at 4bpp, colors are slightly off. I
used gentoo install-x86-minimal-2008.0 in framebuffer mode to test above
setting; the usual grey text is now blue, and Tux appears to be BGR shifted. I
do not know if previous code worked at such a low color setting.

Signed-off-by: Samuel Benson <qemu_ml@digitalescape.info>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6683 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoThe different VFP variants will never occur at the same time, and giving them
pbrook [Wed, 4 Mar 2009 12:18:15 +0000 (12:18 +0000)]
The different VFP variants will never occur at the same time, and giving them
different names confuses GDB, so use org.gnu.gdb.arm.vfp for all of them.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6682 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDB-DMA IDE asynchronous I/O
aurel32 [Wed, 4 Mar 2009 07:20:40 +0000 (07:20 +0000)]
DB-DMA IDE asynchronous I/O

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

15 years agoFix slavio_intctl.c compile errors (Robert Reif)
blueswir1 [Tue, 3 Mar 2009 20:11:43 +0000 (20:11 +0000)]
Fix slavio_intctl.c compile errors (Robert Reif)

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

15 years agoCRIS: Avoid endless loops for unstested CRIS cpu-state load/save.
edgar_igl [Tue, 3 Mar 2009 18:07:11 +0000 (18:07 +0000)]
CRIS: Avoid endless loops for unstested CRIS cpu-state load/save.

Fix several endless loops.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6679 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix SDL on evdev hosts (Anthony Liguori)
aliguori [Tue, 3 Mar 2009 17:37:21 +0000 (17:37 +0000)]
Fix SDL on evdev hosts (Anthony Liguori)

This patch corrects SDL support on X11 hosts using evdev.  It's losely based
on the previous patch by Dustin Kirkland and the evdev support code in gtk-vnc
written by Daniel Berrange.

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

15 years agoFix CVE-2008-0928 - insufficient block device address range checking (Anthony Liguori)
aliguori [Tue, 3 Mar 2009 17:37:16 +0000 (17:37 +0000)]
Fix CVE-2008-0928 - insufficient block device address range checking (Anthony Liguori)

Introduce a growable flag that's set by bdrv_file_open().  Block devices should
never be growable, only files that are being used by block devices.

I went through Fabrice's early comments about the patch that was first applied.
While I disagree with that patch, I also disagree with Fabrice's suggestion.

There's no good reason to do the checks in the block drivers themselves.  It
just increases the possibility that this bug could show up again.  Since we're
calling bdrv_getlength() to determine the length, we're giving the block drivers
a chance to chime in and let us know what range is valid.

Basically, this patch makes the BlockDriver API guarantee that all requests are
within 0..bdrv_getlength() which to me seems like a Good Thing.

What do others think?

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

15 years agoDB-DMA cleanup
aurel32 [Tue, 3 Mar 2009 09:14:10 +0000 (09:14 +0000)]
DB-DMA cleanup

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

15 years agoSH4: Fixed last UTLB unused and URB/URC management
aurel32 [Tue, 3 Mar 2009 09:14:01 +0000 (09:14 +0000)]
SH4: Fixed last UTLB unused and URB/URC management

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

15 years agofix SIGSEGV when USE_KQEMU is defined
aurel32 [Tue, 3 Mar 2009 06:28:26 +0000 (06:28 +0000)]
fix SIGSEGV when USE_KQEMU is defined

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

15 years agosh4: r2d fix no ide/net case
aurel32 [Tue, 3 Mar 2009 06:23:17 +0000 (06:23 +0000)]
sh4: r2d fix no ide/net case

Fix invalid access/crash when there is no IDE device or NET device.

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

15 years agoSH4: Fixed last UTLB unused
aurel32 [Tue, 3 Mar 2009 06:14:43 +0000 (06:14 +0000)]
SH4: Fixed last UTLB unused

Version 2 of the patch.

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

15 years agoSH4: Fixed last UTLB unused
aurel32 [Tue, 3 Mar 2009 06:12:34 +0000 (06:12 +0000)]
SH4: Fixed last UTLB unused

With my previous patch (the one monitoring tlb), I found that the last
TLB entry was never use. Here a little fix.

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

15 years agoSH4: Added monitoring of TLBs
aurel32 [Tue, 3 Mar 2009 06:12:22 +0000 (06:12 +0000)]
SH4: Added monitoring of TLBs

This patch might interest some people trying (as I try to do) to fix
some tlbs for kernel/user space data sharing.

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

15 years agotarget-ppc: improve mfcr/mtcrf
aurel32 [Tue, 3 Mar 2009 06:12:14 +0000 (06:12 +0000)]
target-ppc: improve mfcr/mtcrf

- use ctz32 instead of ffs - 1
- small optimisation of mtcrf
- add the name of both opcodes

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

15 years agoclean build: Fix remaining sh4 warnings
aurel32 [Tue, 3 Mar 2009 06:12:03 +0000 (06:12 +0000)]
clean build: Fix remaining sh4 warnings

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

15 years agoFix mtcrf/mfcr
malc [Mon, 2 Mar 2009 22:39:39 +0000 (22:39 +0000)]
Fix mtcrf/mfcr

Noticed by Alexander Graf

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

15 years agoSH: Implement MOVCO.L and MOVLI.L
aurel32 [Mon, 2 Mar 2009 17:13:21 +0000 (17:13 +0000)]
SH: Implement MOVCO.L and MOVLI.L

* target-sh4/cpu.h (struct CPUSH4State): New field ldst.
* target-sh4/translate.c (cpu_ldst): New.
  (sh4_translate_init): Initialize cpu_ldst.
  (_decode_opc): Support MOVCO.L and MOVLI.L.

(Vladimir Prus)

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