[Qemu-devel] [Bug 1755912] Re: qemu-system-x86_64 crashed with SIGABRT when using option -vga qxl

2018-07-20 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 1:2.12+dfsg-3ubuntu3 --- qemu (1:2.12+dfsg-3ubuntu3) cosmic; urgency=medium * d/p/lp-1755912-qxl-fix-local-renderer-crash.patch: Fix an issue triggered by migrations with UI frontends or frequent guest resolution changes (LP: #1755912

Re: [Qemu-devel] [PATCH v1 06/17] background snapshot: add helpers to manage a copy of ram block list

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:49PM +0300, Denis Plotnikov wrote: > The VM ramblock list may be changed during the snapshotting. > We want to make sure that we have the same ramblock list as it > was at the time of snapshot beginning. > So, we create a copy of the list at the beginning of the snapsh

Re: [Qemu-devel] [PATCH v1 05/17] ram: extend the data structures for background snapshotting

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:48PM +0300, Denis Plotnikov wrote: > Signed-off-by: Denis Plotnikov > --- > include/exec/ram_addr.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h > index 6cbc02aa0f..5b403d537d 100644 > --- a/includ

Re: [Qemu-devel] [PATCH v2] nvic: Change NVIC to support ARMv6-M

2018-07-20 Thread Julia Suvorova via Qemu-devel
On 19.07.2018 19:25, Peter Maydell wrote: On 19 July 2018 at 13:16, Julia Suvorova wrote: The differences from ARMv7-M NVIC are: * ARMv6-M only supports up to 32 external interrupts (configurable feature already). The ICTR is reserved. * Active Bit Register is reserved. * ARMv6-M s

[Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.

2018-07-20 Thread remy . noel
From: "Remy Noel" When removing a secondary-vga device and then adding it back (or adding an other one), qemu aborts with: "RAMBlock ":00:02.0/vga.vram" already registered, abort!". It is caused by the vram staying registered, preventing vga replugging. Signed-off-by: Remy Noel --- hw

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-20 Thread Fam Zheng
On Thu, 07/19 13:57, John Snow wrote: > Should we instead modify the test in this case to not attempt to take a > lock on a device we know cannot meaningfully store state, or is it your > preference to attempt to maintain such a list in the raw driver itself? > > I guess we never want QEMU to try

[Qemu-devel] [PATCH] vhost: check region type before casting

2018-07-20 Thread Tiwei Bie
Check region type first before casting the memory region to IOMMUMemoryRegion. Otherwise QEMU will abort with below error message when casting non-IOMMU memory region: vhost_iommu_region_add: Object 0x561f28bce4f0 is not an instance of type qemu:iommu-memory-region Fixes: cb1efcf462a2 ("iommu: Ad

Re: [Qemu-devel] [PATCH] migration: fix potential overflow in multifd send

2018-07-20 Thread Juan Quintela
Peter Xu wrote: > I would guess it won't happen normally, but this should ease Coverity. > CID 1394385: Integer handling issues (OVERFLOW_BEFORE_WIDEN) Potentially overflowing expression "pages->used * 8192U" with type "unsigned int" (32 bits, unsigned) is evaluated using

Re: [Qemu-devel] [PATCH v1 10/17] background snapshots: adapt the page queueing code for using page copies

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:53PM +0300, Denis Plotnikov wrote: > The background snapshot uses memeory page copying to seal the page > memory content. The patch adapts the migration infrastructure to save > copies of the pages. Again, since previous page only defined some fields that are firstly

Re: [Qemu-devel] [PATCH v2 10/18] qjson: report an error if there are multiple results

2018-07-20 Thread Markus Armbruster
Marc-André Lureau writes: > qobject_from_jsonv() returns a single object. Let's make sure that > during parsing we don't leak an intermediary object. Instead of > returning the last object, set a parsing error. > > Also, the lexer/parser keeps consuming all the data. There might be an > error set

Re: [Qemu-devel] [PULL for-3.0 0/1] Tracing patches

2018-07-20 Thread Peter Maydell
On 19 July 2018 at 17:25, Stefan Hajnoczi wrote: > The following changes since commit ea6abffa8a08d832feb759d359d5b935e3087cf7: > > Update version for v3.0.0-rc1 release (2018-07-17 18:15:19 +0100) > > are available in the Git repository at: > > git://github.com/stefanha/qemu.git tags/tracing-

Re: [Qemu-devel] [PATCH] hw/intc/arm_gicv3_its: downgrade error_report to warn_report in kvm_arm_its_reset

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 02:22, Jia He wrote: > Hi Peter。 Thanks for the comments > > On 7/19/2018 8:41 PM, Peter Maydell Wrote: >> On 19 July 2018 at 04:11, Jia He wrote: >>> In scripts/arch-run.bash of kvm-unit-tests, it will check the qemu >>> output log with: >>> if [ -z "$(echo "$errors" | grep -v

Re: [Qemu-devel] [PATCH v2] nvic: Change NVIC to support ARMv6-M

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 09:09, Julia Suvorova wrote: > On 19.07.2018 19:25, Peter Maydell wrote: >> >> On 19 July 2018 at 13:16, Julia Suvorova wrote: >>> >>> The differences from ARMv7-M NVIC are: >>>* ARMv6-M only supports up to 32 external interrupts >>> (configurable feature already). The

Re: [Qemu-devel] [PATCH] vhost: check region type before casting

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 09:36, Tiwei Bie wrote: > Check region type first before casting the memory region > to IOMMUMemoryRegion. Otherwise QEMU will abort with below > error message when casting non-IOMMU memory region: > > vhost_iommu_region_add: Object 0x561f28bce4f0 is not an > instance of type qe

Re: [Qemu-devel] [PATCH v1 07/17] background snapshot: introduce page buffer

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:50PM +0300, Denis Plotnikov wrote: > To limit the amount of memory used by the background snapshot > a memory limiter is used which called "page buffer". > In fact, it's a memory page counter limiting the page allocation. > Currently, the limit of pages is hardcoded bu

Re: [Qemu-devel] [PATCH v1 00/17] Background snapshots

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:43PM +0300, Denis Plotnikov wrote: > The workflow to make a snapshot is the following: > 1. Pause the vm > 2. Make a snapshot of block devices using the scheme of your choice > 3. Turn on background-snapshot migration capability > 4. Start the migration using the desti

Re: [Qemu-devel] [PATCH v1 15/17] kvm: add vCPU failed memeory access processing

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:58PM +0300, Denis Plotnikov wrote: > Is done with support of the KVM patch returning the faulting address. > > Signed-off-by: Denis Plotnikov I feel like these two kvm-related patches can be put at the end of the series as an extension to kvm support. E.g., without

Re: [Qemu-devel] [PULL 0/2] Net patches

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 01:45, Jason Wang wrote: > The following changes since commit 9f2b67e1ca43c84ed37ebd027e7e77a0f2f8ef65: > > Merge remote-tracking branch > 'remotes/alistair/tags/pull-riscv-pull-20180719' into staging (2018-07-19 > 17:21:43 +0100) > > are available in the git repository at:

Re: [Qemu-devel] [PATCH v1 07/17] background snapshot: introduce page buffer

2018-07-20 Thread Paolo Bonzini
On 18/07/2018 17:41, Denis Plotnikov wrote: > +static void ram_page_buffer_decrease_used(void) > +{ > +qemu_event_reset(&ram_state->page_buffer.used_decreased); > +atomic_dec(&ram_state->page_buffer.used); > +qemu_event_set(&ram_state->page_buffer.used_decreased); As Peter noted, only

Re: [Qemu-devel] [PATCH v2 10/18] qjson: report an error if there are multiple results

2018-07-20 Thread Marc-André Lureau
Hi On Fri, Jul 20, 2018 at 10:49 AM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> qobject_from_jsonv() returns a single object. Let's make sure that >> during parsing we don't leak an intermediary object. Instead of >> returning the last object, set a parsing error. >> >> Also, the

Re: [Qemu-devel] [PULL for-3.0 0/1] tcg-next pull

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 05:03, Richard Henderson wrote: > Just one patch for rc2, fixing a bug with an aarch64 host > emulating sve instructions. > > > r~ > > > The following changes since commit e1ea55668ffe6ce558a063f3a9621b761738e1f2: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-p

Re: [Qemu-devel] [PATCH v1 08/17] migration: add helpers to change VM memory protection rights

2018-07-20 Thread Dr. David Alan Gilbert
* Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > Signed-off-by: Denis Plotnikov > --- > migration/ram.c | 54 + > migration/ram.h | 3 +++ > 2 files changed, 57 insertions(+) > > diff --git a/migration/ram.c b/migration/ram.c > index 27d34034

Re: [Qemu-devel] [PATCH v1 10/17] background snapshots: adapt the page queueing code for using page copies

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:53PM +0300, Denis Plotnikov wrote: [...] > @@ -1003,13 +1008,18 @@ static int ram_save_page(RAMState *rs, > PageSearchStatus *pss, bool last_stage) > } else { > pages = save_zero_page(rs, block, offset, p); Now save_zero_page() is not called by ram_sa

Re: [Qemu-devel] [v23 1/2] virtio-crypto: Add virtio crypto device specification

2018-07-20 Thread Longpeng (Mike)
On 2018/1/10 1:05, Halil Pasic wrote: > > > On 12/30/2017 10:35 AM, Longpeng(Mike) wrote: >> From: Gonglei >> >> The virtio crypto device is a virtual crypto device (ie. hardware >> crypto accelerator card). Currently, the virtio crypto device provides >> the following crypto services: CIPHE

Re: [Qemu-devel] [RFC v3] qemu: Add virtio pmem device

2018-07-20 Thread Pankaj Gupta
> /* > * virtio-balloon-pci: This extends VirtioPCIProxy. > */ > diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c > new file mode 100644 > index 00..08c96d7e80 > --- /dev/null > +++ b/hw/virtio/virtio-pmem.c > @@ -0,0 +1,241

Re: [Qemu-devel] [RFC v3] qemu: Add virtio pmem device

2018-07-20 Thread Pankaj Gupta
> > > > > + > > > > > +typedef struct VirtIOPMEMresp { > > > > > +int ret; > > > > > +} VirtIOPMEMResp; > > > > > + > > > > > +typedef struct VirtIODeviceRequest { > > > > > +VirtQueueElement elem; > > > > > +int fd; > > > > > +VirtIOPMEM *pmem; > > > > > +VirtIOPMEMResp resp;

[Qemu-devel] [PATCH] qstring: Fix integer overflow

2018-07-20 Thread liujunjie
From: l00425170 The incoming parameters "start" and "end" is int type in qstring_from_substr(), but this function can be called by qstring_from_str, which is size_t type in strlen(str). It may result in coredump when called g_malloc later. One scene to triger is to call hmp "into tlb", which may

Re: [Qemu-devel] [PATCH v4 12/20] intc/arm_gic: Implement virtualization extensions in gic_(deactivate|complete_irq)

2018-07-20 Thread Peter Maydell
On 18 July 2018 at 14:22, Luc Michel wrote: > > > On 07/17/2018 03:32 PM, Peter Maydell wrote: >> On 14 July 2018 at 18:15, Luc Michel wrote: >>> Implement virtualization extensions in the gic_deactivate_irq() and >>> gic_complete_irq() functions. When a guest tries to deactivat or end an >> >>

Re: [Qemu-devel] [PATCH v6 11/11] linux-user: Add availability control to some syscalls

2018-07-20 Thread Aleksandar Markovic
> > From: Aleksandar Rikalo > > > > Signed-off-by: Aleksandar Markovic > > Signed-off-by: Stefan Markovic > > --- > > linux-user/strace.c | 14 +- > > linux-user/syscall.c | 25 + > > 2 files changed, 38 insertions(+), 1 deletion(-) If this patch gets a pro

[Qemu-devel] [PATCH 0/4] target/arm: Implement tailchaining for M profile cores

2018-07-20 Thread Peter Maydell
Tailchaining is an optimization in handling of exception return for M-profile cores: if we are about to pop the exception stack for an exception return, but there is a pending exception which is higher priority than the priority we are returning to, then instead of unstacking and then immediately t

[Qemu-devel] [PATCH 2/4] target/arm: Initialize exc_secure correctly in do_v7m_exception_exit()

2018-07-20 Thread Peter Maydell
In do_v7m_exception_exit(), we use the exc_secure variable to track whether the exception we're returning from is secure or non-secure. Unfortunately the statement initializing this was accidentally inside an "if (env->v7m.exception != ARMV7M_EXCP_NMI)" conditional, which meant that we were using t

[Qemu-devel] [PATCH 3/4] target/arm: Restore M-profile CONTROL.SPSEL before any tailchaining

2018-07-20 Thread Peter Maydell
On exception return for M-profile, we must restore the CONTROL.SPSEL bit from the EXCRET value before we do any kind of tailchaining, including for the derived exceptions on integrity check failures. Otherwise we will give the guest an incorrect EXCRET.SPSEL value on exception entry for the tailcha

[Qemu-devel] [PATCH 1/4] target/arm: Improve exception-taken logging

2018-07-20 Thread Peter Maydell
Improve the exception-taken logging by logging in v7m_exception_taken() the exception we're going to take and whether it is secure/nonsecure. This requires us to move logging at many callsites from after the call to before it, so that the logging appears in a sensible order. (This will make tail-

[Qemu-devel] [PATCH 4/4] target/arm: Implement tailchaining for M profile cores

2018-07-20 Thread Peter Maydell
Tailchaining is an optimization in handling of exception return for M-profile cores: if we are about to pop the exception stack for an exception return, but there is a pending exception which is higher priority than the priority we are returning to, then instead of unstacking and then immediately t

Re: [Qemu-devel] [PATCH] hw/arm/spitz: Move problematic nand_init() code to realize function

2018-07-20 Thread Peter Maydell
On 19 July 2018 at 14:15, Thomas Huth wrote: > nand_init() does not only create the NAND device, it also realizes > the device with qdev_init_nofail() already. So we must not call > nand_init() from an instance_init function like sl_nand_init(), > otherwise we get superfluous NAND devices in the Q

Re: [Qemu-devel] [PATCH for-3.0] po: Don't include comments with location

2018-07-20 Thread Peter Maydell
On 18 July 2018 at 07:10, Stefan Weil wrote: > Those comments change often when ui/gtk.c is changed and are not > really useful. > > Add also a new translation for German (still to be done for all other > languages). > > Signed-off-by: Stefan Weil > --- I think I agree with Philippe that we shou

[Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Peter Maydell
In kill_qemu() we have an assert that checks that the QEMU process didn't dump core: assert(!WCOREDUMP(wstatus)); Unfortunately the WCOREDUMP macro here means the resulting message is not very easy to comprehend on at least some systems: ahci-test: tests/libqtest.c:113: kill_qemu: Ass

[Qemu-devel] [kvm-unit-tests PATCH v2 0/4] arm: add GICv2 MMIO tests

2018-07-20 Thread Andre Przywara
I found this in one my branches: this is an updated version of what I sent end of 2016 [1]. I tried to address all comments that Drew and Eric had at the time. Please have a look whether this makes sense. Changelog v1..v2: - made many functions void - use symbolic name for first SPI being number 3

[Qemu-devel] [kvm-unit-tests PATCH v2 2/4] arm/arm64: GIC: basic GICv2 MMIO tests

2018-07-20 Thread Andre Przywara
This adds an MMIO subtest to the GIC test. It accesses some generic GICv2 registers and does some sanity tests, like checking for some of them being read-only. Signed-off-by: Andre Przywara --- arm/gic.c | 91 +++ arm/unittests.cfg | 18

[Qemu-devel] [kvm-unit-tests PATCH v2 1/4] mark exit() and abort() as non-returning functions

2018-07-20 Thread Andre Przywara
exit() and abort() are functions that never return, and (at least) GCC has an attribute to flag those functions accordingly. This allows the compiler to do further optimizations and to omit various warnings about uninitialized variables, for instance. Since the actual "play-dead" function is in (in

[Qemu-devel] [kvm-unit-tests PATCH v2 3/4] arm/arm64: GICv2: add GICD_IPRIORITYR testing

2018-07-20 Thread Andre Przywara
Some tests for the IPRIORITY registers. The significant number of bits is IMPLEMENTATION DEFINED, but should be the same for every IRQ. Also these registers must be byte-accessible. Check that accesses beyond the implemented IRQ limit are actually read-as-zero/write-ignore. Signed-off-by: Andre Pr

[Qemu-devel] [kvm-unit-tests PATCH v2 4/4] arm/arm64: GICv2: add GICD_ITARGETSR testing

2018-07-20 Thread Andre Przywara
Some tests for the ITARGETS registers. Bits corresponding to non-existent CPUs must be RAZ/WI. These registers must be byte-accessible, also check that accesses beyond the implemented IRQ limit are actually read-as-zero/write-ignore. Signed-off-by: Andre Przywara --- arm/gic.c | 43 +

[Qemu-devel] [PATCH 2/2] RFC: seccomp: prefer SCMP_ACT_KILL_PROCESS if available

2018-07-20 Thread Marc-André Lureau
The upcoming libseccomp release should have SCMP_ACT_KILL_PROCESS action (https://github.com/seccomp/libseccomp/issues/96). SCMP_ACT_KILL_PROCESS is preferable to immediately terminate the offending process, rather than having the SIGSYS handler running. Use SECCOMP_GET_ACTION_AVAIL to check avai

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 0/4] arm: add GICv2 MMIO tests

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 16:39, Andre Przywara wrote: > I found this in one my branches: this is an updated version of what I sent > end of 2016 [1]. I tried to address all comments that Drew and Eric had at > the time. > Please have a look whether this makes sense. > > Changelog v1..v2: > - made many f

[Qemu-devel] [PATCH 1/2] seccomp: use SIGSYS signal instead of killing the thread

2018-07-20 Thread Marc-André Lureau
The seccomp action SCMP_ACT_KILL results in immediate termination of the thread that made the bad system call. However, qemu being multi-threaded, it keeps running. There is no easy way for parent process / management layer (libvirt) to know about that situation. Instead, the default SIGSYS handle

[Qemu-devel] [PATCH 0/2] RFC: seccomp action, prefer KILL_PROCESS or TRAP

2018-07-20 Thread Marc-André Lureau
Hi, The seccomp action SCMP_ACT_KILL results in immediate termination of the thread that made the bad system call. However, qemu being multi-threaded, it keeps running. There is no easy way for parent process / management layer (libvirt) to know about that situation. Instead, the default SIGSYS h

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Philippe Mathieu-Daudé
On 07/20/2018 12:39 PM, Peter Maydell wrote: > In kill_qemu() we have an assert that checks that the QEMU process > didn't dump core: > assert(!WCOREDUMP(wstatus)); > > Unfortunately the WCOREDUMP macro here means the resulting message > is not very easy to comprehend on at least some

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 16:48, Philippe Mathieu-Daudé wrote: > On 07/20/2018 12:39 PM, Peter Maydell wrote: >> In kill_qemu() we have an assert that checks that the QEMU process >> didn't dump core: >> assert(!WCOREDUMP(wstatus)); >> >> Unfortunately the WCOREDUMP macro here means the resul

Re: [Qemu-devel] [PATCH 1/2] seccomp: use SIGSYS signal instead of killing the thread

2018-07-20 Thread Daniel P . Berrangé
On Fri, Jul 20, 2018 at 05:44:24PM +0200, Marc-André Lureau wrote: > The seccomp action SCMP_ACT_KILL results in immediate termination of > the thread that made the bad system call. However, qemu being > multi-threaded, it keeps running. There is no easy way for parent > process / management layer

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Richard Henderson
On 07/20/2018 08:49 AM, Peter Maydell wrote: > On 20 July 2018 at 16:48, Philippe Mathieu-Daudé wrote: >> On 07/20/2018 12:39 PM, Peter Maydell wrote: >>> In kill_qemu() we have an assert that checks that the QEMU process >>> didn't dump core: >>> assert(!WCOREDUMP(wstatus)); >>> >>> U

Re: [Qemu-devel] [PATCH v3 14/40] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf)

2018-07-20 Thread Aleksandar Markovic
> From: Richard Henderson > Sent: Thursday, July 19, 2018 9:13 PM > > > case NM_POOL32A7: > > +{ > > +switch ((ctx->opcode >> 3) & 0x07) { > > +case NM_POOL32AXF: > > +gen_pool32axf_nanomips_insn(env, ctx); > > +break; > > +

Re: [Qemu-devel] [PATCH 1/4] target/arm: Improve exception-taken logging

2018-07-20 Thread Richard Henderson
On 07/20/2018 07:56 AM, Peter Maydell wrote: > Improve the exception-taken logging by logging in > v7m_exception_taken() the exception we're going to take > and whether it is secure/nonsecure. > > This requires us to move logging at many callsites from after the > call to before it, so that the lo

Re: [Qemu-devel] [PATCH 2/4] target/arm: Initialize exc_secure correctly in do_v7m_exception_exit()

2018-07-20 Thread Richard Henderson
On 07/20/2018 07:56 AM, Peter Maydell wrote: > In do_v7m_exception_exit(), we use the exc_secure variable to track > whether the exception we're returning from is secure or non-secure. > Unfortunately the statement initializing this was accidentally > inside an "if (env->v7m.exception != ARMV7M_EXC

Re: [Qemu-devel] [PATCH 3/4] target/arm: Restore M-profile CONTROL.SPSEL before any tailchaining

2018-07-20 Thread Richard Henderson
On 07/20/2018 07:56 AM, Peter Maydell wrote: > On exception return for M-profile, we must restore the CONTROL.SPSEL > bit from the EXCRET value before we do any kind of tailchaining, > including for the derived exceptions on integrity check failures. > Otherwise we will give the guest an incorrect

Re: [Qemu-devel] [PATCH 4/4] target/arm: Implement tailchaining for M profile cores

2018-07-20 Thread Richard Henderson
On 07/20/2018 07:56 AM, Peter Maydell wrote: > Tailchaining is an optimization in handling of exception return > for M-profile cores: if we are about to pop the exception stack > for an exception return, but there is a pending exception which > is higher priority than the priority we are returning

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 17:14, Richard Henderson wrote: > You already print the file, just include the line. Perhaps > > fprintf(stderr, > "%s:%d: kill_qemu tried to terminate QEMU " > "process but it dumped core with signal %s\n", > __FILE__, __LINE__, strsignal(WTERMS

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-20 Thread Eric Blake
On 07/19/2018 12:57 PM, John Snow wrote: Should we instead modify the test in this case to not attempt to take a lock on a device we know cannot meaningfully store state, or is it your preference to attempt to maintain such a list in the raw driver itself? I guess we never want QEMU to try to l

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-20 Thread Eric Blake
On 07/20/2018 03:24 AM, Fam Zheng wrote: On Thu, 07/19 13:57, John Snow wrote: Should we instead modify the test in this case to not attempt to take a lock on a device we know cannot meaningfully store state, or is it your preference to attempt to maintain such a list in the raw driver itself?

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Richard Henderson
On 07/20/2018 09:25 AM, Peter Maydell wrote: > On 20 July 2018 at 17:14, Richard Henderson > wrote: >> You already print the file, just include the line. Perhaps >> >> fprintf(stderr, >> "%s:%d: kill_qemu tried to terminate QEMU " >> "process but it dumped core with signal %

Re: [Qemu-devel] [PATCH] vhost: check region type before casting

2018-07-20 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180720083644.1431-1-tiwei@intel.com Subject: [Qemu-devel] [PATCH] vhost: check regio

Re: [Qemu-devel] [PATCH] monitor: print message when using 'help' with an unknown command

2018-07-20 Thread Eric Blake
On 07/19/2018 11:39 AM, Collin Walling wrote: On 07/19/2018 12:31 PM, Markus Armbruster wrote: You neglected to cc: maintainers. Cc'ing them increases the odds your patch will be noticed and picked up. You can use scripts/get_maintainer.pl to find maintainers. You don't have to do anything fo

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Peter Maydell
On 20 July 2018 at 17:36, Richard Henderson wrote: > On 07/20/2018 09:25 AM, Peter Maydell wrote: >> On 20 July 2018 at 17:14, Richard Henderson >> wrote: >>> You already print the file, just include the line. Perhaps >>> >>> fprintf(stderr, >>> "%s:%d: kill_qemu tried to terminate Q

Re: [Qemu-devel] [PATCH for-3.0 ?] tests/libqtest: Improve kill_qemu() assert

2018-07-20 Thread Richard Henderson
On 07/20/2018 09:45 AM, Peter Maydell wrote: >> For non-linux, I peeked at the OpenBSD man page, which says >> >> The strsignal() function first appeared in AT&T System V >> Release 4 UNIX and was reimplemented for NetBSD 1.0. >> >> That suggests all of the extant BSDs should have it. >> >> Min

Re: [Qemu-devel] [PATCH] monitor: print message when using 'help' with an unknown command

2018-07-20 Thread Dr. David Alan Gilbert
* Collin Walling (wall...@linux.ibm.com) wrote: > On 07/19/2018 03:18 PM, Dr. David Alan Gilbert wrote: > > * Collin Walling (wall...@linux.ibm.com) wrote: > >> When typing 'help' followed by an unknown command, QEMU will > >> not print anything to the command line to let the user know > >> they ty

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-20 Thread John Snow
On 07/20/2018 04:24 AM, Fam Zheng wrote: > On Thu, 07/19 13:57, John Snow wrote: >> Should we instead modify the test in this case to not attempt to take a >> lock on a device we know cannot meaningfully store state, or is it your >> preference to attempt to maintain such a list in the raw drive

Re: [Qemu-devel] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-20 Thread Farhan Ali
I am seeing another issue pop up, in a different test. Even though it's a different assertion, it might be related based on the call trace. Stack trace of thread 276199: #0 0x03ff8473e274 raise (libc.so.6) #1 0x03ff847239a8 abort (libc.so.6) #2 0x03ff847362ce __assert_fail_base (l

Re: [Qemu-devel] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-20 Thread Nishanth Aravamudan via Qemu-devel
On 20.07.2018 [15:11:14 -0400], Farhan Ali wrote: > I am seeing another issue pop up, in a different test. Even though it's a > different assertion, it might be related based on the call trace. Just to be clear, this does not happen if you revert the original patch (i.e., the one you bisected to b

Re: [Qemu-devel] [PATCH] monitor: print message when using 'help' with an unknown command

2018-07-20 Thread Collin Walling
On 07/20/2018 12:40 PM, Eric Blake wrote: > On 07/19/2018 11:39 AM, Collin Walling wrote: >> On 07/19/2018 12:31 PM, Markus Armbruster wrote: >>> You neglected to cc: maintainers.  Cc'ing them increases the odds your >>> patch will be noticed and picked up.  You can use >>> scripts/get_maintainer.p

[Qemu-devel] [PATCH v2] monitor: print message when using 'help' with an unknown command

2018-07-20 Thread Collin Walling
When typing 'help' followed by an unknown command, QEMU will not print anything to the command line to let the user know they typed a bad command. Let's fix this by printing a message to the monitor when this happens. For example: (qemu) help xyz unknown command: 'xyz' Reported-by: Stefan

Re: [Qemu-devel] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-20 Thread Farhan Ali
On 07/20/2018 03:32 PM, Nishanth Aravamudan wrote: On 20.07.2018 [15:11:14 -0400], Farhan Ali wrote: I am seeing another issue pop up, in a different test. Even though it's a different assertion, it might be related based on the call trace. Just to be clear, this does not happen if you reve

Re: [Qemu-devel] issue about numa configure

2018-07-20 Thread Eduardo Habkost
Hi, On Thu, Jul 19, 2018 at 09:21:36AM +, linzhecheng wrote: > Hi, all > I found that qemu has a constraint in function numa_node_parse now: > If (node->has_memdev != have_memdevs) { > Error_setg(errp, "qemu: memdev option must be specified for either " > "all

Re: [Qemu-devel] [PATCH for-3.1 v2] python: Use io.StringIO

2018-07-20 Thread Eduardo Habkost
On Wed, Jul 18, 2018 at 07:36:28PM -0300, Philippe Mathieu-Daudé wrote: > Both Python 2.7 and 3 support the same io.StringIO to > handle unicode strings. > > Python 2.6 requires special care, but since 7f2b55443a his > support was removed. Stop caring, drop the ImportError check. > > Use the comm

Re: [Qemu-devel] [PATCH v3 01/11] block/nbd-client: split channel errors from export errors

2018-07-20 Thread Eric Blake
On 06/09/2018 10:32 AM, Vladimir Sementsov-Ogievskiy wrote: To implement nbd reconnect in further patches, we need to distinguish error codes, returned by nbd server, from channel errors, to reconnect only in the latter case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd-client.c

Re: [Qemu-devel] [PATCH] block: Fix copy-on-read crash with partial final cluster

2018-07-20 Thread Eric Blake
On 07/09/2018 04:32 AM, Kevin Wolf wrote: Am 06.07.2018 um 23:20 hat Eric Blake geschrieben: On 07/06/2018 11:45 AM, Kevin Wolf wrote: If the virtual disk size isn't aligned to full clusters, bdrv_co_do_copy_on_readv() may get pnum == 0 before having the full cluster completed, which will let i

Re: [Qemu-devel] [PATCH 2/2] nbd/server: send more than one extent of base:allocation context

2018-07-20 Thread Eric Blake
On 07/10/2018 09:33 AM, Vladimir Sementsov-Ogievskiy wrote: 04.07.2018 14:23, Vladimir Sementsov-Ogievskiy wrote: This is necessary for efficient block-status export, for clients which support it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- +static int blockstatus_to_extents(BlockDriver

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Fix typos in comments (found by codespell)

2018-07-20 Thread Eric Blake
On 07/12/2018 03:32 PM, John Snow wrote: +++ b/block/gluster.c @@ -1326,7 +1326,7 @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs) * If @start is in a trailing hole or beyond EOF, return -ENXIO. * If we can't find out, return a negative errno other than -ENXIO. * - * (Sha

Re: [Qemu-devel] [PATCH 2/3] qemu-img: Use zero writes after source backing EOF

2018-07-20 Thread Eric Blake
On 07/13/2018 06:14 AM, Max Reitz wrote: Past the end of the source backing file, we memset() buf_old to zero, so it is clearly easy to use blk_pwrite_zeroes() instead of blk_pwrite() then. Signed-off-by: Max Reitz --- qemu-img.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions

[Qemu-devel] [PATCH v2 for-3.0] po: Don't include comments with location

2018-07-20 Thread Stefan Weil
Those comments change often when ui/gtk.c is changed and are not really useful. Signed-off-by: Stefan Weil --- CC'ing all translators because of the new string which still needs translations. v2: Only automatically created content, no new German translation. Regards Stefan po/Makefile|

[Qemu-devel] [PATCH 1/5] dev-mtp: add support for canceling transaction

2018-07-20 Thread Bandan Das
The initiator can choose to cancel an ongoing request which is specified by bRequest=0x64. If such a request arrives, free up any pending state Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/hw/us

[Qemu-devel] [PATCH 4/5] dev-mtp: Add support for > 4GB file transfers

2018-07-20 Thread Bandan Das
To support larger file transfers, rely on a short packet to detect end of the data phase and rewrite d->length to the size received Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-mtp.c

[Qemu-devel] [PATCH 3/5] dev-mtp: retry write for incomplete transfers

2018-07-20 Thread Bandan Das
For large buffers, write may not copy the full buffer. For example, on Linux, write imposes a limit of 0x7000. Note that this does not fix >4G transfers but ~>2G files will transfer successfully. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 22 -- 1 file changed, 20 i

[Qemu-devel] [PATCH 0/5] usb-mtp write fixes

2018-07-20 Thread Bandan Das
Patch 1 adds support for canceling an ongoing transaction. 2,3 and 4 fix writes for large transfers. For > 4G file transfers, the logic has been modified to check for the end of the data phase by checking for a short packet. Patch 5 renames x-root to a more meaningful rootdir. Bandan Das (5): de

[Qemu-devel] [PATCH 2/5] dev-mtp: fix buffer allocation for writing file contents

2018-07-20 Thread Bandan Das
usb_mtp_realloc() was being incorrectly used when allocating buffer for incoming data. Set d->length only after resizing the buffer. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index

[Qemu-devel] [PATCH 5/5] dev-mtp: rename x-root to rootdir

2018-07-20 Thread Bandan Das
x-root was renamed as such owing to the experimental nature of the property; the underlying filesystem semantics were undecided Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 2e3ea58

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 for-3.0] po: Don't include comments with location

2018-07-20 Thread Philippe Mathieu-Daudé
On 07/20/2018 06:25 PM, Stefan Weil wrote: > Those comments change often when ui/gtk.c is changed and are not > really useful. > > Signed-off-by: Stefan Weil Thanks for splitting this. Reviewed-by: Philippe Mathieu-Daudé > --- > > CC'ing all translators because of the new string which still

[Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-07-20 Thread John Snow
On 06/26/2018 09:50 AM, Vladimir Sementsov-Ogievskiy wrote: > This patch aims to bring the following behavior: Just as a primer for anyone else reading this email (nobody) who might not understand the terminology (less than nobody), it might be helpful to remember that: -INACTIVATE occurs eithe

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-20 Thread Fam Zheng
On Sat, Jul 21, 2018 at 12:35 AM Eric Blake wrote: > > On 07/20/2018 03:24 AM, Fam Zheng wrote: > I'm not familiar with /dev/nullb* - is that a typo? > > $ ll /dev/nullb* > ls: cannot access '/dev/nullb*': No such file or directory You probably have figured out already but just in case: it's kern

[Qemu-devel] [PATCH] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-07-20 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for freeze specified fs. The valid mountpoints list member are [1]: The path of a mounted folder, for example, Y:\MountX\ A drive letter, for example, D:\ A volume GUID path of the form \\?\Volume{GUID}\, where GUID identifies the volume A