Re: [Qemu-devel] [[RFC v3 08/12] virtio: event suppression support for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 126 +++-- 1 file changed, 123 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index d12a7e3..1d257

[Qemu-devel] [PATCH 2/3] git-submodule.sh: Modern shell scripting (use $() instead of ``)

2018-10-14 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); use of `` is only required when using /bin/sh on Solaris. It would be nice to convert to using $() everywhere, or at least in all bash scripts, as well as in all scripts that are known to not be run on Solaris. Signed-off-by: Ma

Re: [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-10-14 Thread David Hildenbrand
On 12/10/2018 20:05, Michael S. Tsirkin wrote: > On Fri, Oct 12, 2018 at 02:24:27PM +1100, David Gibson wrote: >> When the balloon is inflated, we discard memory place in it using madvise() >> with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which >> sounds like it makes sense but

[Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shell scripting (use $() instead of ``)

2018-10-14 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); use of `` is only required when using /bin/sh on Solaris. It would be nice to convert to using $() everywhere, or at least in all bash scripts, as well as in all scripts that are known to not be run on Solaris. Signed-off-by: Ma

[Qemu-devel] [PATCH 3/3] show-fixed-bugs.sh: Modern shell scripting (use $() instead of ``)

2018-10-14 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); use of `` is only required when using /bin/sh on Solaris. It would be nice to convert to using $() everywhere, or at least in all bash scripts, as well as in all scripts that are known to not be run on Solaris. Signed-off-by: Ma

Re: [Qemu-devel] [PATCH v3 0/6] Avocado: more multi-arch tests

2018-10-14 Thread Thomas Huth
On 2018-10-13 17:15, Philippe Mathieu-Daudé wrote: > Hi, > > Another neanderthal approach to add multi-arch acceptance tests using Avocado. > > I couldn't figure how to use the R2D serial, the kernel boots using the sm501 > display correctly, but I'm too console-oriented to write UI tests... > >

Re: [Qemu-devel] [PATCH 3/3] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-14 Thread Artem Pisarenko
Opps, I introduced race condition in 'timerlist_run_timers' function. If checking procedure decides, that no checkpoint needed, and another thread adds expired non-EXTERNAL timer between end of checking procedure and end of following "for (;;)" loop, then this timer will be processed but no checkpo

Re: [Qemu-devel] [PATCH] edid: fix alignment issues

2018-10-14 Thread Philippe Mathieu-Daudé
Le lun. 15 oct. 2018 07:53, Gerd Hoffmann a écrit : > Use stl_le_p() & friends instead of casts. > > Signed-off-by: Gerd Hoffmann > --- > hw/display/edid-generate.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/display/edid-generate.c b/hw/display/edid-gene

