[Qemu-devel] [PATCH for-2.13] Add host_memory_backend_pagesize() helper

2018-03-28 Thread David Gibson
There are a couple places (one generic, one target specific) where we need to get the host page size associated with a particular memory backend. I have some upcoming code which will add another place which wants this. So, for convenience, add a helper function to calculate this.

Re: [Qemu-devel] [RFC for-2.13 09/12] target/ppc: Move 1T segment and AMR options to PPCHash64Options

2018-03-28 Thread David Gibson
On Wed, Mar 28, 2018 at 09:40:13AM +0200, Cédric Le Goater wrote: > On 03/27/2018 06:37 AM, David Gibson wrote: > > Currently env->mmu_model is a bit of an unholy mess of an enum of distinct > > MMU types, with various flag bits as well. This makes which bits of the > > field should be compared

Re: [Qemu-devel] [RFC for-2.13 07/12] target/ppc: Split page size information into a separate allocation

2018-03-28 Thread David Gibson
On Wed, Mar 28, 2018 at 09:28:41AM +0200, Cédric Le Goater wrote: > On 03/27/2018 06:37 AM, David Gibson wrote: > > env->sps contains page size encoding information as an embedded structure. > > Since this information is specific to 64-bit hash MMUs, split it out into > > a separately allocated

Re: [Qemu-devel] [RFC for-2.13 11/12] target/ppc: Remove unnecessary POWERPC_MMU_V3 flag from mmu_model

2018-03-28 Thread David Gibson
On Wed, Mar 28, 2018 at 12:19:37PM +0200, Cédric Le Goater wrote: > On 03/28/2018 10:47 AM, David Gibson wrote: > > On Wed, Mar 28, 2018 at 09:49:25AM +0200, Cédric Le Goater wrote: > >> On 03/28/2018 09:43 AM, Cédric Le Goater wrote: > >>> On 03/27/2018 06:37 AM, David Gibson wrote: > The

Re: [Qemu-devel] [PATCH v2 04/10] migration: detect compression and decompression errors

2018-03-28 Thread Peter Xu
On Thu, Mar 29, 2018 at 11:51:03AM +0800, Xiao Guangrong wrote: > > > On 03/28/2018 05:59 PM, Peter Xu wrote: > > On Tue, Mar 27, 2018 at 05:10:37PM +0800, guangrong.x...@gmail.com wrote: > > > > [...] > > > > > -static int compress_threads_load_setup(void) > > > +static int

Re: [Qemu-devel] [PATCH] tcg: fix 16-byte vector operations detection

2018-03-28 Thread Miroslav Rezanina
On Wed, Mar 28, 2018 at 03:31:52PM +0200, Laurent Vivier wrote: > configure tries to detect if the compiler > supports 16-byte vector operations. > > As stated in the comment of the detection > program, there is a problem with the system > compiler on GCC on Centos 7. > > This program doesn't

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 0/6] Extend vhost-user to support VFIO based accelerators

2018-03-28 Thread Michael S. Tsirkin
On Thu, Mar 29, 2018 at 11:33:29AM +0800, Tiwei Bie wrote: > On Wed, Mar 28, 2018 at 06:33:01PM +0300, Michael S. Tsirkin wrote: > > On Wed, Mar 28, 2018 at 08:24:07PM +0800, Tiwei Bie wrote: > > > > > Update notes > > > > > > > > > > > > > > > IOMMU feature bit check is removed in

Re: [Qemu-devel] [PATCH v2 03/10] migration: stop decompression to allocate and free memory frequently

