Re: [Qemu-devel] [PATCH v4 04/12] migration: avoid concurrent invoke channel_close by different threads

2018-05-31 Thread 858585 jemmy
On Wed, May 30, 2018 at 10:45 PM, Dr. David Alan Gilbert wrote: > * Lidong Chen (jemmy858...@gmail.com) wrote: >> From: Lidong Chen >> >> The channel_close maybe invoked by different threads. For example, source >> qemu invokes qemu_fclose in main thread, migration thread and return path >> threa

[Qemu-devel] [PATCH] KVM: GIC: Fix memory leak due to calling kvm_init_irq_routing twice

2018-05-31 Thread Shannon Zhao
kvm_irqchip_create called by kvm_init will call kvm_init_irq_routing to initialize global capability variables. If we call kvm_init_irq_routing in GIC realize function, previous allocated memory will leak. Fix this by deleting the unnecessary call. Signed-off-by: Shannon Zhao --- hw/intc/arm_gi

Re: [Qemu-devel] [PATCH v4 10/12] migration: create a dedicated thread to release rdma resource

2018-05-31 Thread 858585 jemmy
On Thu, May 31, 2018 at 12:50 AM, Dr. David Alan Gilbert wrote: > * Lidong Chen (jemmy858...@gmail.com) wrote: >> ibv_dereg_mr wait for a long time for big memory size virtual server. >> >> The test result is: >> 10GB 326ms >> 20GB 699ms >> 30GB 1021ms >> 40GB 1387ms >> 50GB 1712ms

[Qemu-devel] [PATCH v2] tap: fix memory leak on success to create a tap device

2018-05-31 Thread wangyunjian
From: Yunjian Wang The memory leak on success to create a tap device. And the nfds and nvhosts may not be the same and need to be processed separately. Fixes: 07825977 ("tap: fix memory leak on failure to create a multiqueue tap device") Fixes: 264986e2 ("tap: multiqueue support") CC: QEMU Sta

Re: [Qemu-devel] [PATCH] tcg: Pass tb and index to tcg_gen_exit_tb separately

2018-05-31 Thread Laurent Vivier
Le 31/05/2018 à 03:13, Richard Henderson a écrit : > Do the cast to uintptr_t within the helper, so that the compiler > can type check the pointer argument. We can also do some more > sanity checking of the index argument. > > Signed-off-by: Richard Henderson > --- > include/exec/gen-icount.h

Re: [Qemu-devel] [libvirt] [PATCH 2/5] qemu: Move checks for SMM from command-line creation into validation phase

2018-05-31 Thread Laszlo Ersek
adding qemu-devel, Paolo and Gerd; comments below: On 05/30/18 23:08, Martin Kletzander wrote: > On Wed, May 30, 2018 at 11:02:59AM -0400, John Ferlan wrote: >> >> >> On 05/21/2018 11:00 AM, Martin Kletzander wrote: >>> We are still hoping all of such checks will be moved there and this >>> is one

Re: [Qemu-devel] [PATCH v4 11/12] migration: poll the cm event while wait RDMA work request completion

2018-05-31 Thread 858585 jemmy
On Thu, May 31, 2018 at 1:33 AM, Dr. David Alan Gilbert wrote: > * Lidong Chen (jemmy858...@gmail.com) wrote: >> If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function >> maybe loop forever. so we should also poll the cm event fd, and when >> receive any cm event, we consider some e

Re: [Qemu-devel] [PATCH] target/ppc: Allow privileged access to SPR_PCR

2018-05-31 Thread Cédric Le Goater
On 05/30/2018 04:42 PM, Joel Stanley wrote: > The powerpc Linux kernel[1] and skiboot firmware[2] recently gained changes > that cause the Processor Compatibility Register (PCR) SPR to be cleared. > > These changes cause Linux to fail to boot on the Qemu powernv machine > with an error: > > Tryi

[Qemu-devel] [PATCH 1/3] io: Implement QIO_CHANNEL_ERR_BROKEN

2018-05-31 Thread Sergio Lopez
QIO_CHANNEL_ERR_BROKEN is used to identify a potentially unrecoverable error in the channel, like EPIPE. --- include/io/channel.h | 1 + io/channel-file.c| 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/io/channel.h b/include/io/channel.h index e8cdadb..bbe45f6 100644 --- a/incl

[Qemu-devel] [PATCH 3/3] hw/char/serial: Don't retry on serial_xmit if errno == EPIPE

2018-05-31 Thread Sergio Lopez
If writing to the frontend channel failed with EPIPE, don't set up a retry. EPIPE is not a recoverable error, so trying again is a waste of CPU cycles. If the vCPU writing to the serial device and emulator thread are pinned to the same pCPU, it can also compromise the stability of the Guest OS, as

[Qemu-devel] [PATCH 2/3] chardev: On QIO_CHANNEL_ERR_BROKEN set errno to EPIPE

2018-05-31 Thread Sergio Lopez
This allows callers to identify this potentially unrecoverable error. --- chardev/char-io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chardev/char-io.c b/chardev/char-io.c index f810524..f934eb9 100644 --- a/chardev/char-io.c +++ b/chardev/char-io.c @@ -168,6 +168,9 @@ int io_channel_

[Qemu-devel] [PATCH 0/3] Avoid retrying on serial_xmit with EPIPE

2018-05-31 Thread Sergio Lopez
EPIPE is not a recoverable error, so retrying on serial_xmit is a waste of CPU cycles, and can potentially comprosie the Guest OS stability if both the vCPU and the emulator thread are pinned to the same pCPU, with the first one actively polling the serial device and barely giving time to the secon

