Re: [Qemu-devel] [PULL v2 0/7] Block patches

2015-11-11 Thread Marc-André Lureau
Hi Peter On Wed, Nov 11, 2015 at 9:33 PM, Peter Maydell wrote: > On 10 November 2015 at 18:41, Peter Maydell wrote: >> On 9 November 2015 at 17:50, Marc-André Lureau wrote: >>> I can imagine a test starting a server thread and 2 qemu instances >>> would take more than 5s on such configuration t

Re: [Qemu-devel] [PATCH 0/3] Postcopy minor fixes

2015-11-11 Thread Christian Borntraeger
Am 11.11.2015 um 15:02 schrieb Dr. David Alan Gilbert (git): > From: "Dr. David Alan Gilbert" > > Hi, > These are three small fixes for the postcopy code; > the first two coming from Bharata's testing on Power, and > the last one being a text fixup that Eric asked for. > > The first only affec

Re: [Qemu-devel] [PATCH] vl: Use exit(1) when requested VGA interface is unavailable

2015-11-11 Thread Eric Blake
On 11/11/2015 01:39 PM, Eduardo Habkost wrote: > Instead of using exit(0), use exit(1) when an unavailable VGA > interface is used in the command-line to indicate it's an error. > > Signed-off-by: Eduardo Habkost > --- > vl.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-)

Re: [Qemu-devel] [PATCH v7 03/24] block: Release dirty bitmaps in bdrv_close()

2015-11-11 Thread John Snow
On 11/09/2015 05:39 PM, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverStates with > dirty bitmaps still attached to them. In the past, we got around that > very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and > bdrv_close() simply ignoring that co

[Qemu-devel] [PATCH 1/2] vl: Table-based select_vgahw()

2015-11-11 Thread Eduardo Habkost
Instead of implementing separate check functions for each vga interface type, add a table enumerating the possible VGA interfaces. Signed-off-by: Eduardo Habkost --- include/sysemu/sysemu.h | 1 + vl.c| 114 ++-- 2 files changed,

[Qemu-devel] [PATCH 0/2] vl: Simplify vga interface configuration code

2015-11-11 Thread Eduardo Habkost
Instead of duplicating class lookup and strstart() code for each VGA interface type, use a table to implement select_vgahw(). This series needs the following patch to be applied first: From: Eduardo Habkost Date: Wed, 11 Nov 2015 18:39:18 -0200 Message-Id: <1447274358-2772-1-git-send-email

[Qemu-devel] [PATCH 2/2] vl: Replace *_vga_available() functions with class_names field

2015-11-11 Thread Eduardo Habkost
Instead of requiring a separate function for each VGA interface, just enumerate the corresponding class names on struct VGAInterfaceInfo. Signed-off-by: Eduardo Habkost --- vl.c | 70 +++- 1 file changed, 23 insertions(+), 47 deleti

Re: [Qemu-devel] [OpenBIOS] CUDA has problems with Mac OS 10.4

2015-11-11 Thread Andreas Tobler
On 11.11.15 19:55, Programmingkid wrote: On Nov 11, 2015, at 12:54 PM, Mark Cave-Ayland wrote: On 11/11/15 15:15, Programmingkid wrote: I built Cormac O'Brien's QEMU repo for Mac OS 9 and tried to boot my Mac OS 10.4 boot cd. Mac OS 10.4's kernel panics because of a CUDA problem. I did use

[Qemu-devel] [PATCH] nseries: Don't use qemu_hw_version()

2015-11-11 Thread Eduardo Habkost
nseries doesn't use qemu_set_hw_version() and doesn't need the compatibility magic of qemu_hw_version(). Use QEMU_VERSION directly. Signed-off-by: Eduardo Habkost --- hw/arm/nseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 2a

Re: [Qemu-devel] [PATCH v7 10/24] iotests: Add test for eject under NBD server

2015-11-11 Thread John Snow
On 11/09/2015 05:39 PM, Max Reitz wrote: > This patch adds a test for ejecting the BlockBackend an NBD server is > connected to (the NBD server is supposed to stop). > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/140 | 92 > ++ > tests/

[Qemu-devel] [PATCH for-2.5 0/2] Promote 'input-send-event' to supported

2015-11-11 Thread Eric Blake
Now that we have introspection, we should consider what we are exposing to the end user, and try to avoid spurious changes in future versions. There has been debate about switching the qapi code generator to produce different output for 'CamelCase' enum values; the easiest way to ensure this doesn

[Qemu-devel] [PATCH for-2.5 2/2] input: Promote 'input-send-event' to stable API

