Re: [Qemu-devel] [PATCH v4 13/13] vfio: Add trace events in migration code path

2019-06-20 Thread Kirti Wankhede
On 6/21/2019 12:20 AM, Dr. David Alan Gilbert wrote: > * Kirti Wankhede (kwankh...@nvidia.com) wrote: >> Signed-off-by: Kirti Wankhede >> Reviewed-by: Neo Jia > > Thanks, adding traces really helps; however, it might be easier > if you just add them in your previous patches where you're >

Re: [Qemu-devel] [PATCH v4 01/13] vfio: KABI for migration interface

2019-06-20 Thread Kirti Wankhede
On 6/20/2019 10:48 PM, Alex Williamson wrote: > On Thu, 20 Jun 2019 20:07:29 +0530 > Kirti Wankhede wrote: > >> - Defined MIGRATION region type and sub-type. >> - Used 3 bits to define VFIO device states. >> Bit 0 => _RUNNING >> Bit 1 => _SAVING >> Bit 2 => _RESUMING >>

Re: [Qemu-devel] [Qemu-riscv] [RFC v1 4/5] roms: Add OpenSBI version 0.3

2019-06-20 Thread Bin Meng
On Thu, Jun 20, 2019 at 2:30 AM Alistair Francis wrote: > > On Wed, Jun 19, 2019 at 8:18 AM Bin Meng wrote: > > > > On Wed, Jun 19, 2019 at 1:14 PM Anup Patel wrote: > > > > > > On Wed, Jun 19, 2019 at 6:24 AM Alistair Francis > > > wrote: > > > > > > > > Add OpenSBI version 0.3 as a git

Re: [Qemu-devel] [PATCH] riscv: sifive_test: Add reset functionality

2019-06-20 Thread Bin Meng
Hi Palmer, On Fri, Jun 21, 2019 at 10:53 AM Palmer Dabbelt wrote: > > On Wed, 19 Jun 2019 06:42:21 PDT (-0700), bmeng...@gmail.com wrote: > > Hi Alistair, > > > > On Tue, Jun 18, 2019 at 1:15 AM Alistair Francis > > wrote: > >> > >> On Fri, Jun 14, 2019 at 8:30 AM Bin Meng wrote: > >> > > >>

Re: [Qemu-devel] [PATCH] riscv: sifive_test: Add reset functionality

2019-06-20 Thread Palmer Dabbelt
On Wed, 19 Jun 2019 06:42:21 PDT (-0700), bmeng...@gmail.com wrote: Hi Alistair, On Tue, Jun 18, 2019 at 1:15 AM Alistair Francis wrote: On Fri, Jun 14, 2019 at 8:30 AM Bin Meng wrote: > > This adds a reset opcode for sifive_test device to trigger a system > reset for testing purpose. > >

Re: [Qemu-devel] [PATCH v1 0/9] Update the RISC-V specification versions

2019-06-20 Thread Palmer Dabbelt
On Wed, 19 Jun 2019 07:19:38 PDT (-0700), alistai...@gmail.com wrote: On Wed, Jun 19, 2019 at 3:58 AM Palmer Dabbelt wrote: On Mon, 17 Jun 2019 18:31:00 PDT (-0700), Alistair Francis wrote: > Based-on: > > Now that the RISC-V spec has started to be ratified let's update our > QEMU

Re: [Qemu-devel] [PATCH] memory: do not do out of bound notification

2019-06-20 Thread Peter Xu
On Thu, Jun 20, 2019 at 03:14:04PM +0200, Paolo Bonzini wrote: > On 20/06/19 14:59, Peter Xu wrote: > > I feel like this can be problematic. I'm imaging: > > > > start=0x1000_, size=0x1000_1000 > > > > This will get size=0x1000 but actually we can do size=0x1000_ as > > the first. > >

Re: [Qemu-devel] [PULL 00/25] Misc (mostly x86) patches for 2019-06-21

2019-06-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1561081350-3723-1-git-send-email-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/25] Misc (mostly x86) patches for 2019-06-21 Type: series Message-id:

Re: [Qemu-devel] [External Email] Re: [PATCH 3/3] qapi: add block size histogram interface

2019-06-20 Thread zhenwei pi
On 6/20/19 10:03 PM, Eric Blake wrote: On 6/20/19 3:54 AM, zhenwei pi wrote: Set/Clear block size histograms through new command x-block-size-histogram-set and show new statistics in query-blockstats results. I'm guessing this is modeled after the existing block-latency-histogram-set

Re: [Qemu-devel] [PATCH] pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size()

2019-06-20 Thread Eduardo Habkost
On Fri, Jun 21, 2019 at 02:29:29AM +0200, Paolo Bonzini wrote: > On 10/06/19 15:50, Igor Mammedov wrote: > > QEMU will crash when device-memory-region-size property is read if > > ms->device_memory > > wasn't initialized yet. > > > > Crash can be reproduced with: > > $QEMU -preconfig -qmp