Re: [Qemu-devel] [PATCH] KVM: GIC: Fix memory leak due to calling kvm_init_irq_routing twice

2018-05-31 Thread Auger Eric
Hi Shannon, On 05/31/2018 09:16 AM, Shannon Zhao wrote: > kvm_irqchip_create called by kvm_init will call kvm_init_irq_routing to > initialize global capability variables. If we call kvm_init_irq_routing in > GIC realize function, previous allocated memory will leak. > > Fix this by deleting the

Re: [Qemu-devel] [Qemu-block] [PATCH 0/3] ahci: fix completion race condition

2018-05-31 Thread Stefan Hajnoczi
On Thu, May 31, 2018 at 1:43 AM, John Snow wrote: > Commit d759c951f changed the main thread lock release/reacquisition, > and in so doing apparently jostled loose a race condition in the AHCI > code. > > Patch 2 should be sufficient to fix this, and patches 1 and 3 are just > little trivial fixes

Re: [Qemu-devel] [PATCH] KVM: GIC: Fix memory leak due to calling kvm_init_irq_routing twice

2018-05-31 Thread Shannon Zhao
On 2018/5/31 15:54, Auger Eric wrote: > Hi Shannon, > > On 05/31/2018 09:16 AM, Shannon Zhao wrote: >> kvm_irqchip_create called by kvm_init will call kvm_init_irq_routing to >> initialize global capability variables. If we call kvm_init_irq_routing in >> GIC realize function, previous allocate

[Qemu-devel] [Bug 1404278] Re: tap connections not working on windows host

2018-05-31 Thread timsoft
it is working now. using the following config. "c:\program files\qemu\qemu-system-i386.exe" -cpu qemu32 -m 3G -drive file="c:\\data\\images\\slack14.2_32bit_base.qcow2",format=qcow2 -cdrom "c:\\data\\images\\slackware-14.2-install-dvd.iso" -boot c -net nic,macaddr=02:00:00:11:11:14,model=i82551

[Qemu-devel] [Bug 1404278] Re: tap connections not working on windows host

2018-05-31 Thread timsoft
addition to previous comment. it works with qemu-w64-setup-20180519.exe I haven't tested it with in between versions of qemu. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1404278 Title: tap connec

Re: [Qemu-devel] [libvirt] [PATCH 2/5] qemu: Move checks for SMM from command-line creation into validation phase

2018-05-31 Thread Martin Kletzander
On Thu, May 31, 2018 at 09:33:54AM +0200, Laszlo Ersek wrote: adding qemu-devel, Paolo and Gerd; comments below: On 05/30/18 23:08, Martin Kletzander wrote: On Wed, May 30, 2018 at 11:02:59AM -0400, John Ferlan wrote: On 05/21/2018 11:00 AM, Martin Kletzander wrote: We are still hoping all

Re: [Qemu-devel] [PATCH 2/2] linux-user: Fix struct sigaltstack for openrisc

2018-05-31 Thread Laurent Vivier
Le 31/05/2018 à 06:18, Richard Henderson a écrit : > Signed-off-by: Richard Henderson > --- > linux-user/openrisc/target_signal.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/linux-user/openrisc/target_signal.h > b/linux-user/openrisc/target_signal.h > index 2a4e00b0

Re: [Qemu-devel] [PATCH v9 5/7] monitor: remove event_clock_type

2018-05-31 Thread Stefan Hajnoczi
On Thu, May 31, 2018 at 12:11:47PM +0800, Peter Xu wrote: > On Wed, May 30, 2018 at 05:35:52PM +0100, Stefan Hajnoczi wrote: > > On Tue, May 29, 2018 at 01:57:53PM +0800, Peter Xu wrote: > > > Instead, use a dynamic function to detect which clock we'll use. The > > > problem is that the old code w

Re: [Qemu-devel] [PATCH] KVM: GIC: Fix memory leak due to calling kvm_init_irq_routing twice

2018-05-31 Thread Auger Eric
Hi Shannon, On 05/31/2018 10:04 AM, Shannon Zhao wrote: > > > On 2018/5/31 15:54, Auger Eric wrote: >> Hi Shannon, >> >> On 05/31/2018 09:16 AM, Shannon Zhao wrote: >>> kvm_irqchip_create called by kvm_init will call kvm_init_irq_routing to >>> initialize global capability variables. If we call

Re: [Qemu-devel] [PATCH v9 5/7] monitor: remove event_clock_type

2018-05-31 Thread Peter Xu
On Thu, May 31, 2018 at 09:23:24AM +0100, Stefan Hajnoczi wrote: > On Thu, May 31, 2018 at 12:11:47PM +0800, Peter Xu wrote: > > On Wed, May 30, 2018 at 05:35:52PM +0100, Stefan Hajnoczi wrote: > > > On Tue, May 29, 2018 at 01:57:53PM +0800, Peter Xu wrote: > > > > Instead, use a dynamic function t

Re: [Qemu-devel] [PATCH 2/3] hw/arm/virt: Add another UART to the virt board

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 03:12, Jason A. Donenfeld wrote: > Hi Peter, > > What ever became of this? I still really could use a second UART in > the standard configuration. I'm still building with this cludge -- > https://א.cc/RXI3ssWV -- in order to run the test suite on > build.wireguard.com. It stalle

Re: [Qemu-devel] [PATCH v2] ui/cocoa: Suppress NSFileHandlingPanelOKButton deprecation warning

