Re: [Qemu-devel] [RFC 1/5] qmp: add query-memory-devices command

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 09:30:11 (-0600), Eric Blake wrote : On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... allowing to get state of present memory devices. Currently implemented only for DimmDevice. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/mem/dimm.c

Re: [Qemu-devel] [PATCH 1/2] virtio-serial: report frontend connection state via monitor

2014-05-30 Thread Laszlo Ersek
On 05/29/14 22:57, Eric Blake wrote: On 05/29/2014 02:36 PM, Laszlo Ersek wrote: Emitting the events unconditionally shouldn't hurt anything, I think. I added the property for two reasons: - I was sure someone would ask for it. :) Someone still might :) But it may be a pre-mature

Re: [Qemu-devel] [RFC 1/5] qmp: add query-memory-devices command

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 13:43:52 +0200 Benoît Canet benoit.ca...@irqsave.net wrote: The Wednesday 28 May 2014 à 09:30:11 (-0600), Eric Blake wrote : On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... allowing to get state of present memory devices. Currently implemented only for DimmDevice.

Re: [Qemu-devel] [PATCH v2 01/20] block: Introduce qemu_try_blockalign()

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:34 (+0200), Kevin Wolf wrote : This function returns NULL instead of aborting when an allocation fails. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com --- block.c | 5 + include/block/block.h

Re: [Qemu-devel] [PATCH v2 02/20] block: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:35 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses bounce buffer allocations

Re: [Qemu-devel] [PATCH v2 03/20] bochs: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:36 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the

[Qemu-devel] [PATCH v5 00/11] trace: [tcg] Allow tracing guest events in TCG-generated code

2014-05-30 Thread Lluís Vilanova
NOTE: TCG code for execution-time event tracing is always generated, regardless of wether the event has been dynamically disabled or not (unless the event has the static disable property). This approach keeps this series simple, and a future series will handle the case of

[Qemu-devel] [PATCH v5 01/11] trace: [tcg] Add documentation

2014-05-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- docs/tracing.txt | 40 1 file changed, 40 insertions(+) diff --git a/docs/tracing.txt b/docs/tracing.txt index c6ab1c1..2e035a5 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -307,3 +307,43

[Qemu-devel] [PATCH v5 08/11] trace: [tcg] Include TCG-tracing helpers

2014-05-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- include/exec/helper-gen.h |2 ++ include/exec/helper-proto.h |1 + include/exec/helper-tcg.h |1 + 3 files changed, 4 insertions(+) diff --git a/include/exec/helper-gen.h b/include/exec/helper-gen.h index a04a034..0d0da3a

[Qemu-devel] [PATCH v5 04/11] trace: [tcg] Add 'tcg' event property

2014-05-30 Thread Lluís Vilanova
Transforms event: tcg name(...) ..., ... into two internal events: tcg-trans name_trans(...) ... tcg-exec name_exec(...) ... Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- scripts/tracetool/__init__.py| 64 +++---

[Qemu-devel] [PATCH v5 10/11] trace: [tcg] Include event definitions in trace.h

2014-05-30 Thread Lluís Vilanova
Otherwise the user has to explicitly include an auto-generated header. Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- include/trace.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/trace.h b/include/trace.h index c15f498..44a1f1f 100644 --- a/include/trace.h +++

[Qemu-devel] [PATCH v5 06/11] trace: [tcg] Define TCG tracing helper routines

2014-05-30 Thread Lluís Vilanova
Generates file trace/generated-helpers.c with TCG helper definitions to trace events in guest code at execution time. The helpers ('helper_trace_${event}_exec_proxy') cast the TCG-compatible native argument types to their original types (as defined in trace-events) and call the tracing routine

[Qemu-devel] [PATCH v5 02/11] trace: [tcg] Argument type transformation rules

2014-05-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- scripts/tracetool/transform.py | 166 1 file changed, 166 insertions(+) create mode 100644 scripts/tracetool/transform.py diff --git a/scripts/tracetool/transform.py b/scripts/tracetool/transform.py

[Qemu-devel] [PATCH v5 07/11] trace: [tcg] Define TCG tracing helper routine wrappers

