Re: Making QEMU easier for management tools and applications

2020-01-24 Thread Markus Armbruster
John Snow writes: > On 1/23/20 2:01 PM, Daniel P. Berrangé wrote: >> On Thu, Jan 23, 2020 at 12:58:45PM -0500, John Snow wrote: >>> Yes, I agree: Scrap and start over. >>> >>> What SHOULD the syntax look like, though? Clearly the idea of qmp-shell >>> is that it offers a convenient way to enter t

Re: [PATCH REPOST v3 16/80] arm/kzm: drop RAM size fixup

2020-01-24 Thread Igor Mammedov
On Thu, 23 Jan 2020 22:23:20 + "Chubb, Peter (Data61, Kensington NSW)" wrote: > Igor> If the user provided too large a RAM size, the code used to > Igor> complain and trim it to the max size. Now tht RAM is allocated by > Igor> generic code, that's no longer possible, so generate an error an

Re: [PATCH REPOST v3 06/80] alpha:dp264: use memdev for RAM

2020-01-24 Thread Igor Mammedov
On Thu, 23 Jan 2020 16:07:19 +0100 (CET) BALATON Zoltan wrote: > On Thu, 23 Jan 2020, Igor Mammedov wrote: > > memory_region_allocate_system_memory() API is going away, so > > replace it with memdev allocated MemoryRegion. The later is > > initialized by generic code, so board only needs to opt i

Re: [PATCH rc2 12/25] hw/timer: Add limited support for Atmel 16 bit timer peripheral

2020-01-24 Thread Thomas Huth
On 24/01/2020 01.51, Philippe Mathieu-Daudé wrote: > From: Michael Rolnik > > These were designed to facilitate testing but should provide enough > function to be useful in other contexts. Only a subset of the functions > of each peripheral is implemented, mainly due to the lack of a standard >

[Bug 1860759] [NEW] [REGRESSION] option `-snapshot` ignored with blockdev

2020-01-24 Thread Ildar
Public bug reported: After upgrade of qemu 3.1.0 → 4.2.0 I found that running with libvirt doesn't honor `-snapshot` option anymore. I.e. disk images get modified. Using `-hda` option honors `-snapshot` So I made a test case without libvirt. Testcase using 4.2.0: > qemu -hda tmp-16G.img -cdrom

[Bug 1860759] Re: [REGRESSION] option `-snapshot` ignored with blockdev

2020-01-24 Thread Ildar
JFYI, I know that snapshot=on option should be used. But `-snapshot` option exists and must work. Also libvirt doesn't yet support it: https://bugzilla.redhat.com/show_bug.cgi?id=508662 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU

Re: [PATCH] hw/s390x: Add a more verbose comment about get_machine_class() and the wrappers

2020-01-24 Thread Thomas Huth
On 23/01/2020 18.42, Cornelia Huck wrote: > On Thu, 23 Jan 2020 18:02:56 +0100 > Thomas Huth wrote: > >> While working on the "Enable adapter interruption suppression again" >> recently, I had to discover that the meaning of get_machine_class() >> and the related *_allowed() wrappers is not very

Re: [PATCH 1/5] target/s390x: Move struct DisasFields definition earlier

2020-01-24 Thread Thomas Huth
On 24/01/2020 00.22, Richard Henderson wrote: > We will want to include the struct in DisasContext. > > Signed-off-by: Richard Henderson > --- > target/s390x/translate.c | 164 --- > 1 file changed, 83 insertions(+), 81 deletions(-) Reviewed-by: Thomas Huth

Re: QEMU for aarch64 with plugins seems to fail basic consistency checks

2020-01-24 Thread Laurent Desnogues
Hello, On Fri, Jan 24, 2020 at 1:45 AM Robert Henry wrote: > > I wrote a QEMU plugin for aarch64 where the insn and mem callbacks print out > the specifics of the guest instructions as they are "executed". I expect > this trace stream to be well behaved but it is not. By well-behaved, I expect

[PULL v2 58/59] build-sys: clean up flags included in the linker command line

2020-01-24 Thread Paolo Bonzini
Some of the CFLAGS that are discovered during configure, for example compiler warnings, are being included on the linker command line because QEMU_CFLAGS is added to it. Other flags, such as the -m32, appear twice because they are included in both QEMU_CFLAGS and LDFLAGS. All this leads to confus

[PULL v2 00/59] Misc (x86 and QOM) patches for 2020-01-23

2020-01-24 Thread Paolo Bonzini
The following changes since commit 3e08b2b9cb64bff2b73fa9128c0e49bfcde0dd40: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/edk2-next-20200121' into staging (2020-01-21 15:29:25 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream fo

Re: [PATCH 2/5] target/s390x: Remove DisasFields argument from callbacks

2020-01-24 Thread Thomas Huth
On 24/01/2020 00.22, Richard Henderson wrote: > The DisasFields data is available from DisasContext. > We do not need to pass a separate argument. > > Signed-off-by: Richard Henderson > --- > target/s390x/translate.c | 417 --- > 1 file changed, 210 insertions