2018-05-31 Thread Peter Maydell
On 29 May 2018 at 19:23, Programmingkid wrote: > >> On May 29, 2018, at 2:15 PM, Peter Maydell wrote: >> >> OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and >> would rather you use NSModalResponseOK, which was introduced in OS 10.9. >> Use the recommended new constant name, with

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Add a new 256MB ECAM region

2018-05-31 Thread Laszlo Ersek
On 05/31/18 08:55, Auger Eric wrote: > Hi Laszlo, > > On 05/30/2018 06:11 PM, Laszlo Ersek wrote: >> On 05/30/18 16:26, Eric Auger wrote: >>> This patch defines a new ECAM region located after the 256GB limit. >>> >>> The virt machine state is augmented with a new highmem_ecam field >>> which guard

Re: [Qemu-devel] [PATCH v2 0/7] ramfb: simple boot framebuffer, no legacy vga

2018-05-31 Thread Gerd Hoffmann
Hi, Resuming an old discussion ... > > From > > the guests point of view there is no difference between > > > > (a) qemu -device virtio-ramfb, and > > (b) qemu -device virtio-gpu-pci -device ramfb-testdev > > > > On the host side the difference is that (a) is a single QemuConsole > > whic

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Add a new 256MB ECAM region

2018-05-31 Thread Auger Eric
Hi Laszlo, On 05/31/2018 10:41 AM, Laszlo Ersek wrote: > On 05/31/18 08:55, Auger Eric wrote: >> Hi Laszlo, >> >> On 05/30/2018 06:11 PM, Laszlo Ersek wrote: >>> On 05/30/18 16:26, Eric Auger wrote: This patch defines a new ECAM region located after the 256GB limit. The virt machine

Re: [Qemu-devel] Recording I/O activity after KVM does a VMEXIT

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 11:19:13PM -0400, Arnabjyoti Kalita wrote: > I am trying to implement a 'minimal' record-replay mechanism for KVM, which > is similar to the one existing for TCG via -icount. I am trying to record > I/O events only (specifically disk and network events) when KVM does a > VME

Re: [Qemu-devel] [PATCH v2 0/7] ramfb: simple boot framebuffer, no legacy vga

2018-05-31 Thread Laszlo Ersek
On 05/31/18 10:43, Gerd Hoffmann wrote: > Hi, > > Resuming an old discussion ... > >>> From >>> the guests point of view there is no difference between >>> >>> (a) qemu -device virtio-ramfb, and >>> (b) qemu -device virtio-gpu-pci -device ramfb-testdev >>> >>> On the host side the differenc

Re: [Qemu-devel] [RFC 2/3] hw/char/nrf51_uart: Implement nRF51 SoC UART

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 01:03:37AM +0300, Julia Suvorova wrote: > The following features are not yet implemented: > Control with SUSPEND/START*/STOP* This is probably worth implementing for completeness. Just rx_enabled and tx_enabled boolean states will be sufficient. SUSPEND flushes tx and

Re: [Qemu-devel] [RFC 3/3] tests/boot-serial-test: Add support for the microbit board

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 01:03:38AM +0300, Julia Suvorova wrote: > New mini-kernel test for nRF51 SoC UART. > > Signed-off-by: Julia Suvorova > --- > tests/boot-serial-test.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c

Re: [Qemu-devel] [RFC 0/3] nRF51 SoC: Add UART support

2018-05-31 Thread Stefan Hajnoczi
On Tue, May 29, 2018 at 11:57:47PM -0300, Philippe Mathieu-Daudé wrote: > Hi Julia, > > On 05/29/2018 07:03 PM, Julia Suvorova via Qemu-devel wrote: > > This series adds basic support for the nRF51 SoC UART, that used in > > BBC Micro:bit board, and QTest for it. > > > > Based-on: <20180503090532

Re: [Qemu-devel] [PATCH v2] tap: fix memory leak on success to create a tap device

2018-05-31 Thread Jason Wang
On 2018年05月31日 15:28, wangyunjian wrote: From: Yunjian Wang The memory leak on success to create a tap device. And the nfds and nvhosts may not be the same and need to be processed separately. Fixes: 07825977 ("tap: fix memory leak on failure to create a multiqueue tap device") Fixes: 2649

Re: [Qemu-devel] [PATCH 2/3] chardev: On QIO_CHANNEL_ERR_BROKEN set errno to EPIPE

2018-05-31 Thread Marc-André Lureau
On Thu, May 31, 2018 at 9:46 AM, Sergio Lopez wrote: > This allows callers to identify this potentially unrecoverable error. (missing signed-off) Reviewed-by: Marc-André Lureau > --- > chardev/char-io.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/chardev/char-io.c b/chardev/ch

Re: [Qemu-devel] [PATCH 3/3] hw/char/serial: Don't retry on serial_xmit if errno == EPIPE

2018-05-31 Thread Marc-André Lureau
Hi On Thu, May 31, 2018 at 9:46 AM, Sergio Lopez wrote: > If writing to the frontend channel failed with EPIPE, don't set up a > retry. EPIPE is not a recoverable error, so trying again is a waste of CPU > cycles. > > If the vCPU writing to the serial device and emulator thread are pinned > to th

Re: [Qemu-devel] [PATCH 00/27] iommu: support txattrs, support TCG execution, implement TZ MPC

2018-05-31 Thread Peter Maydell
On 30 May 2018 at 17:58, Paolo Bonzini wrote: > On 21/05/2018 16:03, Peter Maydell wrote: >> This patchset is a rather large one, but the first half is all >> fairly simple plumbing. It does four things: >> * support IOMMUs that are aware of memory transaction attributes and >>may generate di

Re: [Qemu-devel] [PATCH v2] vhost-blk: turn on pre-defined RO feature bit