[Qemu-devel] [PULL 21/25] target/i386: kvm: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Kernel commit c4f55198c7c2 ("kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD") introduced a new KVM capability which allows userspace to correctly distinguish between pending and injected exceptions. This distinguish is important in case of nested virtualization scenarios because

[Qemu-devel] [PULL 20/25] target/i386: kvm: Add support for save and restore nested state

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Kernel commit 8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") introduced new IOCTLs to extract and restore vCPU state related to Intel VMX & AMD SVM. Utilize these IOCTLs to add support for migration of VMs which are running nested hypervisors. Reviewed-by: Nikita

[Qemu-devel] [PULL 25/25] hw: Nuke hw_compat_4_0_1 and pc_compat_4_0_1

2019-06-20 Thread Paolo Bonzini
From: Greg Kurz Commit c87759ce876a fixed a regression affecting pc-q35 machines by introducing a new pc-q35-4.0.1 machine version to be used instead of pc-q35-4.0. The only purpose was to revert the default behaviour of not using split irqchip, but the change also introduced the usual hw_compat

[Qemu-devel] [PULL 17/25] target/i386: kvm: Block migration for vCPUs exposed with nested virtualization

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Commit d98f26073beb ("target/i386: kvm: add VMX migration blocker") added a migration blocker for vCPU exposed with Intel VMX. However, migration should also be blocked for vCPU exposed with AMD SVM. Both cases should be blocked because QEMU should extract additional vCPU state

[Qemu-devel] [PULL 12/25] target/i386: define a new MSR based feature word - FEAT_CORE_CAPABILITY

2019-06-20 Thread Paolo Bonzini
From: Xiaoyao Li MSR IA32_CORE_CAPABILITY is a feature-enumerating MSR, which only enumerates the feature split lock detection (via bit 5) by now. The existence of MSR IA32_CORE_CAPABILITY is enumerated by CPUID.7_0:EDX[30]. The latest kernel patches about them can be found here:

[Qemu-devel] [PULL 11/25] i386/kvm: add support for Direct Mode for Hyper-V synthetic timers

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov Hyper-V on KVM can only use Synthetic timers with Direct Mode (opting for an interrupt instead of VMBus message). This new capability is only announced in KVM_GET_SUPPORTED_HV_CPUID. Signed-off-by: Vitaly Kuznetsov Message-Id:

[Qemu-devel] [PULL 13/25] target/i386: kvm: Delete VMX migration blocker on vCPU init failure

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Commit d98f26073beb ("target/i386: kvm: add VMX migration blocker") added migration blocker for vCPU exposed with Intel VMX because QEMU doesn't yet contain code to support migration of nested virtualization workloads. However, that commit missed adding deletion of the

[Qemu-devel] [PULL 15/25] target/i386: kvm: Use symbolic constant for #DB/#BP exception constants

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Krish Sadhukhan Signed-off-by: Liran Alon Message-Id: <20190619162140.133674-4-liran.a...@oracle.com> Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PULL 23/25] sd: Fix out-of-bounds assertions

2019-06-20 Thread Paolo Bonzini
From: Lidong Chen Due to an off-by-one error, the assert statements allow an out-of-bound array access. This doesn't happen in practice, but the static analyzer notices. Signed-off-by: Lidong Chen Reviewed-by: Liam Merwick Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 22/25] target/i386: kvm: Add nested migration blocker only when kernel lacks required capabilities

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Previous commits have added support for migration of nested virtualization workloads. This was done by utilising two new KVM capabilities: KVM_CAP_NESTED_STATE and KVM_CAP_EXCEPTION_PAYLOAD. Both which are required in order to correctly migrate such workloads. Therefore, change

[Qemu-devel] [PULL 07/25] i386/kvm: implement 'hv-passthrough' mode

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov In many case we just want to give Windows guests all currently supported Hyper-V enlightenments and that's where this new mode may come handy. We pass through what was returned by KVM_GET_SUPPORTED_HV_CPUID. hv_cpuid_check_and_set() is modified to also set cpu->hyperv_*

[Qemu-devel] [PULL 14/25] KVM: Introduce kvm_arch_destroy_vcpu()

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Simiar to how kvm_init_vcpu() calls kvm_arch_init_vcpu() to perform arch-dependent initialisation, introduce kvm_arch_destroy_vcpu() to be called from kvm_destroy_vcpu() to perform arch-dependent destruction. This was added because some architectures (Such as i386) currently do

[Qemu-devel] [PULL 16/25] target/i386: kvm: Re-inject #DB to guest with updated DR6

2019-06-20 Thread Paolo Bonzini
From: Liran Alon If userspace (QEMU) debug guest, when #DB is raised in guest and intercepted by KVM, KVM forwards information on #DB to userspace instead of injecting #DB to guest. While doing so, KVM don't update vCPU DR6 but instead report the #DB DR6 value to userspace for further handling.

[Qemu-devel] [PULL 18/25] linux-headers: sync with latest KVM headers from Linux 5.2

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Improve the KVM_{GET,SET}_NESTED_STATE structs by detailing the format of VMX nested state data in a struct. In order to avoid changing the ioctl values of KVM_{GET,SET}_NESTED_STATE, there is a need to preserve sizeof(struct kvm_nested_state). This is done by defining the data