2018-03-28 Thread Peter Xu
On Thu, Mar 29, 2018 at 11:43:07AM +0800, Xiao Guangrong wrote: > > > On 03/28/2018 05:42 PM, Peter Xu wrote: > > On Tue, Mar 27, 2018 at 05:10:36PM +0800, guangrong.x...@gmail.com wrote: > > > > [...] > > > > > +static int compress_threads_load_setup(void) > > > +{ > > > +int i,

Re: [Qemu-devel] [PATCH v2 04/10] migration: detect compression and decompression errors

2018-03-28 Thread Xiao Guangrong
On 03/28/2018 05:59 PM, Peter Xu wrote: On Tue, Mar 27, 2018 at 05:10:37PM +0800, guangrong.x...@gmail.com wrote: [...] -static int compress_threads_load_setup(void) +static int compress_threads_load_setup(QEMUFile *f) { int i, thread_count; @@ -2665,6 +2685,7 @@ static int

Re: [Qemu-devel] [PATCH v2 03/10] migration: stop decompression to allocate and free memory frequently

2018-03-28 Thread Xiao Guangrong
On 03/28/2018 05:42 PM, Peter Xu wrote: On Tue, Mar 27, 2018 at 05:10:36PM +0800, guangrong.x...@gmail.com wrote: [...] +static int compress_threads_load_setup(void) +{ +int i, thread_count; + +if (!migrate_use_compression()) { +return 0; +} + +thread_count =

Re: [Qemu-devel] [PATCH v2 02/10] migration: stop compression to allocate and free memory frequently

2018-03-28 Thread Xiao Guangrong
On 03/28/2018 05:25 PM, Peter Xu wrote: On Tue, Mar 27, 2018 at 05:10:35PM +0800, guangrong.x...@gmail.com wrote: [...] @@ -357,10 +358,20 @@ static void compress_threads_save_cleanup(void) terminate_compression_threads(); thread_count = migrate_compress_threads(); for (i

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 0/6] Extend vhost-user to support VFIO based accelerators

2018-03-28 Thread Tiwei Bie
On Wed, Mar 28, 2018 at 06:33:01PM +0300, Michael S. Tsirkin wrote: > On Wed, Mar 28, 2018 at 08:24:07PM +0800, Tiwei Bie wrote: > > > > Update notes > > > > > > > > > > > > IOMMU feature bit check is removed in this version, because: > > > > > > > > The IOMMU feature is negotiable,

[Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree"

2018-03-28 Thread Alexey Kardashevskiy
This adds owners/parents (which are the same, just occasionally owner==NULL) printing for memory regions; a new '-o' flag enabled new output. Signed-off-by: Alexey Kardashevskiy --- Does this look anything useful? There are cases ("msi", "msix-table", "msix-pba" and probably

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-28 Thread Alexey Kardashevskiy
On 29/3/18 8:03 am, Auger Eric wrote: > Hi Alexey, Alex, > On 22/03/18 09:18, Alexey Kardashevskiy wrote: >> The 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") added >> an error message if a passed memory section address or size is not aligned >> to the minimal IOMMU page size.

Re: [Qemu-devel] [PATCH v2 5/6] e1000: Choose which set of props to migrate

2018-03-28 Thread Jason Wang
On 2018年03月29日 00:36, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" When we're using the subsection we migrate both the 'props' and 'tso_props' data; when we're not using the subsection (to migrate to 2.11 or old machine types) we've got to choose

Re: [Qemu-devel] [PATCH v2 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Liu, Changpeng
> -Original Message- > From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] > Sent: Thursday, March 29, 2018 3:28 AM > To: m...@redhat.com; Liu, Changpeng ; > marcandre.lur...@redhat.com; qemu-devel@nongnu.org > Cc: Maxime Coquelin

Re: [Qemu-devel] [PATCH v2 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-28 Thread Liu, Changpeng
> -Original Message- > From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] > Sent: Thursday, March 29, 2018 3:28 AM > To: m...@redhat.com; Liu, Changpeng ; > marcandre.lur...@redhat.com; qemu-devel@nongnu.org > Cc: Maxime Coquelin

Re: [Qemu-devel] [PATCH v4 2/2] tpm: extend TPM TIS with state migration support

2018-03-28 Thread Stefan Berger
On 03/28/2018 11:41 AM, Marc-André Lureau wrote: Hi On Thu, Mar 1, 2018 at 8:59 PM, Stefan Berger wrote: + +static const VMStateDescription vmstate_locty = { +.name = "loc", +.version_id = 1, +.minimum_version_id = 0, +.minimum_version_id_old = 0,

Re: [Qemu-devel] [PATCH v2 5/6] e1000: Choose which set of props to migrate

2018-03-28 Thread Ed Swierk
On Wed, Mar 28, 2018 at 9:36 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When we're using the subsection we migrate both > the 'props' and 'tso_props' data; when we're not using > the subsection (to migrate to 2.11 or old

Re: [Qemu-devel] [PATCH v2 09/14] hardfloat: support float32/64 multiplication

2018-03-28 Thread Emilio G. Cota
On Wed, Mar 28, 2018 at 14:26:30 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > OK I've had a bit more of a play and I think we can drop the macro abuse > and have common wrappers for the host_fpu. We don't want to intermingle > with the soft float slow path to stop the

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-28 Thread Alex Williamson
On Wed, 28 Mar 2018 23:03:23 +0200 Auger Eric wrote: > Hi Alexey, Alex, > On 22/03/18 09:18, Alexey Kardashevskiy wrote: > > The 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") added > > an error message if a passed memory section address or size is not

Re: [Qemu-devel] [PATCH] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-03-28 Thread Michael S. Tsirkin
On Wed, Mar 28, 2018 at 03:31:23PM -0300, Eduardo Habkost wrote: > On Wed, Mar 28, 2018 at 03:06:23AM +0300, Michael S. Tsirkin wrote: > > On Tue, Mar 27, 2018 at 06:36:46PM -0300, Eduardo Habkost wrote: > > > On Tue, Mar 27, 2018 at 10:42:56PM +0300, Michael S. Tsirkin wrote: > > > > On Fri, Mar

Re: [Qemu-devel] [PATCH v5 for 2.13 3/4] docs: tpm: add VM save/restore example and troubleshooting guide

2018-03-28 Thread Stefan Berger
On 03/28/2018 11:48 AM, Marc-André Lureau wrote: Hi On Fri, Mar 16, 2018 at 10:46 PM, Stefan Berger wrote: Extend the docs related to TPM with specs related to VM save and restore and a troubleshooting guide for TPM migration. Thanks a lot for writing this! some

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-28 Thread Auger Eric
Hi Alexey, Alex, On 22/03/18 09:18, Alexey Kardashevskiy wrote: > The 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") added > an error message if a passed memory section address or size is not aligned > to the minimal IOMMU page size. However although it checks >

[Qemu-devel] [PATCH 4/4] tests: Tests more flags of the CRB interface

2018-03-28 Thread Stefan Berger
Test and modify more flags of the CRB interface. Signed-off-by: Stefan Berger --- tests/tpm-crb-test.c | 74 ++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/tests/tpm-crb-test.c

[Qemu-devel] [PATCH 1/4] tpm: CRB: set the Idle flag by default

2018-03-28 Thread Stefan Berger
Signed-off-by: Stefan Berger --- hw/tpm/tpm_crb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index ef8b80e..e728b55 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -220,6 +220,8 @@ static void tpm_crb_reset(void

[Qemu-devel] [PATCH 0/4] tpm: More improvements on CRB interface

2018-03-28 Thread Stefan Berger
This patch improves yet more flags of the TPM CRB interface and adds more test to the CRB test case. Ideally we could have this for 2.12. I tested it with UEFI and it works as before. Stefan Stefan Berger (4): tpm: CRB: set the Idle flag by default tpm: CRB: Reset Granted flag when

[Qemu-devel] [PATCH 3/4] tpm: CRB: Enforce locality is requested before processing buffer

2018-03-28 Thread Stefan Berger
Section 5.5.3.2.2 of the CRB specs states that use of the TPM through the localty control method must first be requested, otherwise TPM commands will be dropped. This patch makes sure that the current locality is the active locality and only then sends off the command for processing.

[Qemu-devel] [PATCH 2/4] tpm: CRB: Reset Granted flag when relinquishing locality

2018-03-28 Thread Stefan Berger
Reset the Granted flag when relinquishing a locality. Signed-off-by: Stefan Berger --- hw/tpm/tpm_crb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index e728b55..ee6c87e 100644 --- a/hw/tpm/tpm_crb.c +++

Re: [Qemu-devel] [PATCH 2/2] target/riscv: Mark MSTATUS_FS dirty

2018-03-28 Thread Michael Clark
On Tue, Mar 27, 2018 at 7:22 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > Writes to the FP register file mark the register file as dirty. > > Signed-off-by: Richard Henderson > Reviewed-by: Michael Clark Tested-by: Michael Clark

Re: [Qemu-devel] [PATCH] WHPX fixes an issue with CPUID 1 not returning CPUID_EXT_HYPERVISOR

2018-03-28 Thread Justin Terry (VM) via Qemu-devel
Hey Eduardo Responses inline. Thanks! > -Original Message- > From: Eduardo Habkost > Sent: Wednesday, March 28, 2018 10:51 AM > To: Justin Terry (VM) > Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; r...@twiddle.net > Subject: Re: [PATCH]

Re: [Qemu-devel] [PATCH 1/2] target/riscv: Split out mstatus_fs from tb_flags during translation

2018-03-28 Thread Michael Clark
On Tue, Mar 27, 2018 at 7:22 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > We will want to track changes to mstatus_fs through the TB. > As there is nothing else in tb_flags at the moment, remove > the variable from DisasContext. > > Signed-off-by: Richard Henderson

[Qemu-devel] [PULL 1/2] RISC-V: Convert cpu definition to future model

2018-03-28 Thread Michael Clark
- Model borrowed from target/sh4/cpu.c - Rewrote riscv_cpu_list to use object_class_get_list - Dropped 'struct RISCVCPUInfo' and used TypeInfo array - Replaced riscv_cpu_register_types with DEFINE_TYPES - Marked base class as abstract - Fixes -cpu list Cc: Igor Mammedov Cc:

[Qemu-devel] [PULL 0/2] RISC-V: Important fixes for QEMU 2.12

2018-03-28 Thread Michael Clark
The following changes since commit 043289bef4d9c0d277c45695c676a6cc9fca48a0: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180328' into staging (2018-03-28 13:30:10 +0100) are available in the git repository at: https://github.com/riscv/riscv-qemu.git tags/riscv-qemu-2.12

[Qemu-devel] [PULL 2/2] RISC-V: Fix incorrect disassembly for addiw

2018-03-28 Thread Michael Clark
This fixes a bug in the disassembler constraints used to lift instructions into pseudo-instructions, whereby addiw instructions are always lifted to sext.w instead of just lifting addiw with a zero immediate. An associated fix has been made to the metadata used to machine generate the

Re: [Qemu-devel] [PATCH v4 5/9] qapi: introduce new cmd option "allowed-in-preconfig"

2018-03-28 Thread Eduardo Habkost
On Wed, Mar 28, 2018 at 02:29:57PM +0200, Igor Mammedov wrote: > On Fri, 23 Mar 2018 18:28:37 -0300 > Eduardo Habkost wrote: > > > On Mon, Mar 12, 2018 at 02:11:11PM +0100, Igor Mammedov wrote: > > > New option will be used to allow commands, which are prepared/need > > > to

[Qemu-devel] [PATCH v2 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Maxime Coquelin
Without a dedicated protocol feature, QEMU cannot know whether the backend can handle VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG messages. This patch adds a protocol feature that is only advertised by QEMU if the device implements the config ops. Vhost user init fails if the device support

[Qemu-devel] [PATCH v2 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-28 Thread Maxime Coquelin
V2 makes vhost-user init to fail if the device implements config feature but the backend doesn't. While reviewing DPDK series adding support to VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG request, I found that it was not backed with a dedicated protocol feature. This series addresses this

[Qemu-devel] [PATCH v2 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-28 Thread Maxime Coquelin
As soon as vhost-user init is done, the backend may send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG, so let's set the notification callback before it. Also, it will be used to know whether the device supports the config feature to advertize it or not. Signed-off-by: Maxime Coquelin

Re: [Qemu-devel] [PATCH v4 3/9] cli: add -preconfig option

2018-03-28 Thread Eduardo Habkost
On Wed, Mar 28, 2018 at 01:48:35PM +0200, Igor Mammedov wrote: > On Tue, 27 Mar 2018 17:05:41 +0200 > Igor Mammedov wrote: > > > On Fri, 23 Mar 2018 18:25:08 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Mar 12, 2018 at 02:11:09PM +0100, Igor

Re: [Qemu-devel] [PATCH v4 3/9] cli: add -preconfig option

2018-03-28 Thread Eduardo Habkost
On Tue, Mar 27, 2018 at 05:05:41PM +0200, Igor Mammedov wrote: > On Fri, 23 Mar 2018 18:25:08 -0300 > Eduardo Habkost wrote: > > > On Mon, Mar 12, 2018 at 02:11:09PM +0100, Igor Mammedov wrote: > [...] > > > diff --git a/vl.c b/vl.c > > > index 3ef04ce..69b1997 100644 > > >

[Qemu-devel] [PATCH 0/1] WHPX Add signature CPUID

2018-03-28 Thread Alessandro Pilotti
Add support for CPUID 0x4000 in WHPX, requiring Justin Terry's patch that adds support for CPUID 1. Based-on: <20180326170658.606-1-jute...@microsoft.com> Alessandro Pilotti (1): WHPX Add signature CPUID target/i386/whpx-all.c | 12 +++- 1 file changed, 11 insertions(+), 1

[Qemu-devel] [PATCH 1/1] WHPX Add signature CPUID

2018-03-28 Thread Alessandro Pilotti
Adds the CPUID trap for CPUID 0x4000, sending the WHPX signature to the guest upon request. This is consistent with other QEMU accelerators (KVM). Signed-off-by: Alessandro Pilotti --- target/i386/whpx-all.c | 12 +++- 1 file changed, 11

Re: [Qemu-devel] [PATCH v4 4/9] hmp: disable monitor in preconfig state

2018-03-28 Thread Eduardo Habkost
On Wed, Mar 28, 2018 at 01:16:53PM +0200, Igor Mammedov wrote: > On Fri, 23 Mar 2018 18:27:32 -0300 > Eduardo Habkost wrote: > > > On Mon, Mar 12, 2018 at 02:11:10PM +0100, Igor Mammedov wrote: > > > Ban it for now, if someone would need it to work early, > > > one would

Re: [Qemu-devel] [PATCH v4 2/9] numa: split out NumaOptions parsing into parse_NumaOptions()

2018-03-28 Thread Eduardo Habkost
On Tue, Mar 27, 2018 at 03:08:27PM +0200, Igor Mammedov wrote: > On Fri, 23 Mar 2018 17:42:18 -0300 > Eduardo Habkost wrote: > > > On Mon, Mar 12, 2018 at 02:11:08PM +0100, Igor Mammedov wrote: > > > it will allow to reuse parse_NumaOptions() for parsing > > > configuration

Re: [Qemu-devel] [PATCH for-2.12 v2 2/2] i386/hyperv: error out if features requested but unsupported

2018-03-28 Thread Eduardo Habkost
On Wed, Mar 28, 2018 at 06:30:24PM +0300, Roman Kagan wrote: > In order to guarantee compatibility on migration, QEMU should have > complete control over the features it announces to the guest via CPUID. > > However, for a number of Hyper-V-related cpu properties, if the > corresponding feature

Re: [Qemu-devel] [PATCH for-2.12 v2 1/2] i386/hyperv: add hv-frequencies cpu property

2018-03-28 Thread Eduardo Habkost
On Wed, Mar 28, 2018 at 06:30:23PM +0300, Roman Kagan wrote: > In order to guarantee compatibility on migration, QEMU should have > complete control over the features it announces to the guest via CPUID. > > However, the availability of Hyper-V frequency MSRs > (HV_X64_MSR_TSC_FREQUENCY and

Re: [Qemu-devel] [PATCH] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-03-28 Thread Eduardo Habkost
On Wed, Mar 28, 2018 at 03:06:23AM +0300, Michael S. Tsirkin wrote: > On Tue, Mar 27, 2018 at 06:36:46PM -0300, Eduardo Habkost wrote: > > On Tue, Mar 27, 2018 at 10:42:56PM +0300, Michael S. Tsirkin wrote: > > > On Fri, Mar 16, 2018 at 07:36:42AM -0700, Wanpeng Li wrote: > > > > From: Wanpeng Li

Re: [Qemu-devel] [PATCH] blockjob: use qapi enum helpers

2018-03-28 Thread Jeff Cody
On Tue, Mar 27, 2018 at 05:30:11PM +0200, Marc-André Lureau wrote: > QAPI generator provide #define helpers for looking up enum string. > > Signed-off-by: Marc-André Lureau > --- > blockjob.c | 14 +- > 1 file changed, 5 insertions(+), 9 deletions(-) >

Re: [Qemu-devel] [PATCH v2 1/1] blockjob: leak fix, remove from txn when failing early

2018-03-28 Thread Jeff Cody
On Wed, Mar 28, 2018 at 04:28:05PM +0200, Marc-André Lureau wrote: > On Wed, Mar 28, 2018 at 4:09 PM, Jeff Cody wrote: > > From: Marc-André Lureau > > > > This fixes leaks found by ASAN such as: > > GTESTER tests/test-blockjob > >

Re: [Qemu-devel] [PATCH for-2.12 0/2] RISC-V: Mark FP status dirty

2018-03-28 Thread Michael Clark
On Tue, Mar 27, 2018 at 7:22 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > Since it was my patch that broke FP state tracking in the > first place, I feel obligated to fix it again. > > Mark mstatus[fs] as dirty whenever we write to the file. > This can be optimized by only doing

Re: [Qemu-devel] [PATCH for-2.12 v4] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-28 Thread Eric Blake
On 03/28/2018 12:34 PM, Max Reitz wrote: On 2018-03-22 13:41, Alberto Garcia wrote: L2 entries for compressed clusters have a field that indicates the number of sectors used to store the data in the image. That's however not the size of the compressed data itself, just the number of sectors

Re: [Qemu-devel] [PATCH] WHPX fixes an issue with CPUID 1 not returning CPUID_EXT_HYPERVISOR

2018-03-28 Thread Eduardo Habkost
On Mon, Mar 26, 2018 at 10:06:58AM -0700, Justin Terry (VM) wrote: > Implements the CPUID trap for CPUID 1 to include the > CPUID_EXT_HYPERVISOR flag in the ECX results. This was preventing some > older linux kernels from booting when trying to access MSR's that dont > make sense when virtualized.

Re: [Qemu-devel] [PATCH 2/2] target/riscv: Mark MSTATUS_FS dirty

2018-03-28 Thread Michael Clark
On Wed, Mar 28, 2018 at 10:36 AM, Michael Clark wrote: > > > On Tue, Mar 27, 2018 at 7:22 PM, Richard Henderson < > richard.hender...@linaro.org> wrote: > >> Writes to the FP register file mark the register file as dirty. >> >> Signed-off-by: Richard Henderson

Re: [Qemu-devel] [PATCH 2/2] target/riscv: Mark MSTATUS_FS dirty

2018-03-28 Thread Michael Clark
On Tue, Mar 27, 2018 at 7:22 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > Writes to the FP register file mark the register file as dirty. > > Signed-off-by: Richard Henderson > --- > target/riscv/op_helper.c | 25 + >

Re: [Qemu-devel] [PATCH for-2.12] migration: Don't activate block devices if using -S

2018-03-28 Thread Eric Blake
On 03/28/2018 12:02 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Activating the block devices causes the locks to be taken on the backing file. If we're running with -S and the destination libvirt hasn't started the destination with 'cont', it's

Re: [Qemu-devel] [PATCH] file-posix: Support fallocate for block device

2018-03-28 Thread Eric Blake
On 03/27/2018 09:37 PM, zhenwei.pi wrote: since linux 4.9, block device supports fallocate. kernel issues block device zereout request and invalidates page cache. So ioctl(fd, FALLOC_FL_ZERO_RANGE...) is safer than ioctl(fd, did you mean fallocate() in the first half of the sentence?

Re: [Qemu-devel] [PATCH for-2.12 v4] iotests: Test abnormally large size in compressed cluster descriptor

2018-03-28 Thread Max Reitz
On 2018-03-22 13:41, Alberto Garcia wrote: > L2 entries for compressed clusters have a field that indicates the > number of sectors used to store the data in the image. > > That's however not the size of the compressed data itself, just the > number of sectors where that data is located. The

[Qemu-devel] [PATCH 1/4] scripts/qemugdb: get pthread_self from "info threads" command

2018-03-28 Thread Vladimir Sementsov-Ogievskiy
When debugging a coredump, pthread_self can't be obtained from function arch_prctl. Moreover if qemu crashed in coroutine, we can't find 'start_thread' in current stack-trace. So, add a method, actually proposed in 1138f24645e9e, which should work for gdb version >= 7.3. Signed-off-by: Vladimir

[Qemu-devel] [PATCH 4/4] scripts/qemugdb: backtraces for coroutines in coredump

2018-03-28 Thread Vladimir Sementsov-Ogievskiy
We can't get coroutine backtrace through obvious way - set regs - bt - restore regs when debugging a coredump. So, let's go hard way: clone current coredump file, patch regs in it and execute a subprocess gdb to get backtrace from this patched coredump. Signed-off-by: Vladimir

[Qemu-devel] [PATCH 0/4] qemugdb: coroutine backtrace for coredump

2018-03-28 Thread Vladimir Sementsov-Ogievskiy
Hi all. Here are some qemugdb enhancements around qemu coroutine command. The main feature is a backtrace for coroutine, when debugging with a coredump file. The problem is that we can't get coroutine backtrace through obvious way - set regs - bt - restore regs when debugging a coredump. So,

[Qemu-devel] [PATCH 3/4] scripts/qemugdb: add coredump.py for coredump patching

2018-03-28 Thread Vladimir Sementsov-Ogievskiy
The main function is write_regs_to_coredump, which opens coredump file, searches for 'CORE' sign. The first one should correspond to PRSTATUS note for first thread. Patch register values in elf_prstatus structure, going after header with 'CORE' sign. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-devel] [PATCH 2/4] scripts/qemugdb: improve "qemu coroutine" command

2018-03-28 Thread Vladimir Sementsov-Ogievskiy
- print regs - catch exception for coredump debugging Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/qemugdb/coroutine.py | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/qemugdb/coroutine.py

Re: [Qemu-devel] [PATCH 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Michael S. Tsirkin
On Wed, Mar 28, 2018 at 07:08:32PM +0200, Maxime Coquelin wrote: > > > On 03/28/2018 06:55 PM, Michael S. Tsirkin wrote: > > On Wed, Mar 28, 2018 at 05:56:57PM +0200, Maxime Coquelin wrote: > > > Without a dedicated protocol feature, QEMU cannot know whether > > > the backend can handle

Re: [Qemu-devel] [PATCH v2 1/1] blockjob: leak fix, remove from txn when failing early

2018-03-28 Thread John Snow
On 03/28/2018 10:28 AM, Marc-André Lureau wrote: > On Wed, Mar 28, 2018 at 4:09 PM, Jeff Cody wrote: >> From: Marc-André Lureau >> >> This fixes leaks found by ASAN such as: >> GTESTER tests/test-blockjob >>

Re: [Qemu-devel] [PATCH 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Maxime Coquelin
On 03/28/2018 06:55 PM, Michael S. Tsirkin wrote: On Wed, Mar 28, 2018 at 05:56:57PM +0200, Maxime Coquelin wrote: Without a dedicated protocol feature, QEMU cannot know whether the backend can handle VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG messages. This patch adds a protocol

[Qemu-devel] [PATCH] migration: Don't activate block devices if using -S

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Activating the block devices causes the locks to be taken on the backing file. If we're running with -S and the destination libvirt hasn't started the destination with 'cont', it's expecting the locks are still untaken. Don't activate the

Re: [Qemu-devel] [PATCH 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Michael S. Tsirkin
On Wed, Mar 28, 2018 at 05:56:57PM +0200, Maxime Coquelin wrote: > Without a dedicated protocol feature, QEMU cannot know whether > the backend can handle VHOST_USER_SET_CONFIG and > VHOST_USER_GET_CONFIG messages. > > This patch adds a protocol feature that is only advertised by > QEMU if the

[Qemu-devel] [PATCH v2 1/6] e1000: Convert v3 fields to subsection

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" A bunch of new TSO fields were introduced by d62644b4 and this bumped the VMState version; however it's easier for those trying to keep backwards migration compatibility if these fields are added in a subsection instead. Move the new fields to

[Qemu-devel] [PATCH] target/xtensa: fix flush_window_regs

2018-03-28 Thread Max Filippov
flush_window_regs uses wrong stack frame to save overflow registers in call8 and call12 frames, which results in wrong register values in callers of a function that received a signal. Reimplement flush_window_regs closely following window overflow sequence. Signed-off-by: Max Filippov

[Qemu-devel] [PATCH v2 0/6] e1000 migration changes for 2.12

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This set of patches change the e1000 migration code to make it easier to keep with compatibility with older versions in backwards migration. I think the first 3 patches are fairly uncontrovercial and I would like them for 2.12; it would

[Qemu-devel] [PATCH v2 6/6] e1000: Old machine types, turn new subsection off

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Turn the newly added subsection off for old machine types Signed-off-by: Dr. David Alan Gilbert --- include/hw/compat.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/compat.h b/include/hw/compat.h

[Qemu-devel] [PATCH v2 2/6] e1000: Dupe offload data on reading old stream

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Old QEMUs only had one set of offload data; when we only receive one lot, dupe the received data - that should give us about the same bug level as the old version. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH v2 5/6] e1000: Choose which set of props to migrate

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When we're using the subsection we migrate both the 'props' and 'tso_props' data; when we're not using the subsection (to migrate to 2.11 or old machine types) we've got to choose what to migrate in the main structure. If we're using the

[Qemu-devel] [PATCH v2 4/6] e1000: Migrate props via a temporary structure

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Swing the tx.props out via a temporary structure, so in future patches we can select what we're going to send. Signed-off-by: Dr. David Alan Gilbert --- hw/net/e1000.c | 27 +++ 1 file changed, 15

[Qemu-devel] [PATCH v2 3/6] e1000: wire new subsection to property

2018-03-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire the new subsection from the previous commit to a property so we can turn it off easily. Signed-off-by: Dr. David Alan Gilbert --- hw/net/e1000.c | 12 1 file changed, 12 insertions(+) diff --git

Re: [Qemu-devel] [PATCH 02/16] qht: return existing entry when qht_insert fails

2018-03-28 Thread Alex Bennée
Emilio G. Cota writes: > The meaning of "existing" is now changed to "matches in hash and > ht->cmp result". This is saner than just checking the pointer value. > > Note that we now return NULL on insertion success, or the existing > pointer on failure. We can do this because

Re: [Qemu-devel] [PATCH 01/16] qht: require a default comparison function

2018-03-28 Thread Alex Bennée
Emilio G. Cota writes: > qht_lookup now uses the default cmp function. qht_lookup_custom is defined > to retain the old behaviour, that is a cmp function is explicitly provided. > > qht_insert will gain use of the default cmp in the next patch. > > Signed-off-by: Emilio G. Cota

Re: [Qemu-devel] [PATCH 13/16] translate-all: protect TB jumps with a per-destination-TB lock

2018-03-28 Thread Alex Bennée
Emilio G. Cota writes: > This applies to both user-mode and !user-mode emulation. > > @@ -2124,7 +2148,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) > /* Adjust the execution state of the next TB. */ > cpu->cflags_next_tb = curr_cflags() | CF_LAST_IO |

Re: [Qemu-devel] [PATCH 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-28 Thread Maxime Coquelin
On 03/28/2018 05:56 PM, Maxime Coquelin wrote: Hi, While reviewing DPDK series adding support to VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG request, I found that it was not backed with a dedicated protocol feature. This series addresses this by adding a new protocol feature bit, and by

[Qemu-devel] [PATCH 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-28 Thread Maxime Coquelin
As soon as vhost-user init is done, the backend may send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG, so let's set the notification callback before it. Also, it will be used to know whether the device supports the config feature to advertize it or not. Signed-off-by: Maxime Coquelin

[Qemu-devel] [PATCH 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Maxime Coquelin
Without a dedicated protocol feature, QEMU cannot know whether the backend can handle VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG messages. This patch adds a protocol feature that is only advertised by QEMU if the device implements the config ops. The backend should only send

[Qemu-devel] [PATCH 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-28 Thread Maxime Coquelin
Hi, While reviewing DPDK series adding support to VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG request, I found that it was not backed with a dedicated protocol feature. This series addresses this by adding a new protocol feature bit, and by only negotiating it if the device supports it, as

Re: [Qemu-devel] [PATCH v5.2 for 2.13 4/4] tpm: Add test cases that uses the external swtpm with CRB interface

2018-03-28 Thread Marc-André Lureau
Hi On Sat, Mar 17, 2018 at 3:24 AM, Stefan Berger wrote: > Add a test program for testing the CRB with the external swtpm. > > The 1st test case extends a PCR and reads back the value and compares > it against an expected return packet. > > The 2nd test case repeats

Re: [Qemu-devel] [PATCH v5 for 2.13 3/4] docs: tpm: add VM save/restore example and troubleshooting guide

2018-03-28 Thread Marc-André Lureau
Hi On Fri, Mar 16, 2018 at 10:46 PM, Stefan Berger wrote: > Extend the docs related to TPM with specs related to VM save and > restore and a troubleshooting guide for TPM migration. > Thanks a lot for writing this! some questions below > Signed-off-by: Stefan Berger

Re: [Qemu-devel] [PATCH v4 2/2] tpm: extend TPM TIS with state migration support

2018-03-28 Thread Marc-André Lureau
Hi On Thu, Mar 1, 2018 at 8:59 PM, Stefan Berger wrote: > Extend the TPM TIS interface with state migration support. > > We need to synchronize with the backend thread to make sure that a command > being processed by the external TPM emulator has completed and its >

Re: [Qemu-devel] [PULL for-2.12 0/1] tcg mul[us]h fix

2018-03-28 Thread Peter Maydell
elease (2018-03-27 22:04:23 +0100) > > are available in the Git repository at: > > git://github.com/rth7680/qemu.git tags/pull-tcg-20180328 > > for you to fetch changes up to f2f1dde75160cac6ede330f3db50dc817d01a2d6: > > tcg: Mark muluh_i

Re: [Qemu-devel] [PATCH v1 02/14] tests: add fp-test, a floating point test suite

2018-03-28 Thread Emilio G. Cota
On Wed, Mar 28, 2018 at 10:51:30 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > >> So this is a unit test of our code rather than a test program running > >> under QEMU? > > > > Having the -t host/soft flags allows you flexibility in what to test. > > > > With "host" mode,

Re: [Qemu-devel] [PATCH v2 0/6] Extend vhost-user to support VFIO based accelerators

2018-03-28 Thread Michael S. Tsirkin
On Wed, Mar 28, 2018 at 08:24:07PM +0800, Tiwei Bie wrote: > > > Update notes > > > > > > > > > IOMMU feature bit check is removed in this version, because: > > > > > > The IOMMU feature is negotiable, when an accelerator is used and > > > it doesn't support virtual IOMMU, its

Re: [Qemu-devel] [PATCH for 2.12 1/1] block: allow recursive calling of bdrv_set_aio_context

2018-03-28 Thread Denis V. Lunev
On 03/28/2018 06:31 PM, Max Reitz wrote: > On 2018-03-27 15:30, Denis V. Lunev wrote: >> We have received the following assert on QEMU 2.9: >> >> (gdb) bt >> 0 0x7f6f67d281f7 in __GI_raise () >> 1 0x7f6f67d298e8 in __GI_abort () >> 2 0x7f6f67d21266 in __assert_fail_base () >> 3

[Qemu-devel] [PATCH for-2.12 v2 1/2] i386/hyperv: add hv-frequencies cpu property

2018-03-28 Thread Roman Kagan
In order to guarantee compatibility on migration, QEMU should have complete control over the features it announces to the guest via CPUID. However, the availability of Hyper-V frequency MSRs (HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY) depends solely on the support for them in the

Re: [Qemu-devel] [PATCH for 2.12 1/1] block: allow recursive calling of bdrv_set_aio_context

2018-03-28 Thread Max Reitz
On 2018-03-27 15:30, Denis V. Lunev wrote: > We have received the following assert on QEMU 2.9: > > (gdb) bt > 0 0x7f6f67d281f7 in __GI_raise () > 1 0x7f6f67d298e8 in __GI_abort () > 2 0x7f6f67d21266 in __assert_fail_base () > 3 0x7f6f67d21312 in __GI___assert_fail () > 4

[Qemu-devel] [PATCH for-2.12 v2 0/2] i386/hyperv: fully control Hyper-V features in CPUID

2018-03-28 Thread Roman Kagan
In order to guarantee compatibility on migration, QEMU should have complete control over the features it announces to the guest via CPUID. However, a number of Hyper-V-related features happen to depend on the support in the underlying KVM, with no regard to QEMU configuration. Make QEMU regain

[Qemu-devel] [PATCH for-2.12 v2 2/2] i386/hyperv: error out if features requested but unsupported

2018-03-28 Thread Roman Kagan
In order to guarantee compatibility on migration, QEMU should have complete control over the features it announces to the guest via CPUID. However, for a number of Hyper-V-related cpu properties, if the corresponding feature is not supported by the underlying KVM, the propery is silently ignored

Re: [Qemu-devel] [PATCH v4 1/2] tpm: extend TPM emulator with state migration support

2018-03-28 Thread Marc-André Lureau
Hi On Thu, Mar 1, 2018 at 8:59 PM, Stefan Berger wrote: > Extend the TPM emulator backend device with state migration support. > > The external TPM emulator 'swtpm' provides a protocol over > its control channel to retrieve its state blobs. We implement > functions

Re: [Qemu-devel] [PATCH v4 5/9] qapi: introduce new cmd option "allowed-in-preconfig"

2018-03-28 Thread Igor Mammedov
On Fri, 23 Mar 2018 16:11:53 -0500 Eric Blake wrote: > On 03/12/2018 08:11 AM, Igor Mammedov wrote: [...] > > > preconfig state but allowed in all other states like they used > > to be. > > > > Within this patch allow following commands in preconfig state: > >

[Qemu-devel] [Bug 1539940] Re: Qemu 2.5 Solaris 8 and 9 sparc hang after terminal type menu

2018-03-28 Thread Zhen Ning Lim
** Changed in: qemu Status: New => 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/1539940 Title: Qemu 2.5 Solaris 8 and 9 sparc hang after terminal type menu Status in QEMU:

[Qemu-devel] [Bug 1539940] Re: Qemu 2.5 Solaris 8 and 9 sparc hang after terminal type menu

2018-03-28 Thread m...@papersolve.com
This is no longer a problem (for sure in latest git, probably further back than that, as I installed Solaris 9/SPARC on SS-20 a few months ago): Type the number of your choice and press Return: 3 syslog service starting. savecore: no dump device configured Running in command line mode Please

[Qemu-devel] [Bug 1588591] Re: Qemu 2.6 Solaris 8 Sparc telnet terminate itself

2018-03-28 Thread m...@papersolve.com
Although I have occasionally seen this message with later versions of QEMU running Solaris 8/SPARC it has never affected any operations for me or terminated a telnet or QEMU process, so I think if it is still there it's not having any affect. So I think this can be closed. -- You received this

Re: [Qemu-devel] [PATCH v4 for 2.12 0/3] fix bitmaps migration through shared storage

2018-03-28 Thread Max Reitz
On 2018-03-27 12:11, Vladimir Sementsov-Ogievskiy wrote: > 27.03.2018 12:53, Vladimir Sementsov-Ogievskiy wrote: >> 27.03.2018 12:28, Vladimir Sementsov-Ogievskiy wrote: >>> 26.03.2018 21:06, Max Reitz wrote: On 2018-03-20 18:05, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > >

  1   2   >