2014-05-30 Thread Lluís Vilanova
Generates header trace/generated-helpers-wrappers.h with definitions for TCG helper wrappers. These wrappers ('gen_helper_trace_${event}_exec_wrapper') transform mixed native and TCG argument types to TCG types and call the actual TCG helpers ('gen_helper_trace_${event}_exec_proxy').

[Qemu-devel] [PATCH v5 05/11] trace: [tcg] Declare TCG tracing helper routines

2014-05-30 Thread Lluís Vilanova
Generates file trace/generated-helpers.h with TCG helper declarations to trace events in guest code at execution time ('trace_${event}_exec_proxy'). Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- .gitignore |1 + Makefile |

[Qemu-devel] [PATCH v5 09/11] trace: [tcg] Generate TCG tracing routines

2014-05-30 Thread Lluís Vilanova
Generate header trace/generated-tcg-tracers.h with the necessary routines for tracing events in guest code: * trace_${event}_tcg Convenience wrapper that calls the translation-time tracer 'trace_${event}_trans', and calls 'gen_helper_trace_${event}_exec to generate the TCG code to later

Re: [Qemu-devel] [PATCH v2 04/20] cloop: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:37 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the

Re: [Qemu-devel] [PATCH v2 05/20] curl: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:38 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the

[Qemu-devel] [PATCH v5 11/11] trace: [tcg] Include TCG-tracing header on all targets

2014-05-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- target-alpha/translate.c |3 +++ target-arm/translate-a64.c|2 ++ target-arm/translate.c|3 +++ target-cris/translate.c |3 +++ target-i386/translate.c |3 +++ target-lm32/translate.c |

Re: [Qemu-devel] [PATCH v2 06/20] dmg: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:39 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the dmg

[Qemu-devel] [PATCH v5 03/11] trace: [tcg] Argument type transformation machinery

2014-05-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova vilan...@ac.upc.edu --- scripts/tracetool/__init__.py | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index e8e8edc..bd3fd85 100644 ---

[Qemu-devel] [PATCH 3/6] usb-uhci: clean up uhci resource when pci-uhci exit

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com clean up uhci resource when uhci pci device exit Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-uhci.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 9b1166b..27b1f04 100644 ---

[Qemu-devel] [PATCH 0/6] usb: usb host adapter hotplug

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com add support for usb host adapter hotplug, as the same as other pci devices. Gerd, I want to add some qtest for usb host adapters, would you please pull the ehci/uhci tests added by you a few days ago. Thanks! Gonglei (6): usb: add usb_bus_release function

[Qemu-devel] [PATCH 1/6] usb: add usb_bus_release function

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com add global variables releasing logic when the usb buses were removed or hot-unpluged. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/bus.c | 8 include/hw/usb.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/usb/bus.c

[Qemu-devel] [PATCH 5/6] usb-xhci: add exit function

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com clean up xhci resource when xhci pci device exit Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-xhci.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index

[Qemu-devel] [PATCH 2/6] usb-ohci: add exit function

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com clean up ohci resource when ohci pci device exit Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-ohci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index cd87074..3add206 100644 ---

[Qemu-devel] [PATCH 6/6] usb: tag usb host controller as hotpluggable

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com usb host controller should be able to support hotplug/unplug, as the same as the other pci devices, which not enable multifunction capability. BTW, the qemu have not the capability to support hotplug mulitfuncition pci devices at present. Signed-off-by:

[Qemu-devel] [PATCH 4/6] usb-ehci-pci: add exit function

2014-05-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com clean up ehci resource when ehci pci device exit Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-ehci-pci.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index

Re: [Qemu-devel] [PATCH v2 07/20] iscsi: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:40 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the

Re: [Qemu-devel] [PATCH v2 08/20] nfs: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:41 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the nfs

Re: [Qemu-devel] [PATCH v2 09/20] parallels: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:42 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the

Re: [Qemu-devel] [PATCH v2 10/20] qcow1: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:43 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the

Re: [Qemu-devel] [PATCH v2 12/20] qed: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:45 (+0200), Kevin Wolf wrote : Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the qed

Re: [Qemu-devel] [Qemu-stable] qemu segfault in librbd / aio_notify