2015-11-11 Thread Eric Blake
We've had 'x-input-send-event' since 2.3, with no further changes to the interface other than tweaks in the previous patch to the spelling of the enum constants ('X' and 'WheelUp' changed to 'x' and 'wheel-up'). What's more, changing the spelling of enum constants is not easy to introspect prior t

[Qemu-devel] [PATCH for-2.5 1/2] input: Avoid CamelCase in InputEvent enums

2015-11-11 Thread Eric Blake
Our documentation states that we prefer 'lower-case', rather than 'CamelCase', for qapi enum values. The InputButton and InputAxis enums violated this convention. However, they are currently used primarily for generating code that is used internally; their only exposure through QMP is via the exp

[Qemu-devel] [RFC] ide: Don't use qemu_hw_version() for firmware revision

2015-11-11 Thread Eduardo Habkost
The IDEState.version field is used for firmware version information returned to the guest. Updating firmware information on QEMU upgrade is supposed to be acceptable, so IDE doesn't need the version compatibility magic of qemu_hw_version() and can use QEMU_VERSION directly. Signed-off-by: Eduardo

Re: [Qemu-devel] [OpenBIOS] CUDA has problems with Mac OS 10.4

2015-11-11 Thread Programmingkid
On Nov 11, 2015, at 4:32 PM, Andreas Tobler wrote: > On 11.11.15 19:55, Programmingkid wrote: >> >> On Nov 11, 2015, at 12:54 PM, Mark Cave-Ayland wrote: >> >>> On 11/11/15 15:15, Programmingkid wrote: >>> I built Cormac O'Brien's QEMU repo for Mac OS 9 and tried to boot my Mac OS 1

Re: [Qemu-devel] [PATCH 1/2] vl: Table-based select_vgahw()

2015-11-11 Thread Eric Blake
On 11/11/2015 02:27 PM, Eduardo Habkost wrote: > Instead of implementing separate check functions for each vga > interface type, add a table enumerating the possible VGA > interfaces. > > Signed-off-by: Eduardo Habkost > --- > include/sysemu/sysemu.h | 1 + > vl.c| 114 > +

Re: [Qemu-devel] [PATCH 2/2] vl: Replace *_vga_available() functions with class_names field

2015-11-11 Thread Eric Blake
On 11/11/2015 02:27 PM, Eduardo Habkost wrote: > Instead of requiring a separate function for each VGA interface, > just enumerate the corresponding class names on struct > VGAInterfaceInfo. > > Signed-off-by: Eduardo Habkost > --- > vl.c | 70 > +++--

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-11 Thread Nishanth Aravamudan
On 11.11.2015 [12:41:26 +1100], David Gibson wrote: > On Tue, Nov 10, 2015 at 04:56:38PM -0800, Nishanth Aravamudan wrote: > > On 11.11.2015 [11:17:58 +1100], David Gibson wrote: > > > On Mon, Nov 09, 2015 at 08:22:32PM -0800, Sukadev Bhattiprolu wrote: > > > The trouble with xscom is that it's

[Qemu-devel] [PULL for-2.5 0/1] qemu-ga fix for 2.5

2015-11-11 Thread Michael Roth
The following changes since commit 3c07587d49458341510360557c849e93e9afaf59: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-next-2015' into staging (2015-11-11 09:34:18 +) are available in the git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2015

[Qemu-devel] [PULL for-2.5 1/1] qga: fix append file open modes for win32

2015-11-11 Thread Michael Roth
From: Kirk Allan For append file open modes, use FILE_APPEND_DATA for the desired access for writing at the end of the file. Version 2: For "a+", "ab+", and "a+b" modes use FILE_APPEND_DATA|GENERIC_READ. ORing in GENERIC_READ starts a read at the begining of the file. All writes will append to

[Qemu-devel] [PATCH 1/1] configure: use appropriate code fragment for -fstack-protector checks

2015-11-11 Thread Rodrigo Rebello
The check for stack-protector support consisted in compiling and linking the test program below (output by function write_c_skeleton()) with the compiler flag -fstack-protector-strong first and then with -fstack-protector-all if the first one failed to work: int main(void) { return 0; } This ca

Re: [Qemu-devel] [PATCH 12/13] cuda.c: fix T2 timer and enable its interrupt

2015-11-11 Thread Mark Cave-Ayland
On 11/11/15 06:52, David Gibson wrote: > On Wed, Nov 04, 2015 at 11:25:43PM +, Mark Cave-Ayland wrote: >> On 04/11/15 03:40, David Gibson wrote: >> >>> On Fri, Oct 23, 2015 at 02:56:37PM +0100, Mark Cave-Ayland wrote: Fix the counter loading logic and enable the T2 interrupt when the time

