[Qemu-devel] [PATCH 1/2] cpu-all: complete "real" host page size API

2015-06-05 Thread Peter Crosthwaite
Currently the "host" page size alignment API is really aligning to both host and target page sizes. There is the qemu_real_page_size which can be used for the actual host page size but it's missing a mask and ALIGN macro as provided for qemu_page_size. Complete the API. This allows system level cod

[Qemu-devel] [PATCH 2/2] vfio: cpu: Use "real" page size API

2015-06-05 Thread Peter Crosthwaite
This is system level code, and should only depend on the host page size, not the target page size. Note that HOST_PAGE_SIZE is misleadingly lead and is really aligning to both host and target page size. Hence it's replacement with REAL_HOST_PAGE_SIZE. Signed-off-by: Peter Crosthwaite --- hw/vfi

[Qemu-devel] [PATCH 0/2] real host page API

2015-06-05 Thread Peter Crosthwaite
Hi All, As we discussed earlier, the sole use of HOST_PAGE_ALIGN in system level code should be targeting the "real" host page alignment and not the target-specific HOST_PAGE_ALIGN. This complete the API for REAL_HOST_PAGE_ALIGN and friends that can be use the same way as HOST_PAGE_ALIGN in syste

Re: [Qemu-devel] Re-2: Strange problems with lseek in qemu-img map

2015-06-05 Thread Wen Congyang
At 2015/6/5 23:14, Lukáš Czerner Wrote: On Fri, 5 Jun 2015, Stefan Hajnoczi wrote: Date: Fri, 5 Jun 2015 15:05:15 +0100 From: Stefan Hajnoczi To: David Weber Cc: qemu-devel@nongnu.org, linux-e...@vger.kernel.org, Lukas Czerner , we...@cn.fujitsu.com Subject: Re: [Qemu-devel] Re-2: Stran

