[Qemu-devel] [QEMU] crypto/random: Fall back to /dev/random when getrandom returns EAGAIN

2019-07-16 Thread Suraj Jitindar Singh
Hi, I'm trying to use qemu inside a a guest, however since there isn't enough entropy for the rng getrandom() blocks. This means I am unable to even get output from 'qemu --help' for example. This is annoying at best. Thinking about ways to work around this obviously the major one is to have an e

[Qemu-devel] Allow Bit 15 in slbmfee and slbmfev per Power ISA 3.02B Book III pages 1299 and 1300

2019-07-16 Thread Ivan Warren via Qemu-devel
My previous message might have felt through the cracks due to some improper formating. diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 4a5de28036..85f8b147ba 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7064,8 +7064,8 @@ GE

Re: [Qemu-devel] [PATCH-for-4.1 v6 5/5] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/17/19 12:15 AM, Philippe Mathieu-Daudé wrote: > A "system reset" sets the device state machine in READ_ARRAY mode > and, after some delay, set the SR.7 READY bit. > > We do not model timings, so we set the SR.7 bit directly. > > The TYPE_DEVICE interface provides a DeviceReset handler. > Thi

Re: [Qemu-devel] [PATCH v14 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-07-16 Thread David Gibson
On Wed, Jul 17, 2019 at 10:33:00AM +0800, Fei Li wrote: > From: Fei Li > > qemu_thread_create() abort()s on error. Not nice. Give it a return > value and an Error ** argument, so it can return success/failure. > > Considering qemu_thread_create() is quite widely used in qemu, split > this into t

Re: [Qemu-devel] [QEMU-PPC] [PATCH v3] powerpc/spapr: Add host threads parameter to ibm, get_system_parameter

2019-07-16 Thread David Gibson
On Tue, Jul 09, 2019 at 02:00:04PM +1000, Suraj Jitindar Singh wrote: > On Thu, 2019-07-04 at 14:59 +1000, David Gibson wrote: > > On Thu, Jul 04, 2019 at 01:41:59PM +1000, Suraj Jitindar Singh wrote: > > > On Wed, 2019-07-03 at 16:12 +1000, David Gibson wrote: > > > > On Mon, Jul 01, 2019 at 04:19

[Qemu-devel] [PATCH 3/4] cputlb: Byte swap memory transaction attribute

2019-07-16 Thread tony.nguyen
Notice new attribute, byte swap, and force the transaction through the memory slow path. Required by architectures that can invert endianness of memory transaction, e.g. SPARC64 has the Invert Endian TTE bit. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 10 +- include/exec/m

[Qemu-devel] [PATCH 4/4] target/sparc: sun4u Invert Endian TTE bit

2019-07-16 Thread tony.nguyen
This bit configures endianness of PCI MMIO devices. It is used by Solaris and OpenBSD sunhme drivers. Tested working on OpenBSD. Unfortunately Solaris 10 had a unrelated keyboard issue blocking testing... another inch towards Solaris 10 on SPARC64 =) Signed-off-by: Tony Nguyen --- target/sparc

[Qemu-devel] [PATCH 2/4] memory: Single byte swap along the I/O path

2019-07-16 Thread tony.nguyen
Collapsed adjust_endianess and handle_bswap into the former. A single byte swap avoids redundant re-swapping. This is preparation for upcoming SPARC64 TTE invert endian bit which would be a third(!) byte swap along the I/O path. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 58

[Qemu-devel] [PATCH 1/4] tcg: TCGMemOp is now accelerator independent MemOp

2019-07-16 Thread tony.nguyen
Preparation for collapsing the two byte swaps, adjust_endianness and handle_bswap, along the I/O path. Signed-off-by: Tony Nguyen --- MAINTAINERS | 1 + accel/tcg/cputlb.c | 2 +- include/exec/memop.h| 103 +

[Qemu-devel] [PATCH 0/4] Invert Endian bit in SPARCv9 MMU TTE

2019-07-16 Thread tony.nguyen
This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. It is an attempt of the instructions outlined by Richard Henderson to Mark Cave-Ayland. Tested with OpenBSD on sun4u. Solaris 10 is my actual goal, but unfortunately a separate keyboard issue remains in the way. On 01/11/17

Re: [Qemu-devel] [PATCH v4 1/5] spapr: Implement dispatch counter and prod bit on tcg

2019-07-16 Thread Nicholas Piggin
David Gibson's on July 17, 2019 11:51 am: > On Tue, Jul 16, 2019 at 07:27:22PM +1000, Nicholas Piggin wrote: >> David Gibson's on July 16, 2019 5:34 pm: >> > On Tue, Jul 16, 2019 at 12:47:22PM +1000, Nicholas Piggin wrote: >> >> Implement cpu_exec_enter/exit on ppc which calls into new methods of >

[Qemu-devel] [Bug 1836501] Re: cpu_address_space_init fails with assertion

2019-07-16 Thread Lutz
UPDATE: Kernel page handling seems to be related to the -smp 2 parameter. Any number > 1 leads to the paging error while omitting the parameter lead to a running system (without KVM). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. ht