Re: [Qemu-devel] [PATCH v10 00/30] qapi member collision (post-introspection cleanups, subset C')

2015-11-11 Thread Eric Blake
On 11/10/2015 04:57 AM, Markus Armbruster wrote: > I think I'll close the QAPI floodgates for 2.5 now. Bug fixes are of > course exempted, and if we find something that impacts ABI, I'm willing > to consider patches. Work on our backlog can continue uninterrupted; > I'm happy to collect patches

[Qemu-devel] [PATCH v2 01/13] PPC: Allow Rc bit to be set on mtspr

2015-11-11 Thread Mark Cave-Ayland
From: Alexander Graf According to the ISA setting the Rc bit on mtspr is undefined behavior. Real 750 hardware simply ignores the bit and doesn't touch cr0 though. Unfortunately, Mac OS 9 relies on this fact and executes a few mtspr instructions (to set XER for example) with Rc set. So let's ha

[Qemu-devel] [PATCH v2 06/13] cuda.c: implement simple CUDA_GET_6805_ADDR command

2015-11-11 Thread Mark Cave-Ayland
This simply returns an empty response with no error status as implemented by MOL to allow MacOS 9 boot to proceed further. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson --- hw/misc/macio/cuda.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/misc/macio/cuda.c b/hw/misc/

[Qemu-devel] [PATCH v2 02/13] PPC: Fix lswx bounds checks

2015-11-11 Thread Mark Cave-Ayland
From: Alexander Graf The lswx instruction checks whether the desired string actually fits into all defined registers. Unfortunately it does the calculation wrong, resulting in illegal instruction traps for loads that really should fit. Fix it up, making Mac OS happier. Signed-off-by: Alexander

[Qemu-devel] [PATCH v2 04/13] cuda.c: fix CUDA ADB error packet format

2015-11-11 Thread Mark Cave-Ayland
According to MOL, ADB error packets should be of the form (type, status, cmd) rather than just (type, status). This fixes ADB device detection under MacOS 9. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/m

[Qemu-devel] [PATCH v2 00/13] Mac OS 9 compatibility improvements (upstream rework)

2015-11-11 Thread Mark Cave-Ayland
This is a rework of Cormac O'Brien's GSoC project to try and boot MacOS 9 under QEMU, the original version of which was posted to the qemu-devel list at the end of August (https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02521.html). The patchset consisted of some simple patches from Alex

[Qemu-devel] [PATCH v2 05/13] cuda.c: fix CUDA_PACKET response packet format

2015-11-11 Thread Mark Cave-Ayland
According to comments in MOL, the response to a CUDA_PACKET should be one of the following: Reply: (CUDA_PACKET, status, cmd) Error: (ERROR_PACKET, status, CUDA_PACKET, cmd) Update cuda_receive_packet() accordingly to reflect this in order to make MacOS 9 happy. Signed-off-by: Mark Cave-Ayland

[Qemu-devel] [PATCH v2 08/13] cuda.c: fix CUDA SR interrupt clearing

2015-11-11 Thread Mark Cave-Ayland
Make sure that we also clear the data and clock interrupts at the same time. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index b7e9dee..364473f 100644 --- a/hw/misc/

[Qemu-devel] [PATCH v2 03/13] PPC: mac99: Always add USB controller

2015-11-11 Thread Mark Cave-Ayland
From: Alexander Graf The mac99 machines always have a USB controller. Usually not having one around doesn't hurt quite as much, but Mac OS 9 really really wants one or it crashes on bootup. So always add OHCI to make it happy. Signed-off-by: Alexander Graf Signed-off-by: Mark Cave-Ayland Revi

[Qemu-devel] [PATCH v2 09/13] cuda.c: add defines for CUDA registers

2015-11-11 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson --- hw/misc/macio/cuda.c | 87 ++ 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 364473f..c0a3a68 100644 --- a/hw/misc/ma

[Qemu-devel] [PATCH v2 07/13] cuda.c: implement dummy IIC access commands

2015-11-11 Thread Mark Cave-Ayland
These are used by MacOS 9 on boot. Here we return an error except for 4-byte commands which write to the IIC bus in a similar manner to MOL. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/misc/macio/cuda.c b/h

[Qemu-devel] [PATCH v2 13/13] cuda.c: add delay to setting of SR_INT bit

2015-11-11 Thread Mark Cave-Ayland
MacOS 9 is racy when it comes to accessing the shift register. Fix this by introducing a small delay between data accesses and raising the SR_INT interrupt bit. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson --- hw/misc/macio/cuda.c | 44 +---

[Qemu-devel] [PATCH v2 10/13] cuda.c: refactor get_tb() so that the time can be passed in

2015-11-11 Thread Mark Cave-Ayland
This is in preparation for sharing the code between timers. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson --- hw/misc/macio/cuda.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index c0a3a68..e61a3c5 100

[Qemu-devel] [PATCH v2 12/13] cuda.c: fix T2 timer and enable its interrupt

2015-11-11 Thread Mark Cave-Ayland
Fix the counter loading logic and enable the T2 interrupt when the timer expires. Otherwise MacOS 9 hangs on boot. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/hw/misc/macio/cuda.

[Qemu-devel] [PATCH v2 11/13] cuda.c: rename get_counter() state variable from s to ti for consistency

2015-11-11 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson --- hw/misc/macio/cuda.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index e61a3c5..b6da434 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cud

Re: [Qemu-devel] [OpenBIOS] CUDA has problems with Mac OS 10.4

2015-11-11 Thread Mark Cave-Ayland
On 11/11/15 21:32, Andreas Tobler wrote: > On 11.11.15 19:55, Programmingkid wrote: >> >> On Nov 11, 2015, at 12:54 PM, Mark Cave-Ayland wrote: >> >>> On 11/11/15 15:15, Programmingkid wrote: >>> I built Cormac O'Brien's QEMU repo for Mac OS 9 and tried to boot my Mac OS 10.4 boot cd. Ma

Re: [Qemu-devel] [PULL for-2.5 00/15] s390x patches for 2.5

2015-11-11 Thread Peter Maydell
On 11 November 2015 at 17:56, Cornelia Huck wrote: > The following changes since commit 3c07587d49458341510360557c849e93e9afaf59: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-next-2015' into > staging (2015-11-11 09:34:18 +) > > are availa

Re: [Qemu-devel] [OpenBIOS] CUDA has problems with Mac OS 10.4

2015-11-11 Thread Programmingkid
On Nov 11, 2015, at 6:05 PM, Mark Cave-Ayland wrote: > On 11/11/15 21:32, Andreas Tobler wrote: > >> On 11.11.15 19:55, Programmingkid wrote: >>> >>> On Nov 11, 2015, at 12:54 PM, Mark Cave-Ayland wrote: >>> On 11/11/15 15:15, Programmingkid wrote: > I built Cormac O'Brien's QEM

Re: [Qemu-devel] [OpenBIOS] CUDA has problems with Mac OS 10.4

2015-11-11 Thread BALATON Zoltan
On Wed, 11 Nov 2015, Programmingkid wrote: On Nov 11, 2015, at 4:32 PM, Andreas Tobler wrote: It looks like you are saying you wish to keep the CUDA device. Mac OS 9 is most likely hard coded to expect via-pmu instead of via-cuda on the mac99 target. Moving on to via-pmu might make QEMU more com

Re: [Qemu-devel] [OpenBIOS] CUDA has problems with Mac OS 10.4

2015-11-11 Thread Programmingkid
On Nov 11, 2015, at 6:05 PM, Mark Cave-Ayland wrote: > On 11/11/15 21:32, Andreas Tobler wrote: > >> On 11.11.15 19:55, Programmingkid wrote: >>> >>> On Nov 11, 2015, at 12:54 PM, Mark Cave-Ayland wrote: >>> On 11/11/15 15:15, Programmingkid wrote: > I built Cormac O'Brien's QEM

[Qemu-devel] [PATCH 2/2] trace: show MemoryRegion name, not address

2015-11-11 Thread Hollis Blanchard
Recording the MemoryRegion pointers isn't helpful, especially since no trace data allows us to correlate those pointers to devices. Instead, record the MemoryRegion name. Signed-off-by: Hollis Blanchard --- memory.c | 12 ++-- trace-events | 4 ++-- 2 files changed, 8 insertions(+),

[Qemu-devel] [PATCH 1/2] docs: "simple" trace backend does support strings

2015-11-11 Thread Hollis Blanchard
The simple tracing backend has supported strings for more than three years (62bab73213ba885426a781eb2741670b9f3cae36). Signed-off-by: Hollis Blanchard --- docs/tracing.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/tracing.txt b/docs/tracing.txt index 3853a6a..f2f553b 100644 ---

[Qemu-devel] [PATCH for-2.5 0/4] Expose ErrorClass through introspection

2015-11-11 Thread Eric Blake
I noticed that introspection was not documenting either qmp_capabilities nor the ErrorClass enum. I think this is worth fixing for 2.5 when introspection is brand new, so that if we later extend the ErrorClass enum or add future capability negotiation (and in particular if such additions get backp

[Qemu-devel] [PATCH for-2.5 1/4] qapi: Add type.is_empty() helper

2015-11-11 Thread Eric Blake
And use it in qapi-types and qapi-event. Down the road, we may want to lift our artificial restriction of no variants at the top level of an event, at which point, inlining our check for whether members is empty will no longer be sufficient. More immediately, the new .is_empty() helper will help

[Qemu-devel] [PATCH for-2.5 2/4] qapi: Fix command with named empty argument type

2015-11-11 Thread Eric Blake
The generator special-cased { 'command':'foo', 'data': {} } to avoid emitting a visitor variable, but failed to see that { 'struct':'NamedEmptyType, 'data': {} } { 'command':'foo', 'data':'NamedEmptyType' } needs the same treatment. Without a fix to the generator, the change to qapi-schema-test

[Qemu-devel] [PATCH for-2.5 3/4] monitor: use qapi for qmp_capabilities command

2015-11-11 Thread Eric Blake
From: Marc-André Lureau This was initially done to add qmp_capabilities documentation to the schema. Then I figured it would also help to get rid of the "middle mode" monitor dispatch code. Signed-off-by: Marc-André Lureau Message-Id: <1443189844-20341-5-git-send-email-marcandre.lur...@redhat.c

[Qemu-devel] [PATCH for-2.5 4/4] qapi: Expose ErrorClass through introspection

2015-11-11 Thread Eric Blake
Introspection is already able to describe all possible commands and their valid argument types. But consider what happens if a future qemu extends the ErrorClass enum. It is feasible that a client will want to know whether the server is new enough to send the new error class as a result of a part

Re: [Qemu-devel] [v2 0/2] add avx2 instruction optimization

2015-11-11 Thread Li, Liang Z
> > On 10/11/2015 10:26, Li, Liang Z wrote: > > I don't know Paolo's opinion about how to deal with the SSE2 > > Intrinsics, he is the author. From my personal view, now that we have > > found a better way, why to use such low level SSE2/AVX2 Intrinsics. > > I totally agree. :) > > Paolo Hi Pao

[Qemu-devel] [PATCH qemu v5] monitor/target-ppc: Define target_get_monitor_def

2015-11-11 Thread Alexey Kardashevskiy
At the moment get_monitor_def() returns only registers from statically defined monitor_defs array. However there is a lot of BOOK3S SPRs which are not in the list and cannot be printed from the monitor. This adds a new target platform hook - target_get_monitor_def(). The hook is called if a regist

Re: [Qemu-devel] [PATCH v2 00/13] Mac OS 9 compatibility improvements (upstream rework)

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 10:49:38PM +, Mark Cave-Ayland wrote: > This is a rework of Cormac O'Brien's GSoC project to try and boot MacOS 9 > under > QEMU, the original version of which was posted to the qemu-devel list at the > end of August > (https://lists.gnu.org/archive/html/qemu-devel/201

[Qemu-devel] [PATCH 0/2] Minor cleanups when parsing the "iommu" option

2015-11-11 Thread Bandan Das
Small cleanup changes. The first removes the helper function by directly checking the property and the second adds a error message if user tries to use "-machine iommu=on" with i440fx. Bandan Das (2): q35: Check propery to determine if iommu is set i440fx: print a error message if user enable

[Qemu-devel] [PATCH 1/2] q35: Check propery to determine if iommu is set

2015-11-11 Thread Bandan Das
The helper function machine_iommu() isn't necesary. We can directly check for the property. Signed-off-by: Bandan Das --- hw/core/machine.c | 5 - hw/pci-host/q35.c | 2 +- include/hw/boards.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/core/machine.c b/hw/cor

[Qemu-devel] [PATCH 2/2] i440fx: print an error message if user tries to enable iommu

2015-11-11 Thread Bandan Das
There's no indication of any sort that i440fx doesn't support "iommu=on"" Signed-off-by: Bandan Das --- hw/pci-host/piix.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 7b2fbf9..f12593a 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix

[Qemu-devel] [PATCH v4] mirror: Rewrite mirror_iteration

2015-11-11 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. Signed-off-by: Fam Zheng --- block/mirror.c | 198 +++

Re: [Qemu-devel] [PATCH 1/4] spapr: Extend rtas-blob

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 10:45:15PM +0530, Aravinda Prasad wrote: > Extend rtas-blob to accommodate error log. Error log > structure is saved in rtas space upon a machine check > exception. > > Signed-off-by: Aravinda Prasad Reviewed-by: David Gibson > --- > hw/ppc/spapr.c |4 > 1 file

Re: [Qemu-devel] [PATCH 2/4] spapr: Register and handle HCALL to receive updated RTAS region

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 10:45:30PM +0530, Aravinda Prasad wrote: > Receive updates from SLOF about the updated rtas-base. > A separate patch for SLOF [1] adds functionality to invoke > a private HCALL whenever OS issues instantiate-rtas with > a new rtas-base. > > This is required as QEMU needs to

[Qemu-devel] [PATCH qemu v6] monitor/target-ppc: Define target_get_monitor_def

2015-11-11 Thread Alexey Kardashevskiy
At the moment get_monitor_def() returns only registers from statically defined monitor_defs array. However there is a lot of BOOK3S SPRs which are not in the list and cannot be printed from the monitor. This adds a new target platform hook - target_get_monitor_def(). The hook is called if a regist

Re: [Qemu-devel] [PATCH 3/4] spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 10:45:44PM +0530, Aravinda Prasad wrote: > This patch adds support in QEMU to handle "ibm,nmi-register" > and "ibm,nmi-interlock" RTAS calls. > > The machine check notification address is saved when the > OS issues "ibm,nmi-register" RTAS call. > > This patch also handles

[Qemu-devel] [PULL 00/14] ppc-next queue 20151112

2015-11-11 Thread David Gibson
The following changes since commit 31e49ac192f782d594bbd04070fe79e800b7813f: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-2015' into staging (2015-11-11 18:23:08 +) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-next-2015111

[Qemu-devel] [PULL 07/14] cuda.c: implement dummy IIC access commands

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland These are used by MacOS 9 on boot. Here we return an error except for 4-byte commands which write to the IIC bus in a similar manner to MOL. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 18 ++ 1 file changed, 18

[Qemu-devel] [PULL 01/14] PPC: Allow Rc bit to be set on mtspr

2015-11-11 Thread David Gibson
From: Alexander Graf According to the ISA setting the Rc bit on mtspr is undefined behavior. Real 750 hardware simply ignores the bit and doesn't touch cr0 though. Unfortunately, Mac OS 9 relies on this fact and executes a few mtspr instructions (to set XER for example) with Rc set. So let's ha

[Qemu-devel] [PULL 13/14] cuda.c: add delay to setting of SR_INT bit

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland MacOS 9 is racy when it comes to accessing the shift register. Fix this by introducing a small delay between data accesses and raising the SR_INT interrupt bit. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/misc/macio/cuda

[Qemu-devel] [PULL 05/14] cuda.c: fix CUDA_PACKET response packet format

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland According to comments in MOL, the response to a CUDA_PACKET should be one of the following: Reply: (CUDA_PACKET, status, cmd) Error: (ERROR_PACKET, status, CUDA_PACKET, cmd) Update cuda_receive_packet() accordingly to reflect this in order to make MacOS 9 happy. Signed-o

Re: [Qemu-devel] [PATCH 0/4] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 10:45:00PM +0530, Aravinda Prasad wrote: > This series of patches add support for FWNMI in PowerKVM guests. > > Memory error such as bit flips that cannot be corrected > by hardware is passed on to the kernel for handling > by raising machine check exception (an NMI). Upon

[Qemu-devel] [PULL 00/14] ppc-next queue 20151112

2015-11-11 Thread David Gibson
The following changes since commit 31e49ac192f782d594bbd04070fe79e800b7813f: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-2015' into staging (2015-11-11 18:23:08 +) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-next-2015111

[Qemu-devel] [PULL 08/14] cuda.c: fix CUDA SR interrupt clearing

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland Make sure that we also clear the data and clock interrupts at the same time. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/

[Qemu-devel] [PULL 11/14] cuda.c: rename get_counter() state variable from s to ti for consistency

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index e61a3c5..b6da434 10064

[Qemu-devel] [PULL 02/14] PPC: Fix lswx bounds checks

2015-11-11 Thread David Gibson
From: Alexander Graf The lswx instruction checks whether the desired string actually fits into all defined registers. Unfortunately it does the calculation wrong, resulting in illegal instruction traps for loads that really should fit. Fix it up, making Mac OS happier. Signed-off-by: Alexander

[Qemu-devel] [PULL 14/14] monitor/target-ppc: Define target_get_monitor_def

2015-11-11 Thread David Gibson
From: Alexey Kardashevskiy At the moment get_monitor_def() returns only registers from statically defined monitor_defs array. However there is a lot of BOOK3S SPRs which are not in the list and cannot be printed from the monitor. This adds a new target platform hook - target_get_monitor_def(). T

[Qemu-devel] [PULL 09/14] cuda.c: add defines for CUDA registers

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 87 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 10:46:02PM +0530, Aravinda Prasad wrote: > Memory error such as bit flips that cannot be corrected > by hardware are passed on to the kernel for handling. > If the memory address in error belongs to guest then > guest kernel is responsible for taking suitable action. > Patch

[Qemu-devel] [PULL 10/14] cuda.c: refactor get_tb() so that the time can be passed in

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland This is in preparation for sharing the code between timers. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/misc/macio/cuda

[Qemu-devel] [PULL 04/14] cuda.c: fix CUDA ADB error packet format

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland According to MOL, ADB error packets should be of the form (type, status, cmd) rather than just (type, status). This fixes ADB device detection under MacOS 9. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 6 -- 1 file changed,

[Qemu-devel] [PULL 03/14] PPC: mac99: Always add USB controller

2015-11-11 Thread David Gibson
From: Alexander Graf The mac99 machines always have a USB controller. Usually not having one around doesn't hurt quite as much, but Mac OS 9 really really wants one or it crashes on bootup. So always add OHCI to make it happy. Signed-off-by: Alexander Graf Signed-off-by: Mark Cave-Ayland Revi

[Qemu-devel] [PULL 12/14] cuda.c: fix T2 timer and enable its interrupt

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland Fix the counter loading logic and enable the T2 interrupt when the timer expires. Otherwise MacOS 9 hangs on boot. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 33 - 1 file changed, 24 insertions(

[Qemu-devel] [PULL 06/14] cuda.c: implement simple CUDA_GET_6805_ADDR command

2015-11-11 Thread David Gibson
From: Mark Cave-Ayland This simply returns an empty response with no error status as implemented by MOL to allow MacOS 9 boot to proceed further. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 3 +++ 1 file changed, 3 insertio

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 02:10:48PM -0800, Nishanth Aravamudan wrote: > On 11.11.2015 [12:41:26 +1100], David Gibson wrote: > > On Tue, Nov 10, 2015 at 04:56:38PM -0800, Nishanth Aravamudan wrote: > > > On 11.11.2015 [11:17:58 +1100], David Gibson wrote: > > > > On Mon, Nov 09, 2015 at 08:22:32PM -0

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-11 Thread Aravinda Prasad
On Thursday 12 November 2015 09:59 AM, David Gibson wrote: > On Wed, Nov 11, 2015 at 10:46:02PM +0530, Aravinda Prasad wrote: >> Memory error such as bit flips that cannot be corrected >> by hardware are passed on to the kernel for handling. >> If the memory address in error belongs to guest then

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] spapr: Register and handle HCALL to receive updated RTAS region

2015-11-11 Thread Nikunj A Dadhania
David Gibson writes: > On Wed, Nov 11, 2015 at 10:45:30PM +0530, Aravinda Prasad wrote: >> Receive updates from SLOF about the updated rtas-base. >> A separate patch for SLOF [1] adds functionality to invoke >> a private HCALL whenever OS issues instantiate-rtas with >> a new rtas-base. >> >> Th

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH v1] spapr: Memory hot-unplug support

2015-11-11 Thread David Gibson
On Wed, Nov 11, 2015 at 12:50:57PM +0530, Bharata B Rao wrote: > On Wed, Nov 11, 2015 at 12:36:30PM +1100, David Gibson wrote: > > On Mon, Oct 26, 2015 at 03:23:05PM +0530, Bharata B Rao wrote: > > > Add support to hot remove pc-dimm memory devices. > > > > Sorry it's taken me so long to look at t

Re: [Qemu-devel] [PATCH v7 01/24] blockdev: Add missing bdrv_unref() in drive-backup

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > All error paths after a successful bdrv_open() of target_bs should > contain a bdrv_unref(target_bs). This one did not yet, so add it. > > Signed-off-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Kevin Wolf > --- > blockdev.c | 1 + > 1 file

Re: [Qemu-devel] [PATCH v7 02/24] blockjob: Call bdrv_unref() on creation error

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > If block_job_create() fails, it should release its reference to the > job's BDS. Normally, this is done in the callback provided by the > caller, but that callback will not be invoked if the block job failed to > be created. > > Signed-off-by: Max Reitz > R

Re: [Qemu-devel] [PATCH v7 03/24] block: Release dirty bitmaps in bdrv_close()

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverStates with > dirty bitmaps still attached to them. In the past, we got around that > very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and > bdrv_close() simply ignoring that conditi

Re: [Qemu-devel] [PATCH v7 04/24] iotests: Rename filter_nbd to _filter_nbd in 083

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > In the patch after the next, this function is moved to common.filter. > Therefore, its name should be preceded by an underscore to signify its > global availability. > > To keep the code motion patch clean, we cannot rename it in the same > patch, so we need

Re: [Qemu-devel] [PATCH v7 05/24] iotests: Change coding style of _filter_nbd in 083

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > In order to be able to move _filter_nbd to common.filter in the next > patch, its coding style needs to be adapted to that of common.filter. > That means, we have to convert tabs to four spaces, adjust the alignment > of the last line (done with spaces alread

Re: [Qemu-devel] [PATCH v7 06/24] iotests: Move _filter_nbd into common.filter

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > _filter_nbd can be useful for other NBD tests, too, therefore it should > reside in common.filter. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/083 | 12 > tests/qemu-iotests/common.filter | 12 > 2 files chan

Re: [Qemu-devel] [PATCH v7 07/24] iotests: Make _filter_nbd drop log lines

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > The NBD log lines ("/your/source/dir/nbd.c:function():line: error") > should not be converted to empty lines but removed altogether. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/083.out | 10 -- > tests/qemu-iotests/common.filter |

Re: [Qemu-devel] [PATCH v7 08/24] iotests: Make _filter_nbd support more URL types

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > This function should support URLs of the "nbd://" format (without > swallowing the export name), and for "nbd:///" URLs it should replace > "?socket=$TEST_DIR" by "?socket=TEST_DIR" because putting the Unix > socket files into the test directory makes sense.

Re: [Qemu-devel] [PATCH v7 09/24] iotests: Make redirecting qemu's stderr optional

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > Redirecting qemu's stderr to stdout makes working with the stderr output > difficult due to the other file descriptor magic performed in > _launch_qemu ("ambiguous redirect"). > > Add an option which specifies whether stderr should be redirected to > stdout

Re: [Qemu-devel] [PATCH v7 10/24] iotests: Add test for eject under NBD server

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > This patch adds a test for ejecting the BlockBackend an NBD server is > connected to (the NBD server is supposed to stop). > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/140 | 92 > ++ > tests/qemu-

Re: [Qemu-devel] [PATCH v7 18/24] block: Make bdrv_close() static

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > There are no users of bdrv_close() left, except for one of bdrv_open()'s > failure paths, bdrv_close_all() and bdrv_delete(), and that is good. > Make bdrv_close() static so nobody makes the mistake of directly using > bdrv_close() again. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v7 19/24] block: Add list of all BlockDriverStates

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > We need this list so that bdrv_close_all() can keep track of which BDSs > are still open after having removed the BDSs from all of the BBs and > having released all monitor BDS references. > > Signed-off-by: Max Reitz > Reviewed-by: Kevin Wolf Reviewed-by

[Qemu-devel] [PATCH] vfio: Fix handling VFIO_IOMMU_GET_INFO results

2015-11-11 Thread Pavel Fedin
Kernel headers define VFIO_IOMMU_INFO_PGSIZES flag, however it has actually been never used, probably by mistake which now became a part of the ABI. The kernel always sets info.flags to 0: http://lxr.free-electrons.com/source/drivers/vfio/vfio_iommu_type1.c?v=3.7#L675 http://lxr.free-electrons.com

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] spapr: Register and handle HCALL to receive updated RTAS region

2015-11-11 Thread David Gibson
On Thu, Nov 12, 2015 at 10:58:59AM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > On Wed, Nov 11, 2015 at 10:45:30PM +0530, Aravinda Prasad wrote: > >> Receive updates from SLOF about the updated rtas-base. > >> A separate patch for SLOF [1] adds functionality to invoke > >> a priva

Re: [Qemu-devel] [PATCH v7 22/24] block: Rewrite bdrv_close_all()

2015-11-11 Thread Fam Zheng
On Mon, 11/09 23:39, Max Reitz wrote: > This patch rewrites bdrv_close_all(): Until now, all root BDSs have been > force-closed. This is bad because it can lead to cached data not being > flushed to disk. > > Instead, try to make all reference holders relinquish their reference > voluntarily: > >

<    1   2   3