[Qemu-devel] [PULL 19/25] vmstate: Add support for kernel integer types

2019-06-20 Thread Paolo Bonzini
From: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Maran Wilson Signed-off-by: Liran Alon Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190619162140.133674-8-liran.a...@oracle.com> Signed-off-by: Paolo Bonzini --- include/migration/vmstate.h | 26 ++ 1

[Qemu-devel] [PULL 04/25] i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov KVM now supports reporting supported Hyper-V features through CPUID (KVM_GET_SUPPORTED_HV_CPUID ioctl). Going forward, this is going to be the only way to announce new functionality and this has already happened with Direct Mode stimers. While we could just support

[Qemu-devel] [PULL 08/25] i386/kvm: hv-stimer requires hv-time and hv-synic

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov Synthetic timers operate in hv-time time and Windows won't use these without SynIC. Add .dependencies field to kvm_hyperv_properties[] and a generic mechanism to check dependencies between features. Signed-off-by: Vitaly Kuznetsov Message-Id:

[Qemu-devel] [PULL 10/25] i386/kvm: hv-evmcs requires hv-vapic

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov Enlightened VMCS is enabled by writing to a field in VP assist page and these require virtual APIC. Signed-off-by: Vitaly Kuznetsov Message-Id: <20190517141924.19024-9-vkuzn...@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 3 ++- 1 file changed, 2

[Qemu-devel] [PULL 24/25] util/main-loop: Fix incorrect assertion

2019-06-20 Thread Paolo Bonzini
From: Lidong Chen The check for poll_fds in g_assert() was incorrect. The correct assertion should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i is in [0, w->num). This could happen with a very high number

[Qemu-devel] [PULL 09/25] i386/kvm: hv-tlbflush/ipi require hv-vpindex

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov The corresponding hypercalls require using VP indexes. Signed-off-by: Vitaly Kuznetsov Message-Id: <20190517141924.19024-8-vkuzn...@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL 06/25] i386/kvm: document existing Hyper-V enlightenments

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov Currently, there is no doc describing hv-* CPU flags, people are encouraged to get the information from Microsoft Hyper-V Top Level Functional specification (TLFS). There is, however, a bit of QEMU specifics. Signed-off-by: Vitaly Kuznetsov Message-Id:

[Qemu-devel] [PULL 00/25] Misc (mostly x86) patches for 2019-06-21

2019-06-20 Thread Paolo Bonzini
The following changes since commit 33d609990621dea6c7d056c86f707b8811320ac1: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-06-18 17:00:52 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to

[Qemu-devel] [PULL 05/25] i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties()

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov Let's consolidate Hyper-V features handling in hyperv_handle_properties(). The change is necessary to support 'hv-passthrough' mode as we'll be just copying CPUIDs from KVM instead of filling them in. Signed-off-by: Vitaly Kuznetsov Message-Id:

[Qemu-devel] [PULL 01/25] kvm-all: Add/update fprintf's for kvm_*_ioeventfd_del

2019-06-20 Thread Paolo Bonzini
From: Yury Kotov Signed-off-by: Yury Kotov Message-Id: <20190607090830.18807-1-yury-ko...@yandex-team.ru> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index

[Qemu-devel] [PULL 03/25] i386/kvm: convert hyperv enlightenments properties from bools to bits

2019-06-20 Thread Paolo Bonzini
From: Vitaly Kuznetsov Representing Hyper-V properties as bits will allow us to check features and dependencies between them in a natural way. Suggested-by: Roman Kagan Signed-off-by: Vitaly Kuznetsov Message-Id: <20190517141924.19024-2-vkuzn...@redhat.com> Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PULL 02/25] hax: Honor CPUState::halted

2019-06-20 Thread Paolo Bonzini
From: Colin Xu QEMU tracks whether a vcpu is halted using CPUState::halted. E.g., after initialization or reset, halted is 0 for the BSP (vcpu 0) and 1 for the APs (vcpu 1, 2, ...). A halted vcpu should not be handed to the hypervisor to run (e.g. hax_vcpu_run()). Under HAXM, Android Emulator

Re: [Qemu-devel] [PATCH v4 00/13] Add migration support for VFIO device

2019-06-20 Thread Yan Zhao
On Fri, Jun 21, 2019 at 08:25:18AM +0800, Yan Zhao wrote: > On Thu, Jun 20, 2019 at 10:37:28PM +0800, Kirti Wankhede wrote: > > Add migration support for VFIO device > > > > This Patch set include patches as below: > > - Define KABI for VFIO device for migration support. > > - Added save and

Re: [Qemu-devel] [RFC PATCH 0/9] hw/acpi: make build_madt arch agnostic