2014-05-30 Thread Stefan Priebe
Hi, even with +From 271c0f68b4eae72691721243a1c37f46a3232d61 Mon Sep 17 00:00:00 2001 +From: Fam Zheng f...@redhat.com +Date: Wed, 21 May 2014 10:42:13 +0800 +Subject: [PATCH] aio: Fix use-after-free in cancellation path applied i saw today segfault with the following backtrace: Program

Re: [Qemu-devel] [PATCH v3 9/9] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-30 Thread Alexey Kardashevskiy
On 05/30/2014 08:08 PM, Alexander Graf wrote: On 30.05.14 11:34, Alexey Kardashevskiy wrote: Currently SPAPR PHB keeps track of all allocated MSI (here and below MSI stands for both MSI and MSIX) interrupt because XICS used to be unable to reuse interrupts. This is a problem for dynamic MSI

[Qemu-devel] Question about gen_jmp_tb

2014-05-30 Thread Jack Biggs
Hi all, I'm trying to add some arbitrary code to the end of each translation block, and I wanted to confirm my suspicion that each translation block ends in a jmp instruction, and that each translation block ends (or jumps to another TB) with the call to gen_jmp_tb. My guest is i386, but if

Re: [Qemu-devel] [PATCH v3 9/9] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-30 Thread Alexander Graf
On 30.05.14 15:36, Alexey Kardashevskiy wrote: On 05/30/2014 08:08 PM, Alexander Graf wrote: On 30.05.14 11:34, Alexey Kardashevskiy wrote: Currently SPAPR PHB keeps track of all allocated MSI (here and below MSI stands for both MSI and MSIX) interrupt because XICS used to be unable to reuse

Re: [Qemu-devel] [PATCH 0/1] Support Archipelago as a QEMU block backend

2014-05-30 Thread Vangelis Koukis
On Fri, May 30, 2014 at 11:12:55am +0200, Kevin Wolf wrote: Am 29.05.2014 um 13:14 hat Chrysostomos Nanakos geschrieben: Hello team, this is a patch implementing support for a new storage layer, Archipelago [1][2]. We've been using Archipelago in our IaaS public cloud production

[Qemu-devel] [PATCH 4/9] target-arm: VFPv4 implies half-precision extension

2014-05-30 Thread Peter Maydell
VFPv4 implies the presence of the half-precision floating point extension (which is optional in VFPv3). Add this implied rule to arm_cpu_realizefn() and remove some no-longer-needed explicit setting of the bit in initfns. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/cpu.c

[Qemu-devel] [patch 1/2] generate device configuration file header

2014-05-30 Thread Marcelo Tosatti
Required to use device CONFIG_ options from C code. To be used by next patch. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/Makefile.target === --- qemu.orig/Makefile.target +++ qemu/Makefile.target @@ -37,6 +37,9

[Qemu-devel] [patch 2/2] add rtc_reset_reinjection QMP command

2014-05-30 Thread Marcelo Tosatti
It is necessary to reset RTC interrupt backlog if guest time is synchronized via a different mechanism, such as QGA's guest-set-time command. Failing to do so causes both corrections to be applied (summed), resulting in an incorrect guest time. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[Qemu-devel] [patch 0/2] add QMP command to reset rtc interrupt backlog

2014-05-30 Thread Marcelo Tosatti
It is necessary to reset RTC interrupt backlog if guest time is synchronized via a different mechanism, such as QGA's guest-set-time command. Failing to do so causes both corrections to be applied (summed), resulting in an incorrect guest time.

Re: [Qemu-devel] [RFC 1/5] qmp: add query-memory-devices command

2014-05-30 Thread Benoît Canet
The Friday 30 May 2014 à 13:47:21 (+0200), Igor Mammedov wrote : On Fri, 30 May 2014 13:43:52 +0200 Benoît Canet benoit.ca...@irqsave.net wrote: The Wednesday 28 May 2014 à 09:30:11 (-0600), Eric Blake wrote : On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... allowing to get state of

Re: [Qemu-devel] [PATCH] trace: Replace fprintf with error_report and print location

2014-05-30 Thread Lluís Vilanova
Alexey Kardashevskiy writes: On 05/29/2014 10:42 PM, Lluís Vilanova wrote: Alexey Kardashevskiy writes: This replaces fprintf(stderr) with error_report. This prints line number of the trace which does not exist or is not traceable. A little nit pick; it shows an error when some of the

