[Qemu-devel] [PATCH 2/4] xen: Import other xen/io/*.h

2019-06-17 Thread Anthony PERARD
Following "xen: Fix build with public headers", import other Xen public headers that are describing interfaces. Import fbif.h, kbdif.h, netif.h, console.h, xenbus.h, protocols.h. While editing xenfb.c, remove the include of event_channel.h as it isn't needed. The headers are cleaned up a bit whi

Re: [Qemu-devel] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-17 Thread Kevin Wolf
Am 17.06.2019 um 18:01 hat Max Reitz geschrieben: > >>> Should new implicit/explicit > >>> filters be created above or under them? > >> > >> That was always the most difficult question we had when we introduced > >> filters. > >> > >> The problem is that we never answered it in our code base. > >>

Re: [Qemu-devel] [PATCH v4 05/11] tests/vm: add vm-boot-{ssh, serial}- targets

2019-06-17 Thread Philippe Mathieu-Daudé
On 6/17/19 6:38 AM, Gerd Hoffmann wrote: > For testing/troubleshooting convinience. "convenience" (v3) > make vm-boot-serial- > Boot guest, with the serial console on stdio. > > make vm-boot-ssh- > Boot guest, login via ssh. > > Signed-off-by: Gerd Hoffmann > Tested-by: Thomas Huth > ---

Re: [Qemu-devel] [PATCH 1/3] target/tricore: Use DisasContextBase API

2019-06-17 Thread Richard Henderson
On 6/17/19 7:35 AM, Bastian Koppelmann wrote: > this gets rid of the copied fields of TriCore's DisasContext and now > uses the shared DisasContextBase, which is necessary for the conversion > to translate_loop. > > Signed-off-by: Bastian Koppelmann > --- > target/tricore/translate.c | 98 ++

Re: [Qemu-devel] [PATCH 0/4] qapi: block-dirty-bitmap-remove transaction action

2019-06-17 Thread Kevin Wolf
Am 17.06.2019 um 13:37 hat Vladimir Sementsov-Ogievskiy geschrieben: > 08.06.2019 1:26, John Snow wrote: > > > > > > On 6/3/19 8:00 AM, Vladimir Sementsov-Ogievskiy wrote: > >> Hi all! > >> > >> Here is block-dirty-bitmap-remove transaction action. > >> > >> It is used to do transactional movemen

Re: [Qemu-devel] [PATCH 4/4] xen: Avoid VLA

2019-06-17 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 16:41 > To: qemu-devel@nongnu.org > Cc: xen-de...@lists.xenproject.org; Anthony Perard > ; Stefano Stabellini > ; Paul Durrant > Subject: [PATCH 4/4] xen: Avoid VLA > > Avoid using a varia

Re: [Qemu-devel] [PATCH 3/3] target/tricore: Use translate_loop

2019-06-17 Thread Richard Henderson
On 6/17/19 7:35 AM, Bastian Koppelmann wrote: > +static void tricore_tr_translate_insn(DisasContextBase *dcbase, CPUState > *cpu) > +{ > +DisasContext *ctx = container_of(dcbase, DisasContext, base); > +CPUTriCoreState *env = cpu->env_ptr; > + > +ctx->opcode = cpu_ldl_code(env, ctx->ba

Re: [Qemu-devel] [PATCH v4 09/11] tests/vm: netbsd autoinstall, using serial console

2019-06-17 Thread Philippe Mathieu-Daudé
On 6/17/19 6:38 AM, Gerd Hoffmann wrote: > Instead of fetching the prebuilt image from patchew download the install > iso and prepare the image locally. Install to disk, using the serial > console. Create qemu user, configure ssh login. Install packages > needed for qemu builds. > > Signed-off-

Re: [Qemu-devel] [PATCH 1/4] xen: Fix build with public headers

2019-06-17 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 16:41 > To: qemu-devel@nongnu.org > Cc: xen-de...@lists.xenproject.org; Anthony Perard > ; Stefano Stabellini > ; Paul Durrant > Subject: [PATCH 1/4] xen: Fix build with public headers > >

Re: [Qemu-devel] [PATCH] tcg: Fix mmap lock assert on translation failure

2019-06-17 Thread Richard Henderson
On 6/17/19 9:18 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> Check page flags before letting an invalid pc cause a SIGSEGV. >> >> Prepare for eventially validating PROT_EXEC. The current wrinkle being >> that we have a problem with our implementation of signals. We should >> be us

Re: [Qemu-devel] [PATCH 3/4] xen: Import Xen public headers used by xen-hvm.c

2019-06-17 Thread Anthony PERARD
On Mon, Jun 17, 2019 at 05:15:51PM +0100, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 17 June 2019 16:41 > > To: qemu-devel@nongnu.org > > Cc: xen-de...@lists.xenproject.org; Anthony Perard > > ; Stefano Stabellini > > ;

Re: [Qemu-devel] [PATCH v4 10/11] tests/vm: fedora autoinstall, using serial console

2019-06-17 Thread Philippe Mathieu-Daudé
On 6/17/19 6:38 AM, Gerd Hoffmann wrote: > Download the install iso and prepare the image locally. Install to > disk, using the serial console. Create qemu user, configure ssh login. > Install packages needed for qemu builds. > > Yes, we have docker images for fedora. But for trouble-shooting i

Re: [Qemu-devel] [PATCH v4 04/11] tests/vm: proper guest shutdown

2019-06-17 Thread Philippe Mathieu-Daudé
On 6/17/19 6:38 AM, Gerd Hoffmann wrote: > When not running in snapshot mode ask the guest to poweroff and wait for > this to finish instead of simply quitting qemu, so the guest can flush > pending updates to disk. > > Signed-off-by: Gerd Hoffmann > Tested-by: Thomas Huth Tags from v3: Reviewe

Re: [Qemu-devel] [PULL 0/4] docs queue

2019-06-17 Thread Peter Maydell
t; > The following changes since commit 5d0e5694470d2952b4f257bc985cac8c89b4fd92: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2019-06-17 11:55:14 +0100) > > are available in the Git repository at: > > https://git.linaro.org/

Re: [Qemu-devel] [PATCH v4 03/11] tests/vm: run test builds on snapshot

2019-06-17 Thread Philippe Mathieu-Daudé
On 6/17/19 6:38 AM, Gerd Hoffmann wrote: > The build script doesn't shutdown the guest VMs properly, > which results in filesystem corruption and guest boot > failures sooner or later. > > Use the --snapshot to run builds on a snapshot, > That way killing the VM doesn't corrupt the base image. >

Re: [Qemu-devel] [PATCH v4 07/11] tests/vm: openbsd autoinstall, using serial console

2019-06-17 Thread Philippe Mathieu-Daudé
On 6/17/19 6:38 AM, Gerd Hoffmann wrote: > Instead of fetching the prebuilt image from patchew download the install > iso and prepare the image locally. Install to disk, using the serial > console. Create qemu user, configure ssh login. Install packages > needed for qemu builds. > > Signed-off-

Re: [Qemu-devel] [PATCH v5 1/6] machine: Convert the valid cpu types to use cpu_model

2019-06-17 Thread Eduardo Habkost
On Mon, Jun 17, 2019 at 05:33:43PM +0200, Igor Mammedov wrote: > On Mon, 17 Jun 2019 17:15:21 +0200 > Philippe Mathieu-Daudé wrote: [...] > > Yes. Eduardo and you should write some lines to explain this, and then > > we will follow :) > Unfortunately I don't recall details anymore. One could check

Re: [Qemu-devel] [PATCH 3/4] xen: Import Xen public headers used by xen-hvm.c

2019-06-17 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 16:41 > To: qemu-devel@nongnu.org > Cc: xen-de...@lists.xenproject.org; Anthony Perard > ; Stefano Stabellini > ; Paul Durrant > Subject: [PATCH 3/4] xen: Import Xen public headers used by

Re: [Qemu-devel] [PATCH 2/4] xen: Import other xen/io/*.h

2019-06-17 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 16:41 > To: qemu-devel@nongnu.org > Cc: xen-de...@lists.xenproject.org; Anthony Perard > ; Stefano Stabellini > ; Paul Durrant > Subject: [PATCH 2/4] xen: Import other xen/io/*.h > > Follo

Re: [Qemu-devel] [PATCH] tcg: Fix mmap lock assert on translation failure

2019-06-17 Thread Alex Bennée
Richard Henderson writes: > Check page flags before letting an invalid pc cause a SIGSEGV. > > Prepare for eventially validating PROT_EXEC. The current wrinkle being > that we have a problem with our implementation of signals. We should > be using a vdso like the kernel, but we instead put th

Re: [Qemu-devel] [SeaBIOS] [QEMU] [PATCH v3 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190617150950.5264-1-shmuel.eider...@oracle.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/ba

Re: [Qemu-devel] [PATCH] hw/arm/msf2-som: Exit when the cpu is not the expected one

2019-06-17 Thread Alistair Francis
On Mon, Jun 17, 2019 at 9:19 AM Philippe Mathieu-Daudé wrote: > > This machine correctly defines its default_cpu_type to cortex-m3 > and report an error if the user requested another cpu_type, > however it does not exit, and this can confuse users trying > to use another core: > > $ qemu-system-

Re: [Qemu-devel] [PATCH 3/3] target/tricore: Use translate_loop

2019-06-17 Thread Richard Henderson
On 6/17/19 7:35 AM, Bastian Koppelmann wrote: > +static void tricore_tr_init_disas_context(DisasContextBase *dcbase, > + CPUState *cs) > { > +DisasContext *ctx = container_of(dcbase, DisasContext, base); > CPUTriCoreState *env = cs->env_ptr; > +

[Qemu-devel] [Bug 1833101] Re: vexpress-a9 (but not -a15) creates two pl111 LCDs due to duplicate sysbus_create_simple("pl111", ...) calls

2019-06-17 Thread Peter Maydell
Our vexpress-a9 model instantiates two PL111s because the hardware has two PL111s. One is on the daughterboard, at address 0x1002, and the other is on the motherboard, at address 0x40001F000. The vexpress-a15 hardware has only one PL111, which is why you only see one being created for that har

Re: [Qemu-devel] [Xen-devel] [PATCH 3/4] xen: Import Xen public headers used by xen-hvm.c

2019-06-17 Thread Anthony PERARD
On Mon, Jun 17, 2019 at 05:45:44PM +0100, Anthony PERARD wrote: > On Mon, Jun 17, 2019 at 05:15:51PM +0100, Paul Durrant wrote: > > AFAICT the only place (apart from legacy code in xen_common.h) that > > params.h is necessary is in xen_suspend_notifier(). I wonder whether > > that would be better m

Re: [Qemu-devel] [SeaBIOS] [QEMU] [PATCH v3 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190617150950.5264-1-shmuel.eider...@oracle.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190617150950.5264-1-shmuel.eider...@oracle.com Type: series Subject: [SeaBIOS] [QEMU] [PATCH v

Re: [Qemu-devel] [PATCH] hw/arm/msf2-som: Exit when the cpu is not the expected one

2019-06-17 Thread Eduardo Habkost
On Mon, Jun 17, 2019 at 06:01:36PM +0200, Philippe Mathieu-Daudé wrote: > This machine correctly defines its default_cpu_type to cortex-m3 > and report an error if the user requested another cpu_type, > however it does not exit, and this can confuse users trying > to use another core: > > $ qemu

Re: [Qemu-devel] [PATCH 3/4] xen: Import Xen public headers used by xen-hvm.c

2019-06-17 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 17 June 2019 17:46 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Stefano Stabellini > > Subject: Re: [PATCH 3/4] xen: Import Xen public headers used by xen-hvm.c > >

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

2019-06-17 Thread Alistair Francis
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. > > Signed-off-by: Bin Meng > --- > > hw/riscv/sifive_test.c | 4 > include/hw/riscv/sifive_test.h | 3 ++- > 2 files changed, 6 inser

Re: [Qemu-devel] [PATCH 3/7] KVM: i386: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-17 Thread Paolo Bonzini
On 17/06/19 13:34, Liran Alon wrote: > Putting this all together, in case kernel doesn’t support extracting > nested-state, there is no decent way to know if guest is running > nested-virtualization. Which means that in theory we always need to > fail migration in case kernel doesn’t support KVM_CA

Re: [Qemu-devel] [PATCH 4/4] block: drop bs->job

2019-06-17 Thread Kevin Wolf
Am 06.06.2019 um 17:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > Drop remaining users of bs->job: > 1. assertions actually duplicated by assert(!bs->refcnt) > 2. trace-point seems not enough reason to change stream_start to return >BlockJob pointer > 3. Restricting creation of two jobs ba

Re: [Qemu-devel] [PATCH 6/7] KVM: i386: Add support for save and restore nested state

2019-06-17 Thread Paolo Bonzini
On 15/06/19 03:14, Liran Alon wrote: >> @@ -1368,6 +1369,13 @@ int kvm_arch_init_vcpu(CPUState *cs) >> if (has_xsave) { >> env->xsave_buf = qemu_memalign(4096, sizeof(struct kvm_xsave)); >> } >> + >> +nested_state_len = kvm_max_nested_state_length(); >> +if (nested_state_len

Re: [Qemu-devel] [PATCH 4/7] linux-headers: import improved definition of KVM_GET/SET_NESTED_STATE structs

2019-06-17 Thread Paolo Bonzini
On 16/06/19 10:29, Liran Alon wrote: > > I think this is cleaner. > > -Liran Yes, it is. I'll post it to k...@vger.kernel.org. Are you going to send v2 of this series or shall I? Paolo

Re: [Qemu-devel] [PATCH v1 3/4] disas/riscv: Fix `rdinstreth` constraint

2019-06-17 Thread Alistair Francis
On Fri, Jun 14, 2019 at 2:41 AM Palmer Dabbelt wrote: > > On Fri, 17 May 2019 15:11:04 PDT (-0700), Alistair Francis wrote: > > From: Michael Clark > > > > The constraint for `rdinstreth` was comparing the csr number to 0xc80, > > which is `cycleh` instead. Fix this. > > > > Author: Wladimir J. v

Re: [Qemu-devel] [PATCH] RISC-V: Fix a memory leak when realizing a sifive_e

2019-06-17 Thread Alistair Francis
On Sun, Jun 16, 2019 at 1:15 AM Palmer Dabbelt wrote: > > On Fri, 14 Jun 2019 05:25:50 PDT (-0700), phi...@redhat.com wrote: > > On 6/14/19 2:08 PM, Palmer Dabbelt wrote: > >> Coverity pointed out a memory leak in riscv_sifive_e_soc_realize(), > >> where a pair of recently added MemoryRegion insta

Re: [Qemu-devel] [PATCH 4/4] xen: Avoid VLA

2019-06-17 Thread Anthony PERARD
On Mon, Jun 17, 2019 at 05:39:09PM +0100, Paul Durrant wrote: > > @@ -632,6 +633,8 @@ static void xen_sync_dirty_bitmap(XenIOState *state, > > return; > > } > > > > +bitmap = g_new0(unsigned long, bitmap_size); > > + > > How hot is this function? It looks (unsurprisingly) like t

Re: [Qemu-devel] [PATCH v4] virtio-scsi: restart DMA after iothread

2019-06-17 Thread Paolo Bonzini
On 17/06/19 14:29, Kevin Wolf wrote: > But in the end, if Paolo feels strongly that for whatever reason > propagating events through the real device tree isn't good, let's get > the bug fixed with whatever hack it takes. It is actually good, but the implementation in hw/scsi is ugly because it sin

Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts

2019-06-17 Thread Roman Kagan
On Mon, Jun 17, 2019 at 11:23:01AM -0300, Eduardo Habkost wrote: > On Mon, Jun 17, 2019 at 01:48:59PM +, Roman Kagan wrote: > > On Sat, Jun 15, 2019 at 05:05:05PM -0300, Eduardo Habkost wrote: > > > The current default value for hv-spinlocks is 0x (meaning > > > "never retry"). However

Re: [Qemu-devel] [PATCH 4/7] linux-headers: import improved definition of KVM_GET/SET_NESTED_STATE structs

2019-06-17 Thread Liran Alon
> On 17 Jun 2019, at 20:32, Paolo Bonzini wrote: > > On 16/06/19 10:29, Liran Alon wrote: >> >> I think this is cleaner. >> >> -Liran > > Yes, it is. I'll post it to k...@vger.kernel.org. Are you going to send > v2 of this series or shall I? > > Paolo The KVM patch is already submitted

Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts

2019-06-17 Thread Eduardo Habkost
On Mon, Jun 17, 2019 at 05:32:13PM +, Roman Kagan wrote: > On Mon, Jun 17, 2019 at 11:23:01AM -0300, Eduardo Habkost wrote: > > On Mon, Jun 17, 2019 at 01:48:59PM +, Roman Kagan wrote: > > > On Sat, Jun 15, 2019 at 05:05:05PM -0300, Eduardo Habkost wrote: > > > > The current default value f

[Qemu-devel] [PATCH 0/6] Six minor M-profile bugfixes

2019-06-17 Thread Peter Maydell
This series fixes half a dozen miscellaneous minor bugs in our M-profile emulation. (The condbits fix also affects A-profile cores.) thanks -- PMM Peter Maydell (6): target/arm: NS BusFault on vector table fetch escalates to NS HardFault arm v8M: Forcibly clear negative-priority exception

[Qemu-devel] [PATCH 2/6] arm v8M: Forcibly clear negative-priority exceptions on deactivate

2019-06-17 Thread Peter Maydell
To prevent execution priority remaining negative if the guest returns from an NMI or HardFault with a corrupted IPSR, the v8M interrupt deactivation process forces the HardFault and NMI to inactive based on the current raw execution priority, even if the interrupt the guest is trying to deactivate

[Qemu-devel] [PATCH 3/6] target/arm: v8M: Check state of exception being returned from

2019-06-17 Thread Peter Maydell
In v8M, an attempt to return from an exception which is not active is an illegal exception return. For this purpose, exceptions which can configurably target either Secure or NonSecure are not considered to be active if they are configured for the opposite security state for the one we're trying to

[Qemu-devel] [PATCH 6/6] target/arm: Execute Thumb instructions when their condbits are 0xf

2019-06-17 Thread Peter Maydell
Thumb instructions in an IT block are set up to be conditionally executed depending on a set of condition bits encoded into the IT bits of the CPSR/XPSR. The architecture specifies that if the condition bits are 0b this means "always execute" (like 0b1110), not "never execute"; we were treatin

[Qemu-devel] [PATCH 5/6] hw/timer/armv7m_systick: Forbid non-privileged accesses

2019-06-17 Thread Peter Maydell
Like most of the v7M memory mapped system registers, the systick registers are accessible to privileged code only and user accesses must generate a BusFault. We implement that for registers in the NVIC proper already, but missed it for systick since we implement it as a separate device. Correct the

[Qemu-devel] [PATCH 4/6] target/arm: Use _ra versions of cpu_stl_data() in v7M helpers

2019-06-17 Thread Peter Maydell
In the various helper functions for v7M/v8M instructions, use the _ra versions of cpu_stl_data() and friends. Otherwise we may get wrong behaviour or an assert() due to not being able to locate the TB if there is an exception on the memory access or if it performs an IO operation when in icount mod

[Qemu-devel] [PATCH 1/6] target/arm: NS BusFault on vector table fetch escalates to NS HardFault

2019-06-17 Thread Peter Maydell
In the M-profile architecture, when we do a vector table fetch and it fails, we need to report a HardFault. Whether this is a Secure HF or a NonSecure HF depends on several things. If AIRCR.BFHFNMINS is 0 then HF is always Secure, because there is no NonSecure HardFault. Otherwise, the answer dep

[Qemu-devel] [QEMU PATCH v3 1/9] KVM: Introduce kvm_arch_destroy_vcpu()

2019-06-17 Thread 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 not free memory tha

[Qemu-devel] [QEMU PATCH v3 0/9]: KVM: i386: Add support for save and restore of nested state

2019-06-17 Thread Liran Alon
Hi, This series aims to add support for QEMU to be able to migrate VMs that are running nested hypervisors. In order to do so, it utilizes the new IOCTLs introduced in KVM commit 8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") which was created for this purpose. 1st patch introduce kvm

[Qemu-devel] [QEMU PATCH v3 2/9] KVM: i386: Use symbolic constant for #DB/#BP exception constants

2019-06-17 Thread Liran Alon
Reviewed-by: Nikita Leshenko Reviewed-by: Krish Sadhukhan Signed-off-by: Liran Alon --- target/i386/kvm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 29889aa6b001..738dd91ff3cc 100644 --- a/target/i386/kvm.c +++ b/targe

[Qemu-devel] [QEMU PATCH v3 4/9] KVM: i386: Block migration for vCPUs exposed with nested virtualization

2019-06-17 Thread 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 from KVM that shoul

[Qemu-devel] [QEMU PATCH v3 5/9] linux-headers: i386: Modify struct kvm_nested_state to have explicit fields for data

2019-06-17 Thread 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 struct as "data.vmx

[Qemu-devel] [QEMU PATCH v3 3/9] KVM: i386: Re-inject #DB to guest with updated DR6

2019-06-17 Thread 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. See KVM's handle_exc

[Qemu-devel] [QEMU PATCH v3 7/9] KVM: i386: Add support for save and restore nested state

2019-06-17 Thread 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 Leshenko Signed-off-

[Qemu-devel] [QEMU PATCH v3 6/9] vmstate: Add support for kernel integer types

2019-06-17 Thread Liran Alon
Reviewed-by: Nikita Leshenko Reviewed-by: Maran Wilson Signed-off-by: Liran Alon --- include/migration/vmstate.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 9224370ed59a..a85424fb0483 100644 --- a/includ

[Qemu-devel] [QEMU PATCH v3 9/9] KVM: i386: Remove VMX migration blocker

2019-06-17 Thread Liran Alon
This effectively reverts d98f26073beb ("target/i386: kvm: add VMX migration blocker"). This can now be done because previous commits added support for Intel VMX migration. AMD SVM migration is still blocked. This is because kernel KVM_CAP_{GET,SET}_NESTED_STATE in case of AMD SVM is not implemen

Re: [Qemu-devel] [PATCH v4] virtio-scsi: restart DMA after iothread

2019-06-17 Thread Kevin Wolf
Am 17.06.2019 um 19:23 hat Paolo Bonzini geschrieben: > On 17/06/19 14:29, Kevin Wolf wrote: > > But in the end, if Paolo feels strongly that for whatever reason > > propagating events through the real device tree isn't good, let's get > > the bug fixed with whatever hack it takes. > > It is actua

[Qemu-devel] [QEMU PATCH v3 8/9] KVM: i386: Add support for KVM_CAP_EXCEPTION_PAYLOAD

2019-06-17 Thread 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 a L2 pending except

Re: [Qemu-devel] [Xen-devel] [PATCH 0/4] Fix build of Xen support + cleanup

2019-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190617154105.32323-1-anthony.per...@citrix.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190617154105.32323-1-anthony.per...@citrix.com Type: series Subject: [Xen-devel] [PATCH 0/4] F

Re: [Qemu-devel] [PATCH] tcg: Fix mmap lock assert on translation failure

2019-06-17 Thread Alex Bennée
Richard Henderson writes: > On 6/17/19 9:18 AM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> Check page flags before letting an invalid pc cause a SIGSEGV. >>> >>> Prepare for eventially validating PROT_EXEC. The current wrinkle being >>> that we have a problem with our implement

[Qemu-devel] [RFC PATCH v2 00/35] Initial support of multi-process qemu

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Initial support of multi-process qemu Started with the presentation in October 2017 made by Marc-Andre (Red Hat) and Konrad Wilk (Oracle) (http://events17.linuxfoundation.org/sites/events/files/slides/KVM%20FORUM%20multi-process.pdf, https://www.youtube.com/watch?v=Kq1-coHh

[Qemu-devel] [RFC PATCH v2 03/35] multi-process: add a command line option for debug file

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Can be used with -d rdebug command options when starting qemu. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- include/qemu/log.h | 1 + util/log.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/q

[Qemu-devel] [RFC PATCH v2 06/35] multi-process: build system for remote device process

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Modify Makefile to support the building of the remote device process. Implements main() function of remote device process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Makefile| 5 +++- Makefile.obj

[Qemu-devel] [RFC PATCH v2 07/35] multi-process: define proxy-link object

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Defines proxy-link object which forms the communication link between QEMU & emulation program. Adds functions to configure members of proxy-link object instance. Adds functions to send and receive messages over the communication channel. Adds GMainLoop to handle events rec

[Qemu-devel] [RFC PATCH v2 05/35] multi-process: Add config option for multi-process QEMU

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Add a configuration option to separate multi-process code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- configure | 11 +++ 1 file changed, 11 insertions(+) diff --git a/configure b/configure index e1ad87b69

[Qemu-devel] [RFC PATCH v2 08/35] multi-process: add functions to synchronize proxy and remote endpoints

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman In some cases, for example MMIO read, QEMU has to wait for the remote to complete a command before proceeding. An eventfd based mechanism is added to synchronize QEMU & remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena U

[Qemu-devel] [RFC PATCH v2 14/35] multi-process: PCI BAR write handling for proxy & remote endpoints

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Proxy device object implements handler for PCI BAR writes. The handler sends BAR_WRITE message to the remote process with the BAR address and value to be written The remote process implements handler for BAR_WRITE message. Signed-off-by: Jagannathan Raman Signed-off-by:

[Qemu-devel] [RFC PATCH v2 01/35] multi-process: memory: alloc RAM from file at offset

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. This will be needed for the following patches. Signed-off-by: Jagannathan Raman Signed-off-by:

[Qemu-devel] [RFC PATCH v2 02/35] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman qemu_thread_cancel() added to destroy a given running thread. This will be needed in the following patches. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 10

[Qemu-devel] [RFC PATCH v2 04/35] multi-process: Add stub functions to facilate build of multi-process

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Add stub functions that are needed during compile time but not in runtime. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- accel/stubs/kvm-stub.c| 5 +++ accel/stubs/tcg-stub.c| 85

[Qemu-devel] [RFC PATCH v2 15/35] multi-process: PCI BAR read handling for proxy & remote endpoints

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Proxy device object implements the read handler for PCI BAR accesses. The handler sends BAR_READ message to the remote process. The remote process implements handler for BAR_READ message. Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: Joh

[Qemu-devel] [RFC PATCH v2 11/35] multi-process: setup memory manager for remote device

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman sync_sysmem_msg_t message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM.

[Qemu-devel] [RFC PATCH v2 12/35] multi-process: remote process initialization

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Adds the handler to process message from QEMU, Initialize remote process main loop, handles SYNC_SYSMEM message by updating its "system_memory" container using shared file descriptors received from QEMU. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signe

[Qemu-devel] [RFC PATCH v2 20/35] multi-process: Add QMP & extend HMP commands to list remote info

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Add query-remote QMP command and extend "info" HMP command, to list the remote objects used by QEMU. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- hmp-commands-info.hx | 16 +++ hmp.h

[Qemu-devel] [RFC PATCH v2 23/35] multi-process: configure remote side devices

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Add functions to configure remote devices. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/proxy/qemu-proxy.c | 38 ++- include/hw/proxy/qemu-proxy.h | 2 ++ include/io/proxy-l

[Qemu-devel] [RFC PATCH v2 16/35] multi-process: Add LSI device proxy object

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Adds proxy-lsi53c895a object, as a derivative of the pci-proxy-dev object. This object is the proxy for the lsi53c895a object instantiated by the remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- hw/proxy

[Qemu-devel] [RFC PATCH v2 24/35] multi-process: add qdev_proxy_add to create proxy devices

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva This is handled while parsing the command line options. The parsed options are being sent to remote process as the messgaes containing JSON strings. Changes in v2: - parse socket and command suboptions of drive/device commands; Signed-off-by: Jagannathan Raman Signed-off

[Qemu-devel] [RFC PATCH v2 13/35] multi-process: introduce proxy object

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Defines a PCI Device proxy object as a parent of TYPE_PCI_DEVICE. PCI Proxy Object is responsible for registering PCI BARs,i MemoryRegionOps to handle access to the BARs and forwarding those to the remote device. PCI Proxy object intercepts config space reads and writes. In

[Qemu-devel] [RFC PATCH v2 10/35] multi-process: setup a machine object for remote device process

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman remote-machine object sets up various subsystems of the remote device process. Instantiate PCI host bridge object and initialize RAM, IO & PCI memory regions. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- exec.c

[Qemu-devel] [RFC PATCH v2 31/35] multi-process: Extend drive_add to add drive to remote device

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Extend drive_add HMP command to hot-plug drive to a remote device. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- device-hotplug.c| 7 +++ hmp-commands.hx | 5 +++-- hw/proxy/monitor.c | 35

[Qemu-devel] [RFC PATCH v2 21/35] multi-process: Extend monitor commands to add a device to remote process

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Extend device_add QMP & HMP commands to hotplug device to a remote process Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- hmp-commands.hx | 4 +- hmp.c | 8 hw/proxy/monitor.c | 9

[Qemu-devel] [RFC PATCH v2 19/35] multi-process: store info about the remote process

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Store info about the remote process in a hash table, so that it could be used later for QMP/HMP commands. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- Changes in v2: - moved the “remote_devs” object from “pcms” (PCMa

[Qemu-devel] [RFC PATCH v2 17/35] multi-process: Synchronize remote memory

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Add memory-listener object which is used to keep the view of the RAM in sync between QEMU and remote process. A MemoryListener is registered for system-memory AddressSpace. The listener sends SYNC_SYSMEM message to the remote process when memory listener commits the change

[Qemu-devel] [RFC PATCH v2 32/35] multi-process: Extend drive_del command to delete drive from remote process

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Extend drive_del HMP command to hot-unplug drive from a remote process. Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- blockdev.c| 9 + hw/proxy/monitor.c| 26 +

[Qemu-devel] [RFC PATCH v2 22/35] multi-process: Extend monitor commands to remove device from remote process

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Extend device_del QMP & HMP commands to hot-unplug device from remote process. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- hmp.c | 9 + hw/proxy/monitor.c | 15 ++ includ

[Qemu-devel] [RFC PATCH v2 26/35] multi-process: remote: use fd for socket from parent process

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/remote/remote-main.c b/remote/remote-main.c index 8db2f36b90..5c26339ed7 1

[Qemu-devel] [RFC PATCH v2 18/35] multi-process: create IOHUB object to handle irq

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman IOHUB object is added to manage PCI IRQs. It uses KVM_IRQFD ioctl to create irqfd to injecting PCI interrupts to the guest. IOHUB object forwards the irqfd to the remote process. Remote process uses this fd to directly send interrupts to the guest, bypassing QEMU. Signed-

[Qemu-devel] [RFC PATCH v2 25/35] multi-process: remote: add setup_devices and setup_drive msg processing

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Receive by remote side the configuration messages and build the device object from JSON device descriptions. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- Changes in v2: - for new command line suboptions with libvirt

[Qemu-devel] [RFC PATCH v2 28/35] multi-process: add processing of remote drive and device command line

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Add processing of command line options drive and device. After remote devices are created along with their proxies, signal the proxies to finish the configuration steps. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Ch

[Qemu-devel] [RFC PATCH v2 27/35] multi-process: remote: add create_done condition

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Do not allow BAR,MMIO handlers and irq setup to run before the configuration of the devices completes. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 29 - 1 file chang

[Qemu-devel] [PULL 00/16] Monitor patches for 2019-06-17

2019-06-17 Thread Markus Armbruster
The following changes since commit 076243ffe6c1b687e9e6d98348c3bf3398df78f3: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-docs-20190617' into staging (2019-06-17 16:41:25 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monit

[Qemu-devel] [RFC PATCH v2 29/35] multi-process: add heartbeat timer and signal handler

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Add a signal handler for launched remote processes and set up the heartbit timer for remote processes. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/proxy/qemu-proxy.c | 101 +++

[Qemu-devel] [RFC PATCH v2 33/35] multi-process: Extend block_resize command to support remote block device

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman Extend block_resize QMP/HMP commands to resize block devices on a remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Changes in v2: - removed separate QMP/HMP command. - extended existing QMP command

[Qemu-devel] [RFC PATCH v2 35/35] multi-process: add configure and usage information

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- Changes in v2: - since the changes were made to use existing device/drive options, the document was modified to reflect this. --- docs/qemu-multiprocess.txt | 59

[Qemu-devel] [PULL 02/16] monitor: Remove unused password prompting fields

2019-06-17 Thread Markus Armbruster
From: Kevin Wolf Commit 788cf9f8c removed the code for password prompting from the monitor. Since then, the Monitor fields password_completion_cb and password_opaque have been unused. Remove them. Signed-off-by: Kevin Wolf Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Markus Armbruster Mes

[Qemu-devel] [RFC PATCH v2 34/35] multi-process: add the concept description to docs/devel/qemu-multiprocess

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- Changes in v2: - changed the command line options descriptions; - added section about communication with remote process for MMIO and QMP commands using different socke

[Qemu-devel] [Bug 1830872] Re: AARCH64 to ARMv7 mistranslation in TCG

2019-06-17 Thread Alex Bennée
** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1830872 Title: AARCH64 to ARMv7 mistranslation in TCG Status in QEMU: Fix Committed Bug des

[Qemu-devel] [PULL 13/16] monitor: Split out monitor/monitor.c

2019-06-17 Thread Markus Armbruster
From: Kevin Wolf Move the monitor core infrastructure from monitor/misc.c to monitor/monitor.c. This is code that can be shared for all targets, so compile it only once. What remains in monitor/misc.c after this patch is mostly monitor command implementations (which could move to hmp-cmds.c or q

[Qemu-devel] [Bug 1832916] Re: linux-user does not check PROT_EXEC

2019-06-17 Thread Alex Bennée
** Tags added: testcase -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1832916 Title: linux-user does not check PROT_EXEC Status in QEMU: Confirmed Bug description: At no point do we actually

[Qemu-devel] [RFC PATCH v2 09/35] multi-process: setup PCI host bridge for remote device

2019-06-17 Thread elena . ufimtseva
From: Jagannathan Raman PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. Remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by:

<    1   2   3   4   >