Re: [Qemu-devel] [PATCH v4 0/2] Rewrite TCP packet comparison in colo

2018-01-03 Thread Mao Zhongyi
Hi, Jason Long time no news, Ping... Thanks, Mao On 12/25/2017 10:54 AM, Mao Zhongyi wrote: v4: p2: fix some typo [Zhang Chen] v3: p1: merged the patch1 and patch2 from v2 p2: -merged the patch3 and patch4 from v2 -implement the same

Re: [Qemu-devel] [PATCH v1 03/21] RISC-V CPU Core Definition

2018-01-03 Thread Michael Clark
On Thu, Jan 4, 2018 at 7:47 PM, Antony Pavlov wrote: > On Wed, 3 Jan 2018 13:44:07 +1300 > Michael Clark wrote: > > > Add CPU state header, CPU definitions and initialization routines > > > > Signed-off-by: Michael Clark > > --- > >

Re: [Qemu-devel] CVE-2017-5715: relevant qemu patches

2018-01-03 Thread Alexandre DERUMIER
does somebody have a redhat account to see te content of: https://access.redhat.com/solutions/3307851 "Impacts of CVE-2017-5754, CVE-2017-5753, and CVE-2017-5715 to Red Hat Virtualization products" - Mail original - De: "aderumier" À: "Stefan Priebe, Profihost AG"

Re: [Qemu-devel] CVE-2017-5715: relevant qemu patches

2018-01-03 Thread Alexandre DERUMIER
>>Can anybody point me to the relevant qemu patches? I don't have find them yet. Do you known if a vm using kvm64 cpu model is protected or not ? - Mail original - De: "Stefan Priebe, Profihost AG" À: "qemu-devel" Envoyé: Jeudi 4 Janvier

Re: [Qemu-devel] [virtio-dev] [RFC 0/3] Extend vhost-user to support VFIO based accelerators

2018-01-03 Thread Jason Wang
On 2018年01月04日 14:18, Tiwei Bie wrote: On Wed, Jan 03, 2018 at 10:34:36PM +0800, Jason Wang wrote: On 2017年12月22日 14:41, Tiwei Bie wrote: This RFC patch set does some small extensions to vhost-user protocol to support VFIO based accelerators, and makes it possible to get the similar

Re: [Qemu-devel] [PATCH v7 07/17] target/m68k: add chk and chk2

