[Qemu-devel] [PATCH 6/6] Add prctl() PR_SET_FP_MODE and PR_GET_FP_MODE implementations

2018-10-26 Thread Stefan Markovic
From: Stefan Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/target_syscall.h | 2 ++ linux-user/mips64/target_syscall.h | 2 ++ linux-user/syscall.c | 62 +++--- 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/linux-

[Qemu-devel] [PATCH 3/6] Extract MIPS abiflags from ELF file

2018-10-26 Thread Stefan Markovic
From: Stefan Markovic Signed-off-by: Stefan Markovic --- linux-user/elfload.c | 33 + 1 file changed, 33 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 055f6a9..5881233 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@

[Qemu-devel] [PATCH 4/6] Read and set FP ABI value from MIPS abiflags

2018-10-26 Thread Stefan Markovic
From: Stefan Markovic Signed-off-by: Stefan Markovic --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 5881233..5bccd2e 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2396,6 +2396,7 @@ static void

[Qemu-devel] [PATCH 5/6] Determine the desired FPU mode

2018-10-26 Thread Stefan Markovic
From: Stefan Markovic Floating-point mode is calculated from MIPS.abiflags FP ABI value (based on kernel implementation). Illegal combinations are rejected. Signed-off-by: Stefan Markovic --- linux-user/mips/cpu_loop.c | 75 ++ 1 file changed, 75 ins

[Qemu-devel] [PATCH 2/6] Extend image_info struct with MIPS specific fp_abi and interp_fp_abi fields

