[PATCH 1/3] migration/migration: improve error reporting for migrate parameters

2020-03-28 Thread Mao Zhongyi
use QERR_INVALID_PARAMETER_VALUE instead of "Parameter '%s' expects" for consistency. Signed-off-by: Mao Zhongyi --- migration/migration.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

[PATCH 2/3] monitor/hmp-cmds: add hmp_handle_error() for hmp_migrate_set_speed()

2020-03-28 Thread Mao Zhongyi
Signed-off-by: Mao Zhongyi --- monitor/hmp-cmds.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 790fad3afe..63097ddcc8 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1203,8 +1203,11 @@ void

[PATCH 0/3] Improved reporting for migrate parameters

2020-03-28 Thread Mao Zhongyi
This series mainly improve the report message of migrate parameters to make it easier to read. Cc: quint...@redhat.com Cc: dgilb...@redhat.com Mao Zhongyi (3): migration/migration: improve error reporting for migrate parameters monitor/hmp-cmds: add hmp_handle_error() for

[PATCH 3/3] migration: move the units of migrate parameters from milliseconds to ms.

2020-03-28 Thread Mao Zhongyi
Signed-off-by: Mao Zhongyi Suggested-by: Dr. David Alan Gilbert --- migration/migration.c | 2 +- monitor/hmp-cmds.c| 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index e0223f3b15..d014da388a 100644 ---

Re: [PATCH v6 18/61] target/riscv: vector single-width integer multiply instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/29 0:13, LIU Zhiwei wrote: On 2020/3/28 23:47, Richard Henderson wrote: On 3/28/20 8:17 AM, LIU Zhiwei wrote: Missed the improvement here.  See tcg_gen_mulsu2_i64. Though I have not gotten the principle, the code in tcg_gen_mulsu2_i64 is much tidier. Let A = signed operand,    

Re: [PATCH] target/arm: fix incorrect current EL bug in aarch32 exception emulation

2020-03-28 Thread Richard Henderson
On 3/28/20 7:02 AM, Changbin Du wrote: > The arm_current_el() should be invoked after mode switching. Otherwise, we > get a wrong current EL value, since current EL is also determined by > current mode. > > Fixes: 4a2696c0d4 ("target/arm: Set PAN bit as required on exception entry") >

Re: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation

2020-03-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200329001705.15966-1-pauld...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation Message-id:

[PATCH v2 4/6] dwc-hsotg USB host controller emulation

2020-03-28 Thread Paul Zimmerman
Add the dwc-hsotg (dwc2) USB host controller emulation code. Based on hw/usb/hcd-ehci.c and hw/usb/hcd-ohci.c. Note that to use this with the dwc-otg driver in the Raspbian kernel, you must pass the option "dwc_otg.fiq_fsm_enable=0" on the kernel command line. Emulation of slave mode and of

[PATCH v2 6/6] Wire in the dwc-hsotg USB host controller emulation

2020-03-28 Thread Paul Zimmerman
Wire the dwc-hsotg (dwc2) emulation into Qemu Signed-off-by: Paul Zimmerman --- hw/arm/bcm2835_peripherals.c | 21 - hw/usb/Kconfig | 5 + hw/usb/Makefile.objs | 1 + include/hw/arm/bcm2835_peripherals.h | 3 ++- 4 files

[PATCH v2 2/6] dwc-hsotg USB host controller register definitions

2020-03-28 Thread Paul Zimmerman
Import the dwc2 register definitions file from the Linux kernel. This is a copy of drivers/usb/dwc2/hw.h from the mainline Linux kernel, the only changes being two instances of 'u32' changed to 'uint32_t' to allow it to compile Signed-off-by: Paul Zimmerman --- include/hw/usb/dwc2-regs.h | 895

[PATCH v2 1/6] Add BCM2835 SOC MPHI emulation

2020-03-28 Thread Paul Zimmerman
Add BCM2835 SOC MPHI emulation. It is very basic, only providing the FIQ interrupt needed to allow the dwc-otg USB host controller driver in the Raspbian kernel to function. Signed-off-by: Paul Zimmerman --- hw/arm/bcm2835_peripherals.c | 17 +++ hw/misc/Makefile.objs|

[PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation

2020-03-28 Thread Paul Zimmerman
This patch series adds emulation for the dwc-hsotg USB controller, which is used on the Raspberry Pi 3 and earlier, as well as a number of other development boards. The main benefit for Raspberry Pi is that this enables networking on these boards, since the network adapter is attached via USB.

[PATCH v2 5/6] Add short-packet handling to usb-storage driver

2020-03-28 Thread Paul Zimmerman
The dwc-hsotg (dwc2) USB host depends on a short packet to indicate the end of an IN transfer. The usb-storage driver currently doesn't provide this, so fix it. I have tested this change rather extensively using a PC emulation with xhci, ehci, and uhci controllers, and have not observed any

[PATCH v2 3/6] dwc-hsotg USB host controller state definitions

2020-03-28 Thread Paul Zimmerman
Add the dwc-hsotg (dwc2) USB host controller state definitions. Mostly based on hw/usb/hcd-ehci.h. Signed-off-by: Paul Zimmerman --- hw/usb/hcd-dwc2.h | 180 ++ 1 file changed, 180 insertions(+) create mode 100644 hw/usb/hcd-dwc2.h diff --git

Re: [PATCH] target/mips: Add MAC2008 support

2020-03-28 Thread Jiaxun Yang
于 2020年3月29日 GMT+08:00 上午3:09:16, Richard Henderson 写到: >On 3/28/20 2:08 AM, Jiaxun Yang wrote: >> -gen_helper_float_madd_s(fp2, cpu_env, fp0, fp1, fp2); >> +if (ctx->mac2008) { >> +gen_helper_float_madd_s(fp2, cpu_env, fp0, fp1, >fp2); >> +

Re: [PATCH] target/mips: Add MAC2008 support

2020-03-28 Thread Richard Henderson
On 3/28/20 2:08 AM, Jiaxun Yang wrote: > -gen_helper_float_madd_s(fp2, cpu_env, fp0, fp1, fp2); > +if (ctx->mac2008) { > +gen_helper_float_madd_s(fp2, cpu_env, fp0, fp1, fp2); > +} else { > +gen_helper_float_maddf_s(fp2, cpu_env,

[PATCH] i386: hvf: Reset IRQ inhibition after moving RIP

2020-03-28 Thread Roman Bolshakov
The sequence of instructions exposes an issue: sti hlt Interrupts cannot be delivered to hvf after hlt instruction cpu because HF_INHIBIT_IRQ_MASK is set just before hlt is handled and never reset after moving instruction pointer beyond hlt. So, after hvf_vcpu_exec() returns, CPU thread gets

Re: [PATCH v6 57/61] target/riscv: floating-point scalar move instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 11:44, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +/* Floating-Point Scalar Move Instructions */ +static bool trans_vfmv_f_s(DisasContext *s, arg_vfmv_f_s *a) +{ +if (!s->vill && has_ext(s, RVF) && +(s->mstatus_fs != 0) && (s->sew != 0)) { +#ifdef

Re: [PATCH v6 55/61] target/riscv: integer extract instruction

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 11:36, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +/* Integer Extract Instruction */ +static void extract_element(TCGv dest, TCGv_ptr base, +int ofs, int sew) +{ +switch (sew) { +case MO_8: +tcg_gen_ld8u_tl(dest,

Re: [PATCH v6 18/61] target/riscv: vector single-width integer multiply instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 23:47, Richard Henderson wrote: On 3/28/20 8:17 AM, LIU Zhiwei wrote: Missed the improvement here.  See tcg_gen_mulsu2_i64. Though I have not gotten the principle, the code in tcg_gen_mulsu2_i64 is much tidier. Let A = signed operand, B = unsigned operand P =

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-28 Thread Richard Henderson
On 3/27/20 11:38 PM, Daniel Brodsky wrote: > On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson > wrote: >> >> My preference is to add -Wno-tautological-type-limit-compare in >> configure, so we don't have to work around this same issue elsewhere >> in the code base. >> >> r~ > > What do you

[Bug 1868116] Re: QEMU monitor no longer works

2020-03-28 Thread Jakub Wilk
** Bug watch added: Debian Bug tracker #954266 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954266 ** Also affects: qemu (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954266 Importance: Unknown Status: Unknown -- You received this bug notification because

Re: [PATCH v6 41/61] target/riscv: vector floating-point merge instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 11:23, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +for (i = 0; i < vl; i++) {\ +if (!vm && !vext_elem_mask(v0, mlen, i)) {\ +ETYPE s2 = *((ETYPE *)vs2 + H(i));\ +*((ETYPE *)vd

Re: [PATCH v6 18/61] target/riscv: vector single-width integer multiply instructions

2020-03-28 Thread Richard Henderson
On 3/28/20 8:17 AM, LIU Zhiwei wrote: >> Missed the improvement here.  See tcg_gen_mulsu2_i64. > Though I have not gotten the principle, the code in tcg_gen_mulsu2_i64 is much > tidier. Let A = signed operand, B = unsigned operand P = unsigned product If the sign bit A is set, then P is

[Bug 1869497] [NEW] x86_cpu_gdb_read_register segfaults when gdb requests registers

2020-03-28 Thread Matt Wilbur
Public bug reported: When attempting to attach to the gdbstub, a segfault occurs. I traced this down to a problem in a call to gdb_get_reg16 where the mem_buf was being treated like a uint8_t* instead of a GByteArray. The buffer passed to gdb_get_reg16 ends up passing an invalid GByteArray

Re: [PATCH v6 39/61] target/riscv: vector floating-point compare instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 10:01, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +static uint8_t vmfne16(uint16_t a, uint16_t b, float_status *s) +{ +int compare = float16_compare_quiet(a, b, s); +return compare != float_relation_equal && + compare !=

Re: [PATCH v6 26/61] target/riscv: vector single-width fractional multiply with rounding and saturation

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 9:08, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +static int64_t vsmul64(CPURISCVState *env, int vxrm, int64_t a, int64_t b) +{ +uint8_t round; +uint64_t hi_64, lo_64, Hi62; +uint8_t hi62, hi63, lo63; + +muls64(_64, _64, a, b); +hi62 =

Re: [RFC PATCH] crypto/secret: support fetching secrets from Linux keyring

2020-03-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200328114014.6362-1-alex-krasi...@yandex-team.ru/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: [PATCH v6 25/61] target/riscv: vector single-width averaging add and subtract

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 9:22, Richard Henderson wrote: On 3/27/20 6:07 PM, LIU Zhiwei wrote: On 2020/3/28 8:32, Richard Henderson wrote: On 3/18/20 8:46 PM, LIU Zhiwei wrote: +static inline int32_t asub32(CPURISCVState *env, int vxrm, int32_t a, int32_t b) +{ +int64_t res = (int64_t)a - b; +

Re: [PATCH v6 18/61] target/riscv: vector single-width integer multiply instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 8:06, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +static int64_t do_mulhsu_d(int64_t s2, uint64_t s1) +{ +uint64_t hi_64, lo_64, abs_s2 = s2; + +if (s2 < 0) { +abs_s2 = -s2; +} +mulu64(_64, _64, abs_s2, s1); +if (s2 < 0) { +

[RFC PATCH] crypto/secret: support fetching secrets from Linux keyring

2020-03-28 Thread Alexey Krasikov
Add the ability for the secret object to obtain secret data from the Linux in-kernel key managment and retention facility, as an extra option to the existing ones: reading from a file or passing directly as a string. The secret is identified by the key serial number. The upper layers need to

Re: [PATCH v6 10/61] target/riscv: vector single-width integer add and subtract

2020-03-28 Thread LIU Zhiwei
On 2020/3/28 7:54, Richard Henderson wrote: On 3/17/20 8:06 AM, LIU Zhiwei wrote: +if (a->vm && s->vl_eq_vlmax) { +gvec_fn(s->sew, vreg_ofs(s, a->rd), +vreg_ofs(s, a->rs2), vreg_ofs(s, a->rs1), +MAXSZ(s), MAXSZ(s)); Indentation is off here. Do you mean I

[PATCH] target/arm: fix incorrect current EL bug in aarch32 exception emulation

2020-03-28 Thread Changbin Du
The arm_current_el() should be invoked after mode switching. Otherwise, we get a wrong current EL value, since current EL is also determined by current mode. Fixes: 4a2696c0d4 ("target/arm: Set PAN bit as required on exception entry") Signed-off-by: Changbin Du --- target/arm/helper.c | 5 -

Re: [PATCH v6 58/61] target/riscv: vector slide instructions

2020-03-28 Thread LIU Zhiwei
On 2020/3/17 23:06, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/helper.h | 17 target/riscv/insn32.decode | 7 ++ target/riscv/insn_trans/trans_rvv.inc.c | 17 target/riscv/vector_helper.c| 128

[PATCH v4 2/2] net/colo-compare.c: handling of the full primary or secondary queue

2020-03-28 Thread Derek Su
The pervious handling of the full primary or queue is only dropping the packet. If there are lots of clients to the guest VM, the "drop" will lead to the lost of the networking connection until next checkpoint. To address the issue, this patch drops the packet firstly. Then, do checkpoint and

[PATCH v4 0/2] COLO: handling of the full primary or secondary queue

2020-03-28 Thread Derek Su
The series is to handle the full primary or secondary queue in colo-compare. (1) fix the "pkt" memory leak in packet_enqueue(). Reproduce steps: 1. Setup PVM and SVM both with NIC e1000 by the steps descripted in the wiki qemu/COLO 2. Run "iperf3 -s" in PVM 3. Run "iperf3

[PATCH v4 1/2] net/colo-compare.c: Fix memory leak in packet_enqueue()

2020-03-28 Thread Derek Su
The patch is to fix the "pkt" memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big. Signed-off-by: Derek Su --- net/colo-compare.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff

Re: [RFC for-5.1 4/4] spapr: Don't allow unplug of NVLink2 devices

2020-03-28 Thread Alexey Kardashevskiy
On 26/03/2020 16:40, David Gibson wrote: > Currently, we can't properly handle unplug of NVLink2 devices, because we > don't have code to tear down their special memory resources. There's not > a lot of impetus to implement that. Since hardware NVLink2 devices can't > be hot unplugged, the

[Bug 1821515] Re: qemu-ppc (user) incorrectly converts float(nan)->double(non-nan)

2020-03-28 Thread Carlo Marcelo Arenas Belón
*** This bug is a duplicate of bug 1821444 *** https://bugs.launchpad.net/bugs/1821444 ** This bug has been marked a duplicate of bug 1821444 qemu-ppc (user) incorrectly translates float32 arithmetics -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [PULL 0/5] Ide patches

2020-03-28 Thread Peter Maydell
On Fri, 27 Mar 2020 at 20:15, John Snow wrote: > > The following changes since commit cfe68ae025f704f336d7dd3d1903ce37b445831d: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-5.0-pull-request' into staging > (2020-03-26 20:55:54 +) > > are available in the Git

[PATCH] target/mips: Add MAC2008 support

2020-03-28 Thread Jiaxun Yang
MAC2008 was introduced in MIPS Release 3 but removed in MIPS Release 5. However, there are some processors implemented this feature. some Ingenic MCU can config MAC2008 status runtime while whole Loongson-64 family are MAC2008 only. FCSR.MAC2008 bit indicates FMA family of instructions on these

Re: [PATCH v4] piix: fix xenfv regression, add compat machine xenfv-qemu4

2020-03-28 Thread Paolo Bonzini
Nope, that's fine. If you are okay I can apply them myself. Paolo Il sab 28 mar 2020, 08:09 Olaf Hering ha scritto: > On Fri, Mar 27, Paolo Bonzini wrote: > > > Looks good, I would just do the following adjustments to have more > > consistency between pc and xenfv machine types > > Do you want

Re: [PATCH v4] piix: fix xenfv regression, add compat machine xenfv-qemu4

2020-03-28 Thread Olaf Hering
On Fri, Mar 27, Paolo Bonzini wrote: > Looks good, I would just do the following adjustments to have more > consistency between pc and xenfv machine types Do you want me to resend with this change? Olaf

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-28 Thread Daniel Brodsky
On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson wrote: > > My preference is to add -Wno-tautological-type-limit-compare in > configure, so we don't have to work around this same issue elsewhere > in the code base. > > r~ What do you think would be the best way to add this? I could change all