[Qemu-devel] [Bug 1591628] Re: 2.6.0 hangs linux vm using vfio for pci passthrough of graphics card

2016-06-15 Thread Peter Maloney
FYI I tried my grsec kernel (which also has some =m changed to =y so maybe I only forgot a modprobe command before) without acs_override=downstream which works with the revert build, and hangs without. -- You received this bug notification because you are a member of qemu- devel-ml, which is subs

Re: [Qemu-devel] [Qemu-ppc] Determining interest in PPC e500spin, yield, and openpic patches

2016-06-15 Thread Thomas Huth
On 15.06.2016 22:12, alar...@ddci.com wrote: [...] > The following patch has a fix for that, and also raises a separate > issue that I'd be happy to resolve after getting some guidance. [...] @@ -104,6 +108,16 @@ cpu_synchronize_state(cpu); stl_p(&curspin->pir, env->spr[SPR_PIR]); +/* T

Re: [Qemu-devel] [Qemu-ppc] Determining interest in PPC e500spin, yield, and openpic patches

2016-06-15 Thread Thomas Huth
Hi, On 15.06.2016 22:12, alar...@ddci.com wrote: [...] > When e500 PPC is booted multi-core, the non-boot cores are started via > the spin table. ppce500_spin.c:spin_kick() calls > mmubooke_create_initial_mapping() to allocate a 64MB TLB entry, but > the created TLB entry is only 256KB. > > The

[Qemu-devel] [PATCH v4 2/3] target-i386: add migration support for Intel LMCE

2016-06-15 Thread Haozhong Zhang
Migration is only allowed between VCPUs with the same lmce option. Signed-off-by: Haozhong Zhang --- target-i386/machine.c | 25 + 1 file changed, 25 insertions(+) diff --git a/target-i386/machine.c b/target-i386/machine.c index cb9adf2..00375a3 100644 --- a/target-i386/

[Qemu-devel] [PATCH v4 3/3] i386: publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg

2016-06-15 Thread Haozhong Zhang
It's a prerequisite that certain bits of MSR_IA32_FEATURE_CONTROL should be set before some features (e.g. VMX and LMCE) can be used, which is usually done by the firmware. This patch adds a fw_cfg file "etc/msr_feature_control" which contains the advised value of MSR_IA32_FEATURE_CONTROL and can b

[Qemu-devel] [PATCH v4 0/3] Add QEMU support for Intel local MCE