2018-05-31 Thread Stefan Hajnoczi
On Tue, May 29, 2018 at 09:24:35AM +0800, Changpeng Liu wrote: > Read only feature shouldn't be negotiable, because if the > backend device reported Read only feature supported, QEMU > host driver shouldn't change backend's RO attribute. While > here, also enable the vhost-user-blk test utility to

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-31 Thread Peter Maydell
On 30 May 2018 at 02:42, Shannon Zhao wrote: > > > On 2018/5/29 22:44, Peter Maydell wrote: >> This is where we should have a comment explaining the bug and >> what the migration data from the old broken QEMU looks like; something >> like: >> >> /* Older versions of QEMU had a bug in the handl

Re: [Qemu-devel] About cpu_physical_memory_map()

2018-05-31 Thread Peter Maydell
On 30 May 2018 at 01:24, Huaicheng Li wrote: > Dear QEMU/KVM developers, > > I was trying to map a buffer in host QEMU process to a guest user space > application. I tried to achieve this > by allocating a buffer in the guest application first, then map this buffer > to QEMU process address space

Re: [Qemu-devel] [PULL 00/17] Block layer patches

2018-05-31 Thread Peter Maydell
On 30 May 2018 at 16:56, Kevin Wolf wrote: > Merge remote-tracking branch > 'remotes/edgar/tags/edgar/xilinx-next-2018-05-29-v1.for-upstream' into > staging (2018-05-29 13:01:11 +0100) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git tags/for-upstream > > for y

Re: [Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-31 Thread Paolo Bonzini
On 30/05/2018 19:35, Peter Maydell wrote: > On 30 May 2018 at 17:59, Paolo Bonzini wrote: >> On 21/05/2018 17:02, Peter Maydell wrote: >>> On 21 May 2018 at 15:34, Paolo Bonzini wrote: Why do the levels have to be migrated at all? It should be enough if the IRQ level is either migrated

Re: [Qemu-devel] [libvirt] [PATCH 2/5] qemu: Move checks for SMM from command-line creation into validation phase

2018-05-31 Thread Paolo Bonzini
On 31/05/2018 10:19, Martin Kletzander wrote: >> > > Oh, it definitely helps. And I always enjoy when someone explains > low level details of something like you do, it makes me feel very > smart after I read it =) > > ...something about the shoulders of giants and stuff... > > I'll fix this up

Re: [Qemu-devel] [PATCH] qom: support orphan objects in object_get_canonical_path

2018-05-31 Thread Paolo Bonzini
On 31/05/2018 05:45, Alexey Kardashevskiy wrote: > Well, this is correct indeed for the normal case when the result is used > for internal business but for my task (show the owner of an MR or at least > give a clue what to grep for) it will discard a partial path. > > I guess I could print a typen

Re: [Qemu-devel] [RFC 1/3] hw/arm/nrf51_soc: Fix compilation and memory regions

2018-05-31 Thread Peter Maydell
On 29 May 2018 at 23:03, Julia Suvorova wrote: > nRF51 SoC implementation is intended for the BBC Micro:bit board, > which has 256 KB flash and 16 KB RAM. > Added FICR defines. > > Signed-off-by: Julia Suvorova > --- > hw/arm/nrf51_soc.c | 12 +++- > include/hw/arm/nrf51_soc.h |

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

2018-05-31 Thread Alex Bennée
Emilio G. Cota writes: > The meaning of "existing" is now changed to "matches in hash and > ht->cmp result". This is saner than just checking the pointer value. > > Suggested-by: Richard Henderson > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée >

Re: [Qemu-devel] [Qemu-block] Some question about savem/qcow2 incremental snapshot

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 06:07:19PM +0200, Kevin Wolf wrote: > Am 30.05.2018 um 16:44 hat Stefan Hajnoczi geschrieben: > > On Mon, May 14, 2018 at 02:48:47PM +0100, Stefan Hajnoczi wrote: > > > On Fri, May 11, 2018 at 07:25:31PM +0200, Kevin Wolf wrote: > > > > Am 10.05.2018 um 10:26 hat Stefan Hajn

Re: [Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 11:21, Paolo Bonzini wrote: > On 30/05/2018 19:35, Peter Maydell wrote: >> On 30 May 2018 at 17:59, Paolo Bonzini wrote: >>> On 21/05/2018 17:02, Peter Maydell wrote: On 21 May 2018 at 15:34, Paolo Bonzini wrote: > Why do the levels have to be migrated at all? It shou

Re: [Qemu-devel] [PATCH v4 04/12] migration: avoid concurrent invoke channel_close by different threads

2018-05-31 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > On Wed, May 30, 2018 at 10:45 PM, Dr. David Alan Gilbert > wrote: > > * Lidong Chen (jemmy858...@gmail.com) wrote: > >> From: Lidong Chen > >> > >> The channel_close maybe invoked by different threads. For example, source > >> qemu invokes qemu_fclo

Re: [Qemu-devel] [PATCH 1/4] test: Move reusable code from tpm-crb-swtpm-test.c to tpm-util.c

2018-05-31 Thread Marc-André Lureau
On Wed, May 30, 2018 at 9:35 PM, Stefan Berger wrote: > Move code we can reuse from tpm-crb-swtpm-test.c into tpm-util.c > and prefix functions with 'tpm_util_'. > > Remove some unnecessary #include's. > > Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau > --- > tests/tpm-crb-swtpm

Re: [Qemu-devel] [PATCH v4 1/5] Add functional/acceptance tests infrastructure

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 02:41:52PM -0400, Cleber Rosa wrote: > + * Donwload (and cache) remote data files, such as firmware and kernel s/Donwload/Download/ Aside from that: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH 2/4] test: Move common TPM test functions to tpm-tests.c

2018-05-31 Thread Marc-André Lureau
On Wed, May 30, 2018 at 9:35 PM, Stefan Berger wrote: > Move common TPM test functions from tpm-crb-swtpm-test.c to tpm-tests.c > so that for example test cases with the TPM TIS interface can use the > same code. Prefix all funcions with 'tpm_test_'. > > Signed-off-by: Stefan Berger Reviewed-by:

Re: [Qemu-devel] [PATCH v4 5/5] Acceptance tests: add Linux kernel boot and console checking test

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 02:41:56PM -0400, Cleber Rosa wrote: > This test boots a Linux kernel, and checks that the given command > line was effective in two ways: > > * It makes the kernel use the set "console device" as a console > * The kernel records the command line as expected in the consol

Re: [Qemu-devel] [PATCH 3/4] test: Pass TPM interface model to functions creating command line

2018-05-31 Thread Marc-André Lureau
On Wed, May 30, 2018 at 9:35 PM, Stefan Berger wrote: > Pass the TPM interface model, such as 'tpm-crb', through to the functions > that create the command line for QEMU. > > Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau > --- > tests/tpm-crb-swtpm-test.c | 4 ++-- > tests/tpm-

Re: [Qemu-devel] [PATCH v4 10/12] migration: create a dedicated thread to release rdma resource

2018-05-31 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > On Thu, May 31, 2018 at 12:50 AM, Dr. David Alan Gilbert > wrote: > > * Lidong Chen (jemmy858...@gmail.com) wrote: > >> ibv_dereg_mr wait for a long time for big memory size virtual server. > >> > >> The test result is: > >> 10GB 326ms > >> 20GB

Re: [Qemu-devel] [PATCH 4/4] test: Add swtpm migration test for the TPM TIS interface

2018-05-31 Thread Marc-André Lureau
Hi On Wed, May 30, 2018 at 9:35 PM, Stefan Berger wrote: > Add a test case for testing swtpm migration with the TPM TIS > interface. > > Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau > --- > tests/Makefile.include | 3 +++ > tests/tpm-tis-swtpm-test.c | 66 > +

Re: [Qemu-devel] [PATCH v4 4/5] scripts/qemu.py: introduce set_console() method

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 02:41:55PM -0400, Cleber Rosa wrote: > The set_console() method is intended to ease higher level use cases > that require a console device. > > The amount of intelligence is limited on purpose, requiring either the > device type explicitly, or the existence of a machine (pa

Re: [Qemu-devel] [PATCH v5 1/2] arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR

2018-05-31 Thread Auger Eric
Hi, On 05/31/2018 05:15 AM, Shannon Zhao wrote: > While for_each_dist_irq_reg loop starts from GIC_INTERNAL, it forgot to > offset the date array and index. This will overlap the GICR registers > value and leave the last GIC_INTERNAL irq's registers out of update. > > Fixes: 367b9f527becdd20ddf11

Re: [Qemu-devel] [PATCH 3/3] hw/char/serial: Don't retry on serial_xmit if errno == EPIPE

2018-05-31 Thread Sergio Lopez
On Thu, May 31, 2018 at 11:52:01AM +0200, Marc-André Lureau wrote: > On Thu, May 31, 2018 at 9:46 AM, Sergio Lopez wrote: > > If writing to the frontend channel failed with EPIPE, don't set up a > > retry. EPIPE is not a recoverable error, so trying again is a waste of CPU > > cycles. > > > > If t

Re: [Qemu-devel] [PATCH RFC] qemu-error: introduce error_report_once

2018-05-31 Thread Stefan Hajnoczi
On Tue, May 15, 2018 at 05:13:56PM +0800, Peter Xu wrote: > I stole the printk_once() macro. > > I always wanted to be able to print some error directly if there is a > buffer to dump, however we can't use error_report() really quite often > when there can be any DDOS attack. To avoid that, we ca

Re: [Qemu-devel] [PATCH 2/3] chardev: On QIO_CHANNEL_ERR_BROKEN set errno to EPIPE

2018-05-31 Thread Sergio Lopez
On Thu, May 31, 2018 at 11:48:25AM +0200, Marc-André Lureau wrote: > On Thu, May 31, 2018 at 9:46 AM, Sergio Lopez wrote: > > This allows callers to identify this potentially unrecoverable error. > > (missing signed-off) Ouch, sorry, will add it in v2. Sergio.

Re: [Qemu-devel] [PATCH 3/3] hw/char/serial: Don't retry on serial_xmit if errno == EPIPE

2018-05-31 Thread Marc-André Lureau
Hi On Thu, May 31, 2018 at 1:03 PM, Sergio Lopez wrote: > On Thu, May 31, 2018 at 11:52:01AM +0200, Marc-André Lureau wrote: >> On Thu, May 31, 2018 at 9:46 AM, Sergio Lopez wrote: >> > If writing to the frontend channel failed with EPIPE, don't set up a >> > retry. EPIPE is not a recoverable er

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: Allow privileged access to SPR_PCR

2018-05-31 Thread Greg Kurz
On Thu, 31 May 2018 09:38:10 +0200 Cédric Le Goater wrote: > On 05/30/2018 04:42 PM, Joel Stanley wrote: > > The powerpc Linux kernel[1] and skiboot firmware[2] recently gained changes > > that cause the Processor Compatibility Register (PCR) SPR to be cleared. > > > > These changes cause Linux

Re: [Qemu-devel] [PATCH v4 10/12] migration: create a dedicated thread to release rdma resource

2018-05-31 Thread 858585 jemmy
On Thu, May 31, 2018 at 6:55 PM, Dr. David Alan Gilbert wrote: > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> On Thu, May 31, 2018 at 12:50 AM, Dr. David Alan Gilbert >> wrote: >> > * Lidong Chen (jemmy858...@gmail.com) wrote: >> >> ibv_dereg_mr wait for a long time for big memory size virtua

Re: [Qemu-devel] [PATCH v5 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-31 Thread Auger Eric
Hi, On 05/31/2018 05:15 AM, Shannon Zhao wrote: > While we skip the GIC_INTERNAL irqs, we don't change the register offset > accordingly. This will overlap the GICR registers value and leave the > last GIC_INTERNAL irq's registers out of update. > > Fix this by skipping the registers banked by GI

Re: [Qemu-devel] [PATCH] main-loop: drop spin_counter

2018-05-31 Thread Paolo Bonzini
On 30/05/2018 21:42, Stefan Hajnoczi wrote: > Commit d759c951f3287fad04210a52f2dc93f94cf58c7f ("replay: push > replay_mutex_lock up the call tree") removed the !timeout lock > optimization in the main loop. > > The idea of the optimization was to avoid ping-pongs between threads by > keeping the B

Re: [Qemu-devel] [qemu-s390x] [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers

2018-05-31 Thread Igor Mammedov
On Wed, 30 May 2018 16:03:29 +0200 Paolo Bonzini wrote: > On 25/05/2018 14:43, David Hildenbrand wrote: > > On 17.05.2018 10:15, David Hildenbrand wrote: > >> We can have devices that need certain other resources that are e.g. > >> system resources managed by the machine. We need a clean way to

Re: [Qemu-devel] [PATCH 2/3] hw/arm/virt: Add another UART to the virt board

2018-05-31 Thread Jason A. Donenfeld
On Thu, May 31, 2018 at 10:32 AM, Peter Maydell wrote: > It stalled on the fact that adding the second UART breaks > UEFI images (annoyingly, UEFI iterates through UARTs in > the DTB in the opposite direction to Linux, so if you add > a second UART then it picks that one to use rather than > the f

Re: [Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-31 Thread Paolo Bonzini
On 31/05/2018 12:50, Peter Maydell wrote: > On 31 May 2018 at 11:21, Paolo Bonzini wrote: >> On 30/05/2018 19:35, Peter Maydell wrote: >>> On 30 May 2018 at 17:59, Paolo Bonzini wrote: On 21/05/2018 17:02, Peter Maydell wrote: > On 21 May 2018 at 15:34, Paolo Bonzini wrote: >> Why d

Re: [Qemu-devel] [qemu-s390x] [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers

2018-05-31 Thread Paolo Bonzini
On 31/05/2018 13:47, Igor Mammedov wrote: > On Wed, 30 May 2018 16:03:29 +0200 > Paolo Bonzini wrote: > >> On 25/05/2018 14:43, David Hildenbrand wrote: >>> On 17.05.2018 10:15, David Hildenbrand wrote: We can have devices that need certain other resources that are e.g. system resourc

[Qemu-devel] [Bug 1404278] Re: tap connections not working on windows host

2018-05-31 Thread Thomas Huth
ok, thanks for checking! So I'm closing this ticket now... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1404278 Title: tap connections not working on windows host Status in QEMU: Fix Released

[Qemu-devel] [Bug 1404278] Re: tap connections not working on windows host

2018-05-31 Thread Thomas Huth
... ah, well, never mind, just saw that you already closed it :-) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1404278 Title: tap connections not working on windows host Status in QEMU: Fix Rel

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: Allow privileged access to SPR_PCR

2018-05-31 Thread Joel Stanley
On 31 May 2018 at 20:57, Greg Kurz wrote: > On Thu, 31 May 2018 09:38:10 +0200 > Cédric Le Goater wrote: > >> On 05/30/2018 04:42 PM, Joel Stanley wrote: >> > The powerpc Linux kernel[1] and skiboot firmware[2] recently gained changes >> > that cause the Processor Compatibility Register (PCR) SPR

Re: [Qemu-devel] [PATCH 2/3] hw/arm/virt: Add another UART to the virt board

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 12:48, Jason A. Donenfeld wrote: > On Thu, May 31, 2018 at 10:32 AM, Peter Maydell > wrote: >> It stalled on the fact that adding the second UART breaks >> UEFI images (annoyingly, UEFI iterates through UARTs in >> the DTB in the opposite direction to Linux, so if you add >> a s

Re: [Qemu-devel] [PATCH 23/27] hw/core/or-irq: Support more than 16 inputs to an OR gate

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 12:50, Paolo Bonzini wrote: > On 31/05/2018 12:50, Peter Maydell wrote: >> No, calling qemu_set_irq in postload is a bug. (You don't know >> which order the state of the source and destination devices is >> restored, so asserting a signal in postload would have different >> effec

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: Allow privileged access to SPR_PCR

2018-05-31 Thread Greg Kurz
On Thu, 31 May 2018 21:28:08 +0930 Joel Stanley wrote: > On 31 May 2018 at 20:57, Greg Kurz wrote: > > On Thu, 31 May 2018 09:38:10 +0200 > > Cédric Le Goater wrote: > > > >> On 05/30/2018 04:42 PM, Joel Stanley wrote: > >> > The powerpc Linux kernel[1] and skiboot firmware[2] recently gain

Re: [Qemu-devel] [PATCH 0/3] ahci: fix completion race condition

2018-05-31 Thread Bruce Rogers
>>> On 5/30/2018 at 6:43 PM, John Snow wrote: > Commit d759c951f changed the main thread lock release/reacquisition, > and in so doing apparently jostled loose a race condition in the AHCI > code. > > Patch 2 should be sufficient to fix this, and patches 1 and 3 are just > little trivial fixes. >

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: Allow privileged access to SPR_PCR

2018-05-31 Thread Joel Stanley
On 31 May 2018 at 21:43, Greg Kurz wrote: > On Thu, 31 May 2018 21:28:08 +0930 > Joel Stanley wrote: > >> On 31 May 2018 at 20:57, Greg Kurz wrote: >> > On Thu, 31 May 2018 09:38:10 +0200 >> > Cédric Le Goater wrote: >> > >> >> On 05/30/2018 04:42 PM, Joel Stanley wrote: >> >> > The powerpc Lin

Re: [Qemu-devel] [RFC 2/3] hw/char/nrf51_uart: Implement nRF51 SoC UART

2018-05-31 Thread Peter Maydell
On 29 May 2018 at 23:03, Julia Suvorova wrote: > Basic implementation of nRF51 SoC UART. > Description could be found here: > http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf > > The following features are not yet implemented: > Control with SUSPEND/START*/STOP* > CTS/NCTS flow con