2019-06-20 Thread Wei Yang
On Thu, Jun 20, 2019 at 05:04:29PM +0200, Igor Mammedov wrote: >On Thu, 20 Jun 2019 14:18:42 + >Wei Yang wrote: > >> On Wed, Jun 19, 2019 at 11:04:40AM +0200, Igor Mammedov wrote: >> >On Wed, 19 Jun 2019 14:20:50 +0800 >> >Wei Yang wrote: >> > >> >> On Tue, Jun 18, 2019 at 05:59:56PM

Re: [Qemu-devel] [PATCH 1/2] monitor: Add dump-stack command

2019-06-20 Thread Suraj Jitindar Singh
On Wed, 2019-05-01 at 15:35 +1000, Suraj Jitindar Singh wrote: > Add a monitor command "dump-stack" to be used to dump the stack for > the > current cpu. To summarise the discussion which occured on this patch, - It looks like it's ok to duplicate this functionality as it provides an easier

Re: [Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables with machine smp properties

2019-06-20 Thread Like Xu
On 2019/6/20 22:52, Eduardo Habkost wrote: On Sun, May 19, 2019 at 04:54:23AM +0800, Like Xu wrote: The global smp variables in riscv are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR

Re: [Qemu-devel] [PATCH v4 00/13] Add migration support for VFIO device

2019-06-20 Thread Yan Zhao
On Thu, Jun 20, 2019 at 10:37:28PM +0800, Kirti Wankhede wrote: > Add migration support for VFIO device > > This Patch set include patches as below: > - Define KABI for VFIO device for migration support. > - Added save and restore functions for PCI configuration space > - Generic migration

Re: [Qemu-devel] [PATCH v4 08/13] vfio: Add save state functions to SaveVMHandlers

2019-06-20 Thread Yan Zhao
On Thu, Jun 20, 2019 at 10:37:36PM +0800, Kirti Wankhede wrote: > Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy > functions. These functions handles pre-copy and stop-and-copy phase. > > In _SAVING|_RUNNING device state or pre-copy phase: > - read pending_bytes > -

Re: [Qemu-devel] [PATCH] pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size()

2019-06-20 Thread Paolo Bonzini
On 10/06/19 15:50, Igor Mammedov wrote: > QEMU will crash when device-memory-region-size property is read if > ms->device_memory > wasn't initialized yet. > > Crash can be reproduced with: > $QEMU -preconfig -qmp unix:qmp_socket,server,nowait & > ./scripts/qmp/qom-get -s qmp_socket

Re: [Qemu-devel] [PATCH v4 03/13] vfio: Add save and load functions for VFIO PCI devices

2019-06-20 Thread Yan Zhao
On Thu, Jun 20, 2019 at 10:37:31PM +0800, Kirti Wankhede wrote: > These functions save and restore PCI device specific data - config > space of PCI device. > Tested save and restore with MSI and MSIX type. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > --- > hw/vfio/pci.c | 112 >

[Qemu-devel] [RFC v2 PATCH] hw/arm/virt: makes virt a default machine type

2019-06-20 Thread Wainer dos Santos Moschetta
Peter, Cleber, Re-sending this email because I forgot to copy the mailing listing. Sorry. Original message below. == Hi Peter et al., I came across this when running the acceptance tests in an aarch64 host. The arch-independent tests fail because, in general, they don't set a machine type. In

Re: [Qemu-devel] [PATCH 0/2] i386: Introduce X86CPUCacheCPUID struct

2019-06-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190620203616.22715-1-ehabk...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH 0/2] i386: Introduce X86CPUCacheCPUID struct

2019-06-20 Thread Eduardo Habkost
The new struct will let us declare the existing legacy CPU topology info in a static constant, instead of defining it inside x86_cpu_realizefn(). While doing it, make the CPU cache declarations all constants. This will help us represent the model-specific cache info as QOM properties in the

[Qemu-devel] [PATCH 1/2] i386: make cache structs const-safe

2019-06-20 Thread Eduardo Habkost
This code will be refactored and it will be useful to make it const-safe to catch mistakes. Signed-off-by: Eduardo Habkost --- target/i386/cpu.h | 8 target/i386/cpu.c | 36 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git

[Qemu-devel] [PATCH 2/2] i386: Introduce X86CPUCacheCPUID struct

2019-06-20 Thread Eduardo Habkost
The new struct will be used to simplify the code that deals with legacy cache information. Signed-off-by: Eduardo Habkost --- target/i386/cpu.h | 7 +--- target/i386/cpu.c | 100 -- 2 files changed, 63 insertions(+), 44 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v11] ssh: switch from libssh2 to libssh

2019-06-20 Thread Philippe Mathieu-Daudé
On 6/20/19 10:08 PM, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for known_hosts handling > -

Re: [Qemu-devel] [PATCH v11] ssh: switch from libssh2 to libssh

2019-06-20 Thread Max Reitz
On 20.06.19 22:08, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for known_hosts handling > -

Re: [Qemu-devel] [PATCH 11/12] iotests: add test 257 for bitmap-mode backups

