[Qemu-devel] [PULL 13/20] configure: Support pkg-config for zlib

2018-10-26 Thread Laurent Vivier
From: Stefan Weil This is needed for builds with the mingw64-* packages from Cygwin, but also works for Linux. Move the zlib test also more to the end because users should get information on the really important missing packages (which also require zlib) first. Signed-off-by: Stefan Weil

Re: [Qemu-devel] [RFC v4 59/71] cpu: introduce cpu_has_work_with_iothread_lock

2018-10-26 Thread Richard Henderson
On 10/25/18 3:46 PM, Emilio G. Cota wrote: > It will gain some users soon. > > Suggested-by: Paolo Bonzini > Signed-off-by: Emilio G. Cota > --- > include/qom/cpu.h | 36 +--- > 1 file changed, 33 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 00/20] Trivial patches patches

2018-10-26 Thread Laurent Vivier
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/vivier/qemu.git

Re: [Qemu-devel] [RFC v4 58/71] cpu: call .cpu_has_work with the CPU lock held

2018-10-26 Thread Richard Henderson
On 10/25/18 3:46 PM, Emilio G. Cota wrote: > Signed-off-by: Emilio G. Cota > --- > include/qom/cpu.h | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

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

2018-10-26 Thread Aleksandar Markovic
> Subject: [PATCH 2/6] Extend image_info struct with MIPS specific fp_abi and > interp_fp_abi fields > > From: Stefan Markovic > > Signed-off-by: Stefan Markovic > --- A brief commit message is needed. Perhaps with the description of the role/purpose of two fields introduced in this patch.

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

2018-10-26 Thread Mark Kanda
On 10/26/2018 1:37 PM, P J P wrote: +-- On Fri, 26 Oct 2018, Mark Kanda wrote --+ | Deja vu requested that we include the following text in the commit message: | | Discovered by Deja vu Security. Reported by Oracle. | | Would that be acceptable? Generally an email-id is used/preferred in

Re: [Qemu-devel] [PULL v2 00/43] Machine queue, 2018-10-25

2018-10-26 Thread Peter Maydell
On 25 October 2018 at 14:32, Eduardo Habkost wrote: > Changes v1 -> v2: > * Fix 'make check' warnings (Igor) > > > The following changes since commit 13399aad4fa87b2878c49d02a5d3bafa6c966ba3: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-10-22' > into staging

[Qemu-devel] [PULL 15/20] xen: Use the PCI_DEVICE macro

2018-10-26 Thread Laurent Vivier
From: Philippe Mathieu-Daudé TYPE_XEN_PT_DEVICE is a subclass of TYPE_PCI_DEVICE, the clean way to access the PCIDevice pointer is using the PCI_DEVICE() macro. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Acked-by: Anthony PERARD

[Qemu-devel] [PULL 10/20] linux-user: fix comment s/atomic_write/atomic_set/

2018-10-26 Thread Laurent Vivier
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <20180811211011.6277-1-c...@braap.org> Signed-off-by: Laurent Vivier --- linux-user/qemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 1beb6a2cfc..dde3f26f5a

[Qemu-devel] [PULL 07/20] scripts/decodetree.py: remove unused imports

2018-10-26 Thread Laurent Vivier
From: Cleber Rosa Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20181004161852.11673-8-cr...@redhat.com> Signed-off-by: Laurent Vivier --- scripts/decodetree.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py

[Qemu-devel] [PULL 05/20] qemu-iotests: fix filename containing checks

2018-10-26 Thread Laurent Vivier
From: Cleber Rosa Commit cce293a2945 moved some functions from common.config to common.rc, but the error messages still reference the old file location. Signed-off-by: Cleber Rosa Reviewed-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20181004161852.11673-5-cr...@redhat.com>

Re: [Qemu-devel] [RFC v4 60/71] ppc: convert to cpu_has_work_with_iothread_lock