[Qemu-devel] qemu 2.0 segfaults in event notifier

2014-05-30 Thread Stefan Priebe
Hi, even with +From 271c0f68b4eae72691721243a1c37f46a3232d61 Mon Sep 17 00:00:00 2001 +From: Fam Zheng f...@redhat.com +Date: Wed, 21 May 2014 10:42:13 +0800 +Subject: [PATCH] aio: Fix use-after-free in cancellation path applied i saw today segfault with the following backtrace: Program

Re: [Qemu-devel] [PATCH v1 05/16] target-arm: Add ESR_EL2 and 3

2014-05-30 Thread Greg Bellows
On 30 May 2014 02:28, Edgar E. Iglesias edgar.igles...@gmail.com wrote: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h| 2 +- target-arm/helper.c | 8 2 files changed, 9 insertions(+), 1

[Qemu-devel] [Bug 1324724] Re: make install fails on arm host

2014-05-30 Thread Peter Maydell
Not sure this is really ARM related, is it? It looks like it will happen any time we do a make install and we're using strip and we've built something in some subdir like fsdev. ** Patch added: Probably wrong fix. https://bugs.launchpad.net/bugs/1324724/+attachment/4122442/+files/fix.patch

[Qemu-devel] [PATCH 3/9] target-arm: Clean up handling of ARMv8 optional feature bits

2014-05-30 Thread Peter Maydell
CRC and crypto are both optional v8 extensions, so FEATURE_V8 should not imply them. Instead we should set these bits in the initfns for the 32-bit and 64-bit cpu any and for the Cortex-A57. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/cpu.c | 8

[Qemu-devel] [PATCH 1/9] target-arm: arm_any_initfn() should never set ARM_FEATURE_AARCH64

2014-05-30 Thread Peter Maydell
The arm_any_initfn() is used only for the 32-bit linux-user cpu any, so it only gets called in builds where TARGET_AARCH64 is not defined. Remove the unreachable line which sets ARM_FEATURE_AARCH64. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/cpu.c | 3 --- 1 file

[Qemu-devel] [PATCH 2/9] target-arm: Remove unnecessary setting of feature bits

2014-05-30 Thread Peter Maydell
FEATURE_V8 implies both FEATURE_V7MP and FEATURE_ARM_DIV, so we don't need to set them explicitly in initfns which set the V8 feature bit. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/cpu.c | 2 -- target-arm/cpu64.c | 2 -- 2 files changed, 4 deletions(-) diff --git

[Qemu-devel] [PATCH 6/9] target-arm: A32/T32: Mask CRC value in calling code, not helper

2014-05-30 Thread Peter Maydell
Bring the 32-bit CRC helper functions into line with the A64 ones, by masking the high bytes of the value in the calling code rather than the helper. This is more efficient since we can determine the mask at translation time. Signed-off-by: Peter Maydell peter.mayd...@linaro.org ---

[Qemu-devel] [PATCH 0/9] target-arm: A64: Implement crypto insns

2014-05-30 Thread Peter Maydell
This patchseries (which sits on top of the v8 32-bit SHA patches I sent out yesterday) implements all the instructions in the optional CRC and crypto extensions. The first four patches do some preliminary cleanup of various minor problems with the feature bit setting; patch 5 is A64 CRC; patch 6

[Qemu-devel] [PATCH 9/9] target-arm: A64: Implement two-register SHA instructions

2014-05-30 Thread Peter Maydell
Implement the two-register SHA instruction group from the optional Crypto Extensions. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/elfload.c | 2 ++ target-arm/translate-a64.c | 45 - 2 files changed, 46 insertions(+), 1

[Qemu-devel] [PATCH 7/9] target-arm: A64: Implement AES instructions

2014-05-30 Thread Peter Maydell
Implement the AES instructions from the optional Crypto Extensions. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/elfload.c | 1 + target-arm/translate-a64.c | 51 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH 8/9] target-arm: A64: Implement 3-register SHA instructions

2014-05-30 Thread Peter Maydell
Implement the 3-register SHA instruction group from the optional Crypto Extensions. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/translate-a64.c | 59 +- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 5/9] target-arm: A64: Implement CRC instructions