2019-06-20 Thread John Snow
On 6/20/19 3:48 PM, Max Reitz wrote: > On 20.06.19 21:08, John Snow wrote: >> >> >> On 6/20/19 2:35 PM, Max Reitz wrote: >>> On 20.06.19 03:03, John Snow wrote: Signed-off-by: John Snow --- tests/qemu-iotests/257 | 412 +++ tests/qemu-iotests/257.out | 2199

Re: [Qemu-devel] [PATCH v10] ssh: switch from libssh2 to libssh

2019-06-20 Thread Pino Toscano
On Thursday, 20 June 2019 14:58:40 CEST Max Reitz wrote: > On 20.06.19 11:49, Pino Toscano wrote: > > On Tuesday, 18 June 2019 15:14:30 CEST Max Reitz wrote: > >> On 18.06.19 11:24, Pino Toscano wrote: > >>> Rewrite the implementation of the ssh block driver to use libssh instead > >>> of libssh2.

Re: [Qemu-devel] [PATCH v10] ssh: switch from libssh2 to libssh

2019-06-20 Thread Max Reitz
On 20.06.19 22:03, Pino Toscano wrote: > On Thursday, 20 June 2019 14:58:40 CEST Max Reitz wrote: >> On 20.06.19 11:49, Pino Toscano wrote: >>> On Tuesday, 18 June 2019 15:14:30 CEST Max Reitz wrote: On 18.06.19 11:24, Pino Toscano wrote: > Rewrite the implementation of the ssh block

[Qemu-devel] [PATCH v11] ssh: switch from libssh2 to libssh

2019-06-20 Thread Pino Toscano
Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various advantages over libssh2: - easier API for authentication (for example for using ssh-agent) - easier API for known_hosts handling - supports newer types of keys in known_hosts Use

[Qemu-devel] [PATCH] ati-vga: Clarify comment (to be squashed in previous patch)

2019-06-20 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 6fbdda288f..932a1eacea 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -538,9 +538,14 @@ static void ati_mm_write(void

Re: [Qemu-devel] [PATCH 0/3] add ati vgabios

2019-06-20 Thread BALATON Zoltan
On Thu, 20 Jun 2019, Gerd Hoffmann wrote: Gerd Hoffmann (3): seabios: add config for ati vgabios seabios: add ati vgabios binary ati-vga: switch to vgabios-ati.bin hw/display/ati.c| 2 +- pc-bios/vgabios-ati.bin | Bin 0 -> 38912 bytes roms/config.vga-ati | 4 3 files

Re: [Qemu-devel] [PATCH 11/12] iotests: add test 257 for bitmap-mode backups

2019-06-20 Thread Max Reitz
On 20.06.19 21:08, John Snow wrote: > > > On 6/20/19 2:35 PM, Max Reitz wrote: >> On 20.06.19 03:03, John Snow wrote: >>> Signed-off-by: John Snow >>> --- >>> tests/qemu-iotests/257 | 412 +++ >>> tests/qemu-iotests/257.out | 2199 >>>

Re: [Qemu-devel] [RFC PATCH v1 08/12] target.json: add migrate-set-sev-info command

2019-06-20 Thread Singh, Brijesh
On 6/20/19 2:13 PM, Eric Blake wrote: > On 6/20/19 1:03 PM, Singh, Brijesh wrote: >> The command can be used by the hypervisor to specify the target Platform >> Diffie-Hellman key (PDH) and certificate chain before starting the SEV >> guest migration. The values passed through the command will

Re: [Qemu-devel] [PATCH v4 08/13] vfio: Add save state functions to SaveVMHandlers

2019-06-20 Thread Alex Williamson
On Thu, 20 Jun 2019 20:07:36 +0530 Kirti Wankhede wrote: > Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy > functions. These functions handles pre-copy and stop-and-copy phase. > > In _SAVING|_RUNNING device state or pre-copy phase: > - read pending_bytes > - read

Re: [Qemu-devel] [RFC PATCH v1 08/12] target.json: add migrate-set-sev-info command

2019-06-20 Thread Eric Blake
On 6/20/19 1:03 PM, Singh, Brijesh wrote: > The command can be used by the hypervisor to specify the target Platform > Diffie-Hellman key (PDH) and certificate chain before starting the SEV > guest migration. The values passed through the command will be used while > creating the outgoing

Re: [Qemu-devel] [PATCH 07/12] block/backup: add 'always' bitmap sync policy

2019-06-20 Thread Max Reitz
On 20.06.19 20:44, John Snow wrote: > > > On 6/20/19 1:00 PM, Max Reitz wrote: >> On 20.06.19 03:03, John Snow wrote: >>> This adds an "always" policy for bitmap synchronization. Regardless of if >>> the job succeeds or fails, the bitmap is *always* synchronized. This means >>> that for backups

Re: [Qemu-devel] [PATCH 11/12] iotests: add test 257 for bitmap-mode backups

2019-06-20 Thread John Snow
On 6/20/19 2:35 PM, Max Reitz wrote: > On 20.06.19 03:03, John Snow wrote: >> Signed-off-by: John Snow >> --- >> tests/qemu-iotests/257 | 412 +++ >> tests/qemu-iotests/257.out | 2199 >> tests/qemu-iotests/group |1 + >> 3 files changed,

[Qemu-devel] [PATCH v5 4/5] net/announce: Add HMP optional ID

2019-06-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional ID to the HMP command. e.g. # start an announce for a long time on eth1 migrate_set_parameter announce-rounds 1000 announce_self "eth1" e1 # start an announce on eth2 announce_self "eth2" e2 # Change e1 to be announcing on eth1

Re: [Qemu-devel] [PATCH 08/12] iotests: add testing shim for script-style python tests

2019-06-20 Thread Max Reitz
On 20.06.19 20:47, John Snow wrote: > > > On 6/20/19 1:26 PM, Max Reitz wrote: >> On 20.06.19 19:09, Max Reitz wrote: >>> On 20.06.19 03:03, John Snow wrote: Because the new-style python tests don't use the iotests.main() test launcher, we don't turn on the debugger logging for these

Re: [Qemu-devel] [PATCH v4 13/13] vfio: Add trace events in migration code path

2019-06-20 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia Thanks, adding traces really helps; however, it might be easier if you just add them in your previous patches where you're adding the functions. Dave > --- > hw/vfio/migration.c | 26

[Qemu-devel] [PATCH v5 1/5] net/announce: Allow optional list of interfaces

2019-06-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the caller to restrict the set of interfaces that announces are sent on. The default is still to send on all interfaces. e.g. { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2", "vn1"] }

Re: [Qemu-devel] [PATCH 08/12] iotests: add testing shim for script-style python tests

2019-06-20 Thread John Snow
On 6/20/19 1:26 PM, Max Reitz wrote: > On 20.06.19 19:09, Max Reitz wrote: >> On 20.06.19 03:03, John Snow wrote: >>> Because the new-style python tests don't use the iotests.main() test >>> launcher, we don't turn on the debugger logging for these scripts >>> when invoked via ./check -d. >>>

[Qemu-devel] [PATCH v5 5/5] net/announce: Expand test for stopping self announce

2019-06-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Expand self-announce test to check we can stop an announce timer. We set it up to send 300 packets, but after we receive the first one we tell it to stop. We error if: a) We receive more than 30 of the packets b) We're still receiving packets after a lot