[Qemu-devel] [RFC PATCH] Implement qemu_thread_yield for posix, use it in mttcg to handle EXCP_YIELD

2019-07-16 Thread Nicholas Piggin
This is a bit of proof of concept in case mttcg becomes more important yield could be handled like this. You can have by accident or deliberately force vCPUs onto the same physical CPU and cause inversion issues when the lock holder was preempted by the waiter. This is lightly tested but not to the

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Wei Yang
On Wed, Jul 17, 2019 at 11:11:55AM +0800, Peter Xu wrote: >On Wed, Jul 17, 2019 at 10:46:37AM +0800, Wei Yang wrote: >> On Wed, Jul 17, 2019 at 09:59:10AM +0800, Peter Xu wrote: >> >On Wed, Jul 17, 2019 at 09:29:02AM +0800, Wei Yang wrote: >> >> The value left in nr is the number of bits for the la

[Qemu-devel] [PATCH v5 2/4] spapr: Implement H_PROD

2019-07-16 Thread Nicholas Piggin
H_PROD is added, and H_CEDE is modified to test the prod bit according to PAPR. Signed-off-by: Nicholas Piggin --- hw/ppc/spapr_hcall.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index e615881ac4..8b208ab259 1006

[Qemu-devel] [PATCH v5 3/4] spapr: Implement H_CONFER

2019-07-16 Thread Nicholas Piggin
This does not do directed yielding and is not quite as strict as PAPR specifies in terms of precise dispatch behaviour. This generally will mean suboptimal performance, rather than guest misbehaviour. Linux does not rely on exact dispatch behaviour. Signed-off-by: Nicholas Piggin --- Changes sinc

[Qemu-devel] [PATCH v5 4/4] spapr: Implement H_JOIN

2019-07-16 Thread Nicholas Piggin
This has been useful to modify and test the Linux pseries suspend code but it requires modification to the guest to call it (due to being gated by other unimplemented features). It is not otherwise used by Linux yet, but work is slowly progressing there. Signed-off-by: Nicholas Piggin --- Changes

[Qemu-devel] [PATCH v5 0/4] spapr: implement dispatch and suspend calls

2019-07-16 Thread Nicholas Piggin
Since the last post I tried to account for feedback, fix style, add comments, fixed a bug or two in migration etc, more testing, and dropped the rtas ibm,suspend-me patch for now pending some reworking. Thanks, Nick Nicholas Piggin (4): spapr: Implement VPA dispatch counter and prod bit on tcg

[Qemu-devel] [PATCH v5 1/4] spapr: Implement VPA dispatch counter and prod bit on tcg

2019-07-16 Thread Nicholas Piggin
Implement cpu_exec_enter/exit on ppc which calls into new methods of the same name in PPCVirtualHypervisorClass. These are used by spapr to implement these splpar elements, used in subsequent changes. Signed-off-by: Nicholas Piggin --- Changes since v4: - Store to VPA on the way out as well. - In

Re: [Qemu-devel] [PATCH v2] target/i386: Introduce Denverton CPU model

2019-07-16 Thread Tao Xu
Hi Eduardo, Could I ask a question about introducing a old CPU model? Maybe not so old because it was launched in 2017. It is the former generation (Atom Server) of Snowridge and if this cpu model be added, qemu may can migrate guest between Denverton CPU and Snowridge CPU. I am wondering wh

Re: [Qemu-devel] [PATCH] migration: notify runstate immediately before vcpu stops

2019-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1563261042-15974-1-git-send-email-yan.y.z...@intel.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/

Re: [Qemu-devel] [PATCH v2] tests/boot_linux_console: add a test for riscv64 + virt

2019-07-16 Thread Chih-Min Chao
On Wed, Jul 17, 2019 at 6:59 AM Alistair Francis wrote: > On Tue, Jul 16, 2019 at 2:50 PM Philippe Mathieu-Daudé > wrote: > > > > On 7/16/19 10:43 PM, Alistair Francis wrote: > > > On Tue, Jul 16, 2019 at 6:56 AM Chih-Min Chao > wrote: > > >> > > >> > > >> On Tue, Jul 16, 2019 at 12:34 AM Alist

[Qemu-devel] [PATCH v2] target/i386: Introduce Denverton CPU model

2019-07-16 Thread Tao Xu
Denverton is the Atom Processor of Intel Harrisonville platform. For more information: https://ark.intel.com/content/www/us/en/ark/products/\ codename/63508/denverton.html Signed-off-by: Tao Xu --- Changes in v2: - Renamed as Denverton instead of Denverton-Server, because there is on

Re: [Qemu-devel] [PATCH v1 00/27] Add RISC-V Hypervisor Extension

2019-07-16 Thread Chih-Min Chao
On Wed, Jul 17, 2019 at 8:17 AM Alistair Francis wrote: > On Mon, Jul 15, 2019 at 5:00 AM Peter Maydell > wrote: > > > > On Fri, 7 Jun 2019 at 23:03, Alistair Francis > wrote: > > > At the moment this spec is in a draft state and is subject to change. > As > > > QEMU is extreamly useful in earl

