Re: [Qemu-devel] [PATCH v8 25/25] tcg: enable MTTCG by default for ARM on x86 hosts

2017-01-31 Thread Alex Bennée
Richard Henderson writes: > On 01/27/2017 02:39 AM, Alex Bennée wrote: >> +/* This defines the natural memory order supported by this >> + * architecture before guarantees made by various barrier >> + * instructions. >> + * >> + * The x86 has a pretty strong memory ordering which only really >>

Re: [Qemu-devel] [PATCH v8 16/25] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap

2017-01-31 Thread Alex Bennée
Richard Henderson writes: > On 01/27/2017 02:39 AM, Alex Bennée wrote: >> +for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) { >> >> -tlb_debug("%d\n", mmu_idx); >> +if (test_bit(mmu_idx, &mmu_idx_bitmask)) { >> +tlb_debug("%d\n", mmu_idx); >> >> -memse

Re: [Qemu-devel] [PATCH 1/2] ppc/kvm: Handle the "family" CPU via alias instead of registering new types

2017-01-31 Thread Thomas Huth
On 01.02.2017 01:10, David Gibson wrote: > On Tue, Jan 31, 2017 at 02:11:58PM +0100, Thomas Huth wrote: >> When running with KVM on POWER, we are registering a "family" CPU >> type for the host CPU that we are running on. For example, on all >> POWER8-compatible hosts, we register a "POWER8" CPU ty

Re: [Qemu-devel] [PATCH v4 0/2] block/qapi: refactor and optimize the qmp_query_blockstats()

2017-01-31 Thread Markus Armbruster
Max Reitz writes: > Thanks, dropped one of the duplicate info->value assignments in patch 2 > and applied the series to my block tree: > > https://github.com/XanClic/qemu/commits/block > > (Assuming Markus' R-b meant that he does not intends to take it through > his tree.) "Does not intend" is a

[Qemu-devel] [PATCH v2] xen: use qdev_unplug() instead of g_free() in xen_pv_find_xendev()

2017-01-31 Thread Juergen Gross
The error exits of xen_pv_find_xendev() free the new xen-device via g_free() which is wrong. As the xen-device has been initialized as qdev it must be removed via qdev_unplug(). This bug has been introduced with commit 3a6c9172ac5951e6dac2b3f6 ("xen: create qdev for each backend device"). Report

Re: [Qemu-devel] [PATCH] Drop QEMU_GNUC_PREREQ() checks for gcc older than 4.1

2017-01-31 Thread Markus Armbruster
Paolo Bonzini writes: > On 31/01/2017 12:40, Markus Armbruster wrote: >>> >>> #define QEMU_NORETURN __attribute__ ((__noreturn__)) >>> >>> -#if QEMU_GNUC_PREREQ(3, 4) >>> #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) >>> -#else >>> -#define QEMU_WARN_UNUSED_RESULT >>>

[Qemu-devel] [PULL 2/5] sheepdog: reorganize coroutine flow

2017-01-31 Thread Jeff Cody
From: Paolo Bonzini Delimit co_recv's lifetime clearly in aio_read_response. Do a simple qemu_coroutine_enter in aio_read_response, letting sd_co_writev call sd_write_done. Handle nr_pending in the same way in sd_co_rw_vector, sd_write_done and sd_co_flush_to_disk. Remove sd_co_rw_vector's ret

[Qemu-devel] [PULL 5/5] sheepdog: reorganize check for overlapping requests

2017-01-31 Thread Jeff Cody
From: Paolo Bonzini Wrap the code that was copied repeatedly in the two functions, sd_aio_setup and sd_aio_complete. Signed-off-by: Paolo Bonzini Message-id: 20161129113245.32724-6-pbonz...@redhat.com Signed-off-by: Jeff Cody --- block/sheepdog.c | 66 ++---

[Qemu-devel] [PULL 3/5] sheepdog: do not use BlockAIOCB

2017-01-31 Thread Jeff Cody
From: Paolo Bonzini Sheepdog's AIOCB are completely internal entities for a group of requests and do not need dynamic allocation. Signed-off-by: Paolo Bonzini Message-id: 20161129113245.32724-4-pbonz...@redhat.com Signed-off-by: Jeff Cody --- block/sheepdog.c | 99 ++--

Re: [Qemu-devel] [PATCH for-2.9 v3 0/5] Sheepdog cleanups

2017-01-31 Thread Jeff Cody
On Mon, Jan 30, 2017 at 07:48:56PM -0600, Paolo Bonzini wrote: > > > On 04/01/2017 11:47, Jeff Cody wrote: > > On Wed, Jan 04, 2017 at 12:42:53PM +0100, Paolo Bonzini wrote: > >> > >> > >> On 04/01/2017 05:07, Jeff Cody wrote: > >>> On Wed, Dec 21, 2016 at 03:07:07PM +0100, Paolo Bonzini wrote: >

[Qemu-devel] [PULL 4/5] sheepdog: simplify inflight_aio_head management

2017-01-31 Thread Jeff Cody
From: Paolo Bonzini Add to the list in add_aio_request and, indirectly, resend_aioreq. Inline free_aio_req in the caller, it does not simply undo alloc_aio_req's job. Signed-off-by: Paolo Bonzini Message-id: 20161129113245.32724-5-pbonz...@redhat.com Signed-off-by: Jeff Cody --- block/sheepd

[Qemu-devel] [PULL 1/5] sheepdog: remove unused cancellation support

2017-01-31 Thread Jeff Cody
From: Paolo Bonzini SheepdogAIOCB is internal to sheepdog.c, hence it is never canceled. Signed-off-by: Paolo Bonzini Message-id: 20161129113245.32724-2-pbonz...@redhat.com Signed-off-by: Jeff Cody --- block/sheepdog.c | 52 1 file changed,

[Qemu-devel] [PULL 0/5] Block patches

2017-01-31 Thread Jeff Cody
The following changes since commit a0def594286d9110a6035e02eef558cf3cf5d847: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-01-30 10:23:20 +) are available in the git repository at: https://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-reques

Re: [Qemu-devel] [RFC PATCH 12/17] target/ppc/POWER9: Add POWER9 pa-features definition

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:18PM +1100, Suraj Jitindar Singh wrote: > Add a pa-features definition which includes all of the new fields which > have been added, note we don't claim support for any of these new features > at this stage. > > Signed-off-by: Suraj Jitindar Singh Reviewed-by: David

Re: [Qemu-devel] [RFC PATCH 13/17] target/ppc/POWER9: Add cpu_has_work function for POWER9

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:19PM +1100, Suraj Jitindar Singh wrote: > The cpu has work function is used to mask interrupts used to determine > if there is work for the cpu based on the LPCR. Add a function to do this > for POWER9 and add it to the POWER9 cpu definition. This is similar to that >

Re: [Qemu-devel] [RFC PATCH 11/17] target/ppc/POWER9: Update to new pte format for POWER9 accesses

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:17PM +1100, Suraj Jitindar Singh wrote: > The page table entry format was updated for the POWER9 processor. > > It was decided that kernels would used the old format irrespective > with the translation occuring at the hypervisor level. Thus we convert > between the ol

Re: [Qemu-devel] [RFC PATCH 10/17] target/ppc/POWER9: Add POWER9 mmu fault handler

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:16PM +1100, Suraj Jitindar Singh wrote: > Add a new mmu fault handler for the POWER9 cpu and add it as the handler > for the POWER9 cpu definition. > > This handler checks if the guest is radix or hash based on the value in the > partition table entry and calls the co

Re: [Qemu-devel] [RFC PATCH 08/17] target/ppc/POWER9: Add external partition table pointer to cpu state

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:14PM +1100, Suraj Jitindar Singh wrote: > Similarly to how we have an external hpt pointer in the cpu state, add > an external partition table pointer and update it to point to the > partition table entry in the machine state struct on cpu reset. > > Signed-off-by: Su

Re: [Qemu-devel] [RFC PATCH 07/17] target/ppc/POWER9: Add partition table pointer to sPAPRMachineState

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:13PM +1100, Suraj Jitindar Singh wrote: > POWER9 uses a partition table to store information relating to how > address translation is performed on a per partition basis. > > Add a data area for this to the sPAPRMachineState struct and (re)allocate > it on machine rese

Re: [Qemu-devel] [RFC PATCH 09/17] target/ppc/POWER9: Remove SDR1 register

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:15PM +1100, Suraj Jitindar Singh wrote: > The SDR1 registers was used to store the location of the hash page table. > > This register no longer exists on POWER9 processors, so don't create it. > > We now store the hash page table location in the process table entry.

Re: [Qemu-devel] [PATCH v4 2/2] block/qapi: reduce the execution time of qmp_query_blockstats

2017-01-31 Thread Dou Liyang
Hi, Max At 02/01/2017 11:02 AM, Max Reitz wrote: On 15.01.2017 09:01, Dou Liyang wrote: In order to reduce the execution time, this patch optimize the qmp_query_blockstats(): Remove the next_query_bds function. Remove the bdrv_query_stats function. Remove some judgement sentence. The original

Re: [Qemu-devel] [PATCH v4 0/2] block/qapi: refactor and optimize the qmp_query_blockstats()

2017-01-31 Thread Max Reitz
On 15.01.2017 09:01, Dou Liyang wrote: > Change log v3 -> v4: > 1. Develop these into the non-RFC patches. > 2. Fix some comments. > 3. do declarations first. > > Change log v2 -> v3: > 1. Remove the unnecessary code for the bdrv_next_node(). > 2. Remove the change of the locking rules. >

Re: [Qemu-devel] [PATCH v4 2/2] block/qapi: reduce the execution time of qmp_query_blockstats

2017-01-31 Thread Max Reitz
On 15.01.2017 09:01, Dou Liyang wrote: > In order to reduce the execution time, this patch optimize > the qmp_query_blockstats(): > Remove the next_query_bds function. > Remove the bdrv_query_stats function. > Remove some judgement sentence. > > The original qmp_query_blockstats calls next_query_b

Re: [Qemu-devel] [PATCH v2 0/3] block: check full backing filename when searching protocol filenames

2017-01-31 Thread Max Reitz
On 26.01.2017 02:08, Jeff Cody wrote: > Differences from v1: > > Patch 1: set local_error = NULL after freeing (Thanks Eric) > Patch 2: new patch, groundwork for qemu-iotest in patch 3 > Patch 3: qemu-iotest, as requested (Thanks Max) > > > Jeff Cody (3): > block: check full backing filename w

Re: [Qemu-devel] [PULL v3 03/21] ppc: switch to constants within BUILD_BUG_ON

2017-01-31 Thread David Gibson
On Wed, Feb 01, 2017 at 03:37:54AM +0200, Michael S. Tsirkin wrote: > On Wed, Feb 01, 2017 at 09:16:28AM +1100, David Gibson wrote: > > On Tue, Jan 31, 2017 at 03:14:29PM +0200, Michael S. Tsirkin wrote: > > > We are switching BUILD_BUG_ON to verify that it's parameter is a > > > compile-time const

Re: [Qemu-devel] [RFC PATCH 00/17] target/ppc: Implement POWER9 pseries tcg legacy kernel support

2017-01-31 Thread David Gibson
On Wed, Feb 01, 2017 at 01:16:00PM +1100, David Gibson wrote: > On Fri, Jan 13, 2017 at 05:28:06PM +1100, Suraj Jitindar Singh wrote: > > This patch set provides the initial implementation of support for the > > POWER9 processor running in tcg mode under the pseries machine type. > > > > To use a

Re: [Qemu-devel] [RFC PATCH 00/17] target/ppc: Implement POWER9 pseries tcg legacy kernel support

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:06PM +1100, Suraj Jitindar Singh wrote: > This patch set provides the initial implementation of support for the > POWER9 processor running in tcg mode under the pseries machine type. > > To use a POWER9 cpu provide the command line option "-cpu POWER9". > > This is

[Qemu-devel] [PATCH v3] vl: Move the cpu_synchronize_all_post_init() after generic devices initialization

2017-01-31 Thread Dou Liyang
At the Qemu initialization, we call the cpu_synchronize_all_post_init() to synchronize All CPU states to KVM in the ./vl.c::main(). Currently, it is called before we initialize the CPUs, which is created by "-device" command and parsed by generic devices initialization, So, these CPUs may be ignor

Re: [Qemu-devel] [RFC PATCH 00/17] target/ppc: Implement POWER9 pseries tcg legacy kernel support

2017-01-31 Thread David Gibson
On Thu, Jan 12, 2017 at 10:55:49PM -0800, no-re...@patchew.org wrote: > Hi, > > Your series seems to have some coding style problems. See output below for > more information: > > Message-id: 1484288903-18807-1-git-send-email-sjitindarsi...@gmail.com > Subject: [Qemu-devel] [RFC PATCH 00/17] targe

Re: [Qemu-devel] [PATCH] block: bdrv_invalidate_cache: invalidate children first

2017-01-31 Thread Max Reitz
On 31.01.2017 12:23, Vladimir Sementsov-Ogievskiy wrote: > Current implementation invalidates firstly parent bds and then its > children. This leads to the following bug: > > after incoming migration, in bdrv_invalidate_cache_all: > 1. invalidate parent bds - reopen it with BDRV_O_INACTIVE cleared

Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-01-31 Thread ashish mittal
Hi, There has been some work going on on the VxHS libvirt patches and we are making good progress. A suggestion has been made on the libvirt community to check if we can change the qemu VxHS device specification syntax as follows. Replace (a) +file.server.host=192.168.0.1,file.server.port=

Re: [Qemu-devel] [PATCH v4 2/7] qcow2: Discard/zero clusters by byte count

2017-01-31 Thread Max Reitz
On 30.01.2017 17:52, Eric Blake wrote: > On 01/28/2017 02:21 PM, Max Reitz wrote: >> On 20.12.2016 20:15, Eric Blake wrote: >>> Passing a byte offset, but sector count, when we ultimately >>> want to operate on cluster granularity, is madness. Clean up >>> the interfaces to take both offset and co

Re: [Qemu-devel] [PATCH] qcow2: Optimize the refcount-block overlap check

2017-01-31 Thread Max Reitz
On 30.01.2017 17:14, Alberto Garcia wrote: > The metadata overlap checks introduced in a40f1c2add help detect > corruption in the qcow2 image by verifying that data writes don't > overlap with existing metadata sections. > > The 'refcount-block' check in particular iterates over the refcount > tab

Re: [Qemu-devel] [PULL v3 03/21] ppc: switch to constants within BUILD_BUG_ON

2017-01-31 Thread Michael S. Tsirkin
On Wed, Feb 01, 2017 at 09:16:28AM +1100, David Gibson wrote: > On Tue, Jan 31, 2017 at 03:14:29PM +0200, Michael S. Tsirkin wrote: > > We are switching BUILD_BUG_ON to verify that it's parameter is a > > compile-time constant, and it turns out that some gcc versions > > (specifically gcc (Ubuntu 5

Re: [Qemu-devel] [PATCH v2] vl: Ensure the cpu_synchronize_all_post_init() in the appropriate location

2017-01-31 Thread Dou Liyang
Hi, Alex Sorry for late reply. At 01/27/2017 10:03 PM, Alex Bennée wrote: Dou Liyang writes: At the Qemu initialization, we call the cpu_synchronize_all_post_init() to synchronize All CPU states to KVM in the ./vl.c::main(). Currently, it is called before we initialize the CPUs, which crea

Re: [Qemu-devel] [PATCH 1/1] kvm: log available guest crash parameters

2017-01-31 Thread Denis V. Lunev
On 01/31/2017 06:43 PM, Paolo Bonzini wrote: > > On 31/01/2017 05:07, Denis V. Lunev wrote: >> From: Anton Nefedov >> >> Windows reports BSOD parameters through Hyper-V crash MSRs. This >> information is very useful for initial crash analysis and thus >> it would be nice to see it in the QEMU log

Re: [Qemu-devel] [PATCH] qcow2: Optimize the refcount-block overlap check

2017-01-31 Thread Max Reitz
On 30.01.2017 17:34, Alberto Garcia wrote: > On Mon 30 Jan 2017 05:14:41 PM CET, Alberto Garcia wrote: > >> This patch keeps the index of the last used (i.e. non-zero) entry in >> the refcount table and updates it every time the table changes. The >> refcount-block overlap check then uses that ind

Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: fix naming of runtime opts

2017-01-31 Thread Max Reitz
On 31.01.2017 16:56, Peter Lieven wrote: > commit 94d6a7a accidently left the naming of runtime opts and QAPI > scheme inconsistent. As one consequence passing of parameters in the > URI is broken. Sync the naming of the runtime opts to the QAPI > scheme. > > Please note that this is technically b

Re: [Qemu-devel] [PULL v3 03/21] ppc: switch to constants within BUILD_BUG_ON

2017-01-31 Thread David Gibson
On Tue, Jan 31, 2017 at 03:14:29PM +0200, Michael S. Tsirkin wrote: > We are switching BUILD_BUG_ON to verify that it's parameter is a > compile-time constant, and it turns out that some gcc versions > (specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are > not smart enough to figur

Re: [Qemu-devel] [RFC PATCH 06/17] target/ppc/POWER9: Direct all instr and data storage interrupts to the hypv

2017-01-31 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:12PM +1100, Suraj Jitindar Singh wrote: > The vpm0 bit was removed from the LPCR in POWER9, this bit controlled > whether ISI and DSI interrupts were directed to the hypervisor or the > partition. These interrupts now go to the hypervisor irrespective, thus > it is no

Re: [Qemu-devel] [PATCH 2/2] vl: Print CPU help after we've registered the CPU accelerators

2017-01-31 Thread David Gibson
On Tue, Jan 31, 2017 at 02:11:59PM +0100, Thomas Huth wrote: > When running with KVM on POWER, we register some CPU types during > the initialization function of the ppc64 KVM code (which unfortunately > also can not be done via a type_init() like it is done on x86). So to > be able to see these up

Re: [Qemu-devel] [PATCH 1/2] ppc/kvm: Handle the "family" CPU via alias instead of registering new types

2017-01-31 Thread David Gibson
On Tue, Jan 31, 2017 at 02:11:58PM +0100, Thomas Huth wrote: > When running with KVM on POWER, we are registering a "family" CPU > type for the host CPU that we are running on. For example, on all > POWER8-compatible hosts, we register a "POWER8" CPU type, so that > you can always start QEMU with "

Re: [Qemu-devel] [PATCH v2.1] target-ppc: Add MMU model check for booke machines

2017-01-31 Thread David Gibson
On Thu, Jan 26, 2017 at 10:15:59AM +, Valentin Plotkin wrote: > From: Valentin Plotkin > > Machines bamboo, e500 and virtex-ml507 assume a certain MMU model, > otherwise resulting in unpredictable behavior. Add apropriate checks > into *_init functions. > > Signed-off-by: Valentin Plotkin

Re: [Qemu-devel] [PATCH v2 0/2] POWER9 TCG enablements - part12

2017-01-31 Thread David Gibson
On Tue, Jan 24, 2017 at 12:17:22PM +0530, Nikunj A Dadhania wrote: > Nikunj A Dadhania writes: > > > This series contains 5 new instructions for POWER9 ISA3.0 > > VSX Scalar Test Data Class > > VSX Vector Test Data Class > > > > Changelog: > > v1: > > * Zero the match variable in the elem

[Qemu-devel] [PATCH v5 3/3] qemu-io: Add failure regression tests

2017-01-31 Thread Nir Soffer
Add regression tests checking that qemu-io fails with non-zero exit code when reading non-existing file or using the wrong image format. Signed-off-by: Nir Soffer --- tests/qemu-iotests/174 | 59 ++ tests/qemu-iotests/174.out | 7 ++ tests/qem

[Qemu-devel] [PATCH v5 1/3] qemu-io: Return non-zero exit code on failure

2017-01-31 Thread Nir Soffer
The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c 'read -P 1 0 1024' file; echo $? can't

[Qemu-devel] [PATCH v5 0/3] Fix qemu-io return value on failure

2017-01-31 Thread Nir Soffer
This series fix qemu-io to fail with non zero exit code when failing to open the file. Changes since v4: - Added _unsupported_fmt helper - Test any format except raw, instead of only raw - Don't test stderr content, depends on the format - New test move to 174 since 173 is pending - Private copyri

[Qemu-devel] [PATCH v5 2/3] qemu-iotests: Add _unsupported_fmt helper

2017-01-31 Thread Nir Soffer
This helper allows adding tests supporting any format expect the specified formats. This may be useful to test that many formats behave in a common way. Signed-off-by: Nir Soffer --- tests/qemu-iotests/common.rc | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/qemu-iotests/

Re: [Qemu-devel] [Qemu-block] [PATCH v3 2/3] block: Fix target variable of BLKSECTGET ioctl

2017-01-31 Thread Max Reitz
On 20.01.2017 17:25, Eric Farman wrote: > Commit 6f6071745bd0 ("raw-posix: Fetch max sectors for host block device") > introduced a routine to call the kernel BLKSECTGET ioctl, which stores the > result back to user space. However, the size of the data returned depends > on the routine handling th

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/3] scsi-generic and BLKSECTGET

2017-01-31 Thread Max Reitz
On 31.01.2017 12:37, John Snow wrote: > > > On 01/24/2017 07:09 AM, Fam Zheng wrote: >> On Tue, 01/24 12:23, Paolo Bonzini wrote: >>> >>> >>> On 22/01/2017 15:29, Fam Zheng wrote: On Fri, 01/20 17:25, Eric Farman wrote: > Changes: > v2->v3: > - Move byte/sector conversions to

Re: [Qemu-devel] [PATCH v8 00/25] Remaining MTTCG Base patches and ARM enablement

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:38 AM, Alex Bennée wrote: Hi, All of the changes in this revision are addressing comments from v7 posted last week. A new pre-cursor patch was added: cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap To change the cputlb API to use a bitmap instead

Re: [Qemu-devel] [PATCH v8 25/25] tcg: enable MTTCG by default for ARM on x86 hosts

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:39 AM, Alex Bennée wrote: +/* This defines the natural memory order supported by this + * architecture before guarantees made by various barrier + * instructions. + * + * The x86 has a pretty strong memory ordering which only really + * allows for some stores to be re-ordered aft

Re: [Qemu-devel] [PATCH v8 24/25] target-arm: ensure all cross vCPUs TLB flushes complete

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:39 AM, Alex Bennée wrote: Previously flushes on other vCPUs would only get serviced when they exited their TranslationBlocks. While this isn't overly problematic it violates the semantics of TLB flush from the point of view of source vCPU. To solve this we call the cputlb *_all_

Re: [Qemu-devel] [PATCH v8 19/25] cputlb: introduce tlb_flush_*_all_cpus[_synced]

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:39 AM, Alex Bennée wrote: This introduces support to the cputlb API for flushing all CPUs TLBs with one call. This avoids the need for target helpers to iterate through the vCPUs themselves. An additional variant of the API (_synced) do not return from the caller and will cause

Re: [Qemu-devel] [PATCH 24/24] qcow2-bitmap: cache bitmap list in BDRVQcow2State

2017-01-31 Thread Max Reitz
On 23.01.2017 13:10, Vladimir Sementsov-Ogievskiy wrote: > Do not reload bitmap list every time it is needed. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-bitmap.c | 125 > ++- > block/qcow2.c| 2 + > block/qcow2.h

Re: [Qemu-devel] [PATCH] Drop QEMU_GNUC_PREREQ() checks for gcc older than 4.1

2017-01-31 Thread Paolo Bonzini
On 31/01/2017 11:58, Peter Maydell wrote: > On 31 January 2017 at 16:55, Daniel P. Berrange wrote: >> On Tue, Jan 31, 2017 at 04:14:47PM +, Peter Maydell wrote: >>> We already require gcc 4.1 or newer (for the atomic >>> support), so the fallback codepaths for older gcc >>> versions than tha

Re: [Qemu-devel] [PATCH] Drop QEMU_GNUC_PREREQ() checks for gcc older than 4.1

2017-01-31 Thread Paolo Bonzini
On 31/01/2017 12:40, Markus Armbruster wrote: >> >> #define QEMU_NORETURN __attribute__ ((__noreturn__)) >> >> -#if QEMU_GNUC_PREREQ(3, 4) >> #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) >> -#else >> -#define QEMU_WARN_UNUSED_RESULT >> -#endif > Should we inline this

Re: [Qemu-devel] [PATCH 23/24] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-01-31 Thread Max Reitz
On 23.01.2017 13:10, Vladimir Sementsov-Ogievskiy wrote: > Realize .bdrv_remove_persistent_dirty_bitmap interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-bitmap.c | 40 > block/qcow2.c| 1 + > block/qcow2.h|

Re: [Qemu-devel] [PATCH 22/24] block/dirty-bitmap: deep release dirty bitmaps

2017-01-31 Thread Max Reitz
On 01.02.2017 00:00, Max Reitz wrote: > On 31.01.2017 17:03, Vladimir Sementsov-Ogievskiy wrote: [...] >> I've started to rewrite it in that way and it seems like deep almost >> always will be false. What about just move call to >> bs->drv->bdrv_remove_persistent_dirty_bitmap() directly to >> qmp

Re: [Qemu-devel] [PATCH v8 17/25] cputlb: add tlb_flush_by_mmuidx async routines

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:39 AM, Alex Bennée wrote: This converts the remaining TLB flush routines to use async work when detecting a cross-vCPU flush. The only minor complication is having to serialise the var_list of MMU indexes into a form that can be punted to an asynchronous job. The pending_tlb_flu

Re: [Qemu-devel] [PATCH v8 16/25] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:39 AM, Alex Bennée wrote: +for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) { -tlb_debug("%d\n", mmu_idx); +if (test_bit(mmu_idx, &mmu_idx_bitmask)) { +tlb_debug("%d\n", mmu_idx); -memset(env->tlb_table[mmu_idx], -1, sizeof(env->tlb_t

Re: [Qemu-devel] [PATCH 22/24] block/dirty-bitmap: deep release dirty bitmaps

2017-01-31 Thread Max Reitz
On 31.01.2017 17:03, Vladimir Sementsov-Ogievskiy wrote: > 29.01.2017 19:54, Max Reitz wrote: >> On 23.01.2017 13:10, Vladimir Sementsov-Ogievskiy wrote: >>> Remove persistent bitmap from its storage on bdrv_release_dirty_bitmap. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> --- >>> bl

Re: [Qemu-devel] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_bitmaps

2017-01-31 Thread Max Reitz
On 31.01.2017 16:11, Vladimir Sementsov-Ogievskiy wrote: > 29.01.2017 01:20, Max Reitz wrote: >> On 23.01.2017 13:10, Vladimir Sementsov-Ogievskiy wrote: >>> Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They >>> are loaded when the image is opened and become BdrvDirtyBitmaps f

Re: [Qemu-devel] [PATCH 07/24] qcow2: add bitmaps extension

2017-01-31 Thread Max Reitz
On 30.01.2017 08:21, Vladimir Sementsov-Ogievskiy wrote: > 29.01.2017 00:29, Max Reitz wrote: >> On 23.01.2017 13:10, Vladimir Sementsov-Ogievskiy wrote: >>> Add bitmap extension as specified in docs/specs/qcow2.txt. >>> For now, just mirror extension header into Qcow2 state and check >>> constrain

Re: [Qemu-devel] [PATCH 1/2] qemu-io: don't allow I/O operations larger than INT_MAX

2017-01-31 Thread Max Reitz
On 31.01.2017 19:11, Alberto Garcia wrote: > On Tue 31 Jan 2017 05:41:23 PM CET, Eric Blake wrote: > Ideally, it would be nice to fix the block layer to allow larger requests (since we already have code to auto-fragment down to device limits, we should be able to rely on that code

Re: [Qemu-devel] [PATCH] char: drop data written to a disconnected pty

2017-01-31 Thread Ed Swierk
On Tue, Jan 31, 2017 at 6:06 AM, Marc-André Lureau wrote: > I think this can be confusing if some backends silently drop the data (under > disconnected state), while other don't. Perhaps we should have instead a new > common chardev property "hup-drop" ? (suggestions for better name welcome) Ei

Re: [Qemu-devel] [PATCH Risu 1/2] risu_ppc64: Fix Risu to run under qemu linux user

2017-01-31 Thread joserz
On Mon, Jan 30, 2017 at 11:49:34AM +, Peter Maydell wrote: > On 30 January 2017 at 02:47, Jose Ricardo Ziviani > wrote: > > Qemu linux-user doesn't fill uc_mcontext completely like full emul. does. > > For instance, uc->uc_mcontext.regs->nip is an invalid so this > > commit replaces it by uc->

[Qemu-devel] [PATCH] linux-user: fill target sigcontext struct accordingly

2017-01-31 Thread Jose Ricardo Ziviani
A segfault is noticed when an emulated program uses any of ucontext regs fields. Risu detected this issue in the following operation when handling a signal: ucontext_t *uc = (ucontext_t*)uc; uc->uc_mcontext.regs->nip += 4; but this works fine: uc->uc_mcontext.gp_regs[PT_NIP] += 4; This patc

Re: [Qemu-devel] [libvirt] char: Logging serial pty output when disconnected

2017-01-31 Thread Ed Swierk
On Tue, Jan 31, 2017 at 7:34 AM, Paolo Bonzini wrote: > > > On 31/01/2017 04:39, Daniel P. Berrange wrote: >> I don't think so - retrying in this way is pointless IMHO - it is just >> going to get the same result on every retry on 99% of occassions. > > Just to provide the full context, the retry

Re: [Qemu-devel] [Bug 1250360] Re: qcow2 image logical corruption after host crash

2017-01-31 Thread Blue
Since then, I switched all my vm images to (sparse) raw and never experienced corruption problems again. I could not say if this can still be reproduced today, even then it was probably a corner case. I would suggest the closing of the issue as we cannot gather newer and more relevant data. On T

Re: [Qemu-devel] qemu-pcc 2.8.0 linux-user segfaults

2017-01-31 Thread Aníbal Limón
On 01/30/2017 05:52 PM, Sam Bobroff wrote: > On Mon, Jan 16, 2017 at 04:03:21PM -0600, Aníbal Limón wrote: >> >> >> On 01/16/2017 03:56 PM, Aníbal Limón wrote: >>> Hi folks, >>> >>> I'm trying to upgrade qemu to 2.8.0 in Openembedded-core and segfaults >>> in qemu-ppc when is executing: > > Hi A

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2017 at 10:51:02AM +0100, Igor Mammedov wrote: > On Mon, 30 Jan 2017 22:28:41 +0200 > "Michael S. Tsirkin" wrote: > > > On Fri, Jan 27, 2017 at 10:43:13AM -0500, Kevin O'Connor wrote: > > > On Fri, Jan 27, 2017 at 03:46:33PM +0100, Laszlo Ersek wrote: > > > > On 01/27/17 15:18,

[Qemu-devel] [Bug 1250360] Re: qcow2 image logical corruption after host crash

2017-01-31 Thread Thomas Huth
Did this issue happen ever again with a recent version of QEMU? ... if not, should we close this bug nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpa

Re: [Qemu-devel] [PATCH] q35: Provide improved sample configurations

2017-01-31 Thread Eric Blake
On 01/31/2017 02:34 PM, Gerd Hoffmann wrote: > > Note that you can specify -readconfig multiple times, so you can split > out common stuff and ask people to run "qemu -readconfig > q35-paravirt-base.cfg -readconfig q35-paravirt-$style.cfg" Can we add #include-like semantics, so that one .cfg fil

[Qemu-devel] [Bug 1241569] Re: qemu-system-alpha console unresponsive

2017-01-31 Thread Thomas Huth
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1241569 Title: qemu-system-alpha console unresponsive Status in QEMU: Invalid Bug description:

[Qemu-devel] [PULL v5 21/22] arm: better stub version for MISMATCH_CHECK

2017-01-31 Thread Michael S. Tsirkin
stub version of MISMATCH_CHECK is empty so it's easy to misuse for people not building kvm on arm. Use QEMU_BUILD_BUG_ON similar to the non-stub version to make it easier to catch bugs. Signed-off-by: Michael S. Tsirkin Reviewed-by: Peter Maydell --- target/arm/kvm-consts.h | 4 +++- 1 file ch

[Qemu-devel] [PULL v5 19/22] vhost-user: delete chardev on cleanup

2017-01-31 Thread Michael S. Tsirkin
From: Marc-André Lureau Remove the chardev implicitly when cleaning up the netdev. This prevents from reusing the chardev since it would be in an incorrect state with the slave. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1256618 Signed-off-by: Marc-André Lureau Reviewed-by: Michael

[Qemu-devel] [PULL v5 16/22] pci: Convert msix_init() to Error and fix callers

2017-01-31 Thread Michael S. Tsirkin
From: Cao jin msix_init() reports errors with error_report(), which is wrong when it's used in realize(). The same issue was fixed for msi_init() in commit 1108b2f. In order to make the API change as small as possible, leave the return value check to later patch. For some devices(like e1000e, v

[Qemu-devel] [PULL v5 20/22] hw/pci: disable pci-bridge's shpc by default

2017-01-31 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The shpc component is optional while ACPI hotplug is used for hot-plugging PCI devices into a PCI-PCI bridge. Disabling the shpc by default will make slot 0 usable at boot time and not only for hot-plug, without loosing any functionality. Older machines will have shpc enab

[Qemu-devel] [PULL v5 17/22] virtio: make virtio_should_notify static

2017-01-31 Thread Michael S. Tsirkin
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 1 - hw/virtio/virtio.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/vi

[Qemu-devel] [PULL v5 15/22] hcd-xhci: check & correct param before using it

2017-01-31 Thread Michael S. Tsirkin
From: Cao jin usb_xhci_realize() corrects invalid values of property "intrs" automatically, but the uncorrected value is passed to msi_init(), which chokes on invalid values. Delay that until after the correction. Resources allocated by usb_xhci_init() are leaked when msi_init() fails. Fix by

[Qemu-devel] [PULL v5 14/22] msix: Follow CODING_STYLE

2017-01-31 Thread Michael S. Tsirkin
From: Cao jin CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions

[Qemu-devel] [PULL v5 08/22] pci: mark ROMs read-only

2017-01-31 Thread Michael S. Tsirkin
Looks like we didn't mark PCI ROMs as RO allowing mischief such as guests writing there. Further, e.g. vhost gets confused trying to allocate enough space to log writes there. Fix it up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum Tested-by: Laurent Vivier --- hw/pci/pci.c

Re: [Qemu-devel] [PATCH] q35: Provide improved sample configurations

2017-01-31 Thread Gerd Hoffmann
Hi, > Both configuration file are full commented, neatly > organized, and use paravirtualized devices instead of > emulated devices whenever possible for a better user > experience. Moreover, they follow the PCI Express > Guidelines (docs/pcie.txt) for their topology. > --- > I plan to provide s

[Qemu-devel] [PULL v5 10/22] hw/pcie: Introduce a base class for PCI Express Root Ports

2017-01-31 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The 'base' PCI Express Root Port includes the common code to be re-used for all Root Ports implementations. Most of the code was taken from the current implementation of Intel's IOH 3420 Root Port. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-of

[Qemu-devel] [PULL v5 22/22] arm: add trailing ; after MISMATCH_CHECK

2017-01-31 Thread Michael S. Tsirkin
Macro calls without a trailing ; look weird in C, this works as a side effect of how QEMU_BUILD_BUG_ON is implemented. Fix this up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Peter Maydell --- target/arm/kvm-consts.h | 98 - 1 file changed, 49

[Qemu-devel] [PULL v5 06/22] compiler: expression version of QEMU_BUILD_BUG_ON

2017-01-31 Thread Michael S. Tsirkin
QEMU_BUILD_BUG_ON uses a typedef in order to be safe to use outside functions, but sometimes it's useful to have a version that can be used within an expression. Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO that return zero after checking condition at build time. Signed-off-by: Mich

[Qemu-devel] [PULL v5 05/22] compiler: rework BUG_ON using a struct

2017-01-31 Thread Michael S. Tsirkin
There are theoretical concerns that some compilers might not trigger build failures on attempts to define an array of size (x ? -1 : 1) where x is a variable and make it a variable sized array instead. Let rewrite using a struct with a negative bit field size instead as there are no dynamic bit fie

[Qemu-devel] [PULL v5 11/22] hw/ioh3420: derive from PCI Express Root Port base class

2017-01-31 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Preserve only Intel specific details. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-bridge/ioh3420.c | 121 ++-- 1 file changed, 15 insertions(+), 106 deletions(-

[Qemu-devel] [PULL v5 12/22] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-31 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The Generic Root Port behaves almost the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour (e.g add vendor-spec

[Qemu-devel] [PULL v5 18/22] vhost: skip ROM sections

2017-01-31 Thread Michael S. Tsirkin
vhost does not support RO protections on memory at the moment - adding ROMs would mean that e.g. a buggy guest might change them in-memory - a condition from which guest reset does not recover. Not nice. We also definitely don't want to try logging writes into ROMs - in particular guests set very

[Qemu-devel] [PULL v5 09/22] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc()

2017-01-31 Thread Michael S. Tsirkin
From: Jason Wang We don't use 1ULL which is wrong during size calculation. Fix it, and while at it, switch to use cto64() and adds a comments to make it simpler and easier to be understood. Reported-by: Paolo Bonzini Cc: Paolo Bonzini Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL v5 04/22] QEMU_BUILD_BUG_ON: use __COUNTER__

2017-01-31 Thread Michael S. Tsirkin
Some headers use QEMU_BUILD_BUG_ON. This causes a problem if the C file including that header happens to have QEMU_BUILD_BUG_ON at the same line number. Fix using a widely available extension: __COUNTER__. If unavailable, provide a stub. Signed-off-by: Michael S. Tsirkin Reviewed-by: Markus Armb

[Qemu-devel] [PULL v5 03/22] ppc: switch to constants within BUILD_BUG_ON

2017-01-31 Thread Michael S. Tsirkin
We are switching BUILD_BUG_ON to verify that it's parameter is a compile-time constant, and it turns out that some gcc versions (specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are not smart enough to figure it out for expressions involving local variables. This is harmless but mea

[Qemu-devel] [PULL v5 13/22] hw/i386: check if nvdimm is enabled before plugging

2017-01-31 Thread Michael S. Tsirkin
From: Haozhong Zhang The missing of 'nvdimm' in the machine type option '-M' means NVDIMM is disabled. QEMU should refuse to plug any NVDIMM device in this case and report the misconfiguration. The behavior of NVDIMM on unsupported platform (HW/FW) is vendor specific. For some vendors, it's unde

[Qemu-devel] [PULL v5 07/22] ARRAY_SIZE: check that argument is an array

2017-01-31 Thread Michael S. Tsirkin
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to ARRAY_SI

[Qemu-devel] [PULL v5 01/22] compiler: drop ; after BUILD_BUG_ON

2017-01-31 Thread Michael S. Tsirkin
All users include the trailing ; anyway, let's require that - it seems cleaner. Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- include/qemu/compiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/compiler.h b/i

[Qemu-devel] [PULL v5 00/22] virtio, vhost, pci: fixes, features

2017-01-31 Thread Michael S. Tsirkin
The following changes since commit a0def594286d9110a6035e02eef558cf3cf5d847: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-01-30 10:23:20 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

[Qemu-devel] [PULL v5 02/22] qxl: switch to constants within BUILD_BUG_ON

2017-01-31 Thread Michael S. Tsirkin
We are switching BUILD_BUG_ON to verify that it's parameter is a compile-time constant, and it turns out that some gcc versions (specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are not smart enough to figure it out for expressions involving local variables. This is harmless but mea

Re: [Qemu-devel] [PATCH v8 15/25] cputlb: introduce tlb_flush_* async work.

2017-01-31 Thread Richard Henderson
On 01/27/2017 02:39 AM, Alex Bennée wrote: From: KONRAD Frederic Some architectures allow to flush the tlb of other VCPUs. This is not a problem when we have only one thread for all VCPUs but it definitely needs to be an asynchronous work when we are in true multithreaded work. We take the tb_

  1   2   3   4   5   >