Re: [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd()

2020-01-24 Thread Igor Mammedov
On Thu, 23 Jan 2020 12:38:40 +0100 Igor Mammedov wrote: > Function will report error that will mention global mem_path, > which was valid the only if legacy -mem-path was used and > only in case of main RAM. > > However it doesn't work with hostmem backends > (for example: > " > qemu: -object

Re: [PATCH v3 1/4] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/22/20 2:27 AM, Wainer dos Santos Moschetta wrote: The test case may need to boot the VM with an accelerator that isn't actually enabled on the QEMU binary and/or present in the host. In this case the test behavior is undefined, and the best course of action is to skip its execution. This ch

Re: [PATCH 3/5] target/s390x: Pass DisasContext to get_field and have_field

2020-01-24 Thread Thomas Huth
On 24/01/2020 00.22, Richard Henderson wrote: > All callers pass s->fields, so we might as well pass s directly. > > Signed-off-by: Richard Henderson > --- > target/s390x/translate.c| 534 ++-- > target/s390x/translate_vx.inc.c | 609 --

Re: [PATCH v3 01/21] migration-test: Use g_free() instead of free()

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > tests/qtest/migration-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c > index 26e

Re: [PATCH v3 4/4] travis.yml: Enable acceptance KVM tests

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/22/20 2:27 AM, Wainer dos Santos Moschetta wrote: Some acceptance tests require KVM or they are skipped. Travis enables nested virtualization by default with Ubuntu 18.04 (Bionic) on x86_64. So in order to run the kvm tests, this changed the acceptance builder to run in a Bionic VM. Also it

Re: [PATCH v3 05/21] migration: Create migration_is_running()

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > This function returns if we are in the middle of a migration. > It is like migration_is_setup_or_active() with CANCELLING and COLO. > Adapt all calers that are needed. > > Signed-off-by: Juan Quintela Yes; the inclusion of cancelling is interesting

Re: [PATCH 4/5] target/s390x: Move DisasFields into DisasContext

2020-01-24 Thread Thomas Huth
On 24/01/2020 00.22, Richard Henderson wrote: > I believe that the separate allocation of DisasFields from DisasContext > was meant to limit the places from which we could access fields. But > that plan did not go unchanged, and since DisasContext contains a pointer > to fields, the substructure i

Re: [PATCH v3 06/21] migration: Don't send data if we have stopped

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > If we do a cancel, we got out without one error, but we can't do the > rest of the output as in a normal situation. > > Signed-off-by: Juan Quintela I think it's the sync that's the main problem being avoided here rather than actually the problem of

Re: [PATCH 5/5] target/s390x: Remove DisasFields argument from extract_insn

2020-01-24 Thread Thomas Huth
On 24/01/2020 00.22, Richard Henderson wrote: > The separate pointer is now redundant. > > Signed-off-by: Richard Henderson > --- > target/s390x/translate.c | 19 --- > 1 file changed, 8 insertions(+), 11 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH 0/5] target/s390x: Do not leak stack address in translate_one

2020-01-24 Thread Thomas Huth
On 24/01/2020 00.22, Richard Henderson wrote: > Thomas' patch avoids the leak, but I think we can do a bit more to > cleaning in this area, and move the structure inline to DisasContext. > Sounds like a good idea to me. Cornelia, could you please replace my patch with Richard's series? Thanks,

Re: [PATCH v3 4/4] travis.yml: Enable acceptance KVM tests

2020-01-24 Thread Thomas Huth
On 24/01/2020 10.38, Philippe Mathieu-Daudé wrote: > On 1/22/20 2:27 AM, Wainer dos Santos Moschetta wrote: >> Some acceptance tests require KVM or they are skipped. Travis >> enables nested virtualization by default with Ubuntu >> 18.04 (Bionic) on x86_64. So in order to run the kvm tests, this >>

Re: [PATCH v2 051/109] virtiofsd: add seccomp whitelist