Re: [Qemu-devel] [PATCH 08/10] ppc/xive: Extend XiveTCTX with an router object pointer

2019-07-16 Thread David Gibson
On Mon, Jul 15, 2019 at 05:45:38PM +0200, Cédric Le Goater wrote: > On 12/07/2019 03:15, David Gibson wrote: > > On Wed, Jul 03, 2019 at 07:54:57AM +0200, Cédric Le Goater wrote: > >> On 03/07/2019 04:07, David Gibson wrote: > >>> On Sun, Jun 30, 2019 at 10:45:59PM +0200, Cédric Le Goater wrote: >

Re: [Qemu-devel] [PATCH v5 0/8] target/ppc: Optimize emulation of some Altivec instructions

2019-07-16 Thread David Gibson
On Mon, Jul 15, 2019 at 04:22:46PM +0200, Stefan Brankovic wrote: > Optimize emulation of ten Altivec instructions: lvsl, lvsr, vsl, vsr, vpkpx, > vgbbd, vclzb, vclzh, vclzw and vclzd. > > This series buils up on and complements recent work of Thomas Murta, Mark > Cave-Ayland and Richard Henderson

Re: [Qemu-devel] [RFC v1 05/18] vfio/pci: add pasid alloc/free implementation

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 10:25:55AM +, Liu, Yi L wrote: > > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > > Of David Gibson > > Sent: Monday, July 15, 2019 10:55 AM > > To: Liu, Yi L > > Subject: Re: [RFC v1 05/18] vfio/pci: add pasid alloc/free implementation >

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Peter Xu
On Wed, Jul 17, 2019 at 10:46:37AM +0800, Wei Yang wrote: > On Wed, Jul 17, 2019 at 09:59:10AM +0800, Peter Xu wrote: > >On Wed, Jul 17, 2019 at 09:29:02AM +0800, Wei Yang wrote: > >> The value left in nr is the number of bits for the last word, which > >> could be calculate the last word mask dire

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

2019-07-16 Thread Yan Zhao
On Tue, Jul 09, 2019 at 05:49:16PM +0800, Kirti Wankhede wrote: > Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy > functions. These functions handles pre-copy and stop-and-copy phase. > > In _SAVING|_RUNNING device state or pre-copy phase: > - read pending_bytes > - r

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Wei Yang
On Wed, Jul 17, 2019 at 09:59:10AM +0800, Peter Xu wrote: >On Wed, Jul 17, 2019 at 09:29:02AM +0800, Wei Yang wrote: >> The value left in nr is the number of bits for the last word, which >> could be calculate the last word mask directly. > >Is it true even if start does not align to BITS_PER_LONG?