Re: [Qemu-devel] [PATCH 2/9 V5] hostmem-file: add the 'pmem' option

2018-05-31 Thread Stefan Hajnoczi
On Thu, May 10, 2018 at 10:08:51AM +0800, junyan...@gmx.com wrote: > diff --git a/exec.c b/exec.c > index fa33c29..dedeb4d 100644 > --- a/exec.c > +++ b/exec.c > @@ -52,6 +52,9 @@ > #include > #endif > > +/* RAM is backed by the persistent memory. */ > +#define RAM_PMEM (1 << 3) Please

Re: [Qemu-devel] Recording I/O activity after KVM does a VMEXIT

2018-05-31 Thread Pavel Dovgalyuk
> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > On Wed, May 30, 2018 at 11:19:13PM -0400, Arnabjyoti Kalita wrote: > > I am trying to implement a 'minimal' record-replay mechanism for KVM, which > > is similar to the one existing for TCG via -icount. I am trying to record > > I/O events only

Re: [Qemu-devel] [PATCH 1/9 V5] memory, exec: switch file ram allocation functions to 'flags' parameters

2018-05-31 Thread Stefan Hajnoczi
On Thu, May 10, 2018 at 10:08:50AM +0800, junyan...@gmx.com wrote: > diff --git a/include/exec/memory.h b/include/exec/memory.h > index 31eae0a..0460313 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -507,6 +507,9 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,

