~ubuntu-virt/qemu/+git/qemu-lp-import:stable-1.0

Last commit made on 2012-02-02
Get this branch:
git clone -b stable-1.0 https://git.launchpad.net/~ubuntu-virt/qemu/+git/qemu-lp-import

Branch merges

Branch information

Name:
stable-1.0
Repository:
lp:~ubuntu-virt/qemu/+git/qemu-lp-import

Recent commits

3ffb400... by "Justin M. Forbes" <email address hidden>

Version 1.0.1

Signed-off-by: Justin M. Forbes <email address hidden>

86a8d63... by "Justin M. Forbes" <email address hidden>

Merge branch 's390-1.0' of git://repo.or.cz/qemu/agraf

102dd91... by "Justin M. Forbes" <email address hidden>

Merge branch 'ppc-1.0' of git://repo.or.cz/qemu/agraf

d0ed2d2... by Anthony Liguori <email address hidden>

e1000: bounds packet size against buffer size

Otherwise we can write beyond the buffer and corrupt memory. This is tracked
as CVE-2012-0029.

Signed-off-by: Anthony Liguori <email address hidden>

d194ba1... by Christian Borntraeger

s390: fix cpu hotplug / cpu activity on interrupts

The add_del/running_cpu code and env->halted are tracking stopped cpus.
Sleeping cpus (idle and enabled for interrupts) are waiting inside the
kernel.
No interrupt besides the restart can move a cpu from stopped to
operational. This is already handled over there. So lets just remove
the bogus wakup from the common interrupt delivery, otherwise any
interrupt will wake up a cpu, even if this cpu is stopped (Thus leading
to strange hangs on sigp restart)

This fixes
echo 0 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu0/online
in the guest

Signed-off-by: Christian Borntraeger<email address hidden>
Signed-off-by: Alexander Graf <email address hidden>
(cherry picked from commit 93116ac0cf9734e7b28886aedf03848b37d6785e)

8a0a9cf... by agraf

s390x: add TR function for EXECUTE

Newer gcc versions (or glibc?) also generate code that tries to EXECUTE
the TR opcode. Implement it so that we don't break valid guests.

Reported-by: Andreas Faerber <email address hidden>
Signed-off-by: Alexander Graf <email address hidden>

d928541... by David Gibson <email address hidden>

pseries: Don't try to munmap() a malloc()ed TCE table

For the pseries machine, TCE (IOMMU) tables can either be directly
malloc()ed in qemu or, when running on a KVM which supports it, mmap()ed
from a KVM ioctl. The latter option is used when available, because it
allows the (frequent bottlenext) H_PUT_TCE hypercall to be KVM accelerated.
However, even when KVM is persent, TCE acceleration is not always possible.
Only KVM HV supports this ioctl(), not KVM PR, or the kernel could run out
of contiguous memory to allocate the new table. In this case we need to
fall back on the malloc()ed table.

When a device is removed, and we need to remove the TCE table, we need to
either munmap() or free() the table as appropriate for how it was
allocated. The code is supposed to do that, but we buggily fail to
initialize the tcet->fd variable in the malloc() case, which is used as a
flag to determine which is the right choice.

This patch fixes the bug, and cleans up error messages relating to this
path while we're at it.

Signed-off-by: Benjamin Herrenschmidt <email address hidden>
Signed-off-by: David Gibson <email address hidden>
Signed-off-by: Alexander Graf <email address hidden>

7a6d80e... by David Gibson <email address hidden>

pseries: Populate "/chosen/linux,stdout-path" in the FDT

There is a device tree property "/chosen/linux,stdout-path" which indicates
which device should be used as stdout - ie. "the console".

Currently we don't specify anything, which means both firmware and Linux
choose something arbitrarily. Use the routine we added in the last patch
to pick a default vty and specify it as stdout.

Currently SLOF doesn't use the property, but we are hoping to update it
to do so.

Signed-off-by: Michael Ellerman <email address hidden>
Signed-off-by: David Gibson <email address hidden>
Signed-off-by: Alexander Graf <email address hidden>
(cherry picked from commit 68f3a94c64bbaaf8c7f2daa70de1b5d87a432f86)

447a3b3... by David Gibson <email address hidden>

pseries: Add a routine to find a stable "default" vty and use it

In vty_lookup() we have a special case for supporting early debug in
the kernel. This accepts reg == 0 as a special case to mean "any vty".

We implement this by searching the vtys on the bus and returning the
first we find. This means that the vty we chose depends on the order
the vtys are specified on the QEMU command line - because that determines
the order of the vtys on the bus.

We'd rather the command line order was irrelevant, so instead return
the vty with the lowest reg value. This is still a guess as to what the
user really means, but it is at least stable WRT command line ordering.

Signed-off-by: Michael Ellerman <email address hidden>
Signed-off-by: David Gibson <email address hidden>
Signed-off-by: Alexander Graf <email address hidden>

[agraf] fix braces
(cherry picked from commit 98331f8ad6a3e2cfbb402d72e6be47eac7706251)

e295c31... by David Gibson <email address hidden>

pseries: Emit device tree nodes in reg order

Although in theory the device tree has no inherent ordering, in practice
the order of nodes in the device tree does effect the order that devices
are detected by software.

Currently the ordering is determined by the order the devices appear on
the QEMU command line. Although that does give the user control over the
ordering, it is fragile, especially when the user does not generate the
command line manually - eg. when using libvirt etc.

So order the device tree based on the reg value, ie. the address of on
the VIO bus of the devices. This gives us a sane and stable ordering.

Signed-off-by: Michael Ellerman <email address hidden>
Signed-off-by: David Gibson <email address hidden>
Signed-off-by: Alexander Graf <email address hidden>

[agraf] add braces
(cherry picked from commit 05c194384f836240ea4c2da5fa3be43a54bff021)