[Qemu-devel] [PATCH v14 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-07-16 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li R

[Qemu-devel] [PATCH v14 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-07-16 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 35 ++- 1 file changed,

[Qemu-devel] [PATCH v14 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-07-16 Thread Fei Li
Set errno, do some cleanup, and return -1 to replace the temporary &error_abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletion

[Qemu-devel] [PATCH v14 09/11] qemu_thread: supplement error handling for migration

2019-07-16 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state for cal

[Qemu-devel] [PATCH v14 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary &error_abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+),

[Qemu-devel] [PATCH v14 07/11] qemu_thread: supplement error handling for iothread_complete

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary &error_abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- iothread.c | 18 -- 1 file

[Qemu-devel] [PATCH v14 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary &error_abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- dump/dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump/dum

[Qemu-devel] [PATCH v14 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-07-16 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the &error_abort to qemu_thread_create() e

[Qemu-devel] [PATCH v14 00/11] qemu_thread_create: propagate the error to callers to handle

2019-07-16 Thread Fei Li
Hi, This idea comes from BiteSizedTasks, and this patch series implement the error checking of qemu_thread_create: make qemu_thread_create return a flag to indicate if it succeeded rather than failing with an error; make all callers check it. The first patch modifies the qemu_thread_create() by p

[Qemu-devel] [PATCH v14 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-07-16 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary &error_abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson Reviewed-by: Markus Armbruster --- hw/ppc/spapr_hcall.c | 12 1 fi

[Qemu-devel] [PATCH v14 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-07-16 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make qemu

[Qemu-devel] [PATCH v14 06/11] qemu_thread: supplement error handling for emulated_realize

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary &error_abort. If the second thread fails to be created, use a VEvent to cancel the first thread before the join(). Cc: Markus Armbruster Cc: Gerd Hoffmann Cc: Christophe Ferge

Re: [Qemu-devel] [PATCH v7 07/13] vfio: Add migration state change notifier

2019-07-16 Thread Yan Zhao
On Tue, Jul 09, 2019 at 05:49:14PM +0800, Kirti Wankhede wrote: > Added migration state change notifier to get notification on migration state > change. These states are translated to VFIO device state and conveyed to > vendor > driver. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia >

Re: [Qemu-devel] [PATCH] migration: notify runstate immediately before vcpu stops

2019-07-16 Thread Yan Zhao
On Tue, Jul 16, 2019 at 06:33:41PM +0800, Peter Xu wrote: > On Tue, Jul 16, 2019 at 03:57:49AM -0400, Yan Zhao wrote: > > On Tue, Jul 16, 2019 at 03:50:25PM +0800, Peter Xu wrote: > > > On Tue, Jul 16, 2019 at 03:29:19AM -0400, Yan Zhao wrote: > > > > On Tue, Jul 16, 2019 at 03:23:16PM +0800, Peter

Re: [Qemu-devel] [PATCH for-4.2 2/2] spapr: initial implementation for H_TPM_COMM/spapr-tpm-proxy

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 06:53:13PM -0500, Michael Roth wrote: > This implements the H_TPM_COMM hypercall, which is used by an > Ultravisor to pass TPM commands directly to the host's TPM device, or > a TPM Resource Manager associated with the device. > > This also introduces a new virtual device,

Re: [Qemu-devel] [PATCH 2/2] spapr: initial implementation for H_TPM_COMM hcall

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 11:30:01AM -0500, Michael Roth wrote: > Quoting David Gibson (2019-07-14 21:25:24) > > On Fri, Jul 12, 2019 at 09:34:46AM -0500, Michael Roth wrote: > > > Quoting David Gibson (2019-07-12 01:46:19) > > > > On Thu, Jul 11, 2019 at 08:19:34PM -0500, Michael Roth wrote: > > > >

Re: [Qemu-devel] [PATCH v4 1/5] spapr: Implement dispatch counter and prod bit on tcg

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 07:27:22PM +1000, Nicholas Piggin wrote: > David Gibson's on July 16, 2019 5:34 pm: > > On Tue, Jul 16, 2019 at 12:47:22PM +1000, Nicholas Piggin wrote: > >> Implement cpu_exec_enter/exit on ppc which calls into new methods of > >> the same name in PPCVirtualHypervisorClass.

Re: [Qemu-devel] [PATCH v4 3/5] spapr: Implement H_CONFER

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 08:25:28PM +1000, Nicholas Piggin wrote: > David Gibson's on July 16, 2019 6:25 pm: > > On Tue, Jul 16, 2019 at 12:47:24PM +1000, Nicholas Piggin wrote: > >> This does not do directed yielding and is not quite as strict as PAPR > >> specifies in terms of precise dispatch beh

Re: [Qemu-devel] [PATCH v4 5/5] spapr: Implement ibm,suspend-me

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 09:15:23PM +1000, Nicholas Piggin wrote: 65;5603;1c> David Gibson's on July 16, 2019 6:30 pm: > > On Tue, Jul 16, 2019 at 12:47:26PM +1000, Nicholas Piggin wrote: > >> This has been useful to modify and test the Linux pseries suspend > >> code but it requires modification to

Re: [Qemu-devel] [RFC PATCH for 4.1?] target/ppc: move opcode decode tables to PowerPCCPU

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 01:13:52PM +0100, Alex Bennée wrote: > The opcode decode tables aren't really part of the CPUPPCState but an > internal implementation detail for the translator. This can cause > problems with memcpy in cpu_copy as any table created during > ppc_cpu_realize get written over

Re: [Qemu-devel] [PATCH] ppc: Fix some memory leaks

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 07:44:24AM -0700, Richard Henderson wrote: > On 7/16/19 8:24 AM, Shivaprasad G Bhat wrote: > > @@ -827,6 +827,7 @@ int spapr_dt_drc(void *fdt, int offset, Object *owner, > > uint32_t drc_type_mask) > > Object *obj; > > SpaprDrc *drc; > > SpaprDrcC

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Peter Xu
On Wed, Jul 17, 2019 at 09:29:02AM +0800, Wei Yang wrote: > The value left in nr is the number of bits for the last word, which > could be calculate the last word mask directly. Is it true even if start does not align to BITS_PER_LONG? > > Remove the unnecessary size. > > Signed-off-by: Wei Yan

[Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Wei Yang
The value left in nr is the number of bits for the last word, which could be calculate the last word mask directly. Remove the unnecessary size. Signed-off-by: Wei Yang --- resend with wider audience --- util/bitmap.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/uti

Re: [Qemu-devel] [PATCH] migration: remove unused field bytes_xfer

2019-07-16 Thread Wei Yang
On Tue, Jun 11, 2019 at 10:33:29AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> On Tue, Apr 02, 2019 at 08:31:06AM +0800, Wei Yang wrote: >>>MigrationState->bytes_xfer is only set to 0 in migrate_init(). >>> >>>Remove this unnecessary field. >>> >>>Signed-off-by: Wei Yang >> >> Hi, David > >Hi

Re: [Qemu-devel] [PATCH 2/3] migration/ram.c: start of cpu_physical_memory_sync_dirty_bitmap is always 0

2019-07-16 Thread Wei Yang
On Tue, May 14, 2019 at 03:21:08PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> Since start of cpu_physical_memory_sync_dirty_bitmap is always 0, we can >> remove this parameter and simplify the calculation a bit. >> >> Signed-off-by: Wei Yang > >So I

[Qemu-devel] [PATCH] migration: use migration_is_active to represent active state

2019-07-16 Thread Wei Yang
Wrap the check into a function to make it easy to read. Signed-off-by: Wei Yang --- include/migration/misc.h | 1 + migration/migration.c| 12 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/migration/misc.h b/include/migration/misc.h index 5cdbabd094..42

[Qemu-devel] [PATCH v2 2/2] vhost-user-scsi: Call virtio_scsi_common_unrealize() when device realize failed

2019-07-16 Thread elohimes
From: Xie Yongji This avoids memory leak when device hotplug is failed. Signed-off-by: Xie Yongji --- hw/scsi/vhost-user-scsi.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index a9fd8ea305..17826ef8

[Qemu-devel] [PATCH v2 1/2] vhost-scsi: Call virtio_scsi_common_unrealize() when device realize failed

2019-07-16 Thread elohimes
From: Xie Yongji This avoids memory leak when device hotplug is failed. Signed-off-by: Xie Yongji --- hw/scsi/vhost-scsi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 4090f99ee4..c0dd9bdf89 100644 --- a/hw/scsi/vhos

Re: [Qemu-devel] [PATCH v1 00/27] Add RISC-V Hypervisor Extension

2019-07-16 Thread Alistair Francis
On Mon, Jul 15, 2019 at 5:00 AM Peter Maydell wrote: > > On Fri, 7 Jun 2019 at 23:03, Alistair Francis > wrote: > > At the moment this spec is in a draft state and is subject to change. As > > QEMU is extreamly useful in early bring up I think it makes sense for > > QEMU to support non-frozen ex

Re: [Qemu-devel] [PATCH 1/2] vhost-scsi: Call virtio_scsi_common_unrealize() when device realize failed

2019-07-16 Thread Yongji Xie
On Tue, 16 Jul 2019 at 22:42, Stefan Hajnoczi wrote: > > On Mon, Jul 15, 2019 at 06:23:25PM +0800, elohi...@gmail.com wrote: > > From: Xie Yongji > > > > This avoids memory leak when device hotplug is failed. > > > > Signed-off-by: Xie Yongji > > --- > > hw/scsi/vhost-scsi.c | 4 +++- > > 1 fil

Re: [Qemu-devel] [PATCH v1 00/27] Add RISC-V Hypervisor Extension

2019-07-16 Thread Alistair Francis
On Mon, Jul 15, 2019 at 4:50 AM Chih-Min Chao wrote: > > > > On Sat, Jun 8, 2019 at 6:03 AM Alistair Francis > wrote: >> >> This patch series adds the RISC-V Hypervisor extension 0.3. This is the >> latest draft spec of the Hypervisor extension. >> >> The Hypervisor extension is disabled by defa

Re: [Qemu-devel] [PATCH] ppc: Fix some memory leaks

2019-07-16 Thread David Gibson
On Tue, Jul 16, 2019 at 03:24:57AM -0500, Shivaprasad G Bhat wrote: > valgrind showed some memory leaks while running qemu-system-ppc64. > Fixing them in this patch. > > Signed-off-by: Shivaprasad G Bhat Applied, thanks. > --- > hw/ppc/spapr_caps.c |2 ++ > hw/ppc/spapr_drc.c |5 +++

Re: [Qemu-devel] [PATCH v5 0/8] target/ppc: Optimize emulation of some Altivec instructions

2019-07-16 Thread David Gibson
On Mon, Jul 15, 2019 at 04:22:46PM +0200, Stefan Brankovic wrote: > Optimize emulation of ten Altivec instructions: lvsl, lvsr, vsl, vsr, vpkpx, > vgbbd, vclzb, vclzh, vclzw and vclzd. > > This series buils up on and complements recent work of Thomas Murta, Mark > Cave-Ayland and Richard Henderson

[Qemu-devel] [PATCH for-4.2 2/2] spapr: initial implementation for H_TPM_COMM/spapr-tpm-proxy

2019-07-16 Thread Michael Roth
This implements the H_TPM_COMM hypercall, which is used by an Ultravisor to pass TPM commands directly to the host's TPM device, or a TPM Resource Manager associated with the device. This also introduces a new virtual device, spapr-tpm-proxy, which is used to configure the host TPM path to be used

[Qemu-devel] [PATCH for-4.2 1/2] docs/specs: initial spec summary for Ultravisor-related hcalls

2019-07-16 Thread Michael Roth
For now this only covers hcalls relating to TPM communication since it's the only one particularly important from a QEMU perspective atm, but others can be added here where it makes sense. The full specification for all hcalls/ucalls will eventually be made available in the public/OpenPower versio

[Qemu-devel] [PATCH for-4.2 0/2] spapr: Implement H_TPM_COMM for accessing host TPM device

2019-07-16 Thread Michael Roth
These patches are based on ppc-for-4.2 and are also available at: https://github.com/mdroth/qemu/commits/spapr-tpm-hcall-v1 This patchset implements the H_TPM_COMM hypercall, which provides a way for an Ultravisor to pass raw TPM commands on to a host's TPM device, either directly or through a

[Qemu-devel] [ANNOUNCE] QEMU 4.1.0-rc1 is now available

2019-07-16 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the second release candidate for the QEMU 4.1 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-4.1.0-rc1.tar.xz http://down

Re: [Qemu-devel] [PATCH v2] tests/boot_linux_console: add a test for riscv64 + virt

2019-07-16 Thread Alistair Francis
On Tue, Jul 16, 2019 at 2:50 PM Philippe Mathieu-Daudé wrote: > > On 7/16/19 10:43 PM, Alistair Francis wrote: > > On Tue, Jul 16, 2019 at 6:56 AM Chih-Min Chao > > wrote: > >> > >> > >> On Tue, Jul 16, 2019 at 12:34 AM Alistair Francis > >> wrote: > >>> > >>> On Mon, Jul 15, 2019 at 6:02 AM P

Re: [Qemu-devel] [PATCH v3 0/6] Add the STM32F405 and Netduino Plus 2 machine

2019-07-16 Thread Alistair Francis
On Tue, Jun 18, 2019 at 9:53 PM Alistair Francis wrote: > > > Now that the Arm-M4 CPU has been added to QEMU we can add the Netduino > Plus 2 machine. This is very similar to the STM32F205 and Netduino 2 SoC > and machine. Ping? Alistair > > v3: > - Remove custom reset handler > - Add init-en

Re: [Qemu-devel] [PATCH-for-4.1 v6 3/5] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2019-07-16 Thread Alistair Francis
On Tue, Jul 16, 2019 at 3:16 PM Philippe Mathieu-Daudé wrote: > > The same pattern is used when setting the flash in READ_ARRAY mode: > - Set the state machine command to READ_ARRAY > - Reset the write_cycle counter > - Reset the memory region in ROMD > > Refactor the current code by extracting th

Re: [Qemu-devel] [PATCH-for-4.1 v6 2/5] hw/block/pflash_cfi01: Document use of non-CFI compliant command '0x00'

2019-07-16 Thread Alistair Francis
On Tue, Jul 16, 2019 at 3:16 PM Philippe Mathieu-Daudé wrote: > > The command 0x00 is used by this model since its origin (commit > 05ee37ebf630). In this commit the command is described with a > amusing '/* ??? */' comment, probably meaning 'FIXME'. > > switch (cmd) { > case 0x00:

[Qemu-devel] [PATCH-for-4.1 v6 5/5] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-16 Thread Philippe Mathieu-Daudé
A "system reset" sets the device state machine in READ_ARRAY mode and, after some delay, set the SR.7 READY bit. We do not model timings, so we set the SR.7 bit directly. The TYPE_DEVICE interface provides a DeviceReset handler. This pflash device is a subclass of TYPE_SYS_BUS_DEVICE (which is a

[Qemu-devel] [PATCH-for-4.1 v6 4/5] hw/block/pflash_cfi01: Rename 'reset_flash' label as 'mode_read_array'

2019-07-16 Thread Philippe Mathieu-Daudé
Rename the 'reset_flash' as 'mode_read_array' to make explicit we do not reset the device, we simply set its internal state machine in the READ_ARRAY mode. We do not reset the status register error bits, as a device reset would do. Reviewed-by: John Snow Reviewed-by: Alistair Francis Signed-off-

[Qemu-devel] [PATCH-for-4.1 v6 3/5] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2019-07-16 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - On a read access (on invalid command)

[Qemu-devel] [PATCH-for-4.1 v6 1/5] hw/block/pflash_cfi01: Removed an unused timer

2019-07-16 Thread Philippe Mathieu-Daudé
The 'CFI02' NOR flash was introduced in commit 29133e9a0fff, with timing modelled. One year later, the CFI01 model was introduced (commit 05ee37ebf630) based on the CFI02 model. As noted in the header, "It does not support timings". 12 years later, we never had to model the device timings. Time to

[Qemu-devel] [PATCH-for-4.1 v6 0/5] hw/block/pflash_cfi01: Add DeviceReset() handler

2019-07-16 Thread Philippe Mathieu-Daudé
Hello it's me again, insisting with this series because there are at least 2 different report of guests bricked on reset due to the bug fixed by patch #5: https://bugzilla.redhat.com/show_bug.cgi?id=1678713 https://bugzilla.redhat.com/show_bug.cgi?id=1704584 Patches missing review: 2 and 3 The pf

[Qemu-devel] [PATCH-for-4.1 v6 2/5] hw/block/pflash_cfi01: Document use of non-CFI compliant command '0x00'

2019-07-16 Thread Philippe Mathieu-Daudé
The command 0x00 is used by this model since its origin (commit 05ee37ebf630). In this commit the command is described with a amusing '/* ??? */' comment, probably meaning 'FIXME'. switch (cmd) { case 0x00: /* ??? */ ... This comment survived 12 years because the 0x00

Re: [Qemu-devel] [PATCH v7 06/13] vfio: Add VM state change handler to know state of VM

2019-07-16 Thread Alex Williamson
On Tue, 9 Jul 2019 15:19:13 +0530 Kirti Wankhede wrote: > VM state change handler gets called on change in VM's state. This is used to > set > VFIO device state to _RUNNING. > VM state change handler, migration state change handler and log_sync listener > are called asynchronously, which sometim

Re: [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/16/19 11:32 PM, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20190716160143.394-1-phi...@redhat.com/ > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Subject: [Qemu-devel] [PULL 0/2] pflash-ne

Re: [Qemu-devel] [PATCH] kconfig: do not select VMMOUSE

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/16/19 11:13 PM, Paolo Bonzini wrote: > Just make it a default device, so that it is automatically removed if VMPORT > is not included in the binary (as is the case with --with-default-devices). > > Signed-off-by: Paolo Bonzini > --- > hw/i386/Kconfig | 3 +-- > 1 file changed, 1 insertion(+

Re: [Qemu-devel] [PATCH v2] tests/boot_linux_console: add a test for riscv64 + virt

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/16/19 10:43 PM, Alistair Francis wrote: > On Tue, Jul 16, 2019 at 6:56 AM Chih-Min Chao wrote: >> >> >> On Tue, Jul 16, 2019 at 12:34 AM Alistair Francis >> wrote: >>> >>> On Mon, Jul 15, 2019 at 6:02 AM Philippe Mathieu-Daudé >>> wrote: On 7/15/19 1:09 PM, Chih-Min Chao wrote: >

[Qemu-devel] [PATCH-for-4.2 1/1] Only enable the halt poll control MSR if it is supported by the host

2019-07-16 Thread Mark Kanda
The halt poll control MSR should only be enabled on hosts which support it. Fixes: ("kvm: i386: halt poll control MSR support") Signed-off-by: Mark Kanda --- target/i386/cpu.c | 8 +++- target/i386/kvm.c | 2 -- target/i386/machine.c | 1 - 3 files changed, 7 insertions(+), 4 deleti

[Qemu-devel] [PATCH-for-4.2 0/1] Only enable the halt poll control MSR if it is supported by the host

2019-07-16 Thread Mark Kanda
This patch addresses an issue with the 'queued, but not yet applied' halt polling MSR patch. With this patch, halt polling is enabled 'by default'; this causes issues with hosts which don't support halt polling. The fix is to only enable halt polling if it is supported by the host. Mark Kanda (1):

Re: [Qemu-devel] [PATCH] kconfig: do not select VMMOUSE

2019-07-16 Thread Montes, Julio
Thanks Paolo On Tue, 2019-07-16 at 23:13 +0200, Paolo Bonzini wrote: > Just make it a default device, so that it is automatically removed if > VMPORT > is not included in the binary (as is the case with --with-default- > devices). > > Signed-off-by: Paolo Bonzini > --- > hw/i386/Kconfig | 3 +--

Re: [Qemu-devel] [PATCH v7 05/13] vfio: Add migration region initialization and finalize function

2019-07-16 Thread Alex Williamson
On Tue, 9 Jul 2019 15:19:12 +0530 Kirti Wankhede wrote: > - Migration functions are implemented for VFIO_DEVICE_TYPE_PCI device in this > patch series. > - VFIO device supports migration or not is decided based of migration region > query. If migration region query is successful and migration

Re: [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1

2019-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190716160143.394-1-phi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1 Message-id: 20190716160143.394-1-phi..

Re: [Qemu-devel] [patch QEMU] kvm: i386: halt poll control MSR support

2019-07-16 Thread Mark Kanda
On 7/16/2019 4:15 PM, Paolo Bonzini wrote: On 16/07/19 23:09, Paolo Bonzini wrote: As such, I think we should only enable halt polling if it is supported on the host - see the attached patch. ...thoughts? No, it should not be enabled by default at all, at least not until we can require kernel

Re: [Qemu-devel] [patch QEMU] kvm: i386: halt poll control MSR support

2019-07-16 Thread Paolo Bonzini
On 16/07/19 23:09, Paolo Bonzini wrote: >> As such, I think we should only enable halt polling if it is supported >> on the host - see the attached patch. >> >> ...thoughts? > No, it should not be enabled by default at all, at least not until we > can require kernel 5.2. My mistake, sorry. Can yo

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

2019-07-16 Thread Alex Williamson
On Tue, 9 Jul 2019 15:19:11 +0530 Kirti Wankhede wrote: > These functions save and restore PCI device specific data - config > space of PCI device. > Tested save and restore with MSI and MSIX type. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > --- > hw/vfio/pci.c

[Qemu-devel] [PATCH] kconfig: do not select VMMOUSE

2019-07-16 Thread Paolo Bonzini
Just make it a default device, so that it is automatically removed if VMPORT is not included in the binary (as is the case with --with-default-devices). Signed-off-by: Paolo Bonzini --- hw/i386/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/Kconfig b/hw/i38

Re: [Qemu-devel] [patch QEMU] kvm: i386: halt poll control MSR support

2019-07-16 Thread Paolo Bonzini
On 16/07/19 21:52, Mark Kanda wrote: > > As such, I think we should only enable halt polling if it is supported > on the host - see the attached patch. > > ...thoughts? No, it should not be enabled by default at all, at least not until we can require kernel 5.2. My mistake, sorry. Can you post

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

2019-07-16 Thread Alex Williamson
On Tue, 9 Jul 2019 15:19:08 +0530 Kirti Wankhede wrote: > - Defined MIGRATION region type and sub-type. > - Used 3 bits to define VFIO device states. > Bit 0 => _RUNNING > Bit 1 => _SAVING > Bit 2 => _RESUMING > Combination of these bits defines VFIO device's state during migratio

Re: [Qemu-devel] [PATCH v2] tests/boot_linux_console: add a test for riscv64 + virt

2019-07-16 Thread Alistair Francis
On Tue, Jul 16, 2019 at 6:56 AM Chih-Min Chao wrote: > > > On Tue, Jul 16, 2019 at 12:34 AM Alistair Francis > wrote: >> >> On Mon, Jul 15, 2019 at 6:02 AM Philippe Mathieu-Daudé >> wrote: >> > >> > On 7/15/19 1:09 PM, Chih-Min Chao wrote: >> > > On Mon, Jul 15, 2019 at 5:15 PM Philippe Mathieu

[Qemu-devel] [Bug 1836501] Re: cpu_address_space_init fails with assertion

2019-07-16 Thread Lutz
My test setup is now Debian Buster with qemu-system-arm 3.1 and a host with KVM-enabled Kernel 4.9.61 on Odroid XU4. Following results: qemu-system-arm -M vexpress-a15 -smp 2 -m 512 -kernel vmlinuz -initrd initrd.gz -dtb vexpress-v2p-ca15-tc1.dtb -device virtio-blk-device,drive=inst-blk

Re: [Qemu-devel] [PULL 08/10] target/arm: Conditionalize some asserts on aarch32 support

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/16/19 8:42 PM, Laszlo Ersek wrote: > On 07/16/19 18:59, Peter Maydell wrote: >> On Tue, 16 Jul 2019 at 17:51, Laszlo Ersek wrote: >>> The issue still reproduces, so it makes sense for me to look at the host >>> kernel version... Well, I'm afraid it won't help much, for an upstream >>> investi

Re: [Qemu-devel] [PULL for-4.1 0/3] s390x cpumodel fixes

2019-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190716140546.6661-1-coh...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PULL for-4.1 0/3] s390x cpumodel fixes Message-id: 20190716140546.6661-1-coh...@re

Re: [Qemu-devel] [patch QEMU] kvm: i386: halt poll control MSR support

2019-07-16 Thread Mark Kanda
Hi all, If the host doesn't support halt polling, this patch seems to break libvirt save/restore: " virsh # save halt-poll-vm halt-poll-vm.sav --running --verbose Save: [100 %] Domain halt-poll-vm saved to halt-poll-vm.sav virsh # restore halt-poll-vm.sav error: Failed to restore domain from

Re: [Qemu-devel] [PULL 08/19] hw/i386: turn off vmport if CONFIG_VMPORT is disabled

2019-07-16 Thread Paolo Bonzini
Should VMMOUSE also be implied? Paolo Il mar 16 lug 2019, 20:55 Philippe Mathieu-Daudé ha scritto: > Hi, > > On 7/16/19 10:11 AM, Paolo Bonzini wrote: > > From: Julio Montes > > > > vmport device is not included when CONFIG_VMPORT is disabled, hence > > QEMU fails with the following error: > >

Re: [Qemu-devel] [PULL 08/19] hw/i386: turn off vmport if CONFIG_VMPORT is disabled

2019-07-16 Thread Philippe Mathieu-Daudé
Hi, On 7/16/19 10:11 AM, Paolo Bonzini wrote: > From: Julio Montes > > vmport device is not included when CONFIG_VMPORT is disabled, hence > QEMU fails with the following error: > > `Unknown device 'vmport' for bus 'ISA': unknown.` > > v2: imply VMPORT (Paolo Bonzini ) > > Signed-off-by: Juli

[Qemu-devel] [PATCH v3 1/2] roms: Add OpenSBI version 0.4

2019-07-16 Thread Alistair Francis
Add OpenSBI version 0.4 as a git submodule and as a prebult binary. OpenSBI (https://github.com/riscv/opensbi) aims to provide an open-source reference implementation of the RISC-V Supervisor Binary Interface (SBI) specifications for platform-specific firmwares executing in M-mode. For all support

  1   2   3   4   >