Re: [Qemu-devel] [PATCH 3/9 V5] configure: add libpmem support

2018-05-31 Thread Stefan Hajnoczi
On Thu, May 10, 2018 at 10:08:52AM +0800, junyan...@gmx.com wrote: > ## > +# check for libpmem > + > +if test "$libpmem" != "no"; then > + cat > $TMPC < +#include > +int main(void) > +{ > + pmem_is_pmem(0, 0); > + return 0; > +} > +EOF > + libpmem_libs=

Re: [Qemu-devel] [Qemu-ppc] KVM internal error with kvm-pr on ppc64le

2018-05-31 Thread Loic Devulder
Hi, After some test I find a way to workaround this using 2 graphics cards in the VM. Boot with this: # /usr/bin/qemu-system-ppc64 -serial mon:stdio -m 1024 -cpu host -device virtio-scsi-pci,id=scsi0 -device scsi-cd,drive=cd0,bus=scsi0.0 -drive media=cdrom,if=none,id=cd0,format=raw,file=/opt/ope

[Qemu-devel] [PATCH v2] target/ppc: Allow privileged access to SPR_PCR

2018-05-31 Thread Joel Stanley
The powerpc Linux kernel[1] and skiboot firmware[2] recently gained changes that cause the Processor Compatibility Register (PCR) SPR to be cleared. These changes cause Linux to fail to boot on the Qemu powernv machine with an error: Trying to write privileged spr 338 (0x152) at 30017f0c