2016-06-15 Thread Haozhong Zhang
Changes in v4: * Abort starting QEMU if lmce option is present but host does support LMCE. (Eduardo Habkost) * Remove setting MSR_IA32_FEATURE_CONTROL, which should be left to guest. (Radim Krčmá, Paolo Bonzini * Adjust error messages in mce_init(). (Boris Petkov) * Move adding option 'lm

[Qemu-devel] [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support

2016-06-15 Thread Haozhong Zhang
From: Ashok Raj This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they are injected to only one VCPU rather than broadcast to all VCPUs. As KVM reports LMCE support on Intel platforms, this features is only available on Intel platforms. LMCE is disabled by default and can be enab

Re: [Qemu-devel] [PULL 03/13] target-ppc: Use 32-bit rotate instead of deposit + 64-bit rotate

2016-06-15 Thread David Gibson
On Wed, Jun 15, 2016 at 10:17:19PM +1000, Anton Blanchard wrote: > Hi, > > > From: Richard Henderson > > > > A 32-bit rotate insn is more common on hosts than a deposit insn, > > and if the host has neither the result is truely horrific. > > > > At the same time, tidy up the temporaries within

Re: [Qemu-devel] [PATCH v2 17/17] block: Move request_alignment into BlockLimit

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > It makes more sense to have ALL block size limit constraints > in the same struct. Improve the documentation while at it. > > Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v2 16/17] block: Split bdrv_merge_limits() from bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > The raw block driver was blindly copying all limits from bs->file, > even though: 1. the main bdrv_refresh_limits() already does this > for many of gthe limits, and 2. blindly copying from the children s/gthe/the ? > can weaken any stricter limits that wer

Re: [Qemu-devel] [PATCH v2 15/17] block: Switch discard length bounds to byte-based

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > Sector-based limits are awkward to think about; in our on-going > quest to move to byte-based interfaces, convert max_discard and > discard_alignment. Rename them, using 'pdiscard' as an aid to > track which remaining discard interfaces need conversion, and

Re: [Qemu-devel] [PATCH v2 14/17] block: Switch transfer length bounds to byte-based

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > Sector-based limits are awkward to think about; in our on-going > quest to move to byte-based interfaces, convert max_transfer_length > and opt_transfer_length. Rename them (dropping the _length suffix) > so that the compiler will help us catch the change i

Re: [Qemu-devel] [PATCH v2 13/17] block: Set default request_alignment during bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > > Now that all

Re: [Qemu-devel] [PATCH v2 12/17] block: Set request_alignment during .bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > > Add a .bdrv_

Re: [Qemu-devel] [PATCH v2 11/17] raw-win32: Set request_alignment during .bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > > In this case

Re: [Qemu-devel] [PATCH v2 10/17] qcow2: Set request_alignment during .bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > > Signed-off-b

Re: [Qemu-devel] [PATCH v2 09/17] iscsi: Set request_alignment during .bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > > Signed-off-b

Re: [Qemu-devel] [PATCH v2 08/17] blkdebug: Set request_alignment during .bdrv_refresh_limits()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > > qemu-iotests

Re: [Qemu-devel] [PATCH v2 07/17] block: Give nonzero result to blk_get_max_transfer_length()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > Making all callers special-case 0 as unlimited is awkward, > and we DO have a hard maximum of BDRV_REQUEST_MAX_SECTORS given > our current block layer API limits. > > In the case of scsi, this means that we now always advertise a > limit to the guest, even

Re: [Qemu-devel] [PATCH v2 06/17] iscsi: Advertise realistic limits to block layer

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > The function sector_limits_lun2qemu() returns a value in units of > the block layer's 512-byte sector, and can be as large as > 0x4000, which is much larger than the block layer's inherent > limit of BDRV_REQUEST_MAX_SECTORS. The block layer already > h

Re: [Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We were basing the advertisement of maximum discard and transfer > length off of UINT32_MAX, but since the rest of the block layer > has signed int limits on a transaction, nothing could ever reach > that maximum, and we risk overflowing an int once things a

Re: [Qemu-devel] [PATCH v2 04/17] nbd: Allow larger requests

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > The NBD layer was breaking up request at a limit of 2040 sectors > (just under 1M) to cater to old qemu-nbd. But the server limit > was raised to 32M in commit 2d8214885 to match the kernel, more > than three years ago; and the upstream NBD Protocol is propo

Re: [Qemu-devel] [PATCH v2 03/17] block: Fix harmless off-by-one in bdrv_aligned_preadv()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > If the amount of data to read ends exactly on the total size > of the bs, then we were wasting time creating a local qiov > to read the data in preparation for what would normally be > appending zeroes beyond the end, even though this corner case > has nothi

Re: [Qemu-devel] [PATCH v2 02/17] block: Document supported flags during bdrv_aligned_preadv()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We don't pass any flags on to drivers to handle. Tighten an > assert to explain why we pass 0 to bdrv_driver_preadv(), and add > some comments on things to be aware of if we want to turn on > per-BDS BDRV_REQ_FUA support during reads in the future. Also, >

Re: [Qemu-devel] [PATCH v2 01/17] block: Tighter assertions on bdrv_aligned_pwritev()

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > For symmetry with bdrv_aligned_preadv(), assert that the caller > really has aligned things properly. This requires adding an align > parameter, which is used now only in the new asserts, but will > come in handy in a later patch that adds auto-fragmentation

Re: [Qemu-devel] [PATCH 1/2] blockdev: Add dynamic generation of module_block.h

2016-06-15 Thread Fam Zheng
On Wed, 06/15 14:40, Colin Lord wrote: > From: Marc Mari > > To simplify the addition of new block modules, add a script that generates > include/qemu/module_block.h automatically from the modules' source code. > > This script assumes that the QEMU coding style rules are followed. > > Signed-of

[Qemu-devel] [PULL 7/8] migration: fix typos in qapi-schema from latest migration additions

2016-06-15 Thread Amit Shah
From: "Daniel P. Berrange" Recent migration QAPI enhancements had a few spelling mistakes and also incorrect version number in a few places. Signed-off-by: Daniel P. Berrange Reviewed-by: Eric Blake Message-id: 1464776234-9910-2-git-send-email-berra...@redhat.com Message-Id: <1464776234-9910-2

[Qemu-devel] [PULL 8/8] migration: rename functions to starting migrations

2016-06-15 Thread Amit Shah
From: "Daniel P. Berrange" Apply the following renames for starting incoming migration: process_incoming_migration -> migration_fd_process_incoming migration_set_incoming_channel -> migration_channel_process_incoming migration_tls_set_incoming_channel -> migration_tls_channel_process_incoming

[Qemu-devel] [PULL 4/8] test: Postcopy

2016-06-15 Thread Amit Shah
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file "fill.s" .text

[Qemu-devel] [PULL 6/8] Postcopy: Check for support when setting the capability

2016-06-15 Thread Amit Shah
From: "Dr. David Alan Gilbert" Knowing whether the destination host supports migration with postcopy can be tricky. The destination doesn't need the capability set, however if we set it then use the opportunity to do the test and tell the user/management layer early. Signed-off-by: Dr. David Ala

[Qemu-devel] [PULL 5/8] tests: fix libqtest socket timeouts

2016-06-15 Thread Amit Shah
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli Reviewed-by: Marcel Apfelbaum Message-id: 1465816605-29488-6-git-send-email-dgilb...@redhat.com Message-Id: <1465816605-29488-6-git-send-email-dgi

[Qemu-devel] [PULL 3/8] Postcopy: Add stats on page requests

2016-06-15 Thread Amit Shah
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev Message-id: 1465816605-29488-4-git-send-email-dgilb...@redhat.com Message-Id: <1465816605-29488-4

[Qemu-devel] [PULL 0/8] migration: fixes

2016-06-15 Thread Amit Shah
The following changes since commit 49237b856ae58ee7955be0b959c504c51b014f20: Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20160614-tag' into staging (2016-06-14 16:32:32 +0100) are available in the git repository at: https://git.kernel.org/pub/scm/virt/qemu/amit/migration.git

[Qemu-devel] [PULL 1/8] Postcopy: Avoid 0 length discards

2016-06-15 Thread Amit Shah
From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Denis V. Lunev Message-id: 1465816605-29488

[Qemu-devel] [PULL 2/8] Migration: Split out ram part of qmp_query_migrate

2016-06-15 Thread Amit Shah
From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Message-id: 1465816605-29488-3-git-send-email-dgilb...@redhat.com Reviwed-by: Denis V. Lune

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 0/9] Core based CPU hotplug for PowerPC sPAPR

2016-06-15 Thread Bharata B Rao
On Wed, Jun 15, 2016 at 04:04:14PM +1000, David Gibson wrote: > On Fri, Jun 10, 2016 at 03:14:14PM +1000, David Gibson wrote: > > On Fri, Jun 10, 2016 at 06:28:59AM +0530, Bharata B Rao wrote: > > > Hi, > > > > > > This is the next version of the CPU hotplug patchset for PowerPC > > > sPAPR target

Re: [Qemu-devel] [PATCH 0/2] memory/intel_iommu: Generate error for incompatible usage

2016-06-15 Thread Peter Xu
On Wed, Jun 15, 2016 at 09:56:03AM -0600, Alex Williamson wrote: > VT-d emulation is currently incompatible with device assignment due > to intel_iommu's lack of support for memory_region_notify_iommu(). > Alexey has proposed a nice addition to the MemoryRegionIOMMUOps > structure that adds callbac

Re: [Qemu-devel] [PATCH 2/9] m25p80: Make a table for JEDEC ID.

2016-06-15 Thread Cédric Le Goater
On 06/15/2016 03:41 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > Since it is now longer than 4. This work based on Pawel Lenkow > changes and the kernel SPI framework. > > Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater > --- > hw/block/m25p80.c | 61 >

Re: [Qemu-devel] [PATCH v3 00/20] GICv3 emulation

2016-06-15 Thread Shannon Zhao
On 2016/6/15 18:10, Peter Maydell wrote: > On 15 June 2016 at 11:06, Peter Maydell wrote: >> > On 15 June 2016 at 10:20, Andrew Jones wrote: >>> >> There may be a bug in the freebsd kernel. Maybe they need the equivalent >>> >> of Linux's 7c9b973061 "irqchip/gic-v3: Configure all interrupts as

Re: [Qemu-devel] [PATCH v3 08/20] hw/intc/arm_gicv3: Add vmstate descriptors

2016-06-15 Thread Shannon Zhao
On 2016/6/14 22:38, Peter Maydell wrote: > diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c > index acc1730..d08808d 100644 > --- a/hw/intc/arm_gicv3_kvm.c > +++ b/hw/intc/arm_gicv3_kvm.c miss adding #include "migration/migration.h" otherwise there is a compiling error: error: imp

[Qemu-devel] [PATCH] vnc: wrap vnc initialization code with CONFIG_VNC

2016-06-15 Thread Chao Peng
commit f8c75b2486 (vnc: Initialization stubs) removed CONFIG_VNC in vl.c code. However qemu_find_opts("vnc") is NULL when vnc is configured out. Crash will happen in qemu_opts_foreach() before stub vnc_init_func() is called. This patch add it back. Cc: Eduardo Habkost Signed-off-by: Chao Peng --

Re: [Qemu-devel] [PATCH 0/2] memory/intel_iommu: Generate error for incompatible usage

2016-06-15 Thread Alexey Kardashevskiy
On 16/06/16 01:56, Alex Williamson wrote: > VT-d emulation is currently incompatible with device assignment due > to intel_iommu's lack of support for memory_region_notify_iommu(). > Alexey has proposed a nice addition to the MemoryRegionIOMMUOps > structure that adds callbacks when the first iommu

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Throw hw_error on notify_started

2016-06-15 Thread David Gibson
On Wed, Jun 15, 2016 at 09:56:16AM -0600, Alex Williamson wrote: > We don't currently support the MemoryRegionIOMMUOps notifier, so throw > an error should a device require it. > > Signed-off-by: Alex Williamson Reviewed-by: David Gibson > --- > hw/i386/intel_iommu.c | 12 > 1

Re: [Qemu-devel] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-15 Thread David Gibson
On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > This reworks emulation of the various "rfi" variants. I removed > some masking bits that I couldn't make sense of, the only bit that > I am aware we should mask here is POW, the CPU's MSR mask sho

Re: [Qemu-devel] [PATCH v2] Fix confusing argument names in some common functions

2016-06-15 Thread David Gibson
On Wed, Jun 15, 2016 at 01:45:58PM +0300, Sergey Sorokin wrote: > 15.06.2016, 06:03, "David Gibson" : > > On Tue, Jun 14, 2016 at 03:26:17PM +0300, Sergey Sorokin wrote: > >>  There are functions tlb_fill(), cpu_unaligned_access() and > >>  do_unaligned_access() that are called with access type and

Re: [Qemu-devel] [PATCH] vfio: Fix broken EEH

2016-06-15 Thread David Gibson
On Wed, Jun 15, 2016 at 10:52:55AM -0600, Alex Williamson wrote: > On Wed, 15 Jun 2016 15:03:15 +1000 > David Gibson wrote: > > > On Wed, Jun 15, 2016 at 02:46:23PM +1000, David Gibson wrote: > > > On Wed, Jun 15, 2016 at 02:28:27PM +1000, Gavin Shan wrote: > > > > vfio_eeh_container_op() is th

Re: [Qemu-devel] [PATCH RFC 4/4] range: Replace internal representation of Range

2016-06-15 Thread Eric Blake
On 06/15/2016 02:41 PM, Markus Armbruster wrote: > Range represents a range as follows. Member @start is the inclusive > lower bound, member @end is the exclusive upper bound. Zero @end is > special: if @start is also zero, the range is empty, else @end is to > be interpreted as 2^64. No other e

Re: [Qemu-devel] [PATCH RFC 3/4] range: Drop the previous commit's trickery

2016-06-15 Thread Eric Blake
On 06/15/2016 02:41 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > include/qemu/range.h | 21 - > util/range.c | 1 - > 2 files changed, 22 deletions(-) As mentioned on 2/4, you may want to squash this in. Reviewed-by: Eric Blake -- Eric

Re: [Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-15 Thread Eric Blake
On 06/15/2016 02:41 PM, Markus Armbruster wrote: > Users of struct Range mess liberally with its members, which makes > refactoring hard. Create a set of methods, and convert all users to > call them instead of accessing members. The methods have carefully > worded contracts, and use assertions t

Re: [Qemu-devel] [PATCH RFC 1/4] log: Clean up misuse of Range for -dfilter

2016-06-15 Thread Eric Blake
On 06/15/2016 02:41 PM, Markus Armbruster wrote: > Range encodes an integer interval [a,b] as { begin = a, end = b + 1 }, > where a \in [0,2^64-1] and b \in [1,2^64]. Thus, zero end is to be > interpreted as 2^64. > > The implementation of -dfilter (commit 3514552) uses Range > differently: it en

Re: [Qemu-devel] [PATCH 2/2] blockdev: Add dynamic module loading for block drivers

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 20:40, Colin Lord wrote: > > The only block drivers that can be converted into modules are the drivers > that don't perform any init operation except for registering themselves. This > is why libiscsi has been disabled as a module. I don't think it has in this patch :) but you can

Re: [Qemu-devel] [PATCH 1/2] blockdev: Add dynamic generation of module_block.h

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 20:40, Colin Lord wrote: > +def add_module(fhader, library, format_name, protocol_name, fhader looks like a typo. Paolo > +probe, probe_device): > +lines = [] > +lines.append('.library_name = "' + library + '",') > +if format_name != "": > +lin

[Qemu-devel] [Bug 1591628] Re: 2.6.0 hangs linux vm using vfio for pci passthrough of graphics card

2016-06-15 Thread Peter Maloney
It's an AMD FX(tm)-8150 with a GA-990FXA-UD5 board bios version F11. I also tested without the usb controllers, such as with your suggested commands. And again below. root@peter:~ # uname -a Linux peter 4.6.2-1-MANJARO #1 SMP PREEMPT Wed Jun 8 11:00:08 UTC 2016 x86_64 GNU/Linux root@peter:~ # ca

Re: [Qemu-devel] [PATCH v2] ssi: change ssi_slave_init to be a realize ops

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 23:16, Cédric Le Goater wrote: > This enables qemu to handle late inits and report errors. All the SSI > slave routine names were changed accordingly. Code was modified to > handle errors when possible (m25p80 and ssi-sd) > > Tested with the m25p80 slave object. > > Suggested-by:

[Qemu-devel] [PATCH v2] ssi: change ssi_slave_init to be a realize ops

2016-06-15 Thread Cédric Le Goater
This enables qemu to handle late inits and report errors. All the SSI slave routine names were changed accordingly. Code was modified to handle errors when possible (m25p80 and ssi-sd) Tested with the m25p80 slave object. Suggested-by: Paolo Bonzini Signed-off-by: Cédric Le Goater --- Should

[Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-15 Thread Markus Armbruster
Users of struct Range mess liberally with its members, which makes refactoring hard. Create a set of methods, and convert all users to call them instead of accessing members. The methods have carefully worded contracts, and use assertions to check them. To help with tracking down the places that

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-15 Thread Stefan Berger
On 06/15/2016 03:30 PM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: On 05/31/2016 09:58 PM, Xu, Quan wrote: On Wednesday, June 01, 2016 2:59 AM, BICKFORD, JEFFREY E wrote: * Daniel P. Berrange (berra...@redhat.com) wrote: On Wed, Jan 20, 2016 at 10:54:47

[Qemu-devel] [PATCH RFC 0/4] range: Make it simpler & safer

2016-06-15 Thread Markus Armbruster
This is an RFC because PATCH 2 adds hackery we might not want to commit, and PATCH 3 takes it out again. Prerequisites: * [PATCH 0/3] log: Fix error handling and a memory leak * [PATCH 0/2] Clean up around the PCI holes * [PATCH v2 0/3] Fix leak in handling of integer lists as strings Markus Armb

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: pass strace argument in execve

2016-06-15 Thread Laurent Vivier
This is not needed: if you use QEMU_STRACE environment variable, it is propagated to the child processes (this is also true for "-L" and QEMU_LD_PREFIX). In fact, your patch 2 breaks this... Did you try to use a statically linked qemu? IMHO, the best way to avoid environment problem is to have a

[Qemu-devel] [PATCH RFC 1/4] log: Clean up misuse of Range for -dfilter

2016-06-15 Thread Markus Armbruster
Range encodes an integer interval [a,b] as { begin = a, end = b + 1 }, where a \in [0,2^64-1] and b \in [1,2^64]. Thus, zero end is to be interpreted as 2^64. The implementation of -dfilter (commit 3514552) uses Range differently: it encodes [a,b] as { begin = a, end = b }. The code works, but i

[Qemu-devel] [PATCH 06/10] machine: Add machine_register_compat_props() function

2016-06-15 Thread Eduardo Habkost
Move the compat_props handling to core machine code. Signed-off-by: Eduardo Habkost --- hw/core/machine.c | 16 include/hw/boards.h | 1 + vl.c| 9 ++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c

[Qemu-devel] [PATCH 09/10] qdev: Eliminate GlobalProperty 'used' and 'user_provided' fields

2016-06-15 Thread Eduardo Habkost
Those fields are not used for anyting and not needed anymore. Signed-off-by: Eduardo Habkost --- hw/core/qdev-properties.c | 2 -- include/hw/qdev-core.h| 5 - vl.c | 1 - 3 files changed, 8 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properti

[Qemu-devel] [PATCH RFC 3/4] range: Drop the previous commit's trickery

2016-06-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qemu/range.h | 21 - util/range.c | 1 - 2 files changed, 22 deletions(-) diff --git a/include/qemu/range.h b/include/qemu/range.h index 9296ba0..c8c46a9 100644 --- a/include/qemu/range.h +++ b/include/qemu/range.h @@ -30,

[Qemu-devel] [PATCH 07/10] vl: Set errp to &error_abort on machine compat_props

2016-06-15 Thread Eduardo Habkost
Use the new GlobalProperty.errp field to handle compat_props errors. Example output before this change: (with an intentionally broken entry added to PC_COMPAT_1_3 just for testing) $ qemu-system-x86_64 -machine pc-1.3 qemu-system-x86_64: hw/core/qdev-properties.c:1091: qdev_prop_set_globals_

[Qemu-devel] [PATCH 10/10] machine: Skip global registration for non-existing classes

2016-06-15 Thread Eduardo Habkost
MachineClass::compat_props may point to class names that are not compiled into the QEMU binary. Skip registering those as global properties. This will allow the qdev global property code to implement stricter checks on the global property values in the future. Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [PATCH RFC 4/4] range: Replace internal representation of Range

2016-06-15 Thread Markus Armbruster
Range represents a range as follows. Member @start is the inclusive lower bound, member @end is the exclusive upper bound. Zero @end is special: if @start is also zero, the range is empty, else @end is to be interpreted as 2^64. No other empty ranges may occur. The range [0,2^64-1] cannot be re

[Qemu-devel] [PATCH 05/10] qdev: GlobalProperty.errp field

2016-06-15 Thread Eduardo Habkost
The new field will allow error handling to be configured by qdev_prop_register_global() callers: &error_fatal and &error_abort can be used to make QEMU exit or abort if any errors are reported when applying the properties. Suggested-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- hw/core/q

[Qemu-devel] [PATCH 04/10] qdev: Use error_prepend() for errors applying globals

2016-06-15 Thread Eduardo Habkost
The same Error* will be used in an error_propagate() call in the future, so prepend a "can't apply global" prefix to it. Signed-off-by: Eduardo Habkost --- hw/core/qdev-properties.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-

[Qemu-devel] [PATCH 00/10] globals: Clean up validation and error checking

2016-06-15 Thread Eduardo Habkost
This series includes multiple changes to the way errors are handled by the global property system. The series is based on my machine-next branch, available at: https://github.com/ehabkost/qemu.git machine-next The series itself can be found at: https://github.com/ehabkost/qemu-hacks.git work/

[Qemu-devel] [PATCH 08/10] qdev: Eliminate "global not used" warning

2016-06-15 Thread Eduardo Habkost
qdev_prop_check_globals() tries to warn the user if a given -global option was not used. But it does that only if the device is not hotpluggable. The warning also makes it harder for management code or people that write their own scripts or config files: there's no way to know if a given -global o

[Qemu-devel] [PATCH 01/10] qdev: Don't stop applying globals on first error

2016-06-15 Thread Eduardo Habkost
qdev_prop_set_globals_for_type() stops applying global properties on the first error. It is a leftover from when QEMU exited on any error when applying global property. Now we print a warning about the first error, bug ignore all other global properties after it. For example, the following command

[Qemu-devel] [PATCH 02/10] qdev: Eliminate qemu_add_globals() function

2016-06-15 Thread Eduardo Habkost
The function is just a helper to handle the -global options, it can stay in vl.c like most qemu_opts_foreach() calls. Signed-off-by: Eduardo Habkost --- hw/core/qdev-properties-system.c | 21 + include/qemu/config-file.h | 1 - vl.c | 16 +++

[Qemu-devel] [PATCH 03/10] vl: Reject invalid class names on -global

2016-06-15 Thread Eduardo Habkost
Instead of just printing a warning very late, reject obviously invalid -global arguments by validating the class name. Signed-off-by: Eduardo Habkost --- hw/core/qdev-properties.c | 7 --- vl.c | 21 ++--- 2 files changed, 18 insertions(+), 10 deletions(

Re: [Qemu-devel] [PATCH 1/1] hmp: acquire aio_context in hmp_qemu_io

2016-06-15 Thread Denis V. Lunev
On 06/14/2016 11:44 AM, Kevin Wolf wrote: Am 14.06.2016 um 10:34 hat Denis V. Lunev geschrieben: On 06/08/2016 02:23 PM, Kevin Wolf wrote: Am 08.06.2016 um 11:39 hat Denis V. Lunev geschrieben: From: Vladimir Sementsov-Ogievskiy Acquire aio context before run command, this is mandatory for u

Re: [Qemu-devel] [Qemu-ppc] Determining interest in PPC e500spin, yield, and openpic patches

2016-06-15 Thread alarson
David Gibson wrote on 06/14/2016 11:17:57 PM: Aaron Larson AL> 1. There is a defect in ppce500_spin.c:spin_kick() that creates an AL>incorrectly sized TLB entry. This was reported as bug AL>https://bugs.launchpad.net/qemu/+bug/1587535 I can provide a AL>patch if desired. DG> Abso

[Qemu-devel] [Bug 1591628] Re: 2.6.0 hangs linux vm using vfio for pci passthrough of graphics card

2016-06-15 Thread Alex Williamson
Ran as: # /usr/local/bin/qemu-system-x86_64 -enable-kvm -M q35 -m 4G -cpu host -smp 8 \ -vga none -device ioh3420,bus=pcie.0,addr=1c.0,port=1,chassis=1,id=root.1 \ -device vfio-pci,host=02:00.0,bus=root.1,x-vga=on,addr=0.0,romfile=/root/HD8570.rom \ -device ahci,bus=pcie.0,id=ahci \ -driv

Re: [Qemu-devel] [PATCH v2 3/4] linux-user: pass elf interpreter prefix in execve

2016-06-15 Thread Laurent Vivier
More details: why do we need this? Add your Signed-off-by. Le 14/06/2016 à 21:26, Joel Holdsworth a écrit : > --- > linux-user/syscall.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 440986e..1513f0f 100644 > ---

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread Sergey Fedorov
On 15/06/16 18:25, alvise rigo wrote: > On Wed, Jun 15, 2016 at 4:51 PM, Alex Bennée wrote: >> alvise rigo writes: >>> On Wed, Jun 15, 2016 at 2:59 PM, Sergey Fedorov >>> wrote: On 10/06/16 00:51, Sergey Fedorov wrote: > For certain kinds of tasks we might need a quiescent state to per

Re: [Qemu-devel] [PATCH v2 2/4] linux-user: pass environment arguments in execve

2016-06-15 Thread Laurent Vivier
Le 14/06/2016 à 21:26, Joel Holdsworth a écrit : > Previously, when emulating execve(2), qemu would execute a child > instance of the emulator with the environment variables provided by > the parent process. This caused problems with qemu if any of the > variables affected the child emulator's be

Re: [Qemu-devel] [PATCH v2 1/4] linux-user: add option to intercept execve() syscalls

2016-06-15 Thread Laurent Vivier
Le 14/06/2016 à 21:26, Joel Holdsworth a écrit : > From: Petros Angelatos > > In order for one to use QEMU user mode emulation under a chroot, it is > required to use binfmt_misc. This can be avoided by QEMU never doing a > raw execve() to the host system. > > Introduce a new option, -execve,

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-15 Thread Dr. David Alan Gilbert
* Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > On 05/31/2016 09:58 PM, Xu, Quan wrote: > > On Wednesday, June 01, 2016 2:59 AM, BICKFORD, JEFFREY E > > wrote: > > > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > > > On Wed, Jan 20, 2016 at 10:54:47AM -0500, Stefan Berger wrote:

Re: [Qemu-devel] [PATCH 2/2] pc: Eliminate PcPciInfo

2016-06-15 Thread Eric Blake
On 06/15/2016 11:56 AM, Markus Armbruster wrote: > PcPciInfo has two (ill-named) members: Range w32 is the PCI hole, and > w64 is the PCI64 hole. > > Three users: > > * I440FXState and MCHPCIState have a member PcPciInfo pci_info, but > only pci_info.w32 is actually used. This is confusing. R

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread Sergey Fedorov
On 15/06/16 17:56, Alex Bennée wrote: > Sergey Fedorov writes: (snip) > Just some quick comments for context: > >> Alex's reiteration of Fred's approach [2]: >> - maintains a single global safe work queue; > Having separate queues can lead to problems with draining queues as only > queue gets drai

Re: [Qemu-devel] [PATCH 1/2] piix: Set I440FXState member pci_info.w32 in one place

2016-06-15 Thread Eric Blake
On 06/15/2016 11:56 AM, Markus Armbruster wrote: > Range pci_info.w32 records the location of the PCI hole. > > It's initialized to empty when QOM zeroes I440FXState. That's a fine > value for a still unknown PCI hole. > > i440fx_init() sets pci_info.w32.begin = below_4g_mem_size. Changes > the

Re: [Qemu-devel] [PATCH 3/3] log: Fix qemu_set_log_filename() error handling

2016-06-15 Thread Eric Blake
On 06/15/2016 11:27 AM, Markus Armbruster wrote: > When qemu_set_log_filename() detects an invalid file name, it reports > an error, closes the log file (if any), and starts logging to stderr > (unless daemonized or nothing is being logged). > > This is wrong. Asking for an invalid log file on th

Re: [Qemu-devel] [PATCH 2/3] log: Fix qemu_set_dfilter_ranges() error reporting

2016-06-15 Thread Eric Blake
On 06/15/2016 11:27 AM, Markus Armbruster wrote: > g_error() is not an acceptable way to report errors to the user: > > $ qemu-system-x86_64 -dfilter 1000+0 > > ** (process:17187): ERROR **: Failed to parse range in: 1000+0 > Trace/breakpoint trap (core dumped) > > g_assert() isn't,

[Qemu-devel] [Bug 1591628] Re: 2.6.0 hangs linux vm using vfio for pci passthrough of graphics card

2016-06-15 Thread Peter Maloney
** Attachment added: "disk image that reproduces problem" https://bugs.launchpad.net/qemu/+bug/1591628/+attachment/4684474/+files/qemutest2.img.xz -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/159

[Qemu-devel] [Bug 1591628] Re: 2.6.0 hangs linux vm using vfio for pci passthrough of graphics card

2016-06-15 Thread Peter Maloney
Attached is a 4.7 MB xz image of a 20 MB disk image that triggers the problem. It contains a grub2 (2.02~beta2) bootloader, /boot with memtest86+, and no rootfs. If I load that as is, it hangs. If I comment out the "load_video" line, it works. (memtest doesn't run properly, but auto-reboots, but

[Qemu-devel] [PATCH 2/2] blockdev: Add dynamic module loading for block drivers

2016-06-15 Thread Colin Lord
From: Marc Mari Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. This is why libiscsi has been dis

Re: [Qemu-devel] [PATCH] ssi: change ssi_slave_init to be a realize ops

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 17:44, Cédric Le Goater wrote: > s->sd = sd_init(dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, true); > if (s->sd == NULL) { > -return -1; This needs an error_setg (see device_realize in hw/core/qdev.c for an example) until sd_init is changed to take Error *. Otherw

[Qemu-devel] [PATCH 1/2] blockdev: Add dynamic generation of module_block.h

2016-06-15 Thread Colin Lord
From: Marc Mari To simplify the addition of new block modules, add a script that generates include/qemu/module_block.h automatically from the modules' source code. This script assumes that the QEMU coding style rules are followed. Signed-off-by: Marc Marí Signed-off-by: Colin Lord --- .gitig

Re: [Qemu-devel] [PATCH 1/3] log: Plug memory leak on multiple -dfilter

2016-06-15 Thread Eric Blake
On 06/15/2016 11:27 AM, Markus Armbruster wrote: > -dfilter overwrites any previous filter. The overwritten filter is > leaked. Leaks since the beginning (commit 3514552, v2.6.0). Free it > properly. > > Signed-off-by: Markus Armbruster > --- > util/log.c | 7 +++ > 1 file changed, 7 inse

[Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-15 Thread Colin Lord
This is a repost of some previous patches written by Marc Marí which were also reposted by Richard Jones a few months ago. The original series and reposted series are here: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg01995.html https://lists.nongnu.org/archive/html/qemu-devel/2016-04/

Re: [Qemu-devel] [PATCH v3] scsi: esp: check length before dma read

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 19:18, P J P wrote: > Hello Paolo, > > +-- On Wed, 15 Jun 2016, Paolo Bonzini wrote --+ > | Actually, the commit message is wrong. The length parameter cannot > | exceed the buffer size anymore. > > It wouldn't exceed after this patch, right? Is it possible 'esp_do_dma' is >

[Qemu-devel] [PATCH 2/2] pc: Eliminate PcPciInfo

2016-06-15 Thread Markus Armbruster
PcPciInfo has two (ill-named) members: Range w32 is the PCI hole, and w64 is the PCI64 hole. Three users: * I440FXState and MCHPCIState have a member PcPciInfo pci_info, but only pci_info.w32 is actually used. This is confusing. Replace by Range pci_hole. * acpi_build() uses auto PcPciInfo

[Qemu-devel] [PATCH 1/2] piix: Set I440FXState member pci_info.w32 in one place

2016-06-15 Thread Markus Armbruster
Range pci_info.w32 records the location of the PCI hole. It's initialized to empty when QOM zeroes I440FXState. That's a fine value for a still unknown PCI hole. i440fx_init() sets pci_info.w32.begin = below_4g_mem_size. Changes the PCI hole from empty to [below_4g_mem_size, UINT64_MAX]. That'

[Qemu-devel] [PATCH 0/2] Clean up around the PCI holes

2016-06-15 Thread Markus Armbruster
Markus Armbruster (2): piix: Set I440FXState member pci_info.w32 in one place pc: Eliminate PcPciInfo hw/i386/acpi-build.c | 43 ++- hw/pci-host/piix.c| 12 +--- hw/pci-host/q35.c | 12 ++-- include/hw/i386/pc.h

[Qemu-devel] Odp.: [PATCH 6/9] m25p80: Introduce quad and equad modes.

2016-06-15 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
W dniu 15.06.2016 o 16:25, Cédric Le Goater pisze: > On 06/15/2016 03:41 PM, marcin.krzemin...@nokia.com wrote: >> From: Marcin Krzeminski >> >> Quad and Equad modes for Spansion and Macronix flash devices. >> This commit also includes modification and new command to manipulate >> quad mode (sta

[Qemu-devel] [Bug 1569988] Re: [2.6] user network broken reaching foreign servers on Win64

2016-06-15 Thread Stefan Weil
Fixed since v2.6.0-rc3 release. ** Changed in: qemu Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1569988 Title: [2.6] user network broken reaching forei

[Qemu-devel] [PATCH] qapi: Fix crash on missing alternate member of QAPI struct

2016-06-15 Thread Eric Blake
If a QAPI struct has a mandatory alternate member which is not present on input, the input visitor reports an error for the missing alternate without setting the discriminator, but the cleanup code for the struct still tries to use the dealloc visitor to clean up the alternate. Commit dbf11922 cha

  1   2   3   >