2018-01-03 Thread Richard Henderson
On 01/03/2018 05:29 PM, Laurent Vivier wrote: > +/* From the specs: > + * X: Not affected, N,V: Undefined, > + * Z: Set if val is equal to lb or ub > + * V: Set if val < lb or val > ub, cleared otherwise ^^ Just a typo here. Otherwise, Reviewed-by: Richard

Re: [Qemu-devel] [PATCH v1 03/21] RISC-V CPU Core Definition

2018-01-03 Thread Antony Pavlov
On Wed, 3 Jan 2018 13:44:07 +1300 Michael Clark wrote: > Add CPU state header, CPU definitions and initialization routines > > Signed-off-by: Michael Clark > --- > target/riscv/cpu.c | 338 +++ > target/riscv/cpu.h

Re: [Qemu-devel] [PATCH v14 9/9] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2018-01-03 Thread gengdongjiu
On 2018/1/3 21:44, Igor Mammedov wrote: > On Wed, 3 Jan 2018 17:13:45 +0800 > gengdongjiu wrote: > >> On 2017/12/28 23:07, Igor Mammedov wrote: >>> On Thu, 28 Dec 2017 13:54:18 +0800 >>> Dongjiu Geng wrote: >>> Add SIGBUS signal handler.

[Qemu-devel] CVE-2017-5715: relevant qemu patches

2018-01-03 Thread Stefan Priebe - Profihost AG
Hello, i've seen some vendors have updated qemu regarding meltdown / spectre. f.e.: CVE-2017-5715: QEMU was updated to allow passing through new MSR and CPUID flags from the host VM to the CPU, to allow enabling/disabling branch prediction features in the Intel CPU. (bsc#1068032)

Re: [Qemu-devel] [virtio-dev] [RFC 0/3] Extend vhost-user to support VFIO based accelerators

2018-01-03 Thread Tiwei Bie
On Wed, Jan 03, 2018 at 10:34:36PM +0800, Jason Wang wrote: > On 2017年12月22日 14:41, Tiwei Bie wrote: > > This RFC patch set does some small extensions to vhost-user protocol > > to support VFIO based accelerators, and makes it possible to get the > > similar performance of VFIO passthru while

[Qemu-devel] [PATCH RESEND V3 16/16] COLO: quick failover process by kick COLO thread

2018-01-03 Thread Zhang Chen
From: zhanghailiang COLO thread may sleep at qemu_sem_wait(>colo_checkpoint_sem), while failover works begin, It's better to wakeup it to quick the process. Signed-off-by: zhanghailiang --- migration/colo.c | 8 1 file

[Qemu-devel] [PATCH RESEND V3 14/16] filter-rewriter: handle checkpoint and failover event

2018-01-03 Thread Zhang Chen
After one round of checkpoint, the states between PVM and SVM become consistent, so it is unnecessary to adjust the sequence of net packets for old connections, besides, while failover happens, filter-rewriter needs to check if it still needs to adjust sequence of net packets. Cc: Jason Wang

[Qemu-devel] [PATCH RESEND V3 12/16] COLO: flush host dirty ram from cache

2018-01-03 Thread Zhang Chen
From: zhanghailiang Don't need to flush all VM's ram from cache, only flush the dirty pages since last checkpoint Cc: Juan Quintela Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen

[Qemu-devel] [PATCH RESEND V3 15/16] COLO: notify net filters about checkpoint/failover event

2018-01-03 Thread Zhang Chen
From: zhanghailiang Notify all net filters about the checkpoint and failover event. Cc: Jason Wang Signed-off-by: zhanghailiang --- migration/colo.c | 12 1 file changed, 12 insertions(+) diff

[Qemu-devel] [PATCH RESEND V3 10/16] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-01-03 Thread Zhang Chen
From: zhanghailiang If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together with 'x_colo_lost_heartbeat', Users can intervene in COLO's failover work immediately. If users don't want to get involved in COLO's

[Qemu-devel] [PATCH RESEND V3 08/16] ram/COLO: Record the dirty pages that SVM received

2018-01-03 Thread Zhang Chen
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log for SVM, just like migration, in this way, we can record both

[Qemu-devel] [PATCH RESEND V3 09/16] COLO: Flush memory data from ram cache

2018-01-03 Thread Zhang Chen
From: zhanghailiang During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after

[Qemu-devel] [PATCH RESEND V3 13/16] filter: Add handle_event method for NetFilterClass

2018-01-03 Thread Zhang Chen
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Cc: Jason Wang Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/filter.c | 17 + net/net.c

[Qemu-devel] [PATCH RESEND V3 04/16] COLO: integrate colo compare with colo frame

2018-01-03 Thread Zhang Chen
For COLO FT, both the PVM and SVM run at the same time, only sync the state while it needs. So here, let SVM runs while not doing checkpoint, change DEFAULT_MIGRATE_X_CHECKPOINT_DELAY to 200*100. Besides, we forgot to release colo_checkpoint_semd and colo_delay_timer, fix them here. Cc: Jason

[Qemu-devel] [PATCH RESEND V3 06/16] COLO: Remove colo_state migration struct

2018-01-03 Thread Zhang Chen
From: zhanghailiang We need to know if migration is going into COLO state for incoming side before start normal migration. Instead by using the VMStateDescription to send colo_state from source side to destination side, we use MIG_CMD_ENABLE_COLO to indicate

[Qemu-devel] [PATCH RESEND V3 11/16] savevm: split the process of different stages for loadvm/savevm

2018-01-03 Thread Zhang Chen
From: zhanghailiang There are several stages during loadvm/savevm process. In different stage, migration incoming processes different types of sections. We want to control these stages more accuracy, it will benefit COLO performance, we don't have to save type of

[Qemu-devel] [PATCH RESEND V3 07/16] COLO: Load dirty pages into SVM's RAM cache firstly

2018-01-03 Thread Zhang Chen
From: zhanghailiang We should not load PVM's state directly into SVM, because there maybe some errors happen when SVM is receving data, which will break SVM. We need to ensure receving all data before load the state into SVM. We use an extra memory to cache these

[Qemu-devel] [PATCH RESEND V3 02/16] colo-compare: implement the process of checkpoint

2018-01-03 Thread Zhang Chen
While do checkpoint, we need to flush all the unhandled packets, By using the filter notifier mechanism, we can easily to notify every compare object to do this process, which runs inside of compare threads as a coroutine. Cc: Jason Wang Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH RESEND V3 03/16] colo-compare: use notifier to notify packets comparing result

2018-01-03 Thread Zhang Chen
It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Cc: Jason Wang Signed-off-by: Zhang Chen Signed-off-by: zhanghailiang --- net/colo-compare.c | 32 +---

[Qemu-devel] [PATCH RESEND V3 05/16] COLO: Add block replication into colo process

2018-01-03 Thread Zhang Chen
Make sure master start block replication after slave's block replication started. Besides, we need to activate VM's blocks before goes into COLO state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen

[Qemu-devel] [PATCH RESEND V3 01/16] filter-rewriter: fix memory leak for connection in connection_track_table

2018-01-03 Thread Zhang Chen
After a net connection is closed, we didn't clear its releated resources in connection_track_table, which will lead to memory leak. Let't track the state of net connection, if it is closed, its related resources will be cleared up. Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH RESEND V3 00/16] COLO: integrate colo frame with block replication and COLO proxy

2018-01-03 Thread Zhang Chen
Hi~ (Sorry, I forgot add the qemu-devel maillist, resend this series) COLO Frame, block replication and COLO proxy(colo-compare,filter-mirror, filter-redirector,filter-rewriter) have been exist in qemu for long time, it's time to integrate these three parts to make COLO really works. In this

[Qemu-devel] [PATCH] memory: update comments and fix some typos

2018-01-03 Thread Jay Zhou
Signed-off-by: Jay Zhou --- include/exec/memory.h | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index a4cabdf..6e5684d 100644 --- a/include/exec/memory.h +++

[Qemu-devel] [PATCH v3 2/3] qemu: virtio-net: use 64-bit values for feature flags

2018-01-03 Thread Jason Baron via Qemu-devel
In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-open.org ---

[Qemu-devel] [PATCH v3 0/3] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2018-01-03 Thread Jason Baron via Qemu-devel
We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields, and does not require custom ethtool commands for virtio_net. The ability to set linkspeed and duplex is useful in

[Qemu-devel] [PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor

2018-01-03 Thread Jason Baron via Qemu-devel
The ability to set speed and duplex for virtio_net is useful in various scenarios as described here: 16032be virtio_net: add ethtool support for set and get of settings However, it would be nice to be able to set this from the hypervisor, such that virtio_net doesn't require custom guest ethtool

[Qemu-devel] [PATCH v3 3/3] qemu: add linkspeed and duplex settings to virtio-net

2018-01-03 Thread Jason Baron via Qemu-devel
Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', this requires custom ethtool commands for virtio-net by default. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user can subsequently

Re: [Qemu-devel] [PATCH v14 7/9] ARM: ACPI: Add GPIO notification type for hardware RAS error

2018-01-03 Thread gengdongjiu
On 2018/1/3 21:36, Igor Mammedov wrote: > On Wed, 3 Jan 2018 11:48:30 +0800 > gengdongjiu wrote: > >> On 2017/12/28 22:53, Igor Mammedov wrote: >>> On Thu, 28 Dec 2017 13:54:16 +0800 >>> Dongjiu Geng wrote: > [...] +static void

Re: [Qemu-devel] [PATCH] spapr: Correct compatibility mode setting for hotplugged CPUs

2018-01-03 Thread Alexey Kardashevskiy
On 04/01/18 15:24, David Gibson wrote: > Currently the pseries machine sets the compatibility mode for the > guest's cpus in two places: 1) at machine reset and 2) after CAS > negotiation. > > This means that if we set or negotiate a compatiblity mode, then > hotplug a cpu, the hotplugged cpu

[Qemu-devel] [PATCH] spapr: Correct compatibility mode setting for hotplugged CPUs

2018-01-03 Thread David Gibson
Currently the pseries machine sets the compatibility mode for the guest's cpus in two places: 1) at machine reset and 2) after CAS negotiation. This means that if we set or negotiate a compatiblity mode, then hotplug a cpu, the hotplugged cpu doesn't get the right mode set and will incorrectly

Re: [Qemu-devel] [PATCH v14 2/9] ACPI: Add APEI GHES table generation and CPER record support

2018-01-03 Thread gengdongjiu
On 2018/1/3 21:31, Igor Mammedov wrote: > On Wed, 3 Jan 2018 10:21:06 +0800 > gengdongjiu wrote: > > [...] >>> In order to simulation, we hard code the error type to Multi-bit ECC. >>> Not sure what this is about, care to elaborate? >> >> please see

Re: [Qemu-devel] [PATCH v2] hw/ppc: Remove the deprecated spapr-pci-vfio-host-bridge device

2018-01-03 Thread David Gibson
On Wed, Jan 03, 2018 at 10:10:38AM +0100, Thomas Huth wrote: > It's a deprecated dummy device since QEMU v2.6.0. That should have > been enough time to allow the users to update their scripts in case > they still use it, so let's remove this legacy code now. > > Reviewed-by: Alexey Kardashevskiy

Re: [Qemu-devel] [PATCH] Update dtc to fix compilation problem on Mac OS 10.6

2018-01-03 Thread David Gibson
On Wed, Dec 27, 2017 at 07:17:42PM -0500, John Arbuckle wrote: > Currently QEMU does not build on Mac OS 10.6 > because of a missing patch in the dtc > subproject. Updating dtc to make the patch > available fixes this problem. > > Signed-off-by: John Arbuckle So,

Re: [Qemu-devel] dropped pkts with Qemu on tap interace (RX)

2018-01-03 Thread Wei Xu
On Wed, Jan 03, 2018 at 04:07:44PM +0100, Stefan Priebe - Profihost AG wrote: > > Am 03.01.2018 um 04:57 schrieb Wei Xu: > > On Tue, Jan 02, 2018 at 10:17:25PM +0100, Stefan Priebe - Profihost AG > > wrote: > >> > >> Am 02.01.2018 um 18:04 schrieb Wei Xu: > >>> On Tue, Jan 02, 2018 at 04:24:33PM

[Qemu-devel] [PATCH] scsi: Don't deference in_buf if NULL

2018-01-03 Thread Fam Zheng
scsi_disk_emulate_command passes in_buf=NULL and in_len=0 in the REQUEST_SENSE branch. Inline the fixed_in evaluation and put it after the in_len test. Signed-off-by: Fam Zheng --- scsi/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scsi/utils.c

Re: [Qemu-devel] [PATCH v2.1 3/3] chardev: introduce qemu_chr_timeout_add() and use

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 05:41:53PM +, Stefan Hajnoczi wrote: > On Wed, Jan 03, 2018 at 10:24:18AM +0800, Peter Xu wrote: > > It's a replacement of g_timeout_add[_seconds]() for chardevs. Chardevs > > now can have dedicated gcontext, we should always bind chardev tasks > > onto those gcontext

Re: [Qemu-devel] [PATCH] osdep: Retry SETLK upon EINTR

2018-01-03 Thread Fam Zheng
On Wed, 01/03 16:57, Eric Blake wrote: > On 12/26/2017 12:53 AM, Fam Zheng wrote: > > We could hit lock failure if there is a signal that makes fcntl return > > -1 and errno set to EINTR. In this case we should retry. > > Did you hit this in practice? In 'man fcntl' on my Fedora 27 box, the >

Re: [Qemu-devel] [PATCH v2 13/13] migration: remove notify in fd_error

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 01:31:01PM +0100, Juan Quintela wrote: > Peter Xu wrote: > > It should be called in migrate_fd_cleanup too. > > It is *already* called in migrate_fd_cleanup. > > I think we should add a comment stating that we _always_ end calling > migrate_fd_cleanup,

[Qemu-devel] [PATCH v10 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-03 Thread Changpeng Liu
This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start QEMU with command line like this: qemu-system-x86_64 \ -chardev

[Qemu-devel] [PATCH v10 0/4] Introduce a new vhost-user-blk host device to QEMU

2018-01-03 Thread Changpeng Liu
Although virtio scsi specification was designed as a replacement for virtio_blk, there are still many users using virtio_blk. QEMU 2.9 introduced a new device vhost user scsi which can process I/O in user space for virtio_scsi, this commit introduces a new vhost user block host device, which can

[Qemu-devel] [PATCH v10 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-03 Thread Changpeng Liu
This commit introduces a vhost-user-blk backend device, it uses UNIX domain socket to communicate with QEMU. The vhost-user-blk sample application should be used with QEMU vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user-blk -b /dev/sdb -s

[Qemu-devel] [PATCH v10 3/4] contrib/libvhost-user: enable virtio config space messages

2018-01-03 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by: Changpeng Liu

[Qemu-devel] [PATCH v10 1/4] vhost-user: add new vhost user messages to support virtio config space

2018-01-03 Thread Changpeng Liu
Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration of vhost user devices, also vhost user devices can benefit from the messages to get/set virtio config space from/to the I/O target. For the purpose to support virtio config space change,

[Qemu-devel] [PATCH v7 15/17] target/m68k: add andi/ori/eori to SR/CCR

2018-01-03 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 53 ++--- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/target/m68k/translate.c

[Qemu-devel] [PATCH v7 17/17] target/m68k: fix m68k_cpu_dump_state()

2018-01-03 Thread Laurent Vivier
Display correctly the Trace bits for 680x0 (2 bits instead of 1 for Coldfire). Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/cpu.h | 3 ++- target/m68k/translate.c | 9 ++--- 2 files changed, 8

Re: [Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU

2018-01-03 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1515029086-4206-1-git-send-email-changpeng@intel.com Subject: [Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU === TEST SCRIPT BEGIN ===

[Qemu-devel] [PATCH v7 14/17] target/m68k: add 680x0 "move to SR" instruction

2018-01-03 Thread Laurent Vivier
Some cleanup, and allows SR to be moved from any addressing mode. Previous code was wrong for coldfire: coldfire also allows to use addressing mode to set SR/CCR. It only supports Data register to get SR/CCR (move from) Signed-off-by: Laurent Vivier Reviewed-by: Richard

[Qemu-devel] [PATCH v7 16/17] target/m68k: add the Interrupt Stack Pointer

2018-01-03 Thread Laurent Vivier
Add the third stack pointer, the Interrupt Stack Pointer (ISP) (680x0 only). This stack will be needed in softmmu mode. Update movec to set/get the value of the three stacks. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson ---

[Qemu-devel] [PATCH v7 04/17] target/m68k: use insn_pc to generate instruction fault address

2018-01-03 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/target/m68k/translate.c

[Qemu-devel] [PATCH v7 08/17] target/m68k: add move16

2018-01-03 Thread Laurent Vivier
move16 moves the source line to the destination line. Lines are aligned to 16-byte boundaries and are 16 bytes long. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- Notes: v6: split move16 in two functions

[Qemu-devel] [PATCH v7 07/17] target/m68k: add chk and chk2

2018-01-03 Thread Laurent Vivier
chk and chk2 compare a value to boundaries, and trigger a CHK exception if the value is out of bounds. Signed-off-by: Laurent Vivier Suggested-by: Richard Henderson --- Notes: v7: chk: always update C and N flags add some comments

[Qemu-devel] [PATCH v7 13/17] target/m68k: move CCR/SR functions

2018-01-03 Thread Laurent Vivier
The following patches will be clearer if we move functions before adding new ones. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 111 1 file changed,

[Qemu-devel] [PATCH v7 06/17] target/m68k: manage 680x0 stack frames

2018-01-03 Thread Laurent Vivier
680x0 manages several stack frame formats: - format 0: four-word stack frame - format 1: four-word throwaway stack frame - format 2: six-word stack frame - format 3: Floating-Point post-instruction stack frame - format 4: eight-word stack frame - format 7: access-error stack frame

[Qemu-devel] [PATCH v7 05/17] target/m68k: add CPU_LOG_INT trace

2018-01-03 Thread Laurent Vivier
Display the interrupts/exceptions information in QEMU logs (-d int) Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- Notes: v6: update SR with the content of CCR in the

[Qemu-devel] [PATCH v7 11/17] target/m68k: add reset

2018-01-03 Thread Laurent Vivier
The instruction traps if the CPU is not in Supervisor state but the helper is empty because there is no easy way to reset all the peripherals without resetting the CPU itself. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson ---

[Qemu-devel] [PATCH v7 02/17] target/m68k: fix gen_get_ccr()

2018-01-03 Thread Laurent Vivier
As gen_helper_get_ccr() is able to compute CCR from cc_op and flags, we don't need to flush flags before to call it. flush_flags() and get_ccr() use COMPUTE_CCR() to compute flags. get_ccr() computes CCR value, whereas flush_flags update live cc_op and flags. Signed-off-by: Laurent Vivier

[Qemu-devel] [PATCH v7 12/17] target/m68k: implement fsave/frestore

2018-01-03 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index

[Qemu-devel] [PATCH v7 10/17] target/m68k: add cpush/cinv

2018-01-03 Thread Laurent Vivier
Add cache lines invalidate and cache lines push as no-op operations, as we don't have cache. These instructions are 68040 only. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 20

[Qemu-devel] [PATCH v7 00/17] target/m68k: supervisor mode (part 1)

2018-01-03 Thread Laurent Vivier
This series is the first series that will allow to introduce supervisor mode and execute privileged instructions. Some of these patches are only cleanup: sync CC_OP before gen_jmp_tb() fix gen_get_ccr() softmmu cleanup add CPU_LOG_INT trace use insn_pc to generate instruction fault

[Qemu-devel] [PATCH v7 09/17] target/m68k: softmmu cleanup

2018-01-03 Thread Laurent Vivier
don't compile supervisor only instructions in linux-user mode Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 39 +-- 1 file changed, 33 insertions(+), 6 deletions(-)

[Qemu-devel] [PATCH v7 03/17] linux-user, m68k: correctly manage SR in context

2018-01-03 Thread Laurent Vivier
Use cpu_m68k_get_ccr()/cpu_m68k_set_ccr() to setup and restore correctly the value of SR in the context structure. Fix target_rt_setup_ucontext(). Fixes: 3219de458c ("linux-user: correctly manage SR in ucontext") Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson

[Qemu-devel] [PATCH v7 01/17] target-m68k: sync CC_OP before gen_jmp_tb()

2018-01-03 Thread Laurent Vivier
And remove update_cc_op() from gen_exception() because there is one in gen_jmp_im(). Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2018-01-03 Thread Haozhong Zhang
On 01/03/18 11:45 -0200, Eduardo Habkost wrote: > On Wed, Jan 03, 2018 at 11:16:39AM +0800, Haozhong Zhang wrote: > > On 01/02/18 18:02 +0200, Michael S. Tsirkin wrote: > > > On Wed, Dec 27, 2017 at 02:56:20PM +0800, Haozhong Zhang wrote: > > > > When a file supporting DAX is used as vNVDIMM

[Qemu-devel] [PATCH v9 3/4] contrib/libvhost-user: enable virtio config space messages

2018-01-03 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by: Changpeng Liu

[Qemu-devel] [PATCH v9 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-03 Thread Changpeng Liu
This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start QEMU with command line like this: qemu-system-x86_64 \ -chardev

[Qemu-devel] [PATCH v9 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-03 Thread Changpeng Liu
This commit introduces a vhost-user-blk backend device, it uses UNIX domain socket to communicate with QEMU. The vhost-user-blk sample application should be used with QEMU vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user-blk -b /dev/sdb -s

[Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU

2018-01-03 Thread Changpeng Liu
Although virtio scsi specification was designed as a replacement for virtio_blk, there are still many users using virtio_blk. QEMU 2.9 introduced a new device vhost user scsi which can process I/O in user space for virtio_scsi, this commit introduces a new vhost user block host device, which can

[Qemu-devel] [PATCH v9 1/4] vhost-user: add new vhost user messages to support virtio config space

2018-01-03 Thread Changpeng Liu
Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration of vhost user devices, also vhost user devices can benefit from the messages to get/set virtio config space from/to the I/O target. For the purpose to support virtio config space change,

Re: [Qemu-devel] MTTCG External Halt

2018-01-03 Thread Alistair Francis
On Wed, Jan 3, 2018 at 2:23 PM, Alistair Francis wrote: > On Wed, Jan 3, 2018 at 2:14 PM, Peter Maydell > wrote: >> On 3 January 2018 at 22:10, Alistair Francis wrote: >>> Any chance any one has some insight into a way to

Re: [Qemu-devel] [PATCH v6 07/17] target/m68k: add chk and chk2

2018-01-03 Thread Richard Henderson
On 01/03/2018 03:40 PM, Laurent Vivier wrote: >> Did you examine the real hw change to the other flags? > > yes, C is modified, and the logic is: > C = 0 <= ub ? val < 0 || ub < val : val < 0 && ub < val; > All other flags are not modified. > > I'm going to update the patch to reflect the

Re: [Qemu-devel] [PATCH v1 15/21] RISC-V Spike Machines

2018-01-03 Thread Richard Henderson
On 01/02/2018 04:44 PM, Michael Clark wrote: > +object_property_set_int(OBJECT(>soc), smp_cpus, "num-harts", > +_abort); Ah, right. Nevermind my previous question. r~

Re: [Qemu-devel] [PATCH v1 12/21] RISC-V HART Array

2018-01-03 Thread Richard Henderson
On 01/02/2018 04:44 PM, Michael Clark wrote: > Holds the state of a heterogenous array of RISC-V hardware threads. At the moment they are homogeneous, since they are all created from the same cpu_model. Is that the ultimate intent? > +static Property riscv_harts_props[] = { > +

[Qemu-devel] [PATCH v2 2/2] hw/sd/pxa2xx_mmci: add read/write() trace events

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/pxa2xx_mmci.c | 77 ++--- hw/sd/trace-events | 4 +++ 2 files changed, 53 insertions(+), 28 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v1 11/21] RISC-V HTIF Console

2018-01-03 Thread Richard Henderson
On 01/02/2018 04:44 PM, Michael Clark wrote: > +/* > + * Find the static and dynamic symbol tables and their string > + * tables in the the mapped binary. The sh_link field in symbol > + * table section headers gives the section index of the string > + * table for that symbol

Re: [Qemu-devel] [PATCH v1 10/21] RISC-V Linux User Emulation

2018-01-03 Thread Richard Henderson
On 01/02/2018 04:44 PM, Michael Clark wrote: > diff --git a/linux-user/elfload.c b/linux-user/elfload.c > index 20f3d8c..178af56 100644 > --- a/linux-user/elfload.c > +++ b/linux-user/elfload.c > @@ -1272,6 +1272,28 @@ static inline void init_thread(struct target_pt_regs > *regs, > > #endif /*

Re: [Qemu-devel] [PATCH v6 07/17] target/m68k: add chk and chk2

2018-01-03 Thread Laurent Vivier
Le 03/01/2018 à 22:52, Richard Henderson a écrit : > On 01/02/2018 03:40 PM, Laurent Vivier wrote: >> +void HELPER(chk)(CPUM68KState *env, int32_t val, int32_t ub) >> +{ >> +if (val < 0 || val > ub) { >> +CPUState *cs = CPU(m68k_env_get_cpu(env)); >> + >> +/* Recover PC and

Re: [Qemu-devel] [PATCH v1 05/21] RISC-V CPU Helpers

2018-01-03 Thread Richard Henderson
On 01/03/2018 02:59 PM, Michael Clark wrote: > I see exit(1) called in quite a few of the other ports too. I was wondering at > the time if there is a canonical error_abort API? Yes, but they're wrong too. Lots of that is old code in less maintained targets. The only time errors should exit

Re: [Qemu-devel] [PATCH v1 21/21] RISC-V Build Infrastructure

2018-01-03 Thread Eric Blake
On 01/02/2018 06:44 PM, Michael Clark wrote: > This adds RISC-V into the build system enabling the following targets: > > - riscv32-softmmu > - riscv64-softmmu > - riscv32-linux-user > - riscv64-linux-user > > This adds defaults configs for RISC-V, enables the build for the RISC-V > CPU core,

[Qemu-devel] [Bug 1740219] Re: static linux-user ARM emulation has several-second startup time

2018-01-03 Thread LukeShu
To have a link to it from here, on the 28th I submitted a patchset to fix this: https://lists.nongnu.org/archive/html/qemu- devel/2017-12/msg05237.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH v3] linux-user: Use *at functions instead of caching interp_prefix contents

2018-01-03 Thread Eric Blake
On 12/29/2017 12:45 PM, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > === OUTPUT BEGIN === > Checking PATCH 1/1: linux-user: Use *at functions instead of caching > interp_prefix contents... > ERROR: do

Re: [Qemu-devel] [PATCH v1 09/21] RISC-V Physical Memory Protection

2018-01-03 Thread Richard Henderson
On 01/02/2018 04:44 PM, Michael Clark wrote: > +#ifdef DEBUG_PMP > +#define PMP_PRINTF(fmt, ...) \ > +do { fprintf(stderr, "pmp: " fmt, ## __VA_ARGS__); } while (0) > +#else > +#define PMP_PRINTF(fmt, ...) \ > +do {} while (0) > +#endif Debugging goes to qemu_log. Rearrange this so that

Re: [Qemu-devel] [PATCH v1 05/21] RISC-V CPU Helpers

2018-01-03 Thread Michael Clark
On Wed, Jan 3, 2018 at 8:12 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > On 01/02/2018 04:44 PM, Michael Clark wrote: > > +target_ulong mode = env->priv; > > +if (access_type != MMU_INST_FETCH) { > > +if (get_field(env->mstatus, MSTATUS_MPRV)) { > > +

Re: [Qemu-devel] [PATCH] osdep: Retry SETLK upon EINTR

2018-01-03 Thread Eric Blake
On 12/26/2017 12:53 AM, Fam Zheng wrote: > We could hit lock failure if there is a signal that makes fcntl return > -1 and errno set to EINTR. In this case we should retry. Did you hit this in practice? In 'man fcntl' on my Fedora 27 box, the DESCRIPTION section only mentions EINTR as possible

[Qemu-devel] [PATCH v2 1/2] hw/timer/pxa2xx_timer: replace hw_error() -> qemu_log_mask()

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/timer/pxa2xx_timer.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index

[Qemu-devel] [PATCH v2 0/2] pxa2xx_timer: ignore incorrect registers access to use U-Boot

2018-01-03 Thread Philippe Mathieu-Daudé
since v1: - fixed qemu_log_mask() lines indentation (Alistair) - added Alistair's R-b tiny patches that allow to boot a Gumstix Connex board and use U-Boot. Using https://wiki.gumstix.com/index.php/Making_qemu_images#Connex Linux kernel also booting but crashes entering userland: $

Re: [Qemu-devel] [PATCH 1/2] hw/timer/pxa2xx_timer: replace hw_error() -> qemu_log_mask()

2018-01-03 Thread Philippe Mathieu-Daudé
On 01/03/2018 06:53 PM, Alistair Francis wrote: > On Wed, Jan 3, 2018 at 8:41 AM, Philippe Mathieu-Daudé > wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/timer/pxa2xx_timer.c | 13 +++-- >> 1 file changed, 11 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH 2/2] hw/sd/pxa2xx_mmci: add read/write() trace events

2018-01-03 Thread Philippe Mathieu-Daudé
On 01/03/2018 06:54 PM, Alistair Francis wrote: > On Wed, Jan 3, 2018 at 8:41 AM, Philippe Mathieu-Daudé > wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/sd/pxa2xx_mmci.c | 63 >> ++--- >>

Re: [Qemu-devel] [PATCH v1 03/21] RISC-V CPU Core Definition

2018-01-03 Thread Michael Clark
On Wed, Jan 3, 2018 at 6:21 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > On 01/02/2018 04:44 PM, Michael Clark wrote: > > +#ifdef CONFIG_USER_ONLY > > +static bool riscv_cpu_has_work(CPUState *cs) > > +{ > > +return 0; > > +} > > +#else > > +static bool

Re: [Qemu-devel] [PATCH] cpu_physical_memory_sync_dirty_bitmap: Another alignment fix

2018-01-03 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > This code has an optimised, word aligned version, and a boring > unaligned version. My commit f70d345 fixed one alignment issue, but > there's another. > > The optimised version

Re: [Qemu-devel] MTTCG External Halt

2018-01-03 Thread Alistair Francis
On Wed, Jan 3, 2018 at 2:14 PM, Peter Maydell wrote: > On 3 January 2018 at 22:10, Alistair Francis wrote: >> Any chance any one has some insight into a way to externally set a >> vCPU as halted/un-halted? > > PSCI (where one vCPU can power off

Re: [Qemu-devel] [PATCH v2] iotests: Test creating overlay when guest running

2018-01-03 Thread Eric Blake
On 12/24/2017 08:51 PM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > > --- > > v2: Actually test the thing. [Kevin] > --- > tests/qemu-iotests/153 | 8 +--- > tests/qemu-iotests/153.out | 7 --- > 2 files changed, 9 insertions(+), 6 deletions(-) Reviewed-by: Eric

Re: [Qemu-devel] [RFC PATCH v2 0/4] sdbus: testing sdcards

2018-01-03 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180103214925.16677-1-f4...@amsat.org Subject: [Qemu-devel] [RFC PATCH v2 0/4] sdbus: testing sdcards === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log

Re: [Qemu-devel] MTTCG External Halt

2018-01-03 Thread Peter Maydell
On 3 January 2018 at 22:10, Alistair Francis wrote: > Any chance any one has some insight into a way to externally set a > vCPU as halted/un-halted? PSCI (where one vCPU can power off another) does this by calling arm_set_cpu_off(). Does that (or some variation on it) work?

Re: [Qemu-devel] [PATCH v1 04/21] RISC-V Disassembler

2018-01-03 Thread Michael Clark
On Wed, Jan 3, 2018 at 6:30 PM, Richard Henderson < richard.hender...@linaro.org> wrote: > On 01/02/2018 04:44 PM, Michael Clark wrote: > > +static const char *rv_ireg_name_sym[] = { > > +"zero", "ra", "sp", "gp", "tp", "t0", "t1", "t2", > > +"s0", "s1", "a0", "a1",

[Qemu-devel] MTTCG External Halt

2018-01-03 Thread Alistair Francis
Hey guys, I'm super stuck with an ugly MTTCG issue and was wondering if anyone had any ideas. In the Xilinx fork of QEMU (based on 2.11) we have a way for CPUs to halt other CPUs. This is used for example when the power control unit halts the ARM A53s. To do this we have internal GPIO signals

  1   2   3   4   >