[Qemu-devel] [Bug 1774412] [NEW] -icount sleep=on|off documentation is confusing

2018-05-31 Thread Andreas Gustafsson
Public bug reported: The documentation for the -icount option in the qemu man page says: "When the virtual cpu is sleeping, the virtual time will advance at default speed unless sleep=on|off is specified. With sleep=on|off, the virtual time will jump to the next timer deadline instantly whenever

Re: [Qemu-devel] [PATCH 0/3] ahci: fix completion race condition

2018-05-31 Thread Philippe Mathieu-Daudé
Hi Bruce, On 05/31/2018 09:21 AM, Bruce Rogers wrote: On 5/30/2018 at 6:43 PM, John Snow wrote: >> Commit d759c951f changed the main thread lock release/reacquisition, >> and in so doing apparently jostled loose a race condition in the AHCI >> code. >> >> Patch 2 should be sufficient to fix

Re: [Qemu-devel] [PATCH 2/9 V5] hostmem-file: add the 'pmem' option

2018-05-31 Thread Stefan Hajnoczi
On Thu, May 10, 2018 at 10:08:51AM +0800, junyan...@gmx.com wrote: > From: Junyan He > > When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it > needs to know whether the backend storage is a real persistent memory, > in order to decide whether special operations should be performed

Re: [Qemu-devel] [PATCH 0/3] ahci: fix completion race condition