2014-05-30 Thread Peter Maydell
Implement the optional A64 CRC instructions. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/elfload.c | 1 + target-arm/helper-a64.c| 30 ++ target-arm/helper-a64.h| 2 ++ target-arm/translate-a64.c | 54

Re: [Qemu-devel] [patch 2/2] add rtc_reset_reinjection QMP command

2014-05-30 Thread Eric Blake
On 05/30/2014 08:05 AM, Marcelo Tosatti wrote: It is necessary to reset RTC interrupt backlog if guest time is synchronized via a different mechanism, such as QGA's guest-set-time command. Failing to do so causes both corrections to be applied (summed), resulting in an incorrect guest time.

[Qemu-devel] [PATCH 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-05-30 Thread Leon Alrae
The following patchset implements MIPS64 Release 6 Instruction Set. New instructions are added and also there is a number of instructions which are deleted or moved (the encodings have changed). The MIPS64 Release 6 documentation is available: http://www.imgtec.com/mips/architectures/mips64.asp

[Qemu-devel] [PATCH 01/21] target-mips: introduce MIPS64R6 ISA and a new generic CPU

2014-05-30 Thread Leon Alrae
Define ISA_MIPS64R6 and add MIPS64R6-generic core supporting new ISA. Additionally define ISA_MIPS64R3 and ISA_MIPS64R5 to fill the gap. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/mips-defs.h | 28 +++- target-mips/translate_init.c | 29

[Qemu-devel] [PATCH 03/21] target-mips: add SELEQZ and SELNEZ instructions

2014-05-30 Thread Leon Alrae
Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c|8 target-mips/translate.c | 16 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index 2106b57..b950e53 100644 --- a/disas/mips.c +++

[Qemu-devel] [PATCH 17/21] target-mips: add new Floating Point Comparison instructions

2014-05-30 Thread Leon Alrae
From: Yongbok Kim yongbok@imgtec.com Signed-off-by: Yongbok Kim yongbok@imgtec.com Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c| 44 ++ target-mips/helper.h| 27 ++ target-mips/op_helper.c | 113 ++

[Qemu-devel] [PATCH 04/21] target-mips: move LL and SC instructions

2014-05-30 Thread Leon Alrae
The encoding of LL and SC instruction has changed in MIPS32 Release 6. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c|9 - target-mips/translate.c | 29 +++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 21/21] target-mips: use pointers referring to appropriate decoding function

2014-05-30 Thread Leon Alrae
After selecting CPU in QEMU the base ISA will not change. Therefore introducing *_arch function pointers that are set in cpu_state_reset to point at the appropriate SPECIAL and SPECIAL3 decoding functions, and avoid unnecessary 'if' statements. Signed-off-by: Leon Alrae leon.al...@imgtec.com ---

[Qemu-devel] [PATCH 06/21] target-mips: split decode_opc_special* into *_r6 and *_legacy

2014-05-30 Thread Leon Alrae
For better code readability and to avoid 'if' statements for all R6 and preR6 instructions whose opcodes are the same - decode_opc_special* functions are split into functions with _r6 and _legacy suffixes. *_r6 functions will contain instructions which were introduced in R6. *_legacy functions

[Qemu-devel] [PATCH 07/21] target-mips: signal RI Exception on DSP and Loongson instructions

2014-05-30 Thread Leon Alrae
Move DSP and Loongson instruction to *_legacy functions as they have been removed in R6. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/translate.c | 195 --- 1 files changed, 98 insertions(+), 97 deletions(-) diff --git

[Qemu-devel] [PATCH 11/21] target-mips: Status.UX/SX/KX enable 32-bit address wrapping

2014-05-30 Thread Leon Alrae
In R6 the special behaviour for data references is also specified for Kernel and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic MIPS_HFLAG_X indicating whether 64-bit mode is enabled in current operating mode. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/cpu.h

[Qemu-devel] [PATCH 14/21] target-mips: add Addressing and PC-relative instructions

2014-05-30 Thread Leon Alrae
Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c| 41 +- target-mips/translate.c | 194 --- 2 files changed, 222 insertions(+), 13 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index bee39d8..6def662

[Qemu-devel] [PATCH 12/21] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions

2014-05-30 Thread Leon Alrae
From: Yongbok Kim yongbok@imgtec.com Signed-off-by: Yongbok Kim yongbok@imgtec.com Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c|4 ++ target-mips/helper.h|2 + target-mips/op_helper.c | 16 +++ target-mips/translate.c | 103

[Qemu-devel] [PATCH 02/21] target-mips: signal RI Exception on instructions removed in R6

2014-05-30 Thread Leon Alrae
Signal Reserved Instruction Exception on instructions that do not exist in R6. In this commit the following groups of preR6 instructions are marked as deleted: - Floating Point Paired Single - Floating Point Compare - conditional moves / branches on FPU conditions - branch likelies - unaligned

[Qemu-devel] [PATCH 10/21] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6

2014-05-30 Thread Leon Alrae
Also consider OPC_SPIM instruction as deleted in R6 because it is overlaping with MIPS32R6 SDBBP. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c|5 ++ target-mips/translate.c | 120 --- 2 files changed, 66

[Qemu-devel] [PATCH 20/21] mips_malta: update malta's pseudo-bootloader - replace JR with JALR

2014-05-30 Thread Leon Alrae
JR has been removed in R6 and now this instruction will cause Reserved Instruction Exception. Therefore use JALR with rd=0 which is equivalent to JR. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- hw/mips/mips_malta.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH 16/21] target-mips: add new Floating Point instructions

2014-05-30 Thread Leon Alrae
In terms of encoding MIPS32R6 MIN.fmt, MAX.fmt, MINA.fmt, MAXA.fmt replaced MIPS-3D RECIP1, RECIP2, RSQRT1, RSQRT2 instructions. In R6 all Floating Point instructions are supposed to be IEEE-2008 compliant i.e. FIR.HAS2008 always 1. However, QEMU softfloat for MIPS has not been updated yet.

[Qemu-devel] [PATCH 18/21] target-mips: do not allow Status.FR=0 mode in 64-bit FPU

2014-05-30 Thread Leon Alrae
Status.FR bit must be ignored on write and read as 1 when an implementation of Release 6 of the Architecture in which a 64-bit floating point unit is implemented. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/translate.c |7 +++ 1 files changed, 7 insertions(+), 0

[Qemu-devel] [PATCH 15/21] softfloat: add functions corresponding to IEEE-2008 min/maxNumMag

2014-05-30 Thread Leon Alrae
Add abs argument to the existing softfloat minmax() function and define new float{32,64}_{min,max}nummag functions. minnummag(x,y) returns x if |x| |y|, returns y if |y| |x|, otherwise minnum(x,y) maxnummag(x,y) returns x if |x| |y|, returns y if

[Qemu-devel] To measure Interrupt latency

2014-05-30 Thread saravanakumar punith
Hi, Is there any way to measure interrupt latency ( delay between interrupt occurred and interrupt service routine is getting called) in VM. Consider a device is assigned to a VM (using passthrough). Now, interrupt is triggered for the device. I believe kernel code in Host side is getting called

[Qemu-devel] [PATCH 13/21] target-mips: add Compact Branches

2014-05-30 Thread Leon Alrae
From: Yongbok Kim yongbok@imgtec.com Introduce MIPS32R6 Compact Branch instructions which do not have delay slot - they have forbidden slot instead. However, current implementation does not support forbidden slot yet. Signed-off-by: Yongbok Kim yongbok@imgtec.com Signed-off-by: Leon

[Qemu-devel] [PATCH 19/21] target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions

2014-05-30 Thread Leon Alrae
From: Yongbok Kim yongbok@imgtec.com Signed-off-by: Yongbok Kim yongbok@imgtec.com Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c|2 ++ target-mips/translate.c | 18 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 08/21] target-mips: move PREF, CACHE, LLD and SCD instructions

2014-05-30 Thread Leon Alrae
The encoding of PREF, CACHE, LLD and SCD instruction changed in MIPS32R6. Additionally, the hint codes in PREF instruction greater than or equal to 24 generate Reserved Instruction Exception. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c|4

[Qemu-devel] [PATCH 09/21] target-mips: redefine Integer Multiply and Divide instructions

2014-05-30 Thread Leon Alrae
Use R6_ prefix in front of all new Multiply / Divide instructions for easier differentiation between R6 and preR6. Signed-off-by: Leon Alrae leon.al...@imgtec.com --- disas/mips.c| 16 ++ target-mips/translate.c | 351 --- 2 files