[Qemu-devel] [PATCH v5 2/5] net/announce: Add HMP optional interface list

2019-06-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional interface list to the HMP command. i.e. All interfaces announce_self Just the named interfaces: announce_self vn1,vn2 Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx| 6 -- monitor/hmp-cmds.c | 38

[Qemu-devel] [PATCH v5 0/5] network announce; interface selection & IDs

2019-06-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Up until now, the 'announce' feature has mainly been used for migration where we announce on all interfaces. Another use for 'announce' is in cases of network topology changes. Since network topology changes may only affect a subset of the interfaces, we add an

Re: [Qemu-devel] [PATCH 07/12] block/backup: add 'always' bitmap sync policy

2019-06-20 Thread John Snow
On 6/20/19 1:00 PM, Max Reitz wrote: > On 20.06.19 03:03, John Snow wrote: >> This adds an "always" policy for bitmap synchronization. Regardless of if >> the job succeeds or fails, the bitmap is *always* synchronized. This means >> that for backups that fail part-way through, the bitmap

[Qemu-devel] [RFC PATCH v1 10/12] target/i386: sev: add support to load incoming encrypted page

2019-06-20 Thread Singh, Brijesh
The sev_load_incoming_page() provide the implementation to read the incoming guest private pages from the socket and load it into the guest memory. The routines uses the RECEIVE_START command to create the incoming encryption context on the first call then uses the RECEIEVE_UPDATE_DATA command to

[Qemu-devel] [PATCH v5 3/5] net/announce: Add optional ID

2019-06-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Previously there was a single instance of the timer used by monitor triggered announces, that's OK, but when combined with the previous change that lets you have announces for subsets of interfaces it's a bit restrictive if you want to do different things to

Re: [Qemu-devel] [PATCH 02/12] block/backup: Add mirror sync mode 'bitmap'

2019-06-20 Thread Max Reitz
On 20.06.19 18:01, John Snow wrote: > > > On 6/20/19 11:00 AM, Max Reitz wrote: >> On 20.06.19 03:03, John Snow wrote: >>> We don't need or want a new sync mode for simple differences in >>> semantics. Create a new mode simply named "BITMAP" that is designed to >>> make use of the new Bitmap

[Qemu-devel] [RFC PATCH v1 03/12] migration/ram: add support to send encrypted pages

2019-06-20 Thread Singh, Brijesh
When memory encryption is enabled, the guest memory will be encrypted with the guest specific key. The patch introduces RAM_SAVE_FLAG_ENCRYPTED_PAGE flag to distinguish the encrypted data from plaintext. Encrypted pages may need special handling. The kvm_memcrypt_save_outgoing_page() is used by

Re: [Qemu-devel] [PATCH 12/12] block/backup: loosen restriction on readonly bitmaps