2018-05-31 Thread Bruce Rogers
>>> On 5/31/2018 at 7:06 AM, Philippe Mathieu-Daudé wrote: > Hi Bruce, > > On 05/31/2018 09:21 AM, Bruce Rogers wrote: > On 5/30/2018 at 6:43 PM, John Snow wrote: >>> Commit d759c951f changed the main thread lock release/reacquisition, >>> and in so doing apparently jostled loose a race cond

Re: [Qemu-devel] [PATCH V5 0/9] nvdimm: guarantee persistence of QEMU writes to persistent memory

2018-05-31 Thread Stefan Hajnoczi
David Gilbert previously suggested a memory access interface. I guess it would look something like this: typedef struct { void (*memset)(void *s, int c, size_t n); void (*memcpy)(void *dest, const void *src, size_t n); } MemoryOperations; That way code doesn't need if (pmem) A el

Re: [Qemu-devel] [PATCH] main-loop: drop spin_counter

2018-05-31 Thread Stefan Hajnoczi
On Wed, May 30, 2018 at 08:42:38PM +0100, Stefan Hajnoczi wrote: > Commit d759c951f3287fad04210a52f2dc93f94cf58c7f ("replay: push > replay_mutex_lock up the call tree") removed the !timeout lock > optimization in the main loop. > > The idea of the optimization was to avoid ping-pongs between threa

Re: [Qemu-devel] [PATCH 00/27] iommu: support txattrs, support TCG execution, implement TZ MPC

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 10:54, Peter Maydell wrote: > On 30 May 2018 at 17:58, Paolo Bonzini wrote: >> Go ahead and apply it through the ARM tree. Thanks! > > It needs a v2 (there are some patches that need fixing), > and some of the tail end of the patchset hasn't been reviewed, > and I'm not sure if

Re: [Qemu-devel] [PULL 00/12] NUMA queue, 2018-05-30

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 00:05, Eduardo Habkost wrote: > The following changes since commit e609fa71e89c81fbe2670411be62da95dfb093e0: > > Merge remote-tracking branch > 'remotes/edgar/tags/edgar/xilinx-next-2018-05-29-v1.for-upstream' into > staging (2018-05-29 13:01:11 +0100) > > are available in th

Re: [Qemu-devel] [PATCH v3] ARM: ACPI: Fix use-after-free due to memory realloc

2018-05-31 Thread Peter Maydell
On 30 May 2018 at 10:03, Auger Eric wrote: > Hi Shannon, > > On 05/30/2018 09:05 AM, Shannon Zhao wrote: >> acpi_data_push uses g_array_set_size to resize the memory size. If there >> is no enough contiguous memory, the address will be changed. So previous >> pointer could not be used any more. It

Re: [Qemu-devel] [PATCH v5 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 04:15, Shannon Zhao wrote: > While we skip the GIC_INTERNAL irqs, we don't change the register offset > accordingly. This will overlap the GICR registers value and leave the > last GIC_INTERNAL irq's registers out of update. > > Fix this by skipping the registers banked by GICR.

Re: [Qemu-devel] [PATCH v4 01/14] memory-device: drop assert related to align and start of address space

2018-05-31 Thread Igor Mammedov
On Wed, 30 May 2018 16:06:59 +0200 David Hildenbrand wrote: > On 30.05.2018 14:57, Igor Mammedov wrote: > > On Tue, 29 May 2018 18:02:06 +0200 > > David Hildenbrand wrote: > > > >> On 29.05.2018 15:27, Igor Mammedov wrote: > >>> On Thu, 17 May 2018 10:15:14 +0200 > >>> David Hildenbrand wr

Re: [Qemu-devel] [PATCH] KVM: GIC: Fix memory leak due to calling kvm_init_irq_routing twice

2018-05-31 Thread Peter Maydell
On 31 May 2018 at 08:16, Shannon Zhao wrote: > kvm_irqchip_create called by kvm_init will call kvm_init_irq_routing to > initialize global capability variables. If we call kvm_init_irq_routing in > GIC realize function, previous allocated memory will leak. > > Fix this by deleting the unnecessary

Re: [Qemu-devel] [RFC 2/3] hw/char/nrf51_uart: Implement nRF51 SoC UART

2018-05-31 Thread sundeep subbaraya
Hi, On Wed, May 30, 2018 at 3:33 AM, Julia Suvorova via Qemu-devel wrote: > Basic implementation of nRF51 SoC UART. > Description could be found here: > http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf > > The following features are not yet implemented: > Control with SUSPEND/START*/S

Re: [Qemu-devel] [PATCH v3] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-31 Thread Eric Blake
On 05/30/2018 09:19 PM, Chen Hanxiao wrote: From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Eric Blake Signed-off-by: Chen Hanxiao --- @@ -1079,7 +1083,19 @@ static G

Re: [Qemu-devel] [RFC v2 1/4] docs: mention shared state protect for OOB

2018-05-31 Thread Eric Blake
On 05/31/2018 12:16 AM, Peter Xu wrote: Out-Of-Band handlers need to protect shared state if there is any. Mention it in the document. Suggested-by: Markus Armbruster Signed-off-by: Peter Xu --- docs/devel/qapi-code-gen.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/devel/q

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-05-31 Thread Igor Mammedov
On Wed, 30 May 2018 16:13:32 +0200 David Hildenbrand wrote: > On 30.05.2018 15:08, Igor Mammedov wrote: > > On Thu, 17 May 2018 10:15:17 +0200 > > David Hildenbrand wrote: > > > >> For multi stage hotplug handlers, we'll have to do some error handling > >> in some hotplug functions, so let's

  1   2   3   4   >