Re: [Qemu-devel] [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp

2015-06-05 Thread Peter Crosthwaite
On Fri, Jun 5, 2015 at 4:18 PM, Peter Maydell wrote: > On 6 June 2015 at 00:06, Peter Crosthwaite > wrote: >> But I have some follow up design questions, mainly in that I have >> started using individual device resets that back onto the ->reset hook >> to implement reset controllers. This means

Re: [Qemu-devel] [PATCH 5/5] hw/sd/pxa2xx_mmci: Stop using old_mmio in MemoryRegionOps

2015-06-05 Thread Peter Crosthwaite
On Thu, May 28, 2015 at 5:09 AM, Peter Maydell wrote: > Update the pxa2xx_mmci device to stop using the old_mmio read > and write callbacks in its MemoryRegionOps. This actually > simplifies the code because the separate byte/halfword/word > access functions were all calling into a single function

Re: [Qemu-devel] [PATCH 2/5] hw/arm/pxa2xx: Convert pxa2xx-fir to QOM and VMState

2015-06-05 Thread Peter Crosthwaite
On Thu, May 28, 2015 at 5:09 AM, Peter Maydell wrote: > Convert the pxa2xx-fir device to QOM, including using a > VMState for its migration info. > > Signed-off-by: Peter Maydell > --- > hw/arm/pxa2xx.c | 137 > +--- > 1 file changed, 82 inser

Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState

2015-06-05 Thread Peter Crosthwaite
On Fri, Jun 5, 2015 at 4:32 PM, Peter Maydell wrote: > On 6 June 2015 at 00:18, Peter Crosthwaite > wrote: >> On Thu, May 28, 2015 at 5:09 AM, Peter Maydell >> wrote: >>> The pxa2xx-ssp device is already a QOM device but is still >>> using the old-style register_savevm(); convert to VMState. >

[Qemu-devel] [PATCH 2/4] i386/acpi-build: fix PXB workarounds for unsupported BIOSes

2015-06-05 Thread Laszlo Ersek
The patch apci: fix PXB behaviour if used with unsupported BIOS uses the following condition to see if a "PXB mem/IO chunk" has *not* been configured by the BIOS: (!range_base || range_base > range_limit) When this condition evaluates to true, said patch *omits* the corresponding entry from

[Qemu-devel] [PATCH 4/4] i386/acpi-build: build_crs(): fetch BAR from PCI config space directly

2015-06-05 Thread Laszlo Ersek
OVMF downloads the ACPI linker/loader script from QEMU when the edk2 PCI Bus driver globally signals the firmware that PCI enumeration and resource allocation have completed. At this point QEMU regenerates the ACPI payload in an fw_cfg read callback, and this is when the PXB's _CRS gets populated.

[Qemu-devel] [PATCH 3/4] hw/pci: allow the caller of pci_bar_address() to ignore command register

2015-06-05 Thread Laszlo Ersek
The pci_bar_address() function calculates the start address of a given PCI BAR. Its main purpose is supporting MemoryRegion mapping / unmapping in pci_update_mappings(), which is guest-observable. For that reason it contains heavy logic to enforce the validity of the BAR, and this logic includes c

[Qemu-devel] [PATCH 1/4] i386/acpi-build: more traditional _UID and _HID for PXB root buses

2015-06-05 Thread Laszlo Ersek
The ACPI specification permits the _HID and _UID objects to evaluate to strings. (See "6.1.5 _HID (Hardware ID)" and "6.1.12 _UID (Unique ID)" in the ACPI v6.0 spec.) With regard to related standards, the UEFI specification can also express a device address composed from string _HID and _UID ident

[Qemu-devel] [PATCH 0/4] PXB tweaks and fixes

2015-06-05 Thread Laszlo Ersek
I've come across these issues while working on the OVMF patch series. Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Laszlo Ersek (4): i386/acpi-build: more traditional _UID and _HID for PXB root buses i386/acpi-build: fix PXB workarounds for unsupported BIOSes hw/pci: allow the caller of pc

[Qemu-devel] PXB fixes for QEMU, and extra root buses for OVMF

2015-06-05 Thread Laszlo Ersek
Following up on this cross-posted message, I will send two patch sets, one for QEMU (to qemu-devel) and another for OVMF (to edk2-devel). With both in place, OVMF supports multiple PCI root buses. Below I'm writing up the way I tested the feature, plus a few random notes. (1) Interrupt line assig

Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState

2015-06-05 Thread Peter Maydell
On 6 June 2015 at 00:18, Peter Crosthwaite wrote: > On Thu, May 28, 2015 at 5:09 AM, Peter Maydell > wrote: >> The pxa2xx-ssp device is already a QOM device but is still >> using the old-style register_savevm(); convert to VMState. >> >> Signed-off-by: Peter Maydell >> --- >> hw/arm/pxa2xx.c |

Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState

2015-06-05 Thread Peter Crosthwaite
On Thu, May 28, 2015 at 5:09 AM, Peter Maydell wrote: > The pxa2xx-ssp device is already a QOM device but is still > using the old-style register_savevm(); convert to VMState. > > Signed-off-by: Peter Maydell > --- > hw/arm/pxa2xx.c | 89 > +--

Re: [Qemu-devel] [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp

2015-06-05 Thread Peter Maydell
On 6 June 2015 at 00:06, Peter Crosthwaite wrote: > But I have some follow up design questions, mainly in that I have > started using individual device resets that back onto the ->reset hook > to implement reset controllers. This means an IRQ source should reset > its IRQ pin to notify its sinks o

Re: [Qemu-devel] [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp

2015-06-05 Thread Peter Crosthwaite
On Fri, Jun 5, 2015 at 4:00 PM, Peter Maydell wrote: > On 5 June 2015 at 23:57, Peter Crosthwaite > wrote: >> On Thu, May 28, 2015 at 5:09 AM, Peter Maydell >> wrote: >>> The pxa2xx_ssp device was missing a reset method; add one. >>> >>> Signed-off-by: Peter Maydell >>> --- >>> hw/arm/pxa2xx

Re: [Qemu-devel] [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp

2015-06-05 Thread Peter Maydell
On 5 June 2015 at 23:57, Peter Crosthwaite wrote: > On Thu, May 28, 2015 at 5:09 AM, Peter Maydell > wrote: >> The pxa2xx_ssp device was missing a reset method; add one. >> >> Signed-off-by: Peter Maydell >> --- >> hw/arm/pxa2xx.c | 18 ++ >> 1 file changed, 18 insertions(+) >>

Re: [Qemu-devel] [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp

2015-06-05 Thread Peter Crosthwaite
On Thu, May 28, 2015 at 5:09 AM, Peter Maydell wrote: > The pxa2xx_ssp device was missing a reset method; add one. > > Signed-off-by: Peter Maydell > --- > hw/arm/pxa2xx.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c > index fc77b

Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config arg sub-argument

2015-06-05 Thread Peter Maydell
On 5 June 2015 at 22:11, Liviu Ionescu wrote: > >> On 05 Jun 2015, at 23:09, Leon Alrae wrote: >> ... how the >> TARGET_SYS_GET_CMDLINE should behave if cmdline is not available, >> whether should return -1 or pass an empty string to the guest. > > for consistency I would suggest to return -1 for

Re: [Qemu-devel] [PATCH 1/5] hw/arm/pxa2xx: Mark coprocessor registers as ARM_CP_IO

2015-06-05 Thread Peter Crosthwaite
On Thu, May 28, 2015 at 5:09 AM, Peter Maydell wrote: > The pxa2xx custom coprocessor registers in cp6 and cp14 do device > accesses, so mark the non-constant regs as ARM_CP_IO so that > icount works correctly and doesn't abort. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite I

[Qemu-devel] segfault in memcmp

2015-06-05 Thread perrier vincent
Using a very old guest (lenny) with spice and vga=cirrus, I have a segfault: FILE: ui/spice-display.c FUNCTION: qemu_spice_create_update LINE: if (memcmp(guest + yoff + xoff, mirror + yoff + xoff, bw * bpp) == 0) The address of mirror + yof

[Qemu-devel] segfault caused by graphic

2015-06-05 Thread perrier vincent
For a lenny guest, using spice, with option vga=cirrus, I had segfault in: file: ui/spice-display.c function: qemu_spice_create_update(SimpleSpiceDisplay *ssd) in call to: if (memcmp(guest + yoff + xoff, mirror + yoff + xoff, bw * bpp) == 0) After p

[Qemu-devel] QEMU's CVE Procedures

2015-06-05 Thread John Snow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, everyone: ("Oh no, what monolith did John type up this time? /Golly Dang He's really giving Markus a run for his money/") Prompted by the recent CVE-2015-3456 ("VENOM") issue, it seems to me that our CVE handling procedure is a little more ad-h

Re: [Qemu-devel] [PATCH] Do not fail if id field is present.

2015-06-05 Thread Eric Blake
On 06/05/2015 08:32 AM, Daniel P. Berrange wrote: > On Fri, Jun 05, 2015 at 05:17:29PM +0300, Pavel Fedin wrote: >> This fixes QMP regression: >> http://lists.gnu.org/archive/html/qemu-devel/2015-06/msg01795.html >> >> Signed-off-by: Pavel Fedin >> --- >> monitor.c | 2 ++ >> 1 file changed, 2 in

Re: [Qemu-devel] qemu commit 65207c59 broke libvirt's capability retrieval (apparently)

2015-06-05 Thread Laszlo Ersek
On 06/05/15 23:47, Eric Blake wrote: > On 06/05/2015 03:42 PM, Laszlo Ersek wrote: > >> I found this qemu commit, ie. >> >> commit 65207c59d99f2260c5f1d3b9c491146616a522aa >> Author: Markus Armbruster >> Date: Thu Mar 5 14:35:26 2015 +0100 >> >> monitor: Drop broken, unused asynchronous com

[Qemu-devel] [PATCH v6 08/10] block: drive_backup transaction callback support

2015-06-05 Thread John Snow
This patch actually implements the transactional callback system for the drive_backup action. (1) We create a functional closure that envelops the original drive_backup callback, to be able to intercept the completion status and return code for the job. (2) We inform the BlockJob layer th

[Qemu-devel] [PATCH v6 10/10] qmp-commands.hx: Update the supported 'transaction' operations

2015-06-05 Thread John Snow
From: Kashyap Chamarthy Although the canonical source of reference for QMP commands is qapi-schema.json, for consistency's sake, update qmp-commands.hx to state the list of supported transactionable operations, namely: drive-backup blockdev-backup blockdev-snapshot-internal-sync

[Qemu-devel] [PATCH v6 05/10] block: add transactional callbacks feature

2015-06-05 Thread John Snow
The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to perform actions conditionally pending complete success, partial failure, or complete f

[Qemu-devel] [PATCH v6 09/10] iotests: 124 - transactional failure test

2015-06-05 Thread John Snow
Use a transaction to request an incremental backup across two drives. Coerce one of the jobs to fail, and then re-run the transaction. Verify that no bitmap data was lost due to the partial transaction failure. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/124 | 12

[Qemu-devel] [PATCH v6 07/10] qmp: Add an implementation wrapper for qmp_drive_backup

2015-06-05 Thread John Snow
We'd like to be able to specify the callback given to backup_start manually in the case of transactions, so split apart qmp_drive_backup into an implementation and a wrapper. Switch drive_backup_prepare to use the new wrapper, but don't overload the callback and closure yet. Signed-off-by: John S

[Qemu-devel] [PATCH v6 03/10] block: rename BlkTransactionState and BdrvActionOps

2015-06-05 Thread John Snow
These structures are misnomers, somewhat. (1) BlockTransactionState is not state for a transaction, but is rather state for a single transaction action. Rename it "BlkActionState" to be more accurate. (2) The BdrvActionOps describes operations for the BlkActionState, above. This name

[Qemu-devel] [PATCH v6 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-06-05 Thread John Snow
This adds two qmp commands to transactions. block-dirty-bitmap-add allows you to create a bitmap simultaneously alongside a new full backup to accomplish a clean synchronization point. block-dirty-bitmap-clear allows you to reset a bitmap back to as-if it were new, which can also be used alongsid

[Qemu-devel] [PATCH v6 06/10] block: add delayed bitmap successor cleanup

2015-06-05 Thread John Snow
Allow bitmap successors to carry reference counts. We can in a later patch use this ability to clean up the dirty bitmap according to both the individual job's success and the success of all jobs in the transaction group. As a consequence of moving the bitmap successor cleanup actions behind the

[Qemu-devel] [PATCH v6 04/10] block: re-add BlkTransactionState

2015-06-05 Thread John Snow
Now that the structure formerly known as BlkTransactionState has been renamed to something sensible (BlkActionState), re-introduce an actual BlkTransactionState that actually manages state for the entire Transaction. In the process, convert the old QSIMPLEQ list of actions into a QTAILQ, to let us

[Qemu-devel] [PATCH v6 00/10] block: incremental backup transactions

2015-06-05 Thread John Snow
This series adds incremental backup related commands to the QMP transaction subsystem in order to accomplish some slightly more sophisticated bitmap and backup management tasks that require atomic actions. Patch 1 adds basic support for add and clear transactions. Patch 2 tests this basic support.

[Qemu-devel] [PATCH v6 02/10] iotests: add transactional incremental backup test

2015-06-05 Thread John Snow
Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/124 | 54 ++ tests/qemu-iotests/124.out | 4 ++-- 2

Re: [Qemu-devel] qemu commit 65207c59 broke libvirt's capability retrieval (apparently)

2015-06-05 Thread Eric Blake
On 06/05/2015 03:42 PM, Laszlo Ersek wrote: > I found this qemu commit, ie. > > commit 65207c59d99f2260c5f1d3b9c491146616a522aa > Author: Markus Armbruster > Date: Thu Mar 5 14:35:26 2015 +0100 > > monitor: Drop broken, unused asynchronous command interface > > with bisection. Unfortunat

[Qemu-devel] qemu commit 65207c59 broke libvirt's capability retrieval (apparently)

2015-06-05 Thread Laszlo Ersek
Hi All, after pulling QEMU master today, my existent libvirt guests that have the following element: started to barf the following message at me: -- Error starting domain: unsupported configuration: setting ACPI S3 not supported Traceback (most recent call last): Fil

Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config arg sub-argument

2015-06-05 Thread Liviu Ionescu
> On 05 Jun 2015, at 23:09, Leon Alrae wrote: > > ... As far as I can tell existing > implementation may also blow up if kernel_filename is NULL, not necessarily, in my branch it is perfectly legal to start qemu without an image, as long as the gdb server is started, since the application will

Re: [Qemu-devel] [PULL 48/57] TPM2 ACPI table support

2015-06-05 Thread Stefan Berger
On 06/04/2015 09:57 AM, Igor Mammedov wrote: On Sun, 31 May 2015 20:37:28 +0200 "Michael S. Tsirkin" wrote: From: Stefan Berger [...] diff --git a/hw/i386/ssdt-tpm.dsl b/hw/i386/ssdt-tpm.dsl index 75d9691..d81478c 100644 --- a/hw/i386/ssdt-tpm.dsl +++ b/hw/i386/ssdt-tpm.dsl @@ -25,19 +25,5

Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config arg sub-argument

2015-06-05 Thread Leon Alrae
On 05/06/15 16:23, Peter Maydell wrote: > On 26 May 2015 at 17:03, Leon Alrae wrote: >> --- a/target-arm/arm-semi.c >> +++ b/target-arm/arm-semi.c >> @@ -27,6 +27,7 @@ >> #include >> >> #include "cpu.h" >> +#include "exec/semihost.h" >> #ifdef CONFIG_USER_ONLY >> #include "qemu.h" >> >> @@ -4

[Qemu-devel] [PULL 04/12] fdc: Use phase in fdctrl_write_data()

2015-06-05 Thread John Snow
From: Kevin Wolf Instead of relying on a flag in the MSR to distinguish controller phases, use the explicit phase that we store now. Assertions of the right MSR flags are added. Signed-off-by: Kevin Wolf Reviewed-by: John Snow Message-id: 1432214378-31891-5-git-send-email-kw...@redhat.com Sign

[Qemu-devel] [PULL 03/12] fdc: Introduce fdctrl->phase

2015-06-05 Thread John Snow
From: Kevin Wolf The floppy controller spec describes three different controller phases, which are currently not explicitly modelled in our emulation. Instead, each phase is represented by a combination of flags in registers. This patch makes explicit in which phase the controller currently is.

[Qemu-devel] [PULL 09/12] macio: switch pmac_dma_read() over to new offset/len implementation

2015-06-05 Thread John Snow
From: Mark Cave-Ayland For better handling of unaligned block device accesses. Signed-off-by: Mark Cave-Ayland Reviewed-by: John Snow Message-id: 1433455177-21243-2-git-send-email-mark.cave-ayl...@ilande.co.uk Signed-off-by: John Snow --- hw/ide/macio.c | 106 +++-

[Qemu-devel] [PULL 08/12] fdc-test: Test state for existing cases more thoroughly

2015-06-05 Thread John Snow
From: Kevin Wolf This just adds a few additional checks of the MSR and interrupt pin to the already existing test cases. Signed-off-by: Kevin Wolf Reviewed-by: John Snow Message-id: 1432214378-31891-9-git-send-email-kw...@redhat.com Signed-off-by: John Snow --- tests/fdc-test.c | 34

[Qemu-devel] [PULL 06/12] fdc: Disentangle phases in fdctrl_read_data()

2015-06-05 Thread John Snow
From: Kevin Wolf This commit makes similar improvements as have already been made to the write function: Instead of relying on a flag in the MSR to distinguish controller phases, use the explicit phase that we store now. Assertions of the right MSR flags are added. Signed-off-by: Kevin Wolf Rev

[Qemu-devel] [PULL 12/12] macio: remove remainder_len DBDMA_io property

2015-06-05 Thread John Snow
From: Mark Cave-Ayland Since the block alignment code is now effectively independent of the DMA implementation, this variable is no longer required and can be removed. Signed-off-by: Mark Cave-Ayland Reviewed-by: John Snow Message-id: 1433455177-21243-5-git-send-email-mark.cave-ayl...@ilande.c

[Qemu-devel] [PULL 10/12] macio: switch pmac_dma_write() over to new offset/len implementation

2015-06-05 Thread John Snow
From: Mark Cave-Ayland In particular, this fixes a bug whereby chains of overlapping head/tail chains would incorrectly write over each other's remainder cache. This is the access pattern used by OS X/Darwin and fixes an issue with a corrupt Darwin installation in my local tests. While we are he

[Qemu-devel] [PULL 00/12] Ide patches

2015-06-05 Thread John Snow
The following changes since commit 42d58e7c6760cb9c55627c28ae538e27dcf2f144: Merge remote-tracking branch 'remotes/sstabellini/tags/xen-15-06-02-tag' into staging (2015-06-02 16:47:31 +0100) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request fo

[Qemu-devel] [PULL 11/12] macio: update comment/constants to reflect the new code

2015-06-05 Thread John Snow
From: Mark Cave-Ayland With the offset/len functions taking care of all of the alignment mapping in isolation from the DMA tranasaction, many comments are now unnecessary. Remove these and tidy up a few constants at the same time. Signed-off-by: Mark Cave-Ayland Reviewed-by: John Snow Message-

[Qemu-devel] [PULL 07/12] fdc: Fix MSR.RQM flag

2015-06-05 Thread John Snow
From: Kevin Wolf The RQM bit in MSR should be set whenever the guest is supposed to access the FIFO, and it should be cleared in all other cases. This is important so the guest can't continue writing/reading the FIFO beyond the length that it's suppossed to access (see CVE-2015-3456). Commit e90

[Qemu-devel] [PULL 05/12] fdc: Code cleanup in fdctrl_write_data()

2015-06-05 Thread John Snow
From: Kevin Wolf Factor out a few common lines of code, reformat, improve comments. Signed-off-by: Kevin Wolf Reviewed-by: John Snow Message-id: 1432214378-31891-6-git-send-email-kw...@redhat.com Signed-off-by: John Snow --- hw/block/fdc.c | 63 ---

[Qemu-devel] [PULL 01/12] fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase()

2015-06-05 Thread John Snow
From: Kevin Wolf What all callers of fdctrl_reset_fifo() really want to do is to start the command phase, where writes to the data port initiate a new command. The function doesn't only clear the FIFO, but also sets up the state so that a new command can be received. Rename it to reflect this.

[Qemu-devel] [PULL 02/12] fdc: Rename fdctrl_set_fifo() to fdctrl_to_result_phase()

2015-06-05 Thread John Snow
From: Kevin Wolf What callers really do with this function is to switch from execution phase (including data transfers) to result phase where the guest can read out one or more status bytes from the FIFO (the number depends on the command). Rename the function accordingly. Signed-off-by: Kevin

Re: [Qemu-devel] [PATCH] target-mips: add ERETNC instruction and Config5.LLB bit

2015-06-05 Thread Leon Alrae
On 05/06/15 10:42, Aurelien Jarno wrote: > On 2015-06-04 17:00, Leon Alrae wrote: >> ERETNC is identical to ERET except that an ERETNC will not clear the LLbit >> that is set by execution of an LL instruction, and thus when placed between >> an LL and SC sequence, will never cause the SC to fail. >

Re: [Qemu-devel] [PATCH v2 1/7] target-mips: extend selected CP0 registers to 64-bits in MIPS32

2015-06-05 Thread Leon Alrae
On 04/06/15 23:14, Aurelien Jarno wrote: > If you change the size of these registers, you have to adjust the > corresponding MFC0 function for MIPS32, as the tcg_gen_ld_tl() function > will point to the wrong side of the field on big endian hosts. I'll fix it, thanks for pointing this out. Leon

Re: [Qemu-devel] [RFC PATCH] cputlb: modernise the debug support

2015-06-05 Thread Eric Blake
On 06/05/2015 09:55 AM, Alex Bennée wrote: > To avoid cluttering the code with #ifdef legs we wrap up the print > statements into a tlb_debug() macro. As access to the virtual TLB can > get quite heavy defining DEBUG_TLB_LOG will ensure all the logs go to > the qemu_log target of CPU_LOG_MMU instea

Re: [Qemu-devel] undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03)

2015-06-05 Thread Joseph Myers
On Fri, 5 Jun 2015, Paolo Bonzini wrote: > The GCC manual says "GCC does not use the latitude given in C99 and C11 > only to treat certain aspects of signed '<<' as undefined, but this is > subject to change". It would certainly be nice if they removed the > "this is subject to change" part. The

Re: [Qemu-devel] [PATCH COLO-Frame v5 25/29] COLO: Add colo-set-checkpoint-period command

2015-06-05 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > With this command, we can control the period of checkpoint, if > there is no comparison of net packets. This should use the MigrationParameter stuff that's gone into qemu recently; in my local copy of your code I've got this, and your COLO_

Re: [Qemu-devel] [PATCH COLO-Frame v5 11/29] COLO VMstate: Load VM state into qsb before restore it

2015-06-05 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We should cache the device state before restore it, > besides, we should call qemu_system_reset() before load VM state, > which can ensure the data is intact. I think the description could be better; to me the important point is not that it

Re: [Qemu-devel] undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03)

2015-06-05 Thread Peter Maydell
On 5 June 2015 at 16:55, Paolo Bonzini wrote: > The GCC manual says "GCC does not use the latitude given in C99 and C11 > only to treat certain aspects of signed '<<' as undefined, but this is > subject to change". It would certainly be nice if they removed the > "this is subject to change" part.

Re: [Qemu-devel] [PATCH v5 07/10] qmp: Add an implementation wrapper for qmp_drive_backup

2015-06-05 Thread Max Reitz
On 04.06.2015 23:46, John Snow wrote: We'd like to be able to specify the callback given to backup_start manually in the case of transactions, so split apart qmp_drive_backup into an implementation and a wrapper. Switch drive_backup_prepare to use the new wrapper, but don't overload the callback

Re: [Qemu-devel] [PATCH v5 04/10] block: re-add BlkTransactionState

2015-06-05 Thread Max Reitz
On 04.06.2015 23:46, John Snow wrote: Now that the structure formerly known as BlkTransactionState has been renamed to something sensible (BlkActionState), re-introduce an actual BlkTransactionState that actually manages state for the entire Transaction. In the process, convert the old QSIMPLEQ

Re: [Qemu-devel] [PATCH v6 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Max Reitz
On 05.06.2015 18:27, Alberto Garcia wrote: QEMU has options to configure the size of the L2 and refcount caches for the qcow2 format. However, choosing the right sizes for a particular disk image is not a straightforward operation since the ratio between the cache size and the allocated disk spac

Re: [Qemu-devel] Redundant redeclaration of 'gmtime_r' with mingw64

2015-06-05 Thread Stefan Weil
Am 05.06.2015 um 16:38 schrieb Stefan Hajnoczi: Hi Stefan, I get the following compiler warning in Fedora 22 (mingw32-headers-4.0.2-1.fc22): In file included from qemu/include/qemu-common.h:47:0, from qemu/include/qemu/timer.h:5, from qemu/include/sysemu/sysem

Re: [Qemu-devel] [PATCH 2/2] virtio-gpu/2d: add virtio gpu core code

2015-06-05 Thread Max Reitz
On 29.05.2015 13:45, Gerd Hoffmann wrote: This patch adds the core code for virtio gpu emulation, covering 2d support. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- hw/display/Makefile.objs | 2 + hw/display/virtio-gpu.c

Re: [Qemu-devel] [PULL v2 00/62] KVM, dirty bitmap, build system, SMM, icount changes for 2015-06-05

2015-06-05 Thread Paolo Bonzini
On 05/06/2015 18:38, Peter Maydell wrote: > On 5 June 2015 at 16:56, Paolo Bonzini wrote: >> The following changes since commit 00967f4e0bab246679d0ddc32fd31a7179345baf: >> >> Merge remote-tracking branch 'remotes/agraf/tags/signed-s390-for-upstream' >> into staging (2015-06-05 12:04:42 +0100

Re: [Qemu-devel] [PATCH 1/2] virtio: update headers, add virtio-gpu (2d)

2015-06-05 Thread Max Reitz
On 29.05.2015 13:45, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- include/standard-headers/linux/virtio_gpu.h | 204 include/standard-headers/linux/virtio_ids.h | 1 + 2 files changed, 205 insertions(+) create mode 100644 include/standard-headers/lin

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] vmdk: Use vmdk_find_index_in_cluster everywhere

2015-06-05 Thread Max Reitz
On 04.06.2015 08:02, Fam Zheng wrote: Signed-off-by: Fam Zheng --- block/vmdk.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status

2015-06-05 Thread Max Reitz
On 04.06.2015 08:02, Fam Zheng wrote: It has the similar issue with b1649fae49a8. Since the calculation is repeated for a few times already, introduce a function so it can be reused. Signed-off-by: Fam Zheng --- block/vmdk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-06-05 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Jan Beulich wrote: > >>> On 05.06.15 at 13:32, wrote: > >> --- a/hw/xen/xen_pt.c > >> +++ b/hw/xen/xen_pt.c > >> @@ -248,7 +248,9 @@ static void xen_pt_pci_write_config(PCID > >> > >> /* check unused BAR register */ > >> index = xen_pt_bar_offset_to_index(addr); > >

Re: [Qemu-devel] [PULL v2 00/62] KVM, dirty bitmap, build system, SMM, icount changes for 2015-06-05

2015-06-05 Thread Peter Maydell
On 5 June 2015 at 16:56, Paolo Bonzini wrote: > The following changes since commit 00967f4e0bab246679d0ddc32fd31a7179345baf: > > Merge remote-tracking branch 'remotes/agraf/tags/signed-s390-for-upstream' > into staging (2015-06-05 12:04:42 +0100) > > are available in the git repository at: > >

[Qemu-devel] [PATCH v6 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Alberto Garcia
QEMU has options to configure the size of the L2 and refcount caches for the qcow2 format. However, choosing the right sizes for a particular disk image is not a straightforward operation since the ratio between the cache size and the allocated disk space is not obvious and depends on the size of t

[Qemu-devel] [PATCH v6 2/4] qcow2: add option to clean unused cache entries after some time

2015-06-05 Thread Alberto Garcia
This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time use little memory during periods of inactivit

[Qemu-devel] [PATCH v6 0/4] Clean unused entries in the qcow2 L2/refcount cache

2015-06-05 Thread Alberto Garcia
v6: - Update documentation to clarify what "unused entries" mean. v5: https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg00573.html - Fix build in mingw. - Use getpagesize() instead of sysconf(_SC_PAGESIZE). - Clarify that 0 is the default value for 'cache-clean-interval', and that it disa

[Qemu-devel] [PATCH v6 1/4] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-06-05 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

[Qemu-devel] [PATCH v6 4/4] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-06-05 Thread Alberto Garcia
Changing the current ordering saves 8 bytes per cache entry in x86_64. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cache.c b/block/q

Re: [Qemu-devel] [PULL 0/6] fw_cfg patch queue

2015-06-05 Thread Peter Maydell
ull, > Gerd > > The following changes since commit 00967f4e0bab246679d0ddc32fd31a7179345baf: > > Merge remote-tracking branch 'remotes/agraf/tags/signed-s390-for-upstream' > into staging (2015-06-05 12:04:42 +0100) > > are available in the git repository at: > &

Re: [Qemu-devel] [PATCH 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Max Reitz
On 05.06.2015 18:05, Alberto Garcia wrote: On Fri 05 Jun 2015 06:00:17 PM CEST, Max Reitz wrote: I'd like a definition of what "unused" means (I know because of this series, but I wouldn't know just from this document). It means that it hasn't been accessed in that interval (because it was not

Re: [Qemu-devel] [PATCH 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Alberto Garcia
On Fri 05 Jun 2015 06:00:17 PM CEST, Max Reitz wrote: >>> I'd like a definition of what "unused" means (I know because of this >>> series, but I wouldn't know just from this document). >> It means that it hasn't been accessed in that interval (because it >> was not needed). Are you thinking of an

Re: [Qemu-devel] fw cfg files cross-version migration races

2015-06-05 Thread Gabriel L. Somlo
On Tue, Jun 02, 2015 at 09:11:14AM +0200, Gerd Hoffmann wrote: > > I guess the only reason this isn't a problem is that nobody currently > > attempts to access fw_cfg after a migration ? :) > > Accessing fw_cfg after migration is fine. Problem is this ... > > (1) read directory > (2) migrate

Re: [Qemu-devel] [PATCH 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Alberto Garcia
On Fri 05 Jun 2015 05:52:29 PM CEST, Max Reitz wrote: >> +Reducing the memory usage >> +- >> +It is possible to clean unused cache entries in order to reduce the >> +memory usage during periods of low I/O activity. >> + >> +The parameter "cache-clean-interval" defines an int

Re: [Qemu-devel] [PATCH v5 06/10] block: add delayed bitmap successor cleanup

2015-06-05 Thread John Snow
On 06/05/2015 08:56 AM, Stefan Hajnoczi wrote: > On Thu, Jun 04, 2015 at 05:46:08PM -0400, John Snow wrote: >> @@ -3190,19 +3193,13 @@ BdrvDirtyBitmap >> *bdrv_dirty_bitmap_abdicate(BlockDriverState *bs, * we may wish >> to re-join the parent and child/successor. * The merged parent >> will be un

[Qemu-devel] undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03)

2015-06-05 Thread Paolo Bonzini
On 05/06/2015 17:45, Peter Maydell wrote: >>> ...but things like "(1U << 31)" are entirely valid. >> >> They're only valid until someone does a ~ on them. I think it's >> reasonable to forbid them in our coding standards, if we want to fix >> ubsan's warning of (1 << 31). >> >> I don't think it'

Re: [Qemu-devel] [PATCH 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Max Reitz
On 05.06.2015 17:56, Alberto Garcia wrote: On Fri 05 Jun 2015 05:52:29 PM CEST, Max Reitz wrote: +Reducing the memory usage +- +It is possible to clean unused cache entries in order to reduce the +memory usage during periods of low I/O activity. + +The parameter "cache-cl

Re: [Qemu-devel] [PATCH 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-06-05 Thread Max Reitz
On 02.06.2015 14:22, Alberto Garcia wrote: QEMU has options to configure the size of the L2 and refcount caches for the qcow2 format. However, choosing the right sizes for a particular disk image is not a straightforward operation since the ratio between the cache size and the allocated disk spac

Re: [Qemu-devel] [PATCH 1/4] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-06-05 Thread Max Reitz
On 02.06.2015 14:22, Alberto Garcia wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it mo

Re: [Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03

2015-06-05 Thread Peter Maydell
On 5 June 2015 at 16:20, Paolo Bonzini wrote: > > > On 05/06/2015 17:08, Peter Maydell wrote: >>> > Can someone add a checkpatch rule that forbids shifting left U or UL >>> > constants (i.e. only ULL)? That would alleviate my concerns with these >>> > ubsan warnings. >> >> ...but things like "(1U

[Qemu-devel] [PULL v2 00/62] KVM, dirty bitmap, build system, SMM, icount changes for 2015-06-05

2015-06-05 Thread Paolo Bonzini
The following changes since commit 00967f4e0bab246679d0ddc32fd31a7179345baf: Merge remote-tracking branch 'remotes/agraf/tags/signed-s390-for-upstream' into staging (2015-06-05 12:04:42 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for y

Re: [Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03

2015-06-05 Thread Eric Blake
On 06/05/2015 07:33 AM, Peter Maydell wrote: > On 3 June 2015 at 22:45, Alexander Graf wrote: >> Hi Peter, >> >> This is my current patch queue for ppc. Please pull. > > This is applied, but can you fix the clang sanitizer warnings, > please? > > hw/ppc/spapr_drc.c:59:24: runtime error: left sh

[Qemu-devel] [RFC PATCH] cputlb: modernise the debug support

2015-06-05 Thread Alex Bennée
To avoid cluttering the code with #ifdef legs we wrap up the print statements into a tlb_debug() macro. As access to the virtual TLB can get quite heavy defining DEBUG_TLB_LOG will ensure all the logs go to the qemu_log target of CPU_LOG_MMU instead of stderr. I've also removed DEBUG_TLB_CHECK whi

Re: [Qemu-devel] [PATCH 2/4] qcow2: add option to clean unused cache entries after some time

2015-06-05 Thread Max Reitz
On 02.06.2015 14:22, Alberto Garcia wrote: This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time

Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config arg sub-argument

2015-06-05 Thread Peter Maydell
On 26 May 2015 at 17:03, Leon Alrae wrote: > Add new "arg" sub-argument to the --semihosting-config allowing the user > to pass multiple input arguments separately. It is required for example > by UHI semihosting to construct argc and argv. > > Also, update ARM semihosting to support new option (a

Re: [Qemu-devel] [PATCH] Do not fail if id field is present.

2015-06-05 Thread Eric Blake
On 06/05/2015 08:17 AM, Pavel Fedin wrote: > This fixes QMP regression: > http://lists.gnu.org/archive/html/qemu-devel/2015-06/msg01795.html > > Signed-off-by: Pavel Fedin > --- > monitor.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/monitor.c b/monitor.c > index c7baa91..ef21bba

Re: [Qemu-devel] [PULL 00/62] KVM, dirty bitmap, build system, SMM, icount changes for 2015-06-05

2015-06-05 Thread Paolo Bonzini
On 05/06/2015 17:15, Paolo Bonzini wrote: > The following changes since commit 00967f4e0bab246679d0ddc32fd31a7179345baf: > > Merge remote-tracking branch 'remotes/agraf/tags/signed-s390-for-upstream' > into staging (2015-06-05 12:04:42 +0100) > > are available in the git repository at: > >

[Qemu-devel] [PULL 62/62] update Linux headers from kvm/next

2015-06-05 Thread Paolo Bonzini
This is kvm.git commit 05ff30bb56c6b3d3000519d6e02ed35678ddae3b. Signed-off-by: Paolo Bonzini --- include/standard-headers/linux/virtio_ring.h | 2 +- linux-headers/asm-x86/kvm.h | 14 +- linux-headers/linux/kvm.h| 7 ++- 3 files changed, 20

Re: [Qemu-devel] [Qemu-block] [PATCH v3 07/38] block/quorum: Implement bdrv_is_inserted()

2015-06-05 Thread Max Reitz
On 04.06.2015 14:37, Alberto Garcia wrote: On Wed 03 Jun 2015 09:43:48 PM CEST, Max Reitz wrote: bdrv_is_inserted() should be invoked recursively on the children of quorum. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- +static bool quorum_is_inserted(BlockDriverState *bs) +{ +BDRVQ

[Qemu-devel] [PULL 61/62] atomics: add explicit compiler fence in __atomic memory barriers

2015-06-05 Thread Paolo Bonzini
__atomic_thread_fence does not include a compiler barrier; in the C++11 memory model, fences take effect in combination with other atomic operations. GCC implements this by making __atomic_load and __atomic_store access memory as if the pointer was volatile, and leaves no trace whatsoever of acqui

  1   2   3   4   >