2020-01-24 Thread Florian Weimer
* David Alan Gilbert: > +static const int syscall_whitelist[] = { > +/* TODO ireg sem*() syscalls */ > +SCMP_SYS(brk), > +SCMP_SYS(capget), /* For CAP_FSETID */ > +SCMP_SYS(capset), > +SCMP_SYS(clock_gettime), > +SCMP_SYS(gettimeofday), Is this to suppose to work on 32-bi

Re: [PATCH] build-sys: clean up flags included in the linker command line

2020-01-24 Thread Philippe Mathieu-Daudé
On 12/11/19 3:46 PM, Paolo Bonzini wrote: Some of the CFLAGS that are discovered during configure, for example compiler warnings, are being included on the linker command line because QEMU_CFLAGS is added to it. Other flags, such as the -m32, appear twice because they are included in both QEMU_C

Re: [PATCH v3 01/21] migration-test: Use g_free() instead of free()

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/23/20 12:58 PM, Juan Quintela wrote: Signed-off-by: Juan Quintela Nothing changed since v4 (apart it is now v3), however it misses: Fixes: b99784ef6c3 Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé See: https://www.mail-archive.com/qemu-devel@nongnu.org/msg672805.html ht

Re: [PATCH REPOST v3 77/80] hostmem: introduce "prealloc-threads" property

2020-01-24 Thread Igor Mammedov
On Thu, 23 Jan 2020 12:38:42 +0100 Igor Mammedov wrote: > the property will allow user to specify number of threads to use > in pre-allocation stage. It also will allow to reduce implicit > hostmem dependency on current_machine. > On object creation it will default to 1, but via machine > compat

Re: Making QEMU easier for management tools and applications

2020-01-24 Thread Daniel P . Berrangé
On Thu, Jan 23, 2020 at 04:07:09PM -0500, John Snow wrote: > > > On 1/23/20 2:01 PM, Daniel P. Berrangé wrote: > > IOW, the difficulty with configuring QEMU via JSON is not the fault > > of JSON itself, it is the lack of knowledge amongst users and docs, > > compounded by our never ending "improv

Re: [PATCH v2 051/109] virtiofsd: add seccomp whitelist

2020-01-24 Thread Dr. David Alan Gilbert
* Florian Weimer (fwei...@redhat.com) wrote: > * David Alan Gilbert: > > > +static const int syscall_whitelist[] = { > > +/* TODO ireg sem*() syscalls */ > > +SCMP_SYS(brk), > > +SCMP_SYS(capget), /* For CAP_FSETID */ > > +SCMP_SYS(capset), > > +SCMP_SYS(clock_gettime), > > >

Re: [PATCH v3 4/4] travis.yml: Enable acceptance KVM tests

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/24/20 10:44 AM, Thomas Huth wrote: On 24/01/2020 10.38, Philippe Mathieu-Daudé wrote: On 1/22/20 2:27 AM, Wainer dos Santos Moschetta wrote: Some acceptance tests require KVM or they are skipped. Travis enables nested virtualization by default with Ubuntu 18.04 (Bionic) on x86_64. So in or

Re: qemu-img convert vs writing another copy tool

2020-01-24 Thread Richard W.M. Jones
On Thu, Jan 23, 2020 at 01:21:28PM -0600, Eric Blake wrote: > On 1/23/20 12:35 PM, Richard W.M. Jones wrote: > > - Hint that the target already contains zeroes. It's almost always > >the case that we know this, but we cannot tell qemu. This was the > >cause of a big performance regressio

Re: [PATCH REPOST v3 68/80] ppc/virtex_ml507: remove unused arguments

2020-01-24 Thread David Gibson
On Thu, Jan 23, 2020 at 12:38:33PM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > Reviewed-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > CC: da...@gibson.dropbear.id.au > CC: qemu-...@nongnu.org > CC: edgar.igles...@gmail.com > --- > hw/ppc/virtex_ml507.c | 7 ++-

Re: [PATCH v2 051/109] virtiofsd: add seccomp whitelist

2020-01-24 Thread Dr. David Alan Gilbert
* Florian Weimer (fwei...@redhat.com) wrote: > * David Alan Gilbert: > > > +static const int syscall_whitelist[] = { > > +/* TODO ireg sem*() syscalls */ > > +SCMP_SYS(brk), > > +SCMP_SYS(capget), /* For CAP_FSETID */ > > +SCMP_SYS(capset), > > +SCMP_SYS(clock_gettime), > > >

Re: [PULL 0/3] Ui 20200123 patches

2020-01-24 Thread Peter Maydell
On Thu, 23 Jan 2020 at 17:41, Gerd Hoffmann wrote: > > The following changes since commit 43d1455cf84283466e5c22a217db5ef4b8197b14: > > qapi: Fix code generation with Python 3.5 (2020-01-20 12:17:38 +) > > are available in the Git repository at: > > git://git.kraxel.org/qemu tags/ui-202001

[PATCH] s390x: sigp: Fix sense running reporting

2020-01-24 Thread Janosch Frank
The logic was inversed and reported running if the cpu was stopped. Let's fix that. Signed-off-by: Janosch Frank --- target/s390x/sigp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c index 727875bb4a..286c0d6c9c 100644 --- a/target/

[PATCH v2 2/4] virtio-scsi: default num_queues to -smp N

2020-01-24 Thread Stefan Hajnoczi
Automatically size the number of request virtqueues to match the number of vCPUs. This ensures that completion interrupts are handled on the same vCPU that submitted the request. No IPI is necessary to complete an I/O request and performance is improved. Signed-off-by: Stefan Hajnoczi --- hw/c

[PATCH v2 1/4] virtio-scsi: introduce a constant for fixed virtqueues

2020-01-24 Thread Stefan Hajnoczi
The event and control virtqueues are always present, regardless of the multi-queue configuration. Define a constant so that virtqueue number calculations are easier to read. Signed-off-by: Stefan Hajnoczi --- hw/scsi/vhost-user-scsi.c | 2 +- hw/scsi/virtio-scsi.c | 7 --- i

[PATCH v2 0/4] virtio-pci: enable blk and scsi multi-queue by default

2020-01-24 Thread Stefan Hajnoczi
v2: * Let the virtio-DEVICE-pci device select num-queues because the optimal multi-queue configuration may differ between virtio-pci, virtio-mmio, and virtio-ccw [Cornelia] Enabling multi-queue on virtio-pci storage devices improves performance on SMP guests because the completion interrupt

[PATCH v2 3/4] virtio-blk: default num_queues to -smp N

2020-01-24 Thread Stefan Hajnoczi
Automatically size the number of request virtqueues to match the number of vCPUs. This ensures that completion interrupts are handled on the same vCPU that submitted the request. No IPI is necessary to complete an I/O request and performance is improved. Signed-off-by: Stefan Hajnoczi --- hw/b

Re: [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/23/20 11:58 PM, Peter Lieven wrote: Am 23.01.2020 um 22:29 schrieb Felipe Franciosi : On Jan 23, 2020, at 5:46 PM, Philippe Mathieu-Daudé wrote: On 1/23/20 1:44 PM, Felipe Franciosi wrote: When querying an iSCSI server for the provisioning status of blocks (via GET LBA STATUS), Qemu only

[PATCH v2 4/4] vhost-user-blk: default num_queues to -smp N

2020-01-24 Thread Stefan Hajnoczi
Automatically size the number of request virtqueues to match the number of vCPUs. This ensures that completion interrupts are handled on the same vCPU that submitted the request. No IPI is necessary to complete an I/O request and performance is improved. Signed-off-by: Stefan Hajnoczi --- hw/b

Re: [PATCH v8 00/11] Multi-phase reset mechanism

2020-01-24 Thread Peter Maydell
On Thu, 23 Jan 2020 at 13:28, Damien Hedde wrote: > v8: > + patch 3&5: ResettableState::count type from uint32_t to unsigned > (Philippe) We'll have to change that back if we ever want to migrate the count (migration insists on fixed-sized types), but I guess we can do that when we get to i

Re: [PATCH v2 051/109] virtiofsd: add seccomp whitelist

2020-01-24 Thread Florian Weimer
* David Alan Gilbert: > * Florian Weimer (fwei...@redhat.com) wrote: >> * David Alan Gilbert: >> >> > +static const int syscall_whitelist[] = { >> > +/* TODO ireg sem*() syscalls */ >> > +SCMP_SYS(brk), >> > +SCMP_SYS(capget), /* For CAP_FSETID */ >> > +SCMP_SYS(capset), >> > +

Re: [PATCH] s390x: sigp: Fix sense running reporting

2020-01-24 Thread Cornelia Huck
On Fri, 24 Jan 2020 05:01:37 -0500 Janosch Frank wrote: > The logic was inversed and reported running if the cpu was stopped. s/inversed/inverted/ ? > Let's fix that. > Fixes: d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNING STATUS") > Signed-off-by: Janosch Frank > --- > target/s390x

Re: [PULL v2 00/59] Misc (x86 and QOM) patches for 2020-01-23

2020-01-24 Thread Peter Maydell
On Fri, 24 Jan 2020 at 09:18, Paolo Bonzini wrote: > > The following changes since commit 3e08b2b9cb64bff2b73fa9128c0e49bfcde0dd40: > > Merge remote-tracking branch > 'remotes/philmd-gitlab/tags/edk2-next-20200121' into staging (2020-01-21 > 15:29:25 +) > > are available in the git reposit

Re: [PATCH] qemu-img: Add --target-is-zero to convert

2020-01-24 Thread Max Reitz
On 23.01.20 13:17, David Edmondson wrote: > On Tuesday, 2020-01-21 at 16:02:16 +01, Max Reitz wrote: > >> Hi, >> >> On 17.01.20 11:34, David Edmondson wrote: [...] >>> + >>> +if (!s->has_zero_init && s->target_is_new && s->min_sparse && >>> +!s->target_has_backing) { >> >> (This will

Re: [PATCH v8 00/11] Multi-phase reset mechanism

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/24/20 11:05 AM, Peter Maydell wrote: On Thu, 23 Jan 2020 at 13:28, Damien Hedde wrote: v8: + patch 3&5: ResettableState::count type from uint32_t to unsigned (Philippe) We'll have to change that back if we ever want to migrate the count (migration insists on fixed-sized types), b

Re: [PATCH v8 00/11] Multi-phase reset mechanism

2020-01-24 Thread Peter Maydell
On Fri, 24 Jan 2020 at 10:17, Philippe Mathieu-Daudé wrote: > > On 1/24/20 11:05 AM, Peter Maydell wrote: > > On Thu, 23 Jan 2020 at 13:28, Damien Hedde > > wrote: > >> v8: > >>+ patch 3&5: ResettableState::count type from uint32_t to unsigned > >> (Philippe) > > > > We'll have to chang

[Bug 1860759] Re: [REGRESSION] option `-snapshot` ignored with blockdev

2020-01-24 Thread Max Reitz
Hi, I don’t know much about libvirt, but I would have thought that any manual modification of the qemu command line isn’t supported and might always break. Anyway, from a QEMU POV, -snapshot only works with -drive (this includes -hda, etc.). It doesn’t work with -blockdev. I can see that this i

Re: [PATCH] qemu_set_log_filename: filename argument may be NULL

2020-01-24 Thread Stefan Hajnoczi
On Thu, Jan 23, 2020 at 08:36:26PM +0100, salva...@qindel.com wrote: > From: Salvador Fandino > > NULL is a valid log filename used to indicate we want to use stderr > but qemu_set_log_filename (which is called by bsd-user/main.c) was not > handling it correctly. > > That also made redundant a c

Re: [PATCH v8 00/11] Multi-phase reset mechanism

2020-01-24 Thread Damien Hedde
On 1/24/20 11:17 AM, Philippe Mathieu-Daudé wrote: > On 1/24/20 11:05 AM, Peter Maydell wrote: >> On Thu, 23 Jan 2020 at 13:28, Damien Hedde >> wrote: >>> v8: >>>    + patch 3&5: ResettableState::count type from uint32_t to unsigned >>> (Philippe) >> >> We'll have to change that back if we

Re: [PATCH] qemu_set_log_filename: filename argument may be NULL

2020-01-24 Thread Stefan Hajnoczi
On Thu, Jan 23, 2020 at 08:36:26PM +0100, salva...@qindel.com wrote: > From: Salvador Fandino > > NULL is a valid log filename used to indicate we want to use stderr > but qemu_set_log_filename (which is called by bsd-user/main.c) was not > handling it correctly. > > That also made redundant a c

Re: [PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize()

2020-01-24 Thread Igor Mammedov
On Thu, 23 Jan 2020 12:38:39 +0100 Igor Mammedov wrote: > Since all RAM is backed by hostmem backends, drop > global -mem-path invariant and simplify code. Looks like origin of removed here code is PPC, could PPC folk review this please? > Signed-off-by: Igor Mammedov > --- > CC: pbonz...@redh

Re: Making QEMU easier for management tools and applications

2020-01-24 Thread Daniel P . Berrangé
On Fri, Jan 24, 2020 at 08:59:41AM +0100, Markus Armbruster wrote: > John Snow writes: > > > On 1/23/20 2:01 PM, Daniel P. Berrangé wrote: > >> So when configuring objects you'll always provide a JSON/YAML doc. > >> They've got some clever stuff for updating objects where you can > >> provide a J

[Bug 1860553] Re: cmake crashes on qemu-alpha-user with Illegal Instruction

2020-01-24 Thread Laurent Vivier
It seems halt instruction is not implemented for qemu-user, only for qemu-system: 1286 #ifndef CONFIG_USER_ONLY ... 1365 static DisasJumpType gen_mtpr(DisasContext *ctx, TCGv vb, int regno) 1366 { 1367 int data; 1368 1369 switch (regno) { ... 1390 case 252: 1391 /* HALT */ 13

Re: [PATCH] tests/boot-serial-test: Allow the HPPA machine to shudown

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/24/20 8:02 AM, Thomas Huth wrote: On 23/01/2020 22.37, Philippe Mathieu-Daudé wrote: On 1/23/20 7:29 PM, Philippe Mathieu-Daudé wrote: On 1/23/20 5:39 AM, Thomas Huth wrote: On 23/01/2020 01.36, Philippe Mathieu-Daudé wrote: The boot-serial test uses SeaBIOS on HPPA, and expects to read

[PATCH v2 0/2] qemu-img: Add --target-is-zero to indicate that a target is blank

2020-01-24 Thread David Edmondson
qemu-img: Add --target-is-zero to indicate that a target is blank v2: - Remove target_is_zero, preferring to set has_zero_init directly (Mark Kanda). - Disallow --target-is-zero in the presence of a backing file (Max Reitz). - Add relevant documentation (Max Reitz). - @var -> @code for optio

[PATCH v2 1/2] qemu-img: Add --target-is-zero to convert

2020-01-24 Thread David Edmondson
In many cases the target of a convert operation is a newly provisioned target that the user knows is blank (filled with zeroes). In this situation there is no requirement for qemu-img to wastefully zero out the entire device. Add a new option, --target-is-zero, allowing the user to indicate that a

Re: [PATCH v8 01/11] add device_legacy_reset function to prepare for reset api change

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/23/20 2:28 PM, Damien Hedde wrote: Provide a temporary device_legacy_reset function doing what device_reset does to prepare for the transition with Resettable API. All occurrence of device_reset in the code tree are also replaced by device_legacy_reset. The new resettable API has different

[PATCH v2 2/2] doc: Use @code rather than @var for options

2020-01-24 Thread David Edmondson
Texinfo defines @var for metasyntactic variables and such terms are shown in upper-case or italics in the output of makeinfo. When considering an option to a command, such as "-n", upper-casing is undesirable as it may confuse the reader or be in conflict with the equivalent upper-case option. Rep

Re: [PATCH v3 01/21] migration-test: Use g_free() instead of free()

2020-01-24 Thread Daniel P . Berrangé
On Thu, Jan 23, 2020 at 12:58:11PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > tests/qtest/migration-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c > index 26e2e77289..b6a74a05ce 1

Re: [PATCH v3 10/21] ram_addr: Split RAMBlock definition

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We need some of the fields without having to poison everything else. > > Signed-off-by: Juan Quintela OK. (I guess the copyright matches the file we're splitting from; would be good to update the date some time). I wondered if any of the RAMBlock r

Re: [PATCH rc2 12/25] hw/timer: Add limited support for Atmel 16 bit timer peripheral

2020-01-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > From: Michael Rolnik > > These were designed to facilitate testing but should provide enough > function to be useful in other contexts. Only a subset of the functions > of each peripheral is implemented, mainly due to the lack of a standard > way to handle ele

Re: [PATCH 1/2] qdev: Introduce qdev_get_bus_device

2020-01-24 Thread Igor Mammedov
On Wed, 15 Jan 2020 23:40:24 +0100 Julia Suvorova wrote: I's add () at the end of SUJ so it would be obvious that's a function > For bus devices, it is useful to be able to handle the parent device. maybe something like that would be more clear: Add a wrapper qdev_get_bus_device() to replace de

Re: [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)

2020-01-24 Thread Felipe Franciosi
> On Jan 24, 2020, at 10:04 AM, Philippe Mathieu-Daudé > wrote: > > On 1/23/20 11:58 PM, Peter Lieven wrote: >>> Am 23.01.2020 um 22:29 schrieb Felipe Franciosi : On Jan 23, 2020, at 5:46 PM, Philippe Mathieu-Daudé wrote: > On 1/23/20 1:44 PM, Felipe Franciosi wrote: > When

Re: [PATCH v4 0/4] Improve default object property_add uint helpers

2020-01-24 Thread Felipe Franciosi
Hi Marc-Andre and Paolo, > On Dec 20, 2019, at 3:15 PM, Marc-André Lureau > wrote: > > Hi > > On Thu, Dec 19, 2019 at 10:02 PM Felipe Franciosi wrote: >> >> This improves the family of object_property_add_uintXX_ptr helpers by >> enabling >> a default getter/setter only when desired. To pre

Re: [Bug 1860759] Re: [REGRESSION] option `-snapshot` ignored with blockdev

2020-01-24 Thread Ildar
Max, thanks a lot for the explanation. Do you mean that snapshot-ing isn't possible totally for blockdev? Then I guess some libvirt users are in trouble :(( Actually I didn't quite caught the reason why a blockdev supports backing but not {backing to a file on /tmp then promptly deleted} ? What's t

Re: [PATCH rc2 12/25] hw/timer: Add limited support for Atmel 16 bit timer peripheral

2020-01-24 Thread Philippe Mathieu-Daudé
Hello Sarah, On 1/24/20 11:42 AM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: From: Michael Rolnik These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly du

Re: [PATCH 1/7] migration/block-dirty-bitmap: refactor incoming state to be one struct

2020-01-24 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > Move enabled_bitmaps and finish_lock, which are part of incoming state > to DirtyBitmapLoadState, and make static global variable to store state > instead of static local one. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > migration/block-dirty-bitm

Re: [PATCH v3 11/21] multifd: multifd_send_pages only needs the qemufile

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela OK, although this is a side effect of multifd_send_state being a global rather than part of RAMState which might have been cleaner. Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 8 > 1 file c

Re: [PATCH 2/7] migration/block-dirty-bitmap: rename finish_lock to just lock

2020-01-24 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > finish_lock is bad name, as lock used not only on process end. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela I still would like the cleanup suggested on the previous patch, but this one is ok.

Re: Maintainers, please add Message-Id: when merging patches

2020-01-24 Thread Stefan Hajnoczi
On Thu, Jan 23, 2020 at 06:18:57PM +0100, Kevin Wolf wrote: > Am 22.01.2020 um 13:28 hat Kevin Wolf geschrieben: > > Am 22.01.2020 um 13:02 hat Stefan Hajnoczi geschrieben: > > > Around 66% of qemu.git commits since v4.1.0 include a Message-Id: tag. > > > Hooray! > > > > > > Message-Id: referenc

Re: [PATCH rc2 22/25] target/avr: Update build system

2020-01-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > From: Michael Rolnik > > Make AVR support buildable > > Signed-off-by: Michael Rolnik > Tested-by: Philippe Mathieu-Daudé > Reviewed-by: Aleksandar Markovic > Message-Id: <20200118191416.19934-19-mrol...@gmail.com> > Signed-off-by: Richard Henderson > --- >

Re: [PATCH 4/7] migration/block-dirty-bitmap: keep bitmap state for all bitmaps

2020-01-24 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > Keep bitmap state for disabled bitmaps too. Keep the state until the > end of the process. It's needed for the following commit to implement > bitmap postcopy canceling. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > - > -b = g_new(DirtyBitmapLoadB

Re: [PULL 000/108] virtiofs queue

2020-01-24 Thread Peter Maydell
On Thu, 23 Jan 2020 at 19:32, Dr. David Alan Gilbert wrote: > > * Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > > From: "Dr. David Alan Gilbert" > > > > The following changes since commit b7c359c748a2e3ccb97a184b9739feb2cd48de2f: > > > > Merge remote-tracking branch > > 'remotes/

Re: [PATCH v3 01/21] migration-test: Use g_free() instead of free()

2020-01-24 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Thu, Jan 23, 2020 at 12:58:11PM +0100, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> --- >> tests/qtest/migration-test.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test

[Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices

2020-01-24 Thread Salil Mehta
Hello, I am working on vCPU Hotplug feature for ARM64 and I am in mid of understanding some aspect of device_add/device_del interface of the QEMU. Observations: 1. Any object initialised by qmp_device_add() gets into /machine/unattached container. I traced the flow to code leg inside device_set

Re: [PATCH v3 12/21] multifd: multifd_queue_page only needs the qemufile

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 19caf5ed4d..d4c829bc77 100644 > --

Re: [PATCH v3 13/21] multifd: multifd_send_sync_main only needs the qemufile

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index d4c829bc77..2783dc60f4 100644

Re: [PATCH rc2 00/25] target/avr merger

2020-01-24 Thread Michael Rolnik
Tested-by: Michael Rolnik The only thing I want to change is instead of -kernel put -bios in qemu-doc.texi file. Should I send a new series? On Fri, Jan 24, 2020 at 2:51 AM Philippe Mathieu-Daudé wrote: > This is the AVR port from Michael release (merge) candidate 2. > > Since v1 [1]: > - Ad

Re: [PATCH v3 14/21] multifd: Use qemu_target_page_size()

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We will make it cpu independent. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > i

Re: [PATCH rc2 14/25] target/avr: Add section about AVR into QEMU documentation

2020-01-24 Thread Michael Rolnik
Hi Thomas. I will fix it. thanks. Michael Rolnik On Fri, Jan 24, 2020 at 9:14 AM Thomas Huth wrote: > On 24/01/2020 01.51, Philippe Mathieu-Daudé wrote: > > From: Michael Rolnik > > > > Signed-off-by: Michael Rolnik > > Message-Id: <20200118191416.19934-16-mrol...@gmail.com> > > Signed-off-b

Re: [PATCH v3 15/21] migration: Make checkpatch happy with comments

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 14b7cbdbc9..c24b4cc771 100644 >

Re: [PATCH] s390x: sigp: Fix sense running reporting

2020-01-24 Thread David Hildenbrand
On 24.01.20 11:05, Cornelia Huck wrote: > On Fri, 24 Jan 2020 05:01:37 -0500 > Janosch Frank wrote: > >> The logic was inversed and reported running if the cpu was stopped. > > s/inversed/inverted/ ? > >> Let's fix that. >> > > Fixes: d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNING STAT

Re: [PULL v2 00/11] target/hppa patch queue

2020-01-24 Thread Peter Maydell
On Thu, 23 Jan 2020 at 22:10, Richard Henderson wrote: > > Change since v1: > * Incorporate Phil's -vga none fix for boot-serial-test (patch 7). > > > r~ > > > The following changes since commit 6918ab2570bcf942651e69f7ad975e137679738b: > > Merge remote-tracking branch > 'remotes/pmaydell/tag

Re: [PATCH rc2 12/25] hw/timer: Add limited support for Atmel 16 bit timer peripheral

2020-01-24 Thread Sarah Harris
Hi, Do I understand correctly that you need Ed to email a "Signed-off-by: Ed Robbins " himself? Ed's cc'ed already, but I'll email him directly to make sure he's seen this discussion. Sarah On Fri, 24 Jan 2020 11:51:13 +0100 Philippe Mathieu-Daudé wrote: > Hello Sarah, > > On 1/24/20 11:42

Re: [PATCH v3 17/21] multifd: Split multifd code into its own file

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Good, ram.c was getting WAY too big. Reviewed-by: Dr. David Alan Gilbert > --- > migration/Makefile.objs | 1 + > migration/migration.c | 1 + > migration/multifd.c | 891 +++

Re: [PULL] RISC-V Patches for the 5.0 Soft Freeze, Part 1

2020-01-24 Thread Peter Maydell
On Thu, 23 Jan 2020 at 18:43, Palmer Dabbelt wrote: > On Thu, 23 Jan 2020 06:38:07 PST (-0800), Peter Maydell wrote: > > Hi. This pull request doesn't seem to be signed with the GPG > > key that I have on record for you... > > When I moved to Google I got a Yubikey and made new subkeys for it. If

Re: [PATCH 0/3] migration: add sztd compression

2020-01-24 Thread Juan Quintela
Denis Plotnikov wrote: > zstd date compression algorithm shows better performance on data compression. > It might be useful to employ the algorithm in VM migration to reduce CPU > usage. > A user will be able to choose between those algorithms, therefor compress-type > migration parameter is adde

Re: [RFC 0/2] virtio-rng: add a control queue

2020-01-24 Thread Amit Shah
On Thu, 2020-01-23 at 16:16 +0100, Laurent Vivier wrote: > The kernel needs sometime to be able to cancel an ongoing command. > > For instance, if the virtio-rng device uses the egd backend > and this backend doesn't provide data, the buffer provided by the > kernel is kept as long as it is needed

Re: [PATCH] migration/multifd: fix nullptr access in multifd_send_terminate_threads

2020-01-24 Thread Juan Quintela
Zhimin Feng wrote: > If the multifd_send_threads is not created when migration is failed, > multifd_save_cleanup would be called twice. In this senario, the > multifd_send_state is accessed after it has been released, the result > is that the source VM is crashing down. > > Here is the coredump st

Re: [PATCH v3 18/21] migration: Make no compression operations into its own structure

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It will be used later. > > Signed-off-by: Juan Quintela > > --- > Move setup of ->ops helper to proper place (wei) > Rename s/none/nocomp/ (dave) > Introduce MULTIFD_FLAG_NOCOMP > right order of arguments for print > --- > migration/migration.c |

Re: [PULL 2/4] q800: add a block backend to the PRAM

2020-01-24 Thread Peter Maydell
On Tue, 7 Jan 2020 at 14:40, Laurent Vivier wrote: > > This allows to save and restore the content of the PRAM. > It may be useful if we want to check the configuration or to change it. > > The backend is added using mtd interface, for instance: > > ... -drive file=pram.img,format=raw,if=mtd .

Re: [PATCH rc2 00/25] target/avr merger

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/24/20 12:41 PM, Michael Rolnik wrote: Tested-by: Michael Rolnik mailto:mrol...@gmail.com>> Thanks a lot! The only thing I want to change is instead of -kernel put -bios in qemu-doc.texi file. Should I send a new series? Please do NOT :) Richard can do the trivial fixup directly. On F

Re: [PATCH rc2 12/25] hw/timer: Add limited support for Atmel 16 bit timer peripheral

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/24/20 9:16 AM, Thomas Huth wrote: On 24/01/2020 01.51, Philippe Mathieu-Daudé wrote: From: Michael Rolnik These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly

Re: [PATCH rc2 12/25] hw/timer: Add limited support for Atmel 16 bit timer peripheral

2020-01-24 Thread Philippe Mathieu-Daudé
On 1/24/20 11:42 AM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: From: Michael Rolnik These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack o

Re: [PATCH v3 07/21] migration: Make multifd_save_setup() get an Error parameter

2020-01-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > Reviewed-by: Dr. David Alan Gilbert > --- > > We can't trust that error_in is not NULL. Create a local_error. > --- > migration/migration.c | 4 +++- > migration/ram.c | 2 +- > migration/ram.h | 2 +-

Re: [PULL v2 11/14] semihosting: add qemu_semihosting_console_inc for SYS_READC

2020-01-24 Thread Peter Maydell
On Thu, 9 Jan 2020 at 14:19, Alex Bennée wrote: > > From: Keith Packard > > Provides a blocking call to read a character from the console using > semihosting.chardev, if specified. This takes some careful command > line options to use stdio successfully as the serial ports, monitor > and semihost

Re: [PATCH] s390x: sigp: Fix sense running reporting

2020-01-24 Thread Janosch Frank
On 1/24/20 1:03 PM, David Hildenbrand wrote: > On 24.01.20 11:05, Cornelia Huck wrote: >> On Fri, 24 Jan 2020 05:01:37 -0500 >> Janosch Frank wrote: >> >>> The logic was inversed and reported running if the cpu was stopped. >> >> s/inversed/inverted/ ? >> >>> Let's fix that. >>> >> >> Fixes: d1b46

Re: [PATCH] s390x: sigp: Fix sense running reporting

2020-01-24 Thread Janosch Frank
On 1/24/20 11:05 AM, Cornelia Huck wrote: > On Fri, 24 Jan 2020 05:01:37 -0500 > Janosch Frank wrote: > >> The logic was inversed and reported running if the cpu was stopped. > > s/inversed/inverted/ ? Ok > >> Let's fix that. >> > > Fixes: d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNI

  1   2   3   >