2018-10-26 Thread Richard Henderson
On 10/25/18 3:46 PM, Emilio G. Cota wrote: > Soon we will call cpu_has_work without the BQL. > > Cc: David Gibson > Cc: Alexander Graf > Cc: qemu-...@nongnu.org > Signed-off-by: Emilio G. Cota > --- > target/ppc/translate_init.inc.c | 16 > 1 file changed, 12 insertions(+), 4

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

2018-10-26 Thread Aleksandar Markovic
> Subject: [PATCH 5/6] Determine the desired FPU mode > > 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 > --- Reviewed-by: Aleksandar

Re: [Qemu-devel] [RFC v4 67/71] cpus-common: release BQL earlier in run_on_cpu

2018-10-26 Thread Richard Henderson
On 10/25/18 3:46 PM, Emilio G. Cota wrote: > After completing the conversion to per-CPU locks, there is no need > to release the BQL after having called cpu_kick. > > Signed-off-by: Emilio G. Cota > --- > cpus-common.c | 20 +--- > 1 file changed, 5 insertions(+), 15

Re: [Qemu-devel] [RFC v4 70/71] cpus-common: move exclusive_idle higher in the file

2018-10-26 Thread Richard Henderson
On 10/25/18 3:46 PM, Emilio G. Cota wrote: > This will simplify the following commit's diff. > > Signed-off-by: Emilio G. Cota > --- > cpus-common.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Richard Henderson r~

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

2018-10-26 Thread Aleksandar Markovic
> Subject: [PATCH 3/6] Extract MIPS abiflags from ELF file > > From: Stefan Markovic > > Signed-off-by: Stefan Markovic > --- A brief commit message is needed. Other than that: Reviewed-by: Aleksandar Markovic

[Qemu-devel] [PATCH] target/riscv/pmp.c: pmpcfg_csr_read returns bogus value on RV64

2018-10-26 Thread Dayeol Lee
pmp_read_cfg() returns 8-bit value, which is combined together to form a single pmpcfg CSR. The default promotion rules will result in an integer here ("i*8" is integer, which flows through) resulting in a 32-bit signed value on most hosts. That's bogus on RV64I, with the high bits of the CSR

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

2018-10-26 Thread Aleksandar Markovic
> From: Peter Maydell > Subject: Re: [Qemu-devel] [PATCH 5/6] Determine the desired FPU mode > > On 26 October 2018 at 15:21, Stefan Markovic > wrote: > > From: Stefan Markovic > > > > Floating-point mode is calculated from MIPS.abiflags FP ABI value > > (based on kernel implementation).

[Qemu-devel] [PULL 17/20] hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro

2018-10-26 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/round.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir . --in-place Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Acked-by:

Re: [Qemu-devel] [RFC v4 48/71] mips: convert to cpu_interrupt_request

2018-10-26 Thread Richard Henderson
On 10/25/18 3:46 PM, Emilio G. Cota wrote: > Cc: Aurelien Jarno > Cc: Aleksandar Markovic > Cc: James Hogan > Signed-off-by: Emilio G. Cota > --- > target/mips/cpu.c | 7 --- > target/mips/kvm.c | 2 +- > 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 01/20] configs/alpha: Remove unused CONFIG_PARALLEL_ISA switch

2018-10-26 Thread Laurent Vivier
From: Thomas Huth We don't use CONFIG_PARALLEL_ISA in any of our Makefiles, so this is just a dead config option which can be removed. Fixes: a4cb773928e047b137c6998209cf2eec857fac6b Signed-off-by: Thomas Huth Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id:

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

2018-10-26 Thread Aleksandar Markovic
> From: Stefan Markovic > Subject: [PATCH 6/6] Add prctl() PR_SET_FP_MODE and PR_GET_FP_MODE > implementations > > From: Stefan Markovic > > Signed-off-by: Stefan Markovic > #define TARGET_PR_SET_FP_MODE 45 > #define TARGET_PR_GET_FP_MODE 46 > +#define TARGET_PR_FP_MODE_FR (1 << 0) >

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