Re: [Qemu-devel] Question about hcd-ohci and address_space_translate

2014-05-30 Thread BALATON Zoltan
On Fri, 30 May 2014, Paolo Bonzini wrote: Il 30/05/2014 00:33, BALATON Zoltan ha scritto: usb-ohci: pci-ohci: USB Operational Unassigned mem read 07c9ae00 Unassigned mem read 07c9ae04 [...] Unassigned mem read 07c9ae84 usb-ohci: HCCA read error at 7c9ae00 ohci_die: DMA

[Qemu-devel] [PATCH] target-arm: implement PD0/PD1 bits for TTBCR

2014-05-30 Thread Fabian Aggeler
Corrected handling of writes to TTBCR for ARMv8 (previously UNK/SBZP bits are not RES0) and ARMv7 (new bits PD0/PD1 for CPUs with Security Extensions). Extracting T0SZ/T1SZ now uses 3 bits in Aarch32 and 6 bits in Aarch64 as bits [5:3] are now RES0 when writing to Aarch32 TTBCR, and not guaranteed

Re: [Qemu-devel] [RFC 2/5] acpi: introduce TYPE_ACPI_DEVICE_IF interface

2014-05-30 Thread Eric Blake
On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... it will be used to abstract generic ACPI bits from device that implements ACPI interface. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/Makefile.objs|1 + hw/acpi/acpi_interface.c | 15

Re: [Qemu-devel] [RFC 4/5] qmp: add query-acpi-ospm-status command

2014-05-30 Thread Eric Blake
On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... to get ACPI OSPM status reported by ACPI devices via _OST method. Signed-off-by: Igor Mammedov imamm...@redhat.com --- qapi-schema.json |9 + qmp-commands.hx | 22 ++ qmp.c| 20

Re: [Qemu-devel] [RFC 5/5] qmp: add ACPI_DEVICE_OST event handling

2014-05-30 Thread Eric Blake
On 05/28/2014 08:57 AM, Igor Mammedov wrote: emmits event when ACPI OSPM evaluates _OST method s/emmits/emits/ of ACPI device. Signed-off-by: Igor Mammedov imamm...@redhat.com --- docs/qmp/qmp-events.txt | 10 ++ hw/acpi/memory_hotplug.c | 29 -

[Qemu-devel] [v3 01/12] block: Auto-generate node_names for each BDS entry

2014-05-30 Thread Jeff Cody
Currently, node_name is only filled in when done so explicitly by the user. If no node_name is specified, then the node name field is not populated. If node_names are automatically generated when not specified, that means that all block job operations can be done by reference to the unique

[Qemu-devel] [v3 03/12] block: Add overlay BDS pointer into the BlockDriverState struct

2014-05-30 Thread Jeff Cody
Now that node-names can reference an individual BlockDriverState without needing to navigate downwards from the 'device' level, in order to find the top-most image (active layer) we need a pointer to the overlay of a BDS. This will allow QMP commands to reference an image solely by its node-name,

[Qemu-devel] [v3 12/12] block: add QAPI command to allow live backing file change

2014-05-30 Thread Jeff Cody
This allows a user to make a live change to the backing file recorded in an open image. The image file to modify can be specified 2 ways: 1) 'device' string, and image filename 2) image node-name Note: this does not cause the backing file itself to be reopened; it merely changes the backing

[Qemu-devel] [v3 09/12] block: add ability for block-stream to use node-name

2014-05-30 Thread Jeff Cody
This adds the ability for block-stream to use node-name arguments for base, to specify the backing image to stream from. Both 'base' and 'base-node-name' are optional, but mutually exclusive. Either can be specified, but not both together. The argument for device is now optional as well, so long

Re: [Qemu-devel] [RFC 2/5] acpi: introduce TYPE_ACPI_DEVICE_IF interface

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 09:19:04 -0600 Eric Blake ebl...@redhat.com wrote: On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... it will be used to abstract generic ACPI bits from device that implements ACPI interface. Signed-off-by: Igor Mammedov imamm...@redhat.com ---

[Qemu-devel] [v3 05/12] block: simplify bdrv_find_base()