Re: [Qemu-devel] [[RFC v3 07/12] virtio: fill/flush/pop for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 258 ++--- 1 file changed, 244 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 13c6c98..d12a

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-14 Thread Markus Armbruster
Max Reitz writes: > On 13.10.18 22:36, Eduardo Habkost wrote: >> On Sat, Oct 13, 2018 at 08:20:25PM +0200, Max Reitz wrote: >>> On 13.10.18 07:02, Eduardo Habkost wrote: Signed-off-by: Eduardo Habkost --- I'd like to do this in QEMU 3.1. I think it's time to drop support for

[Qemu-devel] [PATCH] edid: fix alignment issues

2018-10-14 Thread Gerd Hoffmann
Use stl_le_p() & friends instead of casts. Signed-off-by: Gerd Hoffmann --- hw/display/edid-generate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 37e60fe42a..bdf5e1d4d4 100644 --- a/hw/display/edid-gen

Re: [Qemu-devel] [PATCH] migration: avoid segmentfault when take a snapshot of a VM which being migrated

2018-10-14 Thread Chai,Wen
在 2018/10/12 下午5:01, "Dr. David Alan Gilbert" 写入: >* jialina01 (jialin...@baidu.com) wrote: >> During an active background migraion, snapshot will trigger a >> segmentfault. As snapshot clears the "current_migration" struct >> and updates "to_dst_file" before it finds out that there is a >> mig

Re: [Qemu-devel] [PATCH 1/1] i386: Add new model of Cascadelake-Server

2018-10-14 Thread Tao Xu
Hi Eduardo, Thank you for your comment. On the release document ref below link (page 13): https://software.intel.com/sites/default/files/managed/c5/15/\ architecture-instruction-set-extensions-programming-reference.pdf PKU is su

[Qemu-devel] [PATCH v5 2/3] x86: Data structure changes to support MSR based features

2018-10-14 Thread Robert Hoo
Add FeatureWordType indicator in struct FeatureWordInfo. Change feature_word_info[] accordingly. Change existing functions that refer to feature_word_info[] accordingly. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 188 +++--- 1 file changed,

[Qemu-devel] [PATCH v5 3/3] x86: define a new MSR based feature word -- FEATURE_WORDS_ARCH_CAPABILITIES

2018-10-14 Thread Robert Hoo
Note RSBA is specially treated -- no matter host support it or not, qemu pretends it is supported. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 31 ++- target/i386/cpu.h | 8 target/i386/kvm.c | 11 +++ 3 files changed, 49 insertions(+), 1 delet

[Qemu-devel] [PATCH v5 1/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-10-14 Thread Robert Hoo
Add kvm_get_supported_feature_msrs() to get supported MSR feature index list. Add kvm_arch_get_supported_msr_feature() to get each MSR features value. Signed-off-by: Robert Hoo --- include/sysemu/kvm.h | 2 ++ target/i386/kvm.c| 80 2 fil

[Qemu-devel] [PATCH v5 0/3] x86: QEMU side support on MSR based features

2018-10-14 Thread Robert Hoo
KVM side has added the framework (kvm.git:d1d93fa90) to support MSR based features. Here is the QEMU part, including data structure changes/expanding, referring functions changes, and the implementations on KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl. Changelog: v5: Re-order pat

Re: [Qemu-devel] [[RFC v3 06/12] virtio: get avail bytes check for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Same thought as 1.0 except a bit confused when trying to reuse 'shadow_avail_idx', so the interrelated new event_idx and the wrap counter for notifications has been introduced in previous patch. Signed-off-by: Wei Xu --- hw/virtio

[Qemu-devel] [PATCH v3 2/3] audio: use object link instead of qdev property to pass wm8750 reference

2018-10-14 Thread Mao Zhongyi
According to qdev-properties.h, properties of pointer type should be avoided, it seems a link type property is a good substitution. Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann Cc: Philippe Mathieu-Daudé Signed-off-by: Mao Zhongyi Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musi

[Qemu-devel] [PATCH v3 3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

2018-10-14 Thread Mao Zhongyi
Cc: Jan Kiszka Cc: Philippe Mathieu-Daudé Cc: Peter Maydell Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 1 - include/hw/audio/wm8750.h | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH v3 1/3] audio: use TYPE_WM8750 instead of a hardcoded string

2018-10-14 Thread Mao Zhongyi
Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c ind

[Qemu-devel] [PATCH v3 0/3] use object link instead of qdev property

2018-10-14 Thread Mao Zhongyi
According to qdev-properties.h, properties of pointer type should be avoid, so convert qdev property to link, Whilst we are here, also update some hardcoded strings with already defineded macros. v3: -removed incorrected "To: xxx" tags from commit message -keep 'dc->user_creatable = false' in mv88

Re: [Qemu-devel] [[RFC v3 05/12] virtio: init and desc empty check for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Basic initialization and helpers for packed ring. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 57 +- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/hw/virtio/v

Re: [Qemu-devel] [[RFC v3 03/12] virtio: init memory cache for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Expand 1.0 by adding offset calculation accordingly. This is only part of what this patch did and I suggest to another patch to do this. Signed-off-by: Wei Xu --- hw/virtio/vhost.c | 16 hw/virtio/

Re: [Qemu-devel] [[RFC v3 02/12] virtio: redefine structure & memory cache for packed ring

2018-10-14 Thread Jason Wang
On 2018年10月11日 22:08, w...@redhat.com wrote: From: Wei Xu Redefine packed ring structure according to qemu nomenclature, also supported data(event index, wrap counter, etc) are introduced. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 26 -- 1 file changed, 24 i

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead ofqdevproperty to pass wm8750 reference

2018-10-14 Thread maozy
Hi, Philippe On 10/13/18 2:40 AM, Philippe Mathieu-Daudé wrote: Hi Mao, On 12/10/2018 14:30, Philippe Mathieu-Daudé wrote: Cc'ing Eduardo and Thomas. On 12/10/2018 13:51, maozy wrote: Hi, Philippe On 10/12/18 5:53 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 12/10/2018 10:30, Mao Zhongyi

Re: [Qemu-devel] [PATCH v2 1/2] spapr_pci: convert g_malloc() to g_new()

2018-10-14 Thread David Gibson
On Fri, Oct 12, 2018 at 11:05:09AM +0200, Greg Kurz wrote: > When allocating an array, it is a recommended coding practice to call > g_new(FooType, n) instead of g_malloc(n * sizeof(FooType)) because > it takes care to avoid overflow when calculating the size of the > allocated block and it returns

Re: [Qemu-devel] [PATCH v2 2/2] spapr_pci: rename some structured types

2018-10-14 Thread Alexey Kardashevskiy
On 12/10/2018 20:05, Greg Kurz wrote: > According to CODING_STYLE, structured types names are expected to be > in CamelCase but we have: > > typedef struct spapr_pci_msi { > uint32_t first_irq; > uint32_t num; > } spapr_pci_msi; > > typedef struct spapr_pci_msi_mig { > uint32_t key

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-14 Thread Maciej W. Rozycki
On Sun, 14 Oct 2018, Philippe Mathieu-Daudé wrote: > > > +gen_move_low32(cpu_LO[acc], t2); > > > +gen_move_high32(cpu_HI[acc], t2); > > > +if (rd) { > > > +gen_move_low32(cpu_gpr[rd], t2); > > > > As above, are LO, HI and GPR[rd] sign-extended to

Re: [Qemu-devel] [PATCH v5 10/28] target/mips: Add CPO PWSize register

2018-10-14 Thread Philippe Mathieu-Daudé
On Fri, Oct 12, 2018 at 6:49 PM Aleksandar Markovic wrote: > > From: Yongbok Kim > > Add PWSize register (CP0 Register 5, Select 7). > > The PWSize register configures hardware page table walking for TLB > refills. > > This register is required for the hardware page walker feature. It > exists on

Re: [Qemu-devel] [PATCH v5 08/28] target/mips: Add CPO PWBase register

2018-10-14 Thread Philippe Mathieu-Daudé
On Fri, Oct 12, 2018 at 6:47 PM Aleksandar Markovic wrote: > > From: Yongbok Kim > > Add PWBase register (CP0 Register 5, Select 5). > > The PWBase register contains the Page Table Base virtual address. > > This register is required for the hardware page walker feature. It > exists only if Config

Re: [Qemu-devel] [PATCH v5 22/28] target/mips: Add CP0 Config2 to DisasContext

2018-10-14 Thread Philippe Mathieu-Daudé
On Fri, Oct 12, 2018 at 6:58 PM Aleksandar Markovic wrote: > > From: Stefan Markovic > > Add field corresponding to CP0 Config2 to DisasContext. This is > needed for availability control via Config2 bits. > > Signed-off-by: Stefan Markovic > Signed-off-by: Aleksandar Markovic Reviewed-by: Phil

Re: [Qemu-devel] [PATCH v5 18/28] target/mips: Add availability control for DSP R3 ASE

2018-10-14 Thread Philippe Mathieu-Daudé
On Fri, Oct 12, 2018 at 6:52 PM Aleksandar Markovic wrote: > > From: Stefan Markovic > > Add infrastructure for availability control for DSP R3 ASE MIPS > instructions. Only BPOSGE32C currently belongs to DSP R3 ASE, but > this is likely to be changed in near future. > > Reviewed-by: Aleksandar M

Re: [Qemu-devel] [PATCH v5 14/28] target/mips: Extend WatchHi registers

2018-10-14 Thread Philippe Mathieu-Daudé
On Fri, Oct 12, 2018 at 6:58 PM Aleksandar Markovic wrote: > > From: Yongbok Kim > > WatchHi is extended by the field MemoryMapID with the GINVT > instruction. The field is accessible by MTHC0/MFHC0 in 32-bit > architectures and DMTC0/DMFC0 in 64-bit architectures. > > Signed-off-by: Yongbok Kim

Re: [Qemu-devel] [PATCH v5 19/28] target/mips: Improve DSP R2/R3-related naming

2018-10-14 Thread Philippe Mathieu-Daudé
On Fri, Oct 12, 2018 at 7:07 PM Aleksandar Markovic wrote: > > From: Stefan Markovic > > Do following replacements: > > ASE_DSPR2 -> ASE_DSP_R2 > ASE_DSPR3 -> ASE_DSP_R3 > check_dspr2() -> check_dsp_r2() > check_dspr3() -> check_dsp_r3() > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Stef

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-14 Thread Philippe Mathieu-Daudé
Hi Fredrik, On Sun, Oct 14, 2018 at 6:41 PM Fredrik Noring wrote: > > Hi Philippe, > > > --- a/target/mips/translate.c > > +++ b/target/mips/translate.c > > @@ -3843,6 +3843,46 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t > > opc, > > What about documenting MADD and MADDU along with M

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-14 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 11:54:35PM -0300, Eduardo Habkost wrote: > The current virtio-*-pci device types actually represent 3 > different types of devices: > * virtio 1.0 non-transitional devices > * virtio 1.0 transitional devices > * virtio 0.9 ("legacy device" in virtio 1.0 terminology) > > Tha

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-14 Thread Fredrik Noring
Hi Philippe, > --- a/target/mips/translate.c > +++ b/target/mips/translate.c > @@ -3843,6 +3843,46 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t > opc, What about documenting MADD and MADDU along with MULT and MULTU in the note above? > +case OPC_MADD: This case is unreachable, b

Re: [Qemu-devel] [PATCH 05/10] target/arm: ISR_EL1 bits track virtual interrupts if IMO/FMO set

2018-10-14 Thread Richard Henderson
On 10/12/18 7:42 AM, Peter Maydell wrote: > The A/I/F bits in ISR_EL1 should track the virtual interrupt > status, not the physical interrupt status, if the associated > HCR_EL2.AMO/IMO/FMO bit is set. Implement this, rather than > always showing the physical interrupt status. > > We don't current

Re: [Qemu-devel] [PATCH 04/10] target/arm: Implement HCR.DC

2018-10-14 Thread Richard Henderson
On 10/12/18 7:42 AM, Peter Maydell wrote: > The HCR.DC virtualization configuration register bit has the > following effects: > * SCTLR.M behaves as if it is 0 for all purposes except >direct reads of the bit > * HCR.VM behaves as if it is 1 for all purposes except >direct reads of the bi

Re: [Qemu-devel] [PATCH 03/10] target/arm: Implement HCR.FB

2018-10-14 Thread Richard Henderson
On 10/12/18 7:42 AM, Peter Maydell wrote: > The HCR.FB virtualization configuration register bit requests that > TLB maintenance, branch predictor invalidate-all and icache > invalidate-all operations performed in NS EL1 should be upgraded > from "local CPU only to "broadcast within Inner Shareable

Re: [Qemu-devel] [PATCH 01/10] target/arm: Improve debug logging of AArch32 exception return

2018-10-14 Thread Richard Henderson
On 10/12/18 7:42 AM, Peter Maydell wrote: > For AArch32, exception return happens through certain kinds > of CPSR write. We don't currently have any CPU_LOG_INT logging > of these events (unlike AArch64, where we log in the ERET > instruction). Add some suitable logging. > > This will log exceptio

Re: [Qemu-devel] [PATCH 02/10] target/arm: Make switch_mode() file-local

2018-10-14 Thread Richard Henderson
On 10/12/18 7:42 AM, Peter Maydell wrote: > The switch_mode() function is defined in target/arm/helper.c and used > only in that file and nowhere else, so we can make it file-local > rather than global. > > Signed-off-by: Peter Maydell > --- > target/arm/internals.h | 1 - > target/arm/helper.c

[Qemu-devel] [PATCH 3/3] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-14 Thread Artem Pisarenko
Adds EXTERNAL attribute definition to qemu timers subsystem and assigns it to virtual clock timers, used in slirp (ICMP IPv6) and ui (key queue). Virtual clock processing in rr mode reimplemented using this attribute. Fixes: 87f4fe7653baf55b5c2f2753fe6003f473c07342 Fixes: 775a412bf83f6bc0c5c02091

[Qemu-devel] [PATCH 2/3] Introduce attributes to qemu timer subsystem

2018-10-14 Thread Artem Pisarenko
Attributes are simple flags, associated with individual timers for their whole lifetime. They intended to be used to mark individual timers for special handling by various qemu features operating at qemu core level. Existing timer, aio and coroutine interface extended with attribute-enabled vari

[Qemu-devel] [PATCH 1/3] Revert some patches from recent series [PATCH v6] "Fixing record/replay and adding reverse debugging", which introduced new virtual clock type for use in external subsystems.

2018-10-14 Thread Artem Pisarenko
This reverts commit 87f4fe7653baf55b5c2f2753fe6003f473c07342. This reverts commit 775a412bf83f6bc0c5c02091ee06cf649b34c593. This reverts commit 9888091404a702d7ec79d51b088d994b9fc121bd. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 9 - slirp/ip6_icmp.c | 7 +++ ui/in

[Qemu-devel] [PATCH 0/3] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-14 Thread Artem Pisarenko
Recent patches from series [PATCH v6] "Fixing record/replay and adding reverse debugging" introduced new clock type QEMU_CLOCK_VIRTUAL_EXT and replaced virtual timers in some external subsystems with it. This resulted in small change to existing behavior, which I consider to be unacceptable. Pro

Re: [Qemu-devel] [PATCH v7 1/7] target/mips: Define R5900 instructions and CPU preprocessor constants

2018-10-14 Thread Philippe Mathieu-Daudé
On Sat, Oct 13, 2018 at 1:10 PM Fredrik Noring wrote: > > The R5900 implements the 64-bit MIPS III instruction set except DMULT, > DMULTU, DDIV, DDIVU, LL, SC, LLD and SCD. The MIPS IV instructions MOVN, > MOVZ and PREF are implemented. It has the R5900 specific three-operand > instructions MADD,

[Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-14 Thread Philippe Mathieu-Daudé
The three-operand MADD and MADDU are specific to the Toshiba TX19/TX39/TX79 cores. The "32-Bit TX System RISC TX39 Family Architecture manual" is available at https://wiki.qemu.org/File:DSAE0022432.pdf Signed-off-by: Philippe Mathieu-Daudé --- Based-on: 540683755a2357b670b107a29658531466be18f4.1

[Qemu-devel] [PATCH v5 01/10] linux-user/syscall: Verify recvfrom(addr) is user-writable

2018-10-14 Thread Laurent Vivier
On 11/10/2018 00:36, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > Tested-By: Guido Günther > Reviewed-by: Laurent Vivier > --- > linux-user/syscall.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index ae3

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-14 Thread Max Reitz
On 13.10.18 22:36, Eduardo Habkost wrote: > On Sat, Oct 13, 2018 at 08:20:25PM +0200, Max Reitz wrote: >> On 13.10.18 07:02, Eduardo Habkost wrote: >>> Signed-off-by: Eduardo Habkost >>> --- >>> I'd like to do this in QEMU 3.1. I think it's time to drop >>> support for old systems that have only

Re: [Qemu-devel] [Qemu-block] [PATCH v2 7/8] gluster: Support auto-read-only option

2018-10-14 Thread Niels de Vos
On Fri, Oct 12, 2018 at 12:31:21PM -0500, Eric Blake wrote: > On 10/12/18 6:55 AM, Kevin Wolf wrote: > > If read-only=off, but auto-read-only=on is given, open the file > > read-write if we have the permissions, but instead of erroring out for > > read-only files, just degrade to read-only. > > >