2018-10-26 Thread Emilio G. Cota
On Fri, Oct 26, 2018 at 14:39:21 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > Cc: Peter Maydell > > This will need to catch-up in the next re-base as there is a merge conflict. Yep, this series is so long that I decided to keep the same baseline as in v3, so that I could just

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

2018-10-26 Thread Dr. David Alan Gilbert
* Jia Lina (jialin...@baidu.com) wrote: > 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 >

[Qemu-devel] [PATCH 1/3] target/mips: Rename MMI-related masks

2018-10-26 Thread Aleksandar Markovic
From: Aleksandar Markovic Rename MMI-related masks. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 51a5488..e38d50d 100644 ---

[Qemu-devel] [PATCH 2/3] target/mips: Rename MMI-related opcodes

2018-10-26 Thread Aleksandar Markovic
From: Aleksandar Markovic Rename MMI-related opcodes. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 470 1 file changed, 235 insertions(+), 235 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c

[Qemu-devel] [PATCH 3/3] target/mips: Rename MMI-related functions

2018-10-26 Thread Aleksandar Markovic
From: Aleksandar Markovic Rename MMI-related functions. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index

[Qemu-devel] [PATCH 0/3] target/mips: Rename MMI-related code elements

2018-10-26 Thread Aleksandar Markovic
From: Aleksandar Markovic This series renames MMI-related code elements so that they do not contain TX79 substring. Tx79 is one of CPUs that support MMI ASE. Opcodes and other code elements should be as generic as possible, and should not contain CPU name if they are supported by multiple CPUs.

Re: [Qemu-devel] [PATCH 04/10] cputlb: Split large page tracking per mmu_idx

2018-10-26 Thread Emilio G. Cota
On Tue, Oct 23, 2018 at 08:02:47 +0100, Richard Henderson wrote: > +static void tlb_flush_page_locked(CPUArchState *env, int midx, > + target_ulong addr) > +{ > +target_ulong lp_addr = env->tlb_d[midx].large_page_addr; > +target_ulong lp_mask =

Re: [Qemu-devel] [PATCH 2/4] migration: introduce lockless multithreads model

2018-10-26 Thread Emilio G. Cota
On Wed, Oct 17, 2018 at 12:10:15 +0200, Paolo Bonzini wrote: > On 16/10/2018 13:10, guangrong.x...@gmail.com wrote: > An idea: the total number of requests is going to be very small, and a > PtrRing is not the nicest data structure for multiple producer/single > consumer. So you could instead:

[Qemu-devel] [Bug 1485180] Re: Ctrl Alt G -- Multiple Virtual Machines

2018-10-26 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1485180 Title: Ctrl Alt G

[Qemu-devel] [Bug 1493033] Re: memory leak/high memory usage with spice webdav feature

2018-10-26 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1493033 Title: memory

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

2018-10-26 Thread Peter Maydell
On 26 October 2018 at 20:43, P J P wrote: > From: Prasad J Pandit > > While writing a message in 'lsi_do_msgin', message length value > in 'msg_len' could be invalid. Add check to avoid OOB access issue. > > Signed-off-by: Prasad J Pandit > --- > hw/scsi/lsi53c895a.c | 15 ++- > 1

Re: [Qemu-devel] [PULL 0/3] MIPS queue for October 2018 - part 3

2018-10-26 Thread Peter Maydell
On 25 October 2018 at 21:19, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > 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) > >

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

2018-10-26 Thread Peter Maydell
On 26 October 2018 at 14:26, Singh, Brijesh wrote: > > > On 10/25/2018 07:59 PM, Michael S. Tsirkin wrote: >> On Thu, Oct 25, 2018 at 08:16:44PM +0100, Peter Maydell wrote: >>> These should presumably all be "ULL". (The "UL" suffix is >>> usually a bug, as it's either unnecessary or should be

[Qemu-devel] [PATCH v1] lsi53c895a: check message length value is valid

2018-10-26 Thread P J P
From: Prasad J Pandit While writing a message in 'lsi_do_msgin', message length value in 'msg_len' could be invalid. Add check to avoid OOB access issue. Signed-off-by: Prasad J Pandit --- hw/scsi/lsi53c895a.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) Update v1:

[Qemu-devel] template for a script for running an ad-hoc QEMU image

2018-10-26 Thread Peter Maydell
In a conversation this week I mentioned the scripts I use for running ad-hoc QEMU guest images that I have. The idea here is just that by making sure that whenever I get a test image I set it up to be run in the same way, I don't have the problem of trying to remember how to run the guest if I

Re: [Qemu-devel] [PATCH v1] bt: use size_t type for length parameters instead of int

2018-10-26 Thread P J P
+-- On Sun, 21 Oct 2018, P J P wrote --+ | The length parameter values are not negative, thus use an unsigned | type 'size_t' for them. Many routines pass 'len' values to memcpy(3) | calls. If it was negative, it could lead to memory corruption issues. | Add check to avoid it. | | Reported-by:

Re: [Qemu-devel] [PATCH 0/3] target/mips: Rename MMI-related code elements

2018-10-26 Thread Fredrik Noring
Hi Aleksandar, > This series renames MMI-related code elements so that they do not > contain TX79 substring. Tx79 is one of CPUs that support MMI ASE. > Opcodes and other code elements should be as generic as possible, > and should not contain CPU name if they are supported by multiple > CPUs. In

[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

[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

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): > > > >

[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

[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 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.

[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 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 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 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:

[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

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

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] [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

[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

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 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

[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

[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

[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 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

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

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 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 1/1] i386: Add PKU/OSPKE on Skylake-Server CPU model

2018-10-26 Thread Tao Xu
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.com/sites/default/files/managed/c5/15/\

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

2018-10-26 Thread P J P
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 instead. | > Verbose version: | >

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

2018-10-26 Thread Peter Maydell
On 25 October 2018 at 21:31, P J P wrote: > +-- On Thu, 25 Oct 2018, Peter Maydell wrote --+ > | Hi; thanks for this patch. Looking at the SA1110 manual, > | it says that writes to the reserved bits [31:28] are > | ignored. So I think that rather than doing this check > | here, we should do what

Re: [Qemu-devel] [PATCH v3 0/3] i.MX: Add the i.MX6UL SOC and a reference board.

2018-10-26 Thread Thomas Huth
On 2018-07-30 22:03, Jean-Christophe Dubois wrote: > This series adds the i.MX6UL SOC from NXP/Freescale and the reference > evaluation board. > > This series was tested by booting linux 4.18 (built using imx_v6_v7_defconfig) > on the emulated board (with the appropriate device tree). > >

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); |

Re: [Qemu-devel] [PATCH RFC 4/4] net/slirp: add ipv6-hostfwd option for user netdev type

2018-10-26 Thread Thomas Huth
On 2018-10-26 01:03, Maxim Samoylov wrote: > This allows forwarding TCP6 and UDP6 connections down to > netdev=user connected guests. > > Signed-off-by: Maxim Samoylov > --- > hmp-commands.hx | 31 > include/net/slirp.h | 2 + > net/slirp.c | 214 >

[Qemu-devel] [Bug 1800088] [NEW] Assertion fail while usb camera redirect

2018-10-26 Thread yueyihua
Public bug reported: This may happen during usb camera redirect. But if i move the camera lens from left to right or up to down, this always happen. My qemu- version is 2.10.0 and following is the error information: 2018-10-26T03:37:54.925231Z qemu-kvm: usbredirparser: error unexpected extra

[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 ---

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 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

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

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

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] 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

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

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

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] [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 > ++-- >

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 >

[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

[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

[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

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

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 > --- >

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 | >

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,

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] [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

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

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

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

[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

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

<    1   2   3   >