2014-05-30 Thread Jeff Cody
This simplifies the function bdrv_find_base(), while keeping the same functionality. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Jeff Cody jc...@redhat.com --- block.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [v3 11/12] block: Add QMP documentation for block-stream

2014-05-30 Thread Jeff Cody
The QMP command 'block-stream' was missing QMP documentation. Add that documentation. Signed-off-by: Jeff Cody jc...@redhat.com --- qmp-commands.hx | 58 + 1 file changed, 58 insertions(+) diff --git a/qmp-commands.hx b/qmp-commands.hx

Re: [Qemu-devel] [PATCH v5 00/11] trace: [tcg] Allow tracing guest events in TCG-generated code

2014-05-30 Thread Richard Henderson
On 05/30/2014 05:11 AM, Lluís Vilanova wrote: Changes in v5: * Rename 'gen_helper_trace_${name}_exec' as 'gen_helper_trace_${name}_exec_wrapper'. * Split generation of 'gen_helper_trace_${name}_exec_wrapper' into a separate file (trace/generated-helpers-wrappers.h), using the new

[Qemu-devel] [v3 06/12] block: make 'top' argument to block-commit optional

2014-05-30 Thread Jeff Cody
Now that active layer block-commit is supported, the 'top' argument no longer needs to be mandatory. Change it to optional, with the default being the active layer in the device chain. Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Jeff Cody

Re: [Qemu-devel] [RFC 2/5] acpi: introduce TYPE_ACPI_DEVICE_IF interface

2014-05-30 Thread Eric Blake
On 05/30/2014 09:39 AM, Igor Mammedov wrote: +# @source_event: Arg0 - An Integer containing the source event +# +# @status_code: Arg1 – An Integer containing the status code +{ 'type': 'ACPIOSTInfo', + 'data' : { 'device': 'str', + 'source': 'int', + 'status':

[Qemu-devel] [v3 00/12] Modify block jobs to use node-names

2014-05-30 Thread Jeff Cody
This is v3 of block: Modify block-commit to use node-names. Changes: * Add Eric's reviewed-by * Addressed Eric's review comments * Dropped HMP changes * Added helper function for setting the overlay, and set the overlay in bdrv_append() * Use bs-backing_file instead of bs-backing_hd-filename

Re: [Qemu-devel] [RFC 4/5] qmp: add query-acpi-ospm-status command

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 09:22:56 -0600 Eric Blake ebl...@redhat.com wrote: On 05/28/2014 08:57 AM, Igor Mammedov wrote: ... to get ACPI OSPM status reported by ACPI devices via _OST method. Signed-off-by: Igor Mammedov imamm...@redhat.com --- qapi-schema.json |9 +

[Qemu-devel] [v3 08/12] block: extend block-commit to accept a string for the backing file

2014-05-30 Thread Jeff Cody
On some image chains, QEMU may not always be able to resolve the filenames properly, when updating the backing file of an image after a block commit. For instance, certain relative pathnames may fail, or drives may have been specified originally by file descriptor (e.g. /dev/fd/???), or a

Re: [Qemu-devel] [RFC 5/5] qmp: add ACPI_DEVICE_OST event handling

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 09:26:05 -0600 Eric Blake ebl...@redhat.com wrote: On 05/28/2014 08:57 AM, Igor Mammedov wrote: emmits event when ACPI OSPM evaluates _OST method s/emmits/emits/ of ACPI device. Signed-off-by: Igor Mammedov imamm...@redhat.com --- docs/qmp/qmp-events.txt

[Qemu-devel] [v3 07/12] block: Accept node-name arguments for block-commit

2014-05-30 Thread Jeff Cody
This modifies the block operation block-commit so that it will accept node-name arguments for either 'top' or 'base' BDS. The filename and node-name are mutually exclusive to each other; i.e.: top and top-node-name are mutually exclusive (enforced) base and base-node-name are mutually

[Qemu-devel] [v3 10/12] block: add backing-file option to block-stream

2014-05-30 Thread Jeff Cody
On some image chains, QEMU may not always be able to resolve the filenames properly, when updating the backing file of an image after a block job. For instance, certain relative pathnames may fail, or drives may have been specified originally by file descriptor (e.g. /dev/fd/???), or a relative

<    1   2   3   4   >