2018-10-26 Thread Stefan Markovic
From: Stefan Markovic Signed-off-by: Stefan Markovic --- linux-user/qemu.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 1beb6a2..a752c1c 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -61,6 +61,10 @@ struct image_info {

[Qemu-devel] [PATCH 0/6] target/mips: Add support for prctl() PR_GET_FP_MODE and PR_SET_FP_MODE

2018-10-26 Thread Stefan Markovic
From: Stefan Markovic This series includes support for prctl() PR_GET_FP_MODE and PR_SET_FP_MODE. This requires extracting MIPS.abiflags section from ELF file and fp_abi value handling. Stefan Markovic (6): Define MIPS_ABI_FP_UNKNOWN macro Extend image_info struct with MIPS specific fp_abi

[Qemu-devel] [PULL 7/9] tests/vm: Let kvm_available() work in cross environments

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-7-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 9fc0

[Qemu-devel] [PULL 8/9] tests/vm: Do not use -enable-kvm if HOST != TARGET architecture

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-8-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/

Re: [Qemu-devel] Minutes of KVM Forum BoF on deprecating stuff

2018-10-26 Thread Daniel P . Berrangé
On Fri, Oct 26, 2018 at 04:03:51PM +0200, Markus Armbruster wrote: > This is from my (imperfect) notes, corrections welcome. > > Motivation: QEMU contains stuff of dubious value, which gets in the way > in various (sometimes painful and expensive) ways. > > Deprecation is the marking of an exter

[Qemu-devel] [PULL 0/9] Testing patches

2018-10-26 Thread Fam Zheng
The following changes since commit 808ebd66e467f77c0d1f8c6346235f81e9c99cf2: Merge remote-tracking branch 'remotes/riscv/tags/riscv-for-master-3.1-sf0' into staging (2018-10-25 17:41:03 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/testing-pull-request

[Qemu-devel] [PULL 4/9] tests/vm: Do not use the -smp option with a single cpu

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-4-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/

[Qemu-devel] [PULL 5/9] tests/vm: Display remaining seconds to wait for a VM to start

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-5-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/te

[Qemu-devel] [PULL 2/9] tests/vm: Extract the kvm_available() handy function

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-2-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py| 4 tests/vm/basevm.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff -

[Qemu-devel] [PULL 6/9] tests/vm: Add a BaseVM::arch property

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé The 'arch' property gives a hint on which architecture the guest image runs. This can be use to select the correct QEMU binary path. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-6-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off

[Qemu-devel] [PULL 9/9] tests/vm: Do not abuse parallelism when HOST != TARGET architecture

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-9-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/basevm.py

[Qemu-devel] [PULL 3/9] tests/vm: Do not abuse parallelism when KVM is not available

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-3-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py

[Qemu-devel] [PULL 1/9] tests: docker: update test-mingw for GTK+ 2.0 removal

2018-10-26 Thread Fam Zheng
From: Paolo Bonzini --with-gtkabi does not exist anymore; remove it from the configure invocation. Fixes: 89d85cde75143325205e332dd97bf1bb8402d7c1 Signed-off-by: Paolo Bonzini Message-Id: <1539886203-33670-1-git-send-email-pbonz...@redhat.com> Tested-by: Philippe Mathieu-Daudé Reviewed-by: Tho

Re: [Qemu-devel] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Daniel P . Berrangé
On Fri, Oct 26, 2018 at 12:03:35PM +0200, Paolo Bonzini wrote: > On 26/10/2018 11:59, Daniel P. Berrangé wrote: > > I should also say that QEMU as an upstream project has multiple goals. > > Running KVM guests with modern PV hardware is only one of them, albeit > > a widely used one. Being able to

[Qemu-devel] Minutes of KVM Forum BoF on deprecating stuff

2018-10-26 Thread Markus Armbruster
This is from my (imperfect) notes, corrections welcome. Motivation: QEMU contains stuff of dubious value, which gets in the way in various (sometimes painful and expensive) ways. Deprecation is the marking of an external interface as "we intend to remove this, you should stop using it" (preferabl

Re: [Qemu-devel] [PATCH] lsi53c895a: check message length value

2018-10-26 Thread Mark Kanda
On 10/26/2018 4:25 AM, P J P wrote: +-- On Thu, 25 Oct 2018, Ameya More wrote --+ | While Mark and I reported this issue to you, it was actually discovered by | Dejvau Security and they should receive credit for reporting this issue. | http://www.dejavusecurity.com I see; Would it be possible

Re: [Qemu-devel] [PATCH 01/11] target/mips: Rename ASE_MMI to ASE_TOSHIBA_MMI, with Toshiba namespace

2018-10-26 Thread Aleksandar Markovic
> From: Fredrik Noring > Subject: [PATCH 01/11] target/mips: Rename ASE_MMI to ASE_TOSHIBA_MMI, with > Toshiba namespace > > Several vendors have multimedia instruction (MMI) sets and other > extensions of various kinds. ASE vendor namespaces make it clear these > are not generic architectural f

Re: [Qemu-devel] [PATCH v2 02/29] targer/riscv: Activate decodetree and implemnt LUI & AUIPC

2018-10-26 Thread Richard Henderson
On 10/26/18 11:49 AM, Bastian Koppelmann wrote: > I think you can pick up everything up to the RVC conversion which still needs > the work suggested by Richard. Thanks, for picking it up :) Even then I thought we were talking about splitting the RV64 insns into a separate file, reducing the ifdefs

[Qemu-devel] [Bug 1800156] [NEW] windows 8.1 loose grab/leave window on windowed

2018-10-26 Thread Valentin Fort
Public bug reported: Hello, i am new to QEMU and i encounter that annoying issue (windowed) when i move the mouse a bit too much then it leave the window. Windows 8.1, Latest QEMU (Windows binaries). ** Affects: qemu Importance: Undecided Status: New ** Summary changed: - windows

Re: [Qemu-devel] [PATCH v8 00/38] target/mips: Limited support for the R5900

2018-10-26 Thread Fredrik Noring
Hi Maciej, > I'm not sure if every single random vendor-specific instruction (or a > bunch of) deserves its own ASE designation, be it internal or externally > exposed. I think the MMI set being a substantial architectural feature > makes sense to be shown in /proc/cpuinfo (in Linux), but I d

Re: [Qemu-devel] [RFC v4 36/71] arm: convert to cpu_interrupt_request

2018-10-26 Thread Alex Bennée
Emilio G. Cota writes: > Cc: Peter Maydell This will need to catch-up in the next re-base as there is a merge conflict. > Cc: qemu-...@nongnu.org > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > --- > target/arm/cpu.c| 2 +- > target/arm/helper.c | 12 +--- >

Re: [Qemu-devel] [PATCH RFC 0/2] Fix migration issues

2018-10-26 Thread Peter Xu
On Fri, Oct 26, 2018 at 09:10:19PM +0800, Fei Li wrote: > > > On 10/25/2018 08:58 PM, Peter Xu wrote: > > On Thu, Oct 25, 2018 at 05:04:00PM +0800, Fei Li wrote: > > > > [...] > > > > > @@ -1325,22 +1325,24 @@ bool multifd_recv_all_channels_created(void) > > >  /* Return true if multifd is rea

Re: [Qemu-devel] Guest application exit point.

2018-10-26 Thread Alex Bennée
Rafael K. V. Maeda writes: > Hi, > > I am implementing a plugin that allocates several resources. I need to > cleanup some of these resources when QEMU finishes executing the guest > application. Where is the best exit point to place my cleanup > functions? > > I have tried registering a functi

Re: [Qemu-devel] [PULL v2 00/28] pci, pc, virtio: fixes, features

2018-10-26 Thread Singh, Brijesh
On 10/25/2018 07:59 PM, Michael S. Tsirkin wrote: > On Thu, Oct 25, 2018 at 08:16:44PM +0100, Peter Maydell wrote: >> On 25 October 2018 at 01:52, Michael S. Tsirkin wrote: >>> The following changes since commit 13399aad4fa87b2878c49d02a5d3bafa6c966ba3: >>> >>>Merge remote-tracking branch 'r

Re: [Qemu-devel] [libvirt] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Christian Borntraeger
On 10/26/2018 11:42 AM, Daniel P. Berrangé wrote: > On Fri, Oct 26, 2018 at 12:33:55PM +0530, P J P wrote: >> Hello Dan, all >> >> +-- On Thu, 25 Oct 2018, Daniel P. Berrangé wrote --+ >> | On Thu, Oct 25, 2018 at 10:52:56AM +0200, Gerd Hoffmann wrote: >> | > While being at it deprecate cirrus

Re: [Qemu-devel] [PATCH v8 00/38] target/mips: Limited support for the R5900

2018-10-26 Thread Maciej W. Rozycki
On Fri, 26 Oct 2018, Richard Henderson wrote: > > Overall this source file is clearly a modified copy of an ancient version > > of the opcode table included with the opcodes library from binutils and I > > think it would benefit from a refresh. > > You can't do that because of GPL v3, sadly.

Re: [Qemu-devel] [PATCH RFC 0/2] Fix migration issues

2018-10-26 Thread Fei Li
On 10/25/2018 08:58 PM, Peter Xu wrote: On Thu, Oct 25, 2018 at 05:04:00PM +0800, Fei Li wrote: [...] @@ -1325,22 +1325,24 @@ bool multifd_recv_all_channels_created(void)  /* Return true if multifd is ready for the migration, otherwise false */  bool multifd_recv_new_channel(QIOChannel *i

Re: [Qemu-devel] [PATCH RFC 0/2] Fix migration issues

2018-10-26 Thread Fei Li
On 10/25/2018 08:55 PM, Dr. David Alan Gilbert wrote: * Fei Li (f...@suse.com) wrote: Hi, these two patches are to fix live migration issues. The first is about multifd, and the second is to fix some error handling. But I have a question about using multifd migration. In our current code, wh

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

2018-10-26 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 | 205 -- target/i386/cpu.

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

2018-10-26 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: v6: In cpu featu

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

2018-10-26 Thread Robert Hoo
Note RSBA is specially treated -- no matter host support it or not, qemu pretends it is supported. Changes in v6: filter out MSR features whose dependent CPUID enumeration is not there. Signed-off-by: Robert Hoo Reviewed-by: Eduardo Habkost --- target/i386/cpu.c | 31 ++

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

2018-10-26 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 Reviewed-by: Eduardo Habkost --- include/sysemu/kvm.h | 2 ++ target/i386/kvm.c| 80 +

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-26 Thread David Hildenbrand
> > It's not obvious to me why this looks so different from the code in > parse_type_int64(). Should we be using qemu_strtoi64() in the > pre-existing function, instead of what's there now? The existing function has to be that complicated because it calls into the same function used to parse r

[Qemu-devel] [PATCH v2] ppc/pnv: check size before data buffer access

2018-10-26 Thread P J P
From: Prasad J Pandit While performing PowerNV memory r/w operations, the access length 'sz' could exceed the data[4] buffer size. Add check to avoid OOB access. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/ppc/pnv_lpc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletio

Re: [Qemu-devel] [libvirt] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Daniel P. Berrangé wrote --+ | > No, since the adlib device is not used as much and is being deprecated, I'm | > not inclined to get one. | | Any security issue that affects code in QEMU that is currently being | shipped by distros should have a CVE. | | Whether we inten

Re: [Qemu-devel] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Paolo Bonzini wrote --+ | Oh, thanks! I said I was dumb. :) So the fix is just this: | | diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h | index e7e578a48e..7199afaa3c 100644 | --- a/hw/audio/fmopl.h | +++ b/hw/audio/fmopl.h | @@ -72,8 +72,8 @@ typedef struct fm_opl_f {

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

2018-10-26 Thread Aleksandar Markovic
> I'm queueing your MADD and MADDU patch... You don't queue, you submit. Thanks, Aleksandar From: Fredrik Noring Sent: Wednesday, October 24, 2018 8:01:15 PM To: Philippe Mathieu-Daudé Cc: Maciej W . Rozycki; Richard Henderson; Aleksandar Markovic; Aurel

[Qemu-devel] [PATCH RFC] MAINTAINERS: clarify some of the tags

2018-10-26 Thread Cornelia Huck
The MAINTAINERS file is a bit sparse on information about what the different designators are. Let's add some more information to give contributors a better idea about what the different roles are. Signed-off-by: Cornelia Huck --- This came out of a discussion about what being a 'reviewer' listed

Re: [Qemu-devel] [PATCH v2 00/29] target/riscv: Convert to decodetree

2018-10-26 Thread Bastian Koppelmann
On 10/25/18 12:21 AM, Palmer Dabbelt wrote: On Sat, 20 Oct 2018 00:14:22 PDT (-0700), kbast...@mail.uni-paderborn.de wrote: Hi, this patchset converts the RISC-V decoder to decodetree in three major steps: 1) Convert 32-bit instructions to decodetree [Patch 1-14]:     Many of the gen_* fun

Re: [Qemu-devel] [PULL v2 05/43] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events

2018-10-26 Thread Philippe Mathieu-Daudé
On 26/10/18 10:27, Eduardo Habkost wrote: On Thu, Oct 25, 2018 at 06:17:59PM +0100, David Gibson wrote: On Thu, Oct 25, 2018 at 10:32:23AM -0300, Eduardo Habkost wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko Reviewed-by: Cédric Le Go

Re: [Qemu-devel] [PATCH v2 02/29] targer/riscv: Activate decodetree and implemnt LUI & AUIPC

2018-10-26 Thread Bastian Koppelmann
On 10/25/18 6:58 PM, Palmer Dabbelt wrote: Reviewed-by: Palmer Dabbelt How do you want to go about merging these?  It looks like it should be possible to merge the patch set piecemeal, which I'd actually be happy doing as it'll be easier to get these out for testing that way.  That way we

Re: [Qemu-devel] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Oct 26, 2018 at 12:33:55PM +0530, P J P wrote: > > Hello Dan, all > > > > +-- On Thu, 25 Oct 2018, Daniel P. Berrangé wrote --+ > > | On Thu, Oct 25, 2018 at 10:52:56AM +0200, Gerd Hoffmann wrote: > > | > While being at it deprecate cir

Re: [Qemu-devel] [PATCH 0/2] Deprecate the "collie" machine and Strongarm devices

2018-10-26 Thread Peter Maydell
On 26 October 2018 at 11:06, Thomas Huth wrote: > These files lack an entry in the MAINTAINERS file, and according to > the initial commits, the board and devices are incomplete. Since there > have hardly been any commits in the past to really improve them, we > should consider to mark them as dep

[Qemu-devel] [PATCH v1] xen: preserve COMPAT in CFLAGS

2018-10-26 Thread Olaf Hering
A given Qemu version can not predict what version of Xen it will run on. There are some checks in configure to decide what Xen libraries and functions are available. How exactly these functions must be accessed has to be decided by configure and the user who is compiling Qemu. In no way some random

[Qemu-devel] [PATCH 2/2] arm: Deprecate the Strongarm sa1100 and sa1110 processors

2018-10-26 Thread Thomas Huth
The deprecated "collie" board is the only user of the Strongarm devices, so if "collie" goes away, we should remove the Strongarm devices, too. Signed-off-by: Thomas Huth --- qemu-deprecated.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi

[Qemu-devel] [PATCH 1/2] hw/arm: Deprecate the "collie" board

2018-10-26 Thread Thomas Huth
"collie" has no entry in the MAINTAINERS file, and the initial commit with ID c64b21d519a6ecae12f65625fa60f3035ed88644 said: "Add very basic implementation of collie PDA emulation. The system lacks LoCoMo and graphics/sound emulation. Linux kernel boots up to mounting rootfs (theoretically it ca

[Qemu-devel] [PATCH 0/2] Deprecate the "collie" machine and Strongarm devices

2018-10-26 Thread Thomas Huth
These files lack an entry in the MAINTAINERS file, and according to the initial commits, the board and devices are incomplete. Since there have hardly been any commits in the past to really improve them, we should consider to mark them as deprecated now. Thomas Huth (2): hw/arm: Deprecate the "c

Re: [Qemu-devel] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Paolo Bonzini
On 26/10/2018 11:59, Daniel P. Berrangé wrote: > I should also say that QEMU as an upstream project has multiple goals. > Running KVM guests with modern PV hardware is only one of them, albeit > a widely used one. Being able to run old legacy OS with old hardware, > and running arbitrary embedded b

Re: [Qemu-devel] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread Paolo Bonzini
On 26/10/2018 11:34, P J P wrote: > +-- On Fri, 26 Oct 2018, Paolo Bonzini wrote --+ > | I am dumb and I don't understand. In set_ar_dr you get > | > | v = 0xff > | ar = 15 > | dr = 15 > | > | and OPL->AR_TABLE[60] is accessed. The size of the array is 75, which > | seems to be actu

Re: [Qemu-devel] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Daniel P . Berrangé
On Fri, Oct 26, 2018 at 10:42:08AM +0100, Daniel P. Berrangé wrote: > On Fri, Oct 26, 2018 at 12:33:55PM +0530, P J P wrote: > > Hello Dan, all > > > > +-- On Thu, 25 Oct 2018, Daniel P. Berrangé wrote --+ > > | On Thu, Oct 25, 2018 at 10:52:56AM +0200, Gerd Hoffmann wrote: > > | > While being a

Re: [Qemu-devel] [PATCH v7 20/20] target/mips: Amend MXU ASE overview note

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Add prefix, suffix, operation descriptions, and other corrections > and amendments to the comment that describes MXU ASE. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/translate.c | 84 > ++

Re: [Qemu-devel] [libvirt] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread Daniel P . Berrangé
On Fri, Oct 26, 2018 at 12:38:53PM +0530, P J P wrote: > +-- On Thu, 25 Oct 2018, Daniel P. Berrangé wrote --+ > | On Thu, Oct 25, 2018 at 04:26:16PM +0530, P J P wrote: > | > +-- On Thu, 25 Oct 2018, Gerd Hoffmann wrote --+ > | > | We have a lovely, guest-triggerable buffer overflow in opl2 emulat

Re: [Qemu-devel] [PATCH v7 19/20] target/mips: Move MXU_EN check one level higher

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Move MXU_EN check to the main MXU decoding function, to avoid code > repetition. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/translate.c | 509 > ++-- > 1

Re: [Qemu-devel] [PATCH v7 13/20] target/mips: Move MUL, S32M2I, S32I2M handling out of main MXU switch

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Move MUL, S32M2I, S32I2M handling out of switch. These are all > instructions that do not depend on MXU_EN flag of MXU_CR. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/translate.c | 41

Re: [Qemu-devel] [libvirt] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Daniel P . Berrangé
On Fri, Oct 26, 2018 at 09:48:35AM +0100, Cole Robinson wrote: > On 10/25/2018 09:37 PM, Daniel P. Berrangé wrote: > > On Thu, Oct 25, 2018 at 10:52:56AM +0200, Gerd Hoffmann wrote: > > > While being at it deprecate cirrus too. > > > > > > Reason (short version): use stdvga instead. > > > Verbose

Re: [Qemu-devel] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Daniel P . Berrangé
On Fri, Oct 26, 2018 at 12:33:55PM +0530, P J P wrote: > Hello Dan, all > > +-- On Thu, 25 Oct 2018, Daniel P. Berrangé wrote --+ > | On Thu, Oct 25, 2018 at 10:52:56AM +0200, Gerd Hoffmann wrote: > | > While being at it deprecate cirrus too. > | > > | > Reason (short version): use stdvga inste

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Cédric Le Goater wrote --+ | On 10/25/18 8:45 AM, P J P wrote: | > - While we refactor the routine for better, a patch below seem okay to fix | >the OOB access issue? | | I think it is fine. Please add something like : | | qemu_log_mask(LOG_GUEST_ERROR, "ECC

Re: [Qemu-devel] [PATCH v1] arm: check bit index before usage

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Peter Maydell wrote --+ | > === | > diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c | > index ec2627374d..dd8c4b1f2e 100644 | > --- a/hw/arm/strongarm.c | > +++ b/hw/arm/strongarm.c | > @@ -587,12 +587,12 @@ static void strongarm_gpio_write(void *opaque, hwaddr | > off

Re: [Qemu-devel] [PATCH] lsi53c895a: check message length value

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Paolo Bonzini wrote --+ | > -int msg_len; | > +uint8_t msg_len; | | Not wrong per se, but it's also not clear why it's needed. I understand | that you want to switch from signed to unsigned, but it is not mentioned | in the commit message. Changed to uint8_t beca

Re: [Qemu-devel] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread P J P
+-- On Fri, 26 Oct 2018, Paolo Bonzini wrote --+ | I am dumb and I don't understand. In set_ar_dr you get | | v = 0xff | ar = 15 | dr = 15 | | and OPL->AR_TABLE[60] is accessed. The size of the array is 75, which | seems to be actually 14 more than required. Likewise OPL->DR_

Re: [Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-26 Thread Paolo Bonzini
On 22/10/2018 14:09, P J P wrote: > From: Prasad J Pandit > > While performing gpio write via strongarm_gpio_handler_update > routine, the 'bit' index could access beyond s->handler[28] array. > Add check to avoid OOB access. > > Reported-by: Moguofang > Signed-off-by: Prasad J Pandit > --- >

Re: [Qemu-devel] [PATCH 2/3] nvme: check size before memcpy

2018-10-26 Thread Paolo Bonzini
On 22/10/2018 14:14, P J P wrote: > From: Prasad J Pandit > > While in nvme_mmio_read, memcpy could read past the 'n->bar' > buffer, if addr offset was pointing towards its tail end. > Add check to avoid OOB access. > > Reported-by: Caihongzhu > Signed-off-by: Prasad J Pandit > --- > hw/block

Re: [Qemu-devel] [PATCH] lsi53c895a: check message length value

2018-10-26 Thread P J P
+-- On Thu, 25 Oct 2018, Ameya More wrote --+ | While Mark and I reported this issue to you, it was actually discovered by | Dejvau Security and they should receive credit for reporting this issue. | http://www.dejavusecurity.com I see; Would it be possible to share email-id of the original repo

Re: [Qemu-devel] [PATCH v7 08/20] target/mips: Add bit encoding for MXU execute add/sub pattern 'eptn2'

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Add bit encoding for MXU execute 2-bit add/subtract pattern 'eptn2'. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/translate.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Stefan Markov

Re: [Qemu-devel] [PATCH v7 06/20] target/mips: Add bit encoding for MXU accumulate add/sub 1-bit pattern 'aptn1'

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Add bit encoding for MXU accumulate add/subtract 1-bit pattern > 'aptn1'. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/translate.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Stefan M

Re: [Qemu-devel] [PATCH v7 05/20] target/mips: Add MXU decoding engine

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Add MXU decoding engine: add handlers for all instruction pools, > and main decode handler. The handlers, for now, for the purpose > of this patch, contain only sceleton in the form of a single > switch statement. > >

Re: [Qemu-devel] [PATCH v7 04/20] target/mips: Add and integrate MXU decoding engine placeholder

2018-10-26 Thread Stefan Markovic
On 24.10.18. 14:18, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Provide the placeholder and add the invocation logic for MXU > decoding engine. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/translate.c | 8 > 1 file changed, 8 insertions(+) > > diff --git

Re: [Qemu-devel] [PATCH v3 0/9] iotests: Make them work for both Python 2 and 3

2018-10-26 Thread Eduardo Habkost
On Mon, Oct 22, 2018 at 02:52:58PM +0100, Max Reitz wrote: > This series prepares the iotests to work with both Python 2 and 3. In > some places, it adds version-specific code and decides what to do based > on the version (for instance, whether to import the StringIO or the > BytesIO class from 'i

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

2018-10-26 Thread Jia Lina
During an active background migration, 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 migration task, Migration accesses the null pointer in "current_migration" struct and qemu crashes eventually.

Re: [Qemu-devel] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread Paolo Bonzini
On 25/10/2018 10:52, Gerd Hoffmann wrote: > We have a lovely, guest-triggerable buffer overflow in opl2 emulation. > > Reproducer: > outw(0xff60, 0x220); > outw(0x1020, 0x220); > outw(0xffb0, 0x220); > Result: > Will overflow FM_OPL->AR_TABLE[] (see hw/audio/fmopl.[ch]) I am dumb

Re: [Qemu-devel] [PATCH] cpu.h: fix a typo in comment

2018-10-26 Thread Laurent Vivier
On 05/09/2018 13:29, Li Qiang wrote: > Found by reading the code. > > Signed-off-by: Li Qiang > --- > include/qom/cpu.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > index dc130cd307..5bb94a9f86 100644 > --- a/include/qom/cpu.h

Re: [Qemu-devel] [libvirt] [PATCH 3/3] cirrus: mark as deprecated

2018-10-26 Thread Cole Robinson
On 10/25/2018 09:37 PM, Daniel P. Berrangé wrote: On Thu, Oct 25, 2018 at 10:52:56AM +0200, Gerd Hoffmann wrote: While being at it deprecate cirrus too. Reason (short version): use stdvga instead. Verbose version: https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful E

[Qemu-devel] [PATCH v3 03/16] gdbstub: add multiprocess support to '?' packets

2018-10-26 Thread Luc Michel
The gdb_get_cpu_pid() function does the PID lookup for the given CPU. It checks if the CPU is a direct child of a CPU cluster. If it is, the returned PID is the cluster ID plus one (cluster IDs start at 0, GDB PIDs at 1). When the CPU is not a child of such a container, the PID of the first process

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

2018-10-26 Thread Eduardo Habkost
On Fri, Oct 26, 2018 at 11:01:25AM +0800, Robert Hoo wrote: > On Wed, 2018-10-24 at 07:06 -0300, Eduardo Habkost wrote: > > On Mon, Oct 15, 2018 at 12:47:25PM +0800, Robert Hoo wrote: > > > Note RSBA is specially treated -- no matter host support it or not, > > > qemu > > > pretends it is supported

[Qemu-devel] [PATCH v3 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-10-26 Thread Luc Michel
Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b7079eff4a..39b1766f28 100644 --

Re: [Qemu-devel] [PULL v2 05/43] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events

2018-10-26 Thread Eduardo Habkost
On Thu, Oct 25, 2018 at 06:17:59PM +0100, David Gibson wrote: > On Thu, Oct 25, 2018 at 10:32:23AM -0300, Eduardo Habkost wrote: > > From: Philippe Mathieu-Daudé > > > > Signed-off-by: Philippe Mathieu-Daudé > > Reviewed-by: Artyom Tarasenko > > Reviewed-by: Cédric Le Goater > > Message-Id: <2

[Qemu-devel] [PATCH v3 06/16] gdbstub: add multiprocess support to 'sC' packets

2018-10-26 Thread Luc Michel
Change the sC packet handling to support the multiprocess extension. Instead of returning the first thread, we return the first thread of the current process. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- gdbstub.c | 11 --- 1 file chan

[Qemu-devel] [PATCH v3 00/16] gdbstub: support for the multiprocess extension

2018-10-26 Thread Luc Michel
changes since v2: - patch 1introducing the cpu-cluster type. I didn't opt for an Interface, but I can add one if you think it's necessary. For now this class inherits from Device and has a cluster-id property, used by the GDB stub to compute a

[Qemu-devel] [PATCH v3 01/16] hw/cpu: introduce CPU clusters

2018-10-26 Thread Luc Michel
This commit adds the cpu-cluster type. It aims at gathering CPUs from the same cluster in a machine. For now it only has a `cluster-id` property. Signed-off-by: Luc Michel --- include/hw/cpu/cluster.h | 38 +++ hw/cpu/cluster.c | 49 ++

[Qemu-devel] [PATCH v3 05/16] gdbstub: add multiprocess support to vCont packets

2018-10-26 Thread Luc Michel
Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension support to vCont packets. Signed-off-by: Luc M

[Qemu-devel] [PATCH v3 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-10-26 Thread Luc Michel
Change the thread info related packets handling to support multiprocess extension. Add the CPUs class name in the extra info to help differentiate them in multiprocess mode. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 35 +-- 1

[Qemu-devel] [PATCH v3 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-10-26 Thread Luc Michel
Change the Xfer:features:read: packet handling to support the multiprocess extension. This packet is used to request the XML description of the CPU. In multiprocess mode, different descriptions can be sent for different processes. This function now takes the process to send the description for as

[Qemu-devel] [PATCH v3 02/16] gdbstub: introduce GDB processes

2018-10-26 Thread Luc Michel
Add a structure GDBProcess that represent processes from the GDB semantic point of view. CPUs can be split into different processes, by grouping them under different cpu-cluster objects. Each occurrence of a cpu-cluster object implies the existence of the corresponding process in the GDB stub. Th

[Qemu-devel] [PATCH v3 13/16] gdbstub: processes initialization on new peer connection

2018-10-26 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 20 +++- 1 file changed, 15 insertio

[Qemu-devel] [PATCH v3 12/16] gdbstub: add support for vAttach packets

2018-10-26 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 9c239c1760..e5eddd8e2b 100644

[Qemu-devel] [PATCH v3 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-10-26 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB get confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel --- gdbstub.c | 9 +

[Qemu-devel] [PATCH v3 16/16] arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters

2018-10-26 Thread Luc Michel
Create two separate CPU clusters for APUs and RPUs. Signed-off-by: Luc Michel --- include/hw/arm/xlnx-zynqmp.h | 3 +++ hw/arm/xlnx-zynqmp.c | 23 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-z

[Qemu-devel] [PATCH v3 04/16] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-10-26 Thread Luc Michel
Add a couple of helper functions to cope with GDB threads and processes. The gdb_get_process() function looks for a process given a pid. The gdb_get_cpu() function returns the CPU corresponding to the (pid, tid) pair given as parameters. The read_thread_id() function parses the thread-id sent by

[Qemu-devel] [PATCH v3 11/16] gdbstub: add support for extended mode packet

2018-10-26 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 4d8474204f..9c239c1760 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1291,10 +129

Re: [Qemu-devel] [PATCH 1/1] i386: Add PKU/OSPKE on Skylake-Server CPU model

2018-10-26 Thread Eduardo Habkost
On Fri, Oct 26, 2018 at 01:53:10PM +0800, Tao Xu wrote: > On 10/25/18 9:28 PM, Eduardo Habkost wrote: > > On Wed, Oct 17, 2018 at 12:48:58PM +0200, Paolo Bonzini wrote: > > > On 17/10/2018 11:30, Tao Xu wrote: > > > > As the release document ref below link (page 13): > > > > https://software.intel.

[Qemu-devel] [PATCH v3 15/16] gdbstub: add multiprocess extension support

2018-10-26 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 6 ++ 1 file changed, 6 insertions(+) diff -

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: check size before data buffer access

2018-10-26 Thread Cédric Le Goater
Hello Prasad, On 10/25/18 8:45 AM, P J P wrote: > Hello Cedric, > > +-- On Wed, 24 Oct 2018, Cédric Le Goater wrote --+ > | I think using a data[8] would be more appropriate. It would make the > | pnv_lpc_do_eccb() routine a little more complex. I tried to rewrite it to > | have a common one

[Qemu-devel] [PATCH v3 10/16] gdbstub: add multiprocess support to 'D' packets

2018-10-26 Thread Luc Michel
'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 60 --- 1 file changed, 53 insertions(+),

[Qemu-devel] [PATCH v2] strongarm: mask off high[32:28] bits from dir and state registers

2018-10-26 Thread P J P
From: Prasad J Pandit The high[32:28] bits of 'direction' and 'state' registers of SA-1100/SA-1110 device are reserved. Setting them may lead to OOB 's->handler[]' array access issue. Mask off [32:28] bits to avoid it. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/arm/strongarm

Re: [Qemu-devel] [PATCH v8 00/38] target/mips: Limited support for the R5900

2018-10-26 Thread Richard Henderson
On 10/25/18 7:03 PM, Maciej W. Rozycki wrote: > Overall this source file is clearly a modified copy of an ancient version > of the opcode table included with the opcodes library from binutils and I > think it would benefit from a refresh. You can't do that because of GPL v3, sadly. r~

Re: [Qemu-devel] [libvirt] [PATCH 2/3] adlib: mark as insecure and deprecated.

2018-10-26 Thread P J P
+-- On Thu, 25 Oct 2018, Daniel P. Berrangé wrote --+ | On Thu, Oct 25, 2018 at 04:26:16PM +0530, P J P wrote: | > +-- On Thu, 25 Oct 2018, Gerd Hoffmann wrote --+ | > | We have a lovely, guest-triggerable buffer overflow in opl2 emulation. | > | | > | Reproducer: | > | outw(0xff60, 0x220); |

<    1   2   3   >