OSDN Git Service
David Gibson [Mon, 7 Dec 2015 03:25:50 +0000 (14:25 +1100)]
pseries: Improve setting of default machine version
This tweaks the way the default machine version is controlled, so that
there will be a bit less churn when each new version is introduced.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Mon, 7 Dec 2015 03:27:21 +0000 (14:27 +1100)]
pseries: Restructure class_options functions
Currently each of the *_class_options() functions for the pseries-2.1 ..
pseries-2.5 machine types are standalone. This will become harder to
maintain as new versions are added.
This patch restructures them similarly to x86 where each function calls
the one from the next version, then overrides anything necessary for
compatibility with the specific version and older.
The default behaviour - that for the most recent machine are set up in
the base class initializer spapr_machine_class_init(). Previously it had
some things set up to default to older behaviour with the more recent
machines overriding it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Mon, 7 Dec 2015 03:23:20 +0000 (14:23 +1100)]
pseries: DEFINE_SPAPR_MACHINE
At the moment all the class_init functions and TypeInfo structures for the
various versioned pseries machine types are open-coded. As more versions
are created this is getting increasingly clumsy.
This patch borrows the approach used in PC, using a DEFINE_SPAPR_MACHINE()
macro to construct most of the boilerplate from simpler 'class_options' and
'instance_options' functions.
This patch makes a small semantic change - the versioned machine types are
now registered through machine_init() instead of type_init(). Since the
new way is how PC already did it, I'm assuming that's correct.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Thu, 3 Dec 2015 06:47:22 +0000 (17:47 +1100)]
pseries: Use SET_MACHINE_COMPAT
To make the spapr_machine_*_class_init() functions a little less bulky.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Thu, 3 Dec 2015 06:34:38 +0000 (17:34 +1100)]
Move SET_MACHINE_COMPAT macro to boards.h
pc.h defines a SET_MACHINE_COMPAT macro to make setting up compat_props
for the various PC machine versions less verbose. There's nothing
inherently PC specific about it, though, so move it to boards.h where other
versioned machine types (like pseries-*) can use it.
While we're doing that, change it's indentation to be a bit more regular.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Mon, 7 Dec 2015 03:29:35 +0000 (14:29 +1100)]
pseries: Remove versions from mc->desc
Currently, the versioned spapr machine types put the machine type version
into the description string. PC does not do this, using just the name
itself to distinguish. Doing the same lets us move setting the description
into the common base class, simplifying the code slightly.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Thu, 3 Dec 2015 06:34:20 +0000 (17:34 +1100)]
pseries: Remove redundant calls to spapr_machine_initfn()
The instance_init() functions for several of the pseries-x.y versioned
machine types explicitly call spapr_machine_initfn(). But that's the
instance_init function for the common parent of all those machine types,
so will already have been called beforehand by the QOM infrastructure.
Remove the redundant calls.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Thu, 3 Dec 2015 06:34:10 +0000 (17:34 +1100)]
pseries: Rearrange versioned machine type code
hw/ppc/spapr.c has a number of definitions related to the various versioned
machine types ("pseries-2.1" .. "pseries-2.5") it defines. These are
mostly arranged by type of function first, then machine version second, and
it's not consistent about whether it goes in increasing or decreasing
version order.
This rearranges the code to keep all the definitions for a particular
machine version together, and arrange then consistently in order most
recent to least recent.
This brings us closer to matching the way PC does things, and makes later
cleanups easier to follow.
Apart from adding some comments marking each section, this is a pure
mechanical rearrangement with no semantic changes.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson [Mon, 30 Nov 2015 05:36:49 +0000 (16:36 +1100)]
pseries: Remove redundant setting of mc->name for pseries-2.5 machine
98cec76 "machine: Set MachineClass::name automatically" removed the setting
of mc->name for the pseries machine types, since it can be derived
automatically from the type names constructed with MACHINE_TYPE_NAME().
Unfortunately
fb0fc8f "spapr: Create pseries-2.5 machine" went in later and
brought one of them back.
This removes it again.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Alexey Kardashevskiy [Mon, 9 Nov 2015 06:47:17 +0000 (17:47 +1100)]
spapr: Add /system-id
Section B.6.2.1 Root Node Properties of PAPR specification defines
a set of properties which shall be present in the device tree root,
one of these properties is "system-id" which "should be unique across
all systems and all manufacturers". Since UUID is meant to be unique,
it makes sense to use it as "system-id".
This adds "system-id" property to the device tree root when not empty.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Sukadev Bhattiprolu [Sat, 14 Nov 2015 02:13:07 +0000 (18:13 -0800)]
target-ppc: Define kvmppc_read_int_dt()
Extract code from the function kvmppc_read_int_cpu_dt() that actually
reads the file into a separate function, so it can be called from
other places.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Thomas Huth [Fri, 18 Dec 2015 09:06:14 +0000 (10:06 +0100)]
hw/ppc/spapr_rtc: Remove bad class_size value
class_size = sizeof(XICSStateClass) does not make much sense
in the RTC code and likely was just a copy-n-paste error.
Let's simply remove it.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Peter Maydell [Fri, 8 Jan 2016 12:50:19 +0000 (12:50 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-
20160108-1' into staging
sdl2/opengl: add opengl context and scanout support
ui/curses: Fix color attribute of monitor for curses
# gpg: Signature made Fri 08 Jan 2016 12:42:02 GMT using RSA key ID
D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-ui-
20160108-1:
sdl2/opengl: add opengl context and scanout support
ui/curses: Fix color attribute of monitor for curses
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Fri, 8 Jan 2016 11:24:15 +0000 (11:24 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-
20160108-1' into staging
usb: mtp and ohci fixes.
# gpg: Signature made Fri 08 Jan 2016 10:14:59 GMT using RSA key ID
D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-usb-
20160108-1:
ohci: clear pending SOF on suspend
ohci: delay first SOF interrupt
usb-mtp: fix call to trace function
usb-mtp: use safe variant when cleaning events list
ohci: fix command HostControllerReset
ohci: fix Host Controller USBRESET
ohci: split reset method in 3 parts
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Gerd Hoffmann [Wed, 19 Nov 2014 13:56:46 +0000 (14:56 +0100)]
sdl2/opengl: add opengl context and scanout support
This allows virtio-gpu to render in 3d mode.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
OGAWA Hirofumi [Sun, 29 Nov 2015 13:28:24 +0000 (22:28 +0900)]
ui/curses: Fix color attribute of monitor for curses
Current text_console_update() writes totally broken color attributes
to console_write_ch(). The format now is writing,
[WRONG]
bold << 21 | fg << 12 | bg << 8 | char
fg == 3bits curses color number
bg == 3bits curses color number
I can't see this format is where come from. Anyway, this doesn't work
at all.
What curses expects is actually (and vga.c is using),
[RIGHT]
bold << 21 | bg << 11 | fg << 8 | char
fg == 3bits vga color number
bg == 3bits vga color number
And curses set COLOR_PAIR() up to match this format, and curses's
chtype. I.e,
bold | color_pair | char
color_pair == (bg << 3 | fg)
To fix, this simply uses VGA color number everywhere except curses.c
internal. Then, convert it to above [RIGHT] format to write by
console_write_ch(). And as bonus, this reduces to expose curses define
to other parts (removes COLOR_* from console.c).
[Tested the first line is displayed as white on blue back for monitor
in curses console]
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Message-id: 87r3j95407.fsf@mail.parknet.co.jp
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Peter Maydell [Fri, 8 Jan 2016 10:45:07 +0000 (10:45 +0000)]
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-for-peter-2016-01-07' into staging
Block patches from 2015-12-23 until 2016-01-07.
# gpg: Signature made Thu 07 Jan 2016 22:46:08 GMT using RSA key ID
E838ACAD
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
* remotes/maxreitz/tags/pull-block-for-peter-2016-01-07: (21 commits)
iotests: Add test cases for blockdev-mirror
qmp: Add blockdev-mirror command
block: Add check on mirror target
block: Extract blockdev part of qmp_drive_mirror
block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE
qemu-iotests: s390x: fix test 051
iotests: 095: Filter _img_info output
iotests: 095: Use TEST_IMG override instead of "mv"
iotests: 050: Use TEST_IMG override instead of "mv"
iotests: 038: Use TEST_IMG override instead of "mv"
iotests: 037: Use TEST_IMG override instead of "mv"
iotests: 034: Use TEST_IMG override instead of "mv"
iotests: 028: Use TEST_IMG override instead of "mv"
iotests: 024: Use TEST_IMG override instead of "mv"
iotests: 020: Use TEST_IMG override instead of "mv"
iotests: 019: Use TEST_IMG override instead of "mv"
iotests: 018: Use TEST_IMG override instead of "mv"
block/qapi: Clear err for further error
block: use drained section in bdrv_close
qemu-iotests: make check-block.sh work on out-of-tree builds
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Laurent Vivier [Wed, 6 Jan 2016 19:45:25 +0000 (20:45 +0100)]
ohci: clear pending SOF on suspend
On overcommitted CPU, kernel can be so slow that an interrupt can
be triggered by the device whereas the driver is not ready to receive
it. This drives us into an infinite loop.
On suspend, if a SOF interrupt is raised between the stop of the
device processing and the change of the device internal state to
OHCI_USB_SUSPEND (QEMU stops SOF timer on this state change), this
interrupt is never acknowledged.
This patch clears pending SOF interrupt on OHCI_USB_SUSPEND setting.
Some details:
- ohci_irq(): the OHCI interrupt handler, acknowledges the SOF IRQ
only if the state of the driver (rh_state) is OHCI_STATE_RUNNING.
So if this interrupt happens and the driver is not in this state,
the function is called again and again, moving the system to a
CPU starvation.
- ohci_rh_suspend(): the function stop the operation and acknowledge
pending interrupts (but doesn't disable it). Later in the function,
the device is moved to OHCI_SUSPEND_STATE, and the driver to
OHCI_RH_SUSPENDED. If between the moment when the interrupt is
acknowledged and the moment when the device is suspended a new
interrupt is raised, it will be never acknowledged because the
driver is now not in OHCI_RH_RUNNING state.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id:
1452109525-32150-3-git-send-email-lvivier@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Laurent Vivier [Wed, 6 Jan 2016 19:45:24 +0000 (20:45 +0100)]
ohci: delay first SOF interrupt
On overcommitted CPU, kernel can be so slow that an interrupt can
be triggered by the device whereas the driver is not ready to receive
it. This drives us into an infinite loop.
This does not happen on real hardware because real hardware never send
interrupt immediately after the controller has been moved to OPERATION state.
This patch tries to delay the first SOF interrupt to let driver exits from
the critical section (which is not protected against interrupts...)
Some details:
- ohci_irq(): the OHCI interrupt handler, acknowledges the SOF IRQ
only if the state of the driver (rh_state) is OHCI_STATE_RUNNING.
So if this interrupt happens and the driver is not in this state,
the function is called again and again, moving the system to a
CPU starvation.
- ohci_rh_resume(): the driver re-enables operation with OHCI_USB_OPER.
In QEMU this start the SOF timer and QEMU starts to send IRQs. As
the driver is not in OHCI_STATE_RUNNING and not protected against IRQ,
the ohci_irq() can be called and the driver never moved to
OHCI_STATE_RUNNING.
Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id:
1452109525-32150-2-git-send-email-lvivier@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Bandan Das [Wed, 23 Dec 2015 09:09:47 +0000 (14:39 +0530)]
usb-mtp: fix call to trace function
trace_usb_mtp_inotify_event() was being called after the object was
being freed.
Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id:
1450861787-16213-3-git-send-email-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Bandan Das [Wed, 23 Dec 2015 09:09:46 +0000 (14:39 +0530)]
usb-mtp: use safe variant when cleaning events list
usb_mtp_inotify_cleanup uses QLIST_FOREACH to pick events
from a list and free them which is incorrect. Use QLIST_FOREACH_SAFE
instead.
Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id:
1450861787-16213-2-git-send-email-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hervé Poussineau [Sat, 19 Dec 2015 23:23:51 +0000 (00:23 +0100)]
ohci: fix command HostControllerReset
Specification says that: "This bit is set by HCD to initiate a software reset of HC."
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id:
1450567431-31795-4-git-send-email-hpoussin@reactos.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hervé Poussineau [Sat, 19 Dec 2015 23:23:50 +0000 (00:23 +0100)]
ohci: fix Host Controller USBRESET
Specification says that, when entering this state, "the contents of the registers
(except Root Hub registers) are preserved by the HC. [...] The Root Hub is being reset,
which causes the Root Hub's downstream ports to be reset and possibly powered off."
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id:
1450567431-31795-3-git-send-email-hpoussin@reactos.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hervé Poussineau [Sat, 19 Dec 2015 23:23:49 +0000 (00:23 +0100)]
ohci: split reset method in 3 parts
The three parts are:
- root hub reset (ohci_roothub_reset)
- host controller soft reset (ohci_soft_reset)
- host controller hard reset (ohci_hard_reset)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id:
1450567431-31795-2-git-send-email-hpoussin@reactos.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Fam Zheng [Thu, 24 Dec 2015 04:45:06 +0000 (12:45 +0800)]
iotests: Add test cases for blockdev-mirror
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450932306-13717-6-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Thu, 24 Dec 2015 04:45:05 +0000 (12:45 +0800)]
qmp: Add blockdev-mirror command
This will start a mirror job from a named device to another named
device, its relation with drive-mirror is similar with blockdev-backup
to drive-backup.
In blockdev-mirror, the target node should be prepared by blockdev-add,
which will be responsible for assigning a name to the new node, so
we don't have 'node-name' parameter.
Signed-off-by: Fam Zheng <famz@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-id:
1450932306-13717-5-git-send-email-famz@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Thu, 24 Dec 2015 04:45:04 +0000 (12:45 +0800)]
block: Add check on mirror target
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450932306-13717-4-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Thu, 24 Dec 2015 04:45:03 +0000 (12:45 +0800)]
block: Extract blockdev part of qmp_drive_mirror
This is the part that will be reused by blockdev-mirror.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450932306-13717-3-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Thu, 24 Dec 2015 04:45:02 +0000 (12:45 +0800)]
block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE
It's necessary to distinguish source and target before we can add
blockdev-mirror, because we would want a concrete type of operation to
check on target bs before starting.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450932306-13717-2-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Bo Tu [Mon, 4 Jan 2016 05:29:20 +0000 (13:29 +0800)]
qemu-iotests: s390x: fix test 051
Replace the remaining "-drive file..."
by "-drive file=...,if=none,id=$device_id", then x86 and s390x
can get the common output.
"if=ide, if=floppy, if=scsi" are not supported by s390x,
so these test cases are not executed for s390x platform.
Signed-off-by: Bo Tu <tubo@linux.vnet.ibm.com>
Message-id:
1451885360-20236-2-git-send-email-tubo@linux.vnet.ibm.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:21 +0000 (10:49 +0800)]
iotests: 095: Filter _img_info output
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
1450752561-9300-12-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:20 +0000 (10:49 +0800)]
iotests: 095: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
1450752561-9300-11-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:19 +0000 (10:49 +0800)]
iotests: 050: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-10-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:18 +0000 (10:49 +0800)]
iotests: 038: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-9-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:17 +0000 (10:49 +0800)]
iotests: 037: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-8-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:16 +0000 (10:49 +0800)]
iotests: 034: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-7-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:15 +0000 (10:49 +0800)]
iotests: 028: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-6-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:14 +0000 (10:49 +0800)]
iotests: 024: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-5-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:13 +0000 (10:49 +0800)]
iotests: 020: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-4-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:12 +0000 (10:49 +0800)]
iotests: 019: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-3-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 02:49:11 +0000 (10:49 +0800)]
iotests: 018: Use TEST_IMG override instead of "mv"
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id:
1450752561-9300-2-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Tue, 22 Dec 2015 10:11:47 +0000 (18:11 +0800)]
block/qapi: Clear err for further error
Since
a5002d5 (block/qapi: allow best-effort query) we don't return at
this error, however err must be cleared before passing to
bdrv_query_snapshot_info_list below, as required by error API.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
1450779107-26765-1-git-send-email-famz@redhat.com
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Paolo Bonzini [Wed, 23 Dec 2015 10:48:24 +0000 (11:48 +0100)]
block: use drained section in bdrv_close
bdrv_close is used when ejecting a medium. Use a drained section to ensure
that all I/O goes to either the old medium or the bitbucket.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1450867706-19860-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Paolo Bonzini [Wed, 23 Dec 2015 10:42:21 +0000 (11:42 +0100)]
qemu-iotests: make check-block.sh work on out-of-tree builds
Since check-block.sh, the "check" script has learnt to find the source
path. On the other hand, it expects common.env to be in the build tree
(both changes made in commit
76c7560, "configure: Enable out-of-tree
iotests", 2014-05-24). So, it is wrong to invoke "check" from the source
path like check-block.sh does. Fix it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1450867341-11100-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam Zheng [Wed, 23 Dec 2015 06:26:19 +0000 (14:26 +0800)]
iotests: 086: Add raw format
Raw is as qualified as qcow2 for this test case, add it for more
coverage.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
1450851979-15580-1-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Edgar E. Iglesias [Fri, 13 Nov 2015 16:11:51 +0000 (17:11 +0100)]
petalogix-ml605: Set the MicroBlaze CPU version to 8.10.a
Set the MicroBlaze CPU version to 8.10.a avoiding a runtime
warning due to an unset CPU version.
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Edgar E. Iglesias [Fri, 13 Nov 2015 15:55:00 +0000 (16:55 +0100)]
s3adsp1800: Set the MicroBlaze CPU version to 7.10.d
Set the MicroBlaze CPU version to 7.10.d avoiding a runtime
warning due to an unset CPU version.
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Peter Maydell [Thu, 7 Jan 2016 13:33:19 +0000 (13:33 +0000)]
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging
qemu-sparc update
# gpg: Signature made Thu 07 Jan 2016 13:20:13 GMT using RSA key ID
AE0F321F
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
* remotes/mcayland/tags/qemu-sparc-signed:
target-sparc: implement NPT timer bit
sun4u: split NPT and INT_DIS accesses between timer and compare registers
sun4u: split out NPT and INT_DIS into separate CPUTimer fields
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Mark Cave-Ayland [Sun, 8 Nov 2015 17:11:59 +0000 (17:11 +0000)]
target-sparc: implement NPT timer bit
If the NPT bit is set in the timer register, all non-supervisor read accesses
to the register should fail with a privilege exception.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-By: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mark Cave-Ayland [Sun, 8 Nov 2015 12:45:35 +0000 (12:45 +0000)]
sun4u: split NPT and INT_DIS accesses between timer and compare registers
Accesses to the timer register high bit should only set NPT, whilst accesses
to the timer compare register high bit should only set INT_DIS. This fixes
issues with the timer being unexpectedly disabled whilst trying to boot
FreeBSD SPARC64.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-By: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mark Cave-Ayland [Sun, 8 Nov 2015 12:27:38 +0000 (12:27 +0000)]
sun4u: split out NPT and INT_DIS into separate CPUTimer fields
Currently there is confusion between use of these bits for the timer and timer
compare registers (while they both have the same value, the behaviour is
different). Split into two separate CPUTimer fields so we can always reference
the correct value.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-By: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Peter Maydell [Thu, 7 Jan 2016 11:22:18 +0000 (11:22 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-seabios-
20160105-1' into staging
seabios: update to release 1.9.0
# gpg: Signature made Tue 05 Jan 2016 12:07:22 GMT using RSA key ID
D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-seabios-
20160105-1:
seabios: update binaries to release 1.9.0
seabios: stop updating aml files
seabios: update 128k bios config
seabios: use new EXTRAVERSION to tag qemu builds
seabios: update submodule to release 1.9.0
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 7 Jan 2016 10:19:28 +0000 (10:19 +0000)]
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Thu 07 Jan 2016 09:13:22 GMT using RSA key ID
81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/tracing-pull-request:
trace: add make dependencies on tracetool source
trace: fix make foo-timestamp rules
trace: fix PRIx64 constants in trace-events
trace: reflect the file name change
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Stefan Hajnoczi [Wed, 28 Oct 2015 14:38:41 +0000 (14:38 +0000)]
trace: add make dependencies on tracetool source
Patches that change tracetool can break the build if old build output
files are lying around.
This happens because the Makefile does not specify dependencies on
tracetool. The build will use old object files that do not match the
current source code.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Wed, 28 Oct 2015 14:45:10 +0000 (14:45 +0000)]
trace: fix make foo-timestamp rules
The Makefile uses intermediate timestamp files to avoid rebuilding if
tracetool output is unchanged.
Timestamps are implemented incorrectly. This was fixed for rules.mak in
commit
4b25966ab976f3a7fd9008193b2defcc82f8f04d ("rules.mak: cleanup
config generation rules") but never fixed in trace/Makefile.objs.
The problem with the old timestamp implementation was that make doesn't
notice the updated file modification time until the next time it is run.
It was necessary to run make twice in a row to achieve a full rebuild.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Mark Cave-Ayland [Sat, 19 Dec 2015 23:08:42 +0000 (23:08 +0000)]
trace: fix PRIx64 constants in trace-events
Commit
c8ee0a4 introduced new events containing PRIx64 constants without
including the % prefix in the preceding string. This results in a compile
error during build if --enable-trace-backends is passed to configure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id:
1450566522-6003-1-git-send-email-mark.cave-ayland@ilande.co.uk
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Qinghua Jin [Fri, 11 Dec 2015 07:06:12 +0000 (15:06 +0800)]
trace: reflect the file name change
Some functions was moved from block.c to block/io.c, so the trace-events file should reflect that change.
Signed-off-by: Qinghua Jin <qhjin_dev@163.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Gerd Hoffmann [Thu, 17 Dec 2015 10:20:24 +0000 (11:20 +0100)]
seabios: update binaries to release 1.9.0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 17 Dec 2015 09:51:41 +0000 (10:51 +0100)]
seabios: stop updating aml files
ACPI aml files traditionally have been managed in the seabios repo.
In qemu version 2.0 we've switched over to have qemu generate the
acpi tables and provide them to the firmware via fw_cfg.
The old aml files are still there and used for old machine types.
Well, actually the q35 file only, the piix4 version is compiled into
seabios (unless built with CONFIG_ACPI_DSDT=n) and is there for
reference only.
The aml files havn't been touched for a long time, and given that
new features requiring acpi changes are typically only added to new
machine types this is unlikely to change in the future. So stop
updating them.
That allows to cleanup things a bit on the seabios side in the future.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 17 Dec 2015 09:28:34 +0000 (10:28 +0100)]
seabios: update 128k bios config
Turn off OHCI + TPM support to keep the size below 128k.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 17 Dec 2015 09:32:24 +0000 (10:32 +0100)]
seabios: use new EXTRAVERSION to tag qemu builds
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 17 Dec 2015 09:03:41 +0000 (10:03 +0100)]
seabios: update submodule to release 1.9.0
Highlights / user visible changes in seabios:
* boot menu key is ESC now.
* virtio 1.0 support.
* sdcard support.
* fw_cfg dma suport.
* usual share of bugfixes ;)
In vgabios:
* Emulates leal instruction. Works around a bug in old x86emu versions,
which makes old xorg vesa drivers work (RHEL-5 for example).
full shortlog rel-1.8.2..rel-1.9.0
----------------------------------
Ameya Palande (1):
x86: add barrier to read{b,w,l} and write{b,w,l} functions
Andreas Färber (1):
checkrom: Fix typo in error message
Chen Fan (1):
pci: enable SERR# for error forwarding in bridge control register
Gerd Hoffmann (28):
vga: simplify vga builds
vga: rework virtio-vga support
vga: add virtio-vga to kconfig
pci: allow to loop over capabilities
virtio: run drivers in 32bit mode
virtio: add struct vp_device
virtio: pass struct pci_device to vp_init_simple
virtio: add version 1.0 structs and #defines
virtio: add version 0.9.5 struct
virtio: find version 1.0 virtio capabilities
virtio: create vp_cap struct for legacy bar
virtio: add read/write functions and macros
virtio: make features 64bit, support version 1.0 features
virtio: add version 1.0 support to vp_{get,set}_status
virtio: add version 1.0 support to vp_get_isr
virtio: add version 1.0 support to vp_reset
virtio: add version 1.0 support to vp_notify
virtio: remove unused vp_del_vq
virtio: add version 1.0 support to vp_find_vq
virtio-scsi: fix initialization for version 1.0
virtio-blk: fix initialization for version 1.0
virtio: use version 1.0 if available (flip the big switch)
virtio: also probe version 1.0 pci ids
virtio: legacy cleanup
virtio-blk: 32bit cleanup
virtio-scsi: 32bit cleanup
virtio-ring: 32bit cleanup
virtio-pci: use high memory for rings
Julius Werner (1):
xhci: Count new Max Scratchpad Bufs bits from XHCI 1.1
Kevin O'Connor (126):
docs: add page for SeaVGABIOS
docs: Add page describing the patch contribution process
docs: Add page on available CBFS/fw_cfg runtime config files
docs: Prefer triple backticks to multiple lines with single backticks
smp: Fix smp race introduced in
0673b787
docs: Note release date of 1.8.1
vgabios: On bda_save_restore() the saved vbe_mode also has flags in it
vgabios: Don't use extra stack if it appears a modern OS is in use
docs: Clarify that pci-optionrom-exec doesn't apply to roms in cbfs
checkstack: Replace function information tuple with class
checkstack: Simplify yield calculations
checkstack: Prefer passing "function" class instead of function address
smbios: Use integer signature instead of string signature
vgabios: Don't use "smsww" instruction - it confuses x86emu
vgabios: Add config option for assembler fixups
vgabios: Emulate "leal" instruction
checkstack: Minor - continue if not a regular asm line
Don't forward declare functions with "inline" in headers
build: Support "make VERSION=xyz" to override the default build version
tcg: Use seabios setup()/prepboot() calling convention for tcg
build: CONFIG_VGA_FIXUP_ASM should depend on CONFIG_BUILD_VGABIOS
bootorder: Update "extra pci root" buses bootorder format to match qemu
Make sure all code checks for malloc failures
docs: Note release date of 1.8.2
block: Split process_op() command dispatch up into multiple functions
block: Introduce default_process_op() with common command handling codes
block: Route scsi style commands through 'struct disk_op_s'
blockcmd: Introduce scsi_fill_cmd()
ata: Handle ATA ATAPI drives directly via 'struct disk_op_s' requests
ahci: Handle AHCI ATAPI drives directly via 'struct disk_op_s' requests
usb-msc: Handle USB drives directly via 'struct disk_op_s' requests
usb-uas: Handle USB drives directly via 'struct disk_op_s' requests
lsi-scsi: Handle LSI drives directly via 'struct disk_op_s' requests
esp-scsi: Handle ESP drives directly via 'struct disk_op_s' requests
megasas: Handle Megasas drives directly via 'struct disk_op_s' requests
virtio-scsi: Handle virtio drives directly via 'struct disk_op_s' requests
pvscsi: Move pvscsi_fill_req() code into pvscsi_cmd()
pvscsi: Handle pvscsi drives directly via 'struct disk_op_s' requests
blockcmd: Remove unused scsi_process_op() and cdb_cmd_data()
blockcmd: Convert cdb_is_read() to scsi_is_read()
block: Rename process_XXX_op() functions to XXX_process_op()
coreboot: Try to auto-detect if the CBFS anchor pointer is a relative pointer
ps2: Support mode for polling the PS2 port instead of using irqs
ata: Make sure "chanid" is relative to PCI device for bootorder file
Don't enable interrupts prior to IVT and PIC setup
ps2: Don't wait 100ms to discard possible extra reset receive byte
timer: Delay timestamp counter init until after pmtimer is probed
timer: Add CONFIG_TSC_TIMER build option to disable the CPU TSC timer
ramdisk: Allow ramdisk support (CONFIG_FLASH_FLOPPY) under QEMU
Minor - move declaration of CDRom_locks to code that uses it
smm: ignore bits 16,18-31 of SMM revision ID at runtime too
vgafb: Minor - move gfx_common() variables outside of switch statement
sdcard: Check if card is present before sending commands to card
sdcard: Implement controller frequency setting according to sdhci spec
sdcard: Make sure controller support 3.3V before enabling it
sdcard: Set timeout control register during init (to max allowed timeout)
sdcard: Improve SD card initialization command sequence
sdcard: Add proper delays during card power up
mptable: Don't create mptable if it is very large
optionroms: Don't run option rom on PCI bar if CBFS/fw_cfg version exists
edd: Pass the segment/offset from int 1348 calls using a 'struct segoff_s'
edd: Reduce parameters to fill_generic_edd()
Move CanInterrupt check to check_irqs()
Call cpu_relax() if yielding prior to interrupts being enabled
sdcard: Fix typo - use sdcard_pio() instead of sdcard_pio_app()
sdcard: Fill command bits according to spec
sdcard: Support SDHCI v3.00 spec clock setting
sdcard: Move power setup to new function sdcard_set_power()
sdcard: Power controller up to maximum voltage supported
sdcard: Power down controller on failure
sdcard: The card should never be in a busy state at start of sdcard_pio()
sdcard: Implement timeout on every block read in sdcard_pio_transfer()
sdcard: Rename waitw() to sdcard_waitw() and simplify
sdcard: Perform a controller reset at start of init
sdcard: Check for error events during sdcard_pio()
sdcard: Initial support for MMC cards
sdcard: Allow the sdcard driver to run on real hardware
rtc: Support disabling the RTC timer irq support
Add minimal support for machines without hardware interrupts
ps2: Eliminate "etc/ps2-poll-only"; use CONFIG_HARDWARE_IRQ instead
sdcard: Allow sdcard addresses to be specified in CBFS files
xhci: Minor - add USB port type comments to xhci_hub_reset()
docs: Don't use an add-symbol-file offset when describing gdb debugging
rtc: Disable NMI in rtc_mask()
sdcard: Move sdcard_set_frequency()/sdcard_set_power() in sdcard.c
sdcard: Move frequency setting into sdcard_card_setup()
sdcard: Move drive registration to sdcard_card_setup()
sdcard: Turn card_type into a bitmap and store if card is MMC type
sdcard: Display sdcard product name in boot menu
sdcard: Obtain card capacity and report it on the boot menu
megasas: Use outl() on MFI_IDB register
minor - correct spelling error in comment
Simplify transition16/32 assembler code
docs: Minor - add "code relocation" link to "Execution and code flow" document
Unify smm/sloppy variants of call32_prep/post and call16_helper
Rename Call32Data to Call16Data
Unify inline assembler in variants of call16 functions
Unify call32_sloppy() and call32()
Use transition32_nmi_off from call32() and call16_back()
Consolidate code16*() functions
Always enable caching on transition32; backup/restore cr0 on call32
e820: Introduce e820_remove() and avoid exporting E820_HOLE
e820: Rename memmap.c to e820map.c and use consistent "e820_" prefix
e820: Update debugging messages to report 64bit values
virtio: Simplify vring alignment code
virtio: Move standard definitions from virtio-ring.h to standard headers
malloc: Use consistent naming for internal low-level "alloc" functions
malloc: Introduce common helper alloc_new_detail()
malloc: Add warning if free() called on invalid memory
malloc: Don't mix virtual and physical addresses
memmap: Introduce SYMBOL() macro to access linker script symbols
build: Rework version generation; don't allow make version override
build: Report gcc and binutils versions in debug log
build: Generate "reproducible" version strings on "clean" builds
stacks: Use macro wrappers for call32() and stack_hop_back()
malloc: Rename csm_malloc_preinit() to malloc_csm_preinit()
build: Be more permissive in buildversion.py tool version scan
docs: Document 'make EXTRAVERSION=xyz' and scripts/tarball.sh
build: Allow official tarball builds to be considered "clean"
coreboot: Minor - avoid K&R style function declaration
biostables: Minor - fix incorrect indentation
virtio: Minor - replace tab characters with space
docs: Minor - replace seavgabios text in Build_overview.md with link
buildversion: Avoid subprocess.check_output() as that requires python2.7
buildversion: Add debugging messages
docs: Note v1.9.0 release
Kyösti Mälkki (1):
PCI SDHCI driver: Fix base address
Magnus Granberg (1):
build: use -fstack-check=no when available
Marc Marí (1):
Add QEMU fw_cfg DMA interface
Marcel Apfelbaum (2):
fw/pci: scan all buses if extraroots romfile is present
fw/pci: map memory and IO regions for multiple pci root buses
Paolo Bonzini (4):
boot.c: delay exiting boot if menu key is ESC
boot: switch default menu key to ESC
smm: ignore bits 16,18-31 of SMM revision ID
smm: fix outl argument order
Paulo Alcantara (1):
ich9: initialise RCBA register through LPC interface
Quan Xu (1):
make SeaBios compatible with Xen vTPM.
Stefan Berger (9):
Add an implementation of a TPM TIS driver
Implementation of the TCG BIOS extensions
Support for BIOS interrupt handler
Add 'measurement' code to the BIOS
tpm: Introduce a #define for command tag
tpm: Be consistent with array sizes in tcgbios.c
tpm: clean up parameters to build_and_send_cmd
tpm: Clean up in tcgbios.h
tpm: Move call to tpm_option_rom into init_optionrom
Stefan Weil (2):
megasas: Fix outw, outl argument order
Fix typos found by codespell
Vladimir Serbinenko (3):
ahci: Ignore max_ports.
Link rom.o with -N option.
Add multiboot support.
tpearson@raptorengineeringinc.com (1):
Add an option to only execute option ROMs contained in CBFS
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Peter Maydell [Wed, 23 Dec 2015 13:53:32 +0000 (13:53 +0000)]
Merge remote-tracking branch 'remotes/berrange/tags/pull-crypto-fixes-2015-12-23-1' into staging
Merge misc crypto changes & fixes
# gpg: Signature made Wed 23 Dec 2015 11:11:54 GMT using RSA key ID
15104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg: aka "Daniel P. Berrange <berrange@redhat.com>"
* remotes/berrange/tags/pull-crypto-fixes-2015-12-23-1:
crypto: fix transposed arguments in cipher error message
crypto: ensure qapi/crypto.json is listed in qapi-modules
crypto: move QCryptoCipherAlgorithm/Mode enum definitions into QAPI
crypto: move QCryptoHashAlgorithm enum definition into QAPI
crypto: add ability to query hash digest len
crypto: add additional query accessors for cipher instances
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 23 Dec 2015 13:29:47 +0000 (13:29 +0000)]
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
Fix a 2.5 regression.
# gpg: Signature made Wed 23 Dec 2015 10:57:00 GMT using DSA key ID
0101DBC2
# gpg: Good signature from "Greg Kurz <gkurz@fr.ibm.com>"
# gpg: aka "Greg Kurz <groug@free.fr>"
# gpg: aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
# gpg: aka "Gregory Kurz (Groug) <groug@free.fr>"
# gpg: aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
# gpg: aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 2BD4 3B44 535E C0A7 9894 DBA2 02FC 3AEB 0101 DBC2
* remotes/gkurz/tags/for-upstream:
virtio-9p: use accessor to get thread_pool
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 23 Dec 2015 12:55:55 +0000 (12:55 +0000)]
Merge remote-tracking branch 'remotes/berrange/tags/pull-io-fixes-2015-12-23-1' into staging
Merge misc I/O channel fixes
# gpg: Signature made Wed 23 Dec 2015 10:54:52 GMT using RSA key ID
15104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg: aka "Daniel P. Berrange <berrange@redhat.com>"
* remotes/berrange/tags/pull-io-fixes-2015-12-23-1:
io: fix stack allocation when sending of file descriptors
io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections
io: bind to loopback IP addrs in test suite
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 23 Dec 2015 12:27:51 +0000 (12:27 +0000)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi, pc features
pxb support for q35
nvdimm support
most of ipmi support
part of DSDT rewrite
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Tue 22 Dec 2015 16:47:18 GMT using RSA key ID
D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
* remotes/mst/tags/for_upstream: (55 commits)
acpi: extend aml_and() to accept target argument
acpi: extend aml_or() to accept target argument
acpi add aml_dma()
acpi: add aml_to_buffer()
acpi: add aml_to_hexstring()
acpi: extend aml_field() to support LockRule
acpi: add aml_lgreater()
acpi: add aml_lor()
acpi: add aml_sleep()
acpi: add aml_alias()
acpi: extend aml_shiftright() to accept target argument
acpi: add aml_to_integer()
acpi: add aml_call0() helper
acpi: add aml_decrement() and aml_subtract()
acpi: extend aml_add() to accept target argument
acpi: aml: add helper for Opcode Arg2 Arg2 [Dst] AML pattern
acpi: add aml_create_qword_field()
acpi: add aml_mutex(), aml_acquire(), aml_release()
acpi: add aml_lgreater_equal()
acpi: add aml_sizeof
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 23 Dec 2015 12:04:01 +0000 (12:04 +0000)]
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2015-12-22' into staging
Xen 2015/12/22
# gpg: Signature made Tue 22 Dec 2015 16:17:57 GMT using RSA key ID
70E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
* remotes/sstabellini/tags/xen-2015-12-22:
xen_disk: treat "vhd" as "vpc"
xen/pass-through: correctly deal with RW1C bits
xen/MSI-X: really enforce alignment
xen/MSI-X: latch MSI-X table writes
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Daniel P. Berrange [Fri, 20 Nov 2015 16:15:42 +0000 (16:15 +0000)]
crypto: fix transposed arguments in cipher error message
When reporting an incorrect key length for a cipher, we
mixed up the actual vs expected arguments.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Thu, 19 Nov 2015 17:18:39 +0000 (17:18 +0000)]
crypto: ensure qapi/crypto.json is listed in qapi-modules
The rebuild of qapi-types.c/h is not correctly triggered
when qapi/crypto.json is changed because it was missing
from the list of files in the qapi-modules variable.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Thu, 19 Nov 2015 17:09:01 +0000 (17:09 +0000)]
crypto: move QCryptoCipherAlgorithm/Mode enum definitions into QAPI
The QCryptoCipherAlgorithm and QCryptoCipherMode enums are
defined in the crypto/cipher.h header. In the future some
QAPI types will want to reference the hash enums, so move
the enum definition into QAPI too.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Thu, 19 Nov 2015 17:09:01 +0000 (17:09 +0000)]
crypto: move QCryptoHashAlgorithm enum definition into QAPI
The QCryptoHashAlgorithm enum is defined in the crypto/hash.h
header. In the future some QAPI types will want to reference
the hash enums, so move the enum definition into QAPI too.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Fri, 23 Oct 2015 15:14:50 +0000 (16:14 +0100)]
crypto: add ability to query hash digest len
Add a qcrypto_hash_digest_len() method which allows querying of
the raw digest size for a given hash algorithm.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Fri, 23 Oct 2015 15:13:50 +0000 (16:13 +0100)]
crypto: add additional query accessors for cipher instances
Adds new methods to allow querying the length of the cipher
key, block size and initialization vectors.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Mon, 21 Dec 2015 11:58:51 +0000 (11:58 +0000)]
io: fix stack allocation when sending of file descriptors
When sending file descriptors over a socket, we have to
allocate a data buffer to hold the FDs in the scmsghdr.
Unfortunately we allocated the buffer on the stack inside
an if () {} block, but called sendmsg() outside the block.
So the stack bytes holding the FDs were liable to be
overwritten with other data. By luck this was not a problem
when sending 1 FD, but if sending 2 or more then it would
fail.
The fix is to simply move the variables outside the nested
'if' block. To keep valgrind quiet we also zero-initialize
the 'control' buffer.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Greg Kurz [Wed, 23 Dec 2015 09:56:58 +0000 (10:56 +0100)]
virtio-9p: use accessor to get thread_pool
The aio_context_new() function does not allocate a thread pool. This is
deferred to the first call to the aio_get_thread_pool() accessor. It is
hence forbidden to access the thread_pool field directly, as it may be
NULL. The accessor *must* be used always.
Fixes:
ebac1202c95a4f1b76b6ef3f0f63926fa76e753e
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-stable@nongnu.org
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Daniel P. Berrange [Mon, 21 Dec 2015 12:04:21 +0000 (12:04 +0000)]
io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections
The QIO_CHANNEL_FEATURE_FD_PASS feature flag is set in the
qio_channel_socket_set_fd() method, however, this only deals
with client side connections.
To ensure server side connections also have the feature flag
set, we must set it in qio_channel_socket_accept() too. This
also highlighted a typo fix where the code updated the
sockaddr struct in the wrong object instance.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange [Tue, 22 Dec 2015 15:43:42 +0000 (15:43 +0000)]
io: bind to loopback IP addrs in test suite
The test suite currently binds to 0.0.0.0 or ::, which covers
all interfaces of the machine. It is bad practice for test
suite to open publically accessible ports on a machine, so
switch to use loopback addrs 127.0.0.1 or ::1.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:17 +0000 (00:41 +0100)]
acpi: extend aml_and() to accept target argument
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:16 +0000 (00:41 +0100)]
acpi: extend aml_or() to accept target argument
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:15 +0000 (00:41 +0100)]
acpi add aml_dma()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:14 +0000 (00:41 +0100)]
acpi: add aml_to_buffer()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:13 +0000 (00:41 +0100)]
acpi: add aml_to_hexstring()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:12 +0000 (00:41 +0100)]
acpi: extend aml_field() to support LockRule
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:11 +0000 (00:41 +0100)]
acpi: add aml_lgreater()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:10 +0000 (00:41 +0100)]
acpi: add aml_lor()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:08 +0000 (00:41 +0100)]
acpi: add aml_sleep()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:07 +0000 (00:41 +0100)]
acpi: add aml_alias()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:06 +0000 (00:41 +0100)]
acpi: extend aml_shiftright() to accept target argument
it allows to express ShiftRight(A,B,C) syntax
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:05 +0000 (00:41 +0100)]
acpi: add aml_to_integer()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:04 +0000 (00:41 +0100)]
acpi: add aml_call0() helper
it will help to call a method with 0 arguments
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:03 +0000 (00:41 +0100)]
acpi: add aml_decrement() and aml_subtract()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:02 +0000 (00:41 +0100)]
acpi: extend aml_add() to accept target argument
it allows to express following ASL expression:
Add(arg1, arg2, result)
usecases that do not need to store result
should pass NULL as 3rd arg that would express
Add(arg1, arg2,)
construct.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:41:01 +0000 (00:41 +0100)]
acpi: aml: add helper for Opcode Arg2 Arg2 [Dst] AML pattern
Currently AML API doesn't compose terms in form of
following pattern:
Opcode Arg2 Arg2 [Dst]
but ASL used in piix4/q35 DSDT ACPI tables uses that
form, so for clean conversion of it, AML API should
be able to handle an optional 'Dst' argumet used there.
Since above pattern is used by arithmetic/bit ops,
introduce helper that they could reuse.
It reduces code duplication in existing 5 aml_foo()
functions and also will prevent more duplication
when exiting functions are extended to support
optional 'Dst' argument.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Igor Mammedov [Wed, 9 Dec 2015 23:41:00 +0000 (00:41 +0100)]
acpi: add aml_create_qword_field()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Xiao Guangrong [Wed, 9 Dec 2015 23:40:59 +0000 (00:40 +0100)]
acpi: add aml_mutex(), aml_acquire(), aml_release()
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Igor Mammedov [Wed, 9 Dec 2015 23:40:58 +0000 (00:40 +0100)]
acpi: add aml_lgreater_equal()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Xiao Guangrong [Wed, 9 Dec 2015 23:40:57 +0000 (00:40 +0100)]
acpi: add aml_sizeof
Implement SizeOf term which is used by NVDIMM _DSM method in later patch
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Xiao Guangrong [Wed, 9 Dec 2015 23:40:56 +0000 (00:40 +0100)]
acpi: add aml_derefof
Implement DeRefOf term which is used by NVDIMM _DSM method in later patch
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Xiao Guangrong [Wed, 2 Dec 2015 07:21:00 +0000 (15:21 +0800)]
nvdimm: add maintain info
Add NVDIMM maintainer
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Xiao Guangrong [Wed, 2 Dec 2015 07:20:59 +0000 (15:20 +0800)]
nvdimm acpi: build ACPI nvdimm devices
NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices
There is a root device under \_SB and specified NVDIMM devices are under the
root device. Each NVDIMM device has _ADR which returns its handle used to
associate MEMDEV structure in NFIT
Currently, we do not support any function on _DSM, that means, NVDIMM
label data has not been supported yet
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>