2019-06-20 Thread Max Reitz
On 20.06.19 03:03, John Snow wrote: > With the "never" sync policy, we actually can utilize readonly bitmaps > now. Loosen the check at the QMP level, and tighten it based on > provided arguments down at the job creation level instead. > > Signed-off-by: John Snow > --- > block/backup.c | 6

[Qemu-devel] [RFC PATCH v1 01/12] linux-headers: update kernel header to include SEV migration commands

2019-06-20 Thread Singh, Brijesh
Signed-off-by: Brijesh Singh --- linux-headers/linux/kvm.h | 53 +++ 1 file changed, 53 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index c8423e760c..2bdd6a908e 100644 --- a/linux-headers/linux/kvm.h +++

Re: [Qemu-devel] [Qemu-riscv] [RFC v1 0/5] RISC-V: Add firmware loading support and default

2019-06-20 Thread David Abdurachmanov
On Thu, Jun 20, 2019 at 9:18 PM Alistair Francis wrote: > > On Thu, Jun 20, 2019 at 1:16 AM Andrea Bolognani wrote: > > > > On Wed, 2019-06-19 at 11:23 -0700, Alistair Francis wrote: > > > On Wed, Jun 19, 2019 at 7:42 AM Bin Meng wrote: > > > > On Wed, Jun 19, 2019 at 10:30 PM Alistair Francis

Re: [Qemu-devel] [PATCH 11/12] iotests: add test 257 for bitmap-mode backups

2019-06-20 Thread Max Reitz
On 20.06.19 03:03, John Snow wrote: > Signed-off-by: John Snow > --- > tests/qemu-iotests/257 | 412 +++ > tests/qemu-iotests/257.out | 2199 > tests/qemu-iotests/group |1 + > 3 files changed, 2612 insertions(+) > create mode 100755

[Qemu-devel] [RFC PATCH v1 09/12] target/i386: sev: add support to encrypt the outgoing page

2019-06-20 Thread Singh, Brijesh
The sev_save_outgoing_page() provide the implementation to encrypt the guest private pages during the transit. The routines uses the SEND_START command to create the outgoing encryption context on the first call then uses the SEND_UPDATE_DATA command to encrypt the data before writing it to the

[Qemu-devel] [RFC PATCH v1 06/12] doc: update AMD SEV to include Live migration flow

2019-06-20 Thread Singh, Brijesh
Signed-off-by: Brijesh Singh --- docs/amd-memory-encryption.txt | 44 +- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt index abb9a976f5..757e0d931a 100644 ---

[Qemu-devel] [RFC PATCH v1 02/12] kvm: introduce high-level API to support encrypted guest migration

2019-06-20 Thread Singh, Brijesh
When memory encryption is enabled in VM, the guest pages will be encrypted with the guest-specific key, to protect the confidentiality of data in transit. To support the live migration we need to use platform specific hooks to access the guest memory. The kvm_memcrypt_save_outgoing_page() can be

[Qemu-devel] [RFC PATCH v1 12/12] target/i386: sev: remove migration blocker

2019-06-20 Thread Singh, Brijesh
Signed-off-by: Brijesh Singh --- target/i386/sev.c | 12 1 file changed, 12 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index dc1e974d93..095ef4c729 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -34,7 +34,6 @@ #define DEFAULT_SEV_DEVICE

[Qemu-devel] [RFC PATCH v1 00/12] Add SEV guest live migration support

2019-06-20 Thread Singh, Brijesh
AMD SEV encrypts the memory of VMs and because this encryption is done using an address tweak, the hypervisor will not be able to simply copy ciphertext between machines to migrate a VM. Instead the AMD SEV Key Management API provides a set of functions which the hypervisor can use to package a

[Qemu-devel] [RFC PATCH v1 11/12] migration: add support to migrate page encryption bitmap

2019-06-20 Thread Singh, Brijesh
When memory encryption is enabled, the hypervisor maintains a page encryption bitmap which is referred by hypervisor during migratoin to check if page is private or shared. The bitmap is built during the VM bootup and must be migrated to the target host so that hypervisor on target host can use it

[Qemu-devel] [RFC PATCH v1 08/12] target.json: add migrate-set-sev-info command

2019-06-20 Thread Singh, Brijesh
The command can be used by the hypervisor to specify the target Platform Diffie-Hellman key (PDH) and certificate chain before starting the SEV guest migration. The values passed through the command will be used while creating the outgoing encryption context. Signed-off-by: Brijesh Singh ---

[Qemu-devel] [RFC PATCH v1 05/12] doc: update AMD SEV API spec web link

2019-06-20 Thread Singh, Brijesh
Signed-off-by: Brijesh Singh --- docs/amd-memory-encryption.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt index 43bf3ee6a5..abb9a976f5 100644 --- a/docs/amd-memory-encryption.txt +++

[Qemu-devel] [RFC PATCH v1 07/12] target/i386: sev: do not create launch context for an incoming guest

2019-06-20 Thread Singh, Brijesh
The LAUNCH_START is used for creating an encryption context to encrypt newly created guest, for an incoming guest the RECEIVE_START should be used. Signed-off-by: Brijesh Singh --- target/i386/sev.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [RFC PATCH v1 04/12] kvm: add support to sync the page encryption state bitmap

2019-06-20 Thread Singh, Brijesh
The SEV VMs have concept of private and shared memory. The private memory is encrypted with guest-specific key, while shared memory may be encrypted with hyperivosr key. The KVM_GET_PAGE_ENC_BITMAP can be used to get a bitmap indicating whether the guest page is private or shared. A private page

Re: [Qemu-devel] [PATCH v5 0/3] virtio-scsi: restart DMA after iothread

2019-06-20 Thread Paolo Bonzini
On 20/06/19 19:37, Stefan Hajnoczi wrote: > v5: > * Plumbing vm change state handlers into DeviceClass/BusClass is a rather >large bug fix. Instead I've combined the previous priorities approach with >the observation from Kevin and Paolo that we really want to order by qdev >tree

Re: [Qemu-devel] [Qemu-riscv] [RFC v1 0/5] RISC-V: Add firmware loading support and default

2019-06-20 Thread Alistair Francis
On Thu, Jun 20, 2019 at 1:16 AM Andrea Bolognani wrote: > > On Wed, 2019-06-19 at 11:23 -0700, Alistair Francis wrote: > > On Wed, Jun 19, 2019 at 7:42 AM Bin Meng wrote: > > > On Wed, Jun 19, 2019 at 10:30 PM Alistair Francis > > > wrote: > > > > On Wed, Jun 19, 2019 at 7:26 AM Bin Meng

Re: [Qemu-devel] [PATCH 05/12] hbitmap: enable merging across granularities

2019-06-20 Thread John Snow
On 6/20/19 11:47 AM, Max Reitz wrote: > On 20.06.19 03:03, John Snow wrote: >> Signed-off-by: John Snow >> --- >> util/hbitmap.c | 22 +- >> 1 file changed, 21 insertions(+), 1 deletion(-) >> >> diff --git a/util/hbitmap.c b/util/hbitmap.c >> index 45d1725daf..0d6724b7bc

Re: [Qemu-devel] [PATCH v4 0/5] network announce; interface selection & IDs

2019-06-20 Thread Dr. David Alan Gilbert
* Jason Wang (jasow...@redhat.com) wrote: > > On 2019/6/13 下午5:59, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Laine asked for some extra features on the network announce support; > > > It's better to explain why this feature is needed. Yes, I'll reword. >

Re: [Qemu-devel] virtual machine cpu soft lock when qemu attach disk

2019-06-20 Thread Stefan Hajnoczi
On Tue, Jun 04, 2019 at 04:39:00PM +0800, l00284672 wrote: > Hi,  I found a problem that virtual machine cpu soft lock when I attach a > disk to the vm in the case that > > backend storage network has a large delay or IO pressure is too large. > > 1) The disk xml which I attached is: > >     >

[Qemu-devel] [PATCH v5 0/3] virtio-scsi: restart DMA after iothread

2019-06-20 Thread Stefan Hajnoczi
v5: * Plumbing vm change state handlers into DeviceClass/BusClass is a rather large bug fix. Instead I've combined the previous priorities approach with the observation from Kevin and Paolo that we really want to order by qdev tree depth. The new qdev_add_vm_change_state_handler()

[Qemu-devel] [PATCH v5 1/3] vl: add qemu_add_vm_change_state_handler_prio()

2019-06-20 Thread Stefan Hajnoczi
Add an API for registering vm change state handlers with a well-defined ordering. This is necessary when handlers depend on each other. Small coding style fixes are included to make checkpatch.pl happy. Signed-off-by: Stefan Hajnoczi --- include/sysemu/sysemu.h | 2 ++ vl.c

[Qemu-devel] [PATCH v5 0/3] virtio-scsi: restart DMA after iothread

2019-06-20 Thread Stefan Hajnoczi
v5: * Plumbing vm change state handlers into DeviceClass/BusClass is a rather large bug fix. Instead I've combined the previous priorities approach with the observation from Kevin and Paolo that we really want to order by qdev tree depth. The new qdev_add_vm_change_state_handler()

[Qemu-devel] [PATCH v5 3/3] virtio-scsi: restart DMA after iothread

2019-06-20 Thread Stefan Hajnoczi
When the 'cont' command resumes guest execution the vm change state handlers are invoked. Unfortunately there is no explicit ordering between classic qemu_add_vm_change_state_handler() callbacks. When two layers of code both use vm change state handlers, we don't control which handler runs

[Qemu-devel] [PATCH v5 1/3] vl: add qemu_add_vm_change_state_handler_prio()

2019-06-20 Thread Stefan Hajnoczi
Add an API for registering vm change state handlers with a well-defined ordering. This is necessary when handlers depend on each other. Small coding style fixes are included to make checkpatch.pl happy. Signed-off-by: Stefan Hajnoczi --- include/sysemu/sysemu.h | 2 ++ vl.c

  1   2   3   4   >