[Qemu-devel] [PATCH v3 13/29] Clean up inclusion of exec/cpu-common.h

2019-08-08 Thread Markus Armbruster
migration/qemu-file.h neglects to include it even though it needs ram_addr_t. Fix that. Drop a few superfluous inclusions elsewhere. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- accel/stubs/tcg-stub.c | 1 - balloon.c

[Qemu-devel] [PATCH v3 03/29] qapi: Split error.json off common.json

2019-08-08 Thread Markus Armbruster
In my "build everything" tree, changing a type in qapi/common.json triggers a recompile of some 3600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). One common dependency is QapiErrorClass: it's used only in in qapi/error.h, which uses nothing else, and is w

[Qemu-devel] [PATCH v3 08/29] Include sysemu/reset.h a lot less

2019-08-08 Thread Markus Armbruster
In my "build everything" tree, changing sysemu/reset.h triggers a recompile of some 2600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). The main culprit is hw/hw.h, which supposedly includes it for convenience. Include sysemu/reset.h only where it's needed

[Qemu-devel] [PATCH v9 03/11] numa: move numa global variable have_numa_distance into MachineState

2019-08-08 Thread Tao
From: Tao Xu Move existing numa global have_numa_distance into NumaState. Reviewed-by: Igor Mammedov Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- No changes in v9 --- hw/arm/sbsa-ref.c| 2 +- hw/arm/virt-acpi-build.c |

[Qemu-devel] [PATCH v3 23/29] numa: Don't include hw/boards.h into sysemu/numa.h

2019-08-08 Thread Markus Armbruster
sysemu/numa.h includes hw/boards.h just for the CPUArchId typedef, at the cost of pulling in more than two dozen extra headers indirectly. I could move the typedef from hw/boards.h to qemu/typedefs.h. But it's used in just two headers: boards.h and numa.h. I could move it to another header both

[Qemu-devel] [PATCH v3 27/29] Include sysemu/sysemu.h a lot less

2019-08-08 Thread Markus Armbruster
In my "build everything" tree, changing sysemu/sysemu.h triggers a recompile of some 5400 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). hw/qdev-core.h includes sysemu/sysemu.h since recent commit e965ffa70a "qdev: add qdev_add_vm_change_state_handler()".

[Qemu-devel] [PATCH v9 04/11] numa: move numa global variable numa_info into MachineState

2019-08-08 Thread Tao
From: Tao Xu Move existing numa global numa_info (renamed as "nodes") into NumaState. Reviewed-by: Igor Mammedov Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- No changes in v9 --- exec.c | 2 +- hw/acpi/aml-build.c | 6 --

[Qemu-devel] [PATCH v9 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-08-08 Thread Tao
This series of patches will build Heterogeneous Memory Attribute Table (HMAT) according to the command line. The ACPI HMAT describes the memory attributes, such as memory side cache attributes and bandwidth and latency details, related to the Memory Proximity Domain. The software is expected to use

Re: [Qemu-devel] [PATCH v2] hw: net: cadence_gem: Fix build errors in DB_PRINT()

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 8:36 AM, Bin Meng wrote: > On Thu, Aug 8, 2019 at 1:21 PM Philippe Mathieu-Daudé > wrote: >> >> Hi, >> >> On 8/8/19 6:44 AM, Bin Meng wrote: >>> When CADENCE_GEM_ERR_DEBUG is turned on, there are several >>> compilation errors in DB_PRINT(). Fix them. >>> >>> Signed-off-by: Bin Meng >>

Re: [Qemu-devel] [PATCH v2 1/2] memory-device: not necessary to use goto for the last check

2019-08-08 Thread David Hildenbrand
On 08.08.19 04:38, Wei Yang wrote: > On Thu, Aug 08, 2019 at 02:30:02AM +, Zeng, Star wrote: >>> -Original Message- >>> From: Wei Yang [mailto:richardw.y...@linux.intel.com] >>> Sent: Thursday, August 8, 2019 10:13 AM >>> To: Zeng, Star >>> Cc: Wei Yang ; qemu-devel@nongnu.org; >>> ima

[Qemu-devel] [Bug 1839428] [NEW] qemu core dumped when repeat "system_reset" multiple times during guest boot

2019-08-08 Thread Xujun Ma
Public bug reported: commit 864ab314f1d924129d06ac7b571f105a2b76a4b2 (HEAD, tag: v4.1.0-rc4, origin/master, origin/HEAD, master) Test arch:x86 and power Steps: 1.Boot up guest with command power cmdline: /usr/libexec/backup/qemu-kvm \ -smp 8 \ -m 4096 \ -nodefaults \ -device virtio-blk-pci,

Re: [Qemu-devel] [PATCH v2] hw: net: cadence_gem: Fix build errors in DB_PRINT()

2019-08-08 Thread Bin Meng
On Thu, Aug 8, 2019 at 3:01 PM Philippe Mathieu-Daudé wrote: > > On 8/8/19 8:36 AM, Bin Meng wrote: > > On Thu, Aug 8, 2019 at 1:21 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Hi, > >> > >> On 8/8/19 6:44 AM, Bin Meng wrote: > >>> When CADENCE_GEM_ERR_DEBUG is turned on, there are several > >

[Qemu-devel] [Bug 1839428] Re: qemu core dumped when repeat "system_reset" multiple times during guest boot

2019-08-08 Thread Xujun Ma
Upstream qemu-v3.1.0 pass Upstream qemu-v3.1.1 pass Upstream qemu-v4.0.0 fail Upstream qemu-v4.0.0-rc0 fail So the problem occurs due to patch between qemu-v3.1.1 to qemu-v4.0.0-rc0. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. ht

Re: [Qemu-devel] Quick nbdkit question

2019-08-08 Thread Richard W.M. Jones
On Wed, Aug 07, 2019 at 02:30:18PM -0700, ivo welch wrote: > hi richard---please forgive us. another quickie. we created an nbd > device. just a block device...no partitions, etc. in the guest vm, we > wrote a short C program that writes one sector (open file, fseek, fwrite, > close file) and t

[Qemu-devel] [Bug 1838946] Re: qemu 3.10 golang crash

2019-08-08 Thread Antony Rheneus
Thanks @pmaydell, I missed to check binfmt qemu version. I checked in qemu 4.0.93 and I don't issue any issue. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.lau

Re: [Qemu-devel] [Fail] tests/test-util-filemonitor fails

2019-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2019 at 10:07:23AM +0800, Wei Yang wrote: > Current qemu fails tests/test-util-filemonitor. You'll need to provide more info. The test works for me and passes in all the QEMU CI environments. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/db

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-08 Thread piaojun
Hi Stefan, >From my test, your patch set of multithreading improves iops greatly as below: Guest configuration: 8 vCPU 8GB RAM Linux 5.1 (vivek-aug-06-2019) Host configuration: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (8 cores x 4 threads) 32GB RAM Linux 3.10.0 EXT4 + LVM + local HDD --- Before

Re: [Qemu-devel] Is network backend netmap worth keeping? (was: [PATCH v2 27/29] Include sysemu/sysemu.h a lot less)

2019-08-08 Thread Stefano Garzarella
On Thu, Aug 08, 2019 at 06:48:25AM +0200, Markus Armbruster wrote: > Please excuse the attention-grabbing subject. > > Philippe Mathieu-Daudé writes: > > > On 8/7/19 10:16 PM, Markus Armbruster wrote: > [...] > >> Can you tell me offhand what I have to install so configure enables > >> CONFIG_NE

Re: [Qemu-devel] [PATCH] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node

2019-08-08 Thread Tao Xu
On 8/8/2019 1:52 AM, Eduardo Habkost wrote: On Tue, Aug 06, 2019 at 02:50:55PM +0200, Igor Mammedov wrote: On Mon, 5 Aug 2019 15:13:02 +0800 Tao Xu wrote: Add MachineClass::auto_enable_numa field. When it is true, a NUMA node is expected to be created implicitly. Acked-by: David Gibson Sug

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Stefano Garzarella
On Thu, Aug 08, 2019 at 12:03:40PM +0530, P J P wrote: > From: Prasad J Pandit > > When executing script in lsi_execute_script(), the LSI scsi > adapter emulator advances 's->dsp' index to read next opcode. > This can lead to an infinite loop if the next opcode is empty. > Exit such loop after re

[Qemu-devel] [Bug 1839294] Re: Latest Installer (qemu-w64-setup-20190807.exe) for windows immediately deletes installed files at the very end of the installation

2019-08-08 Thread Philipp Oppermann
I hit the same error in my azure pipelines script that uses `choco install qemu`. While it worked with qemu-w64-setup-20190731.exe, the `C:\Program Files\qemu` directory is empty with qemu-w64-setup-20190807.exe. -- You received this bug notification because you are a member of qemu- devel-ml, wh

Re: [Qemu-devel] [RFC PATCH 3/6] hw/ppc/pnv_homer: add homer/occ common area emulation for PowerNV

2019-08-08 Thread Cédric Le Goater
On 07/08/2019 12:07, Balamuruhan S wrote: > On Wed, Aug 07, 2019 at 09:54:55AM +0200, Cédric Le Goater wrote: >> On 07/08/2019 09:14, Balamuruhan S wrote: >>> Add mmio callback functions to enable homer/occ common area >>> to emulate pstate table, occ-sensors, slw, occ static and >>> dynamic values

Re: [Qemu-devel] [RFC PATCH 4/6] hw/ppc/pnv: initialize and realize homer/occ common area

2019-08-08 Thread Cédric Le Goater
On 07/08/2019 12:12, Balamuruhan S wrote: > On Wed, Aug 07, 2019 at 09:59:26AM +0200, Cédric Le Goater wrote: >> On 07/08/2019 09:14, Balamuruhan S wrote: >>> homer and occ common area region base address are initialized >>> to create device tree and realized to map the address with >>> mmio callba

Re: [Qemu-devel] [Fail] tests/test-util-filemonitor fails

2019-08-08 Thread Wei Yang
On Thu, Aug 08, 2019 at 09:02:29AM +0100, Daniel P. Berrangé wrote: >On Thu, Aug 08, 2019 at 10:07:23AM +0800, Wei Yang wrote: >> Current qemu fails tests/test-util-filemonitor. > >You'll need to provide more info. The test works for me and passes in all >the QEMU CI environments. > The error mess

Re: [Qemu-devel] [PATCH v3 03/15] target/arm/monitor: Introduce qmp_query_cpu_model_expansion

2019-08-08 Thread Andrew Jones
On Wed, Aug 07, 2019 at 08:22:07AM -0700, Richard Henderson wrote: > On 8/6/19 5:21 AM, Andrew Jones wrote: > > That's a reasonable suggestion. I do like having self-contained > > validation, self-contained, but when cross-dependencies arise, then > > it does make sense to have a master validation

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-08 Thread Stefan Hajnoczi
On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: > Kernel also serializes MAP/UNMAP on one inode. So you will need to run > multiple jobs operating on different inodes to see parallel MAP/UNMAP > (atleast from kernel's point of view). Okay, there is still room to experiment with how MA

Re: [Qemu-devel] [RFC PATCH 2/6] hw/ppc/pnv_xscom: extend xscom to use python interface

2019-08-08 Thread Cédric Le Goater
On 07/08/2019 09:14, Balamuruhan S wrote: > Existing xscom access emulation for read/write can be > extended with the python interface to support feeding > data externally. You should take a look at Rashmica's patch : hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500 https://patchw

Re: [Qemu-devel] [Qemu-arm] [PATCH v2] hw: net: cadence_gem: Fix build errors in DB_PRINT()

2019-08-08 Thread Alex Bennée
Bin Meng writes: > When CADENCE_GEM_ERR_DEBUG is turned on, there are several > compilation errors in DB_PRINT(). Fix them. The first fix should be to ensure the format strings are validated in normal compilation. This can be achieved by allowing the compiler to optimise away debug strings wit

[Qemu-devel] [PATCH v2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
From: Prasad J Pandit When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Exit such loop after reading 10k empty opcodes. Reported-by: Bugs SysSec Signed-off-by:

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Paolo Bonzini
On 08/08/19 08:33, P J P wrote: > From: Prasad J Pandit > > When executing script in lsi_execute_script(), the LSI scsi > adapter emulator advances 's->dsp' index to read next opcode. > This can lead to an infinite loop if the next opcode is empty. > Exit such loop after reading 10k empty opcodes

Re: [Qemu-devel] [PATCH] ide: ahci: add check to avoid null dereference (CVE-2019-12067)

2019-08-08 Thread Philippe Mathieu-Daudé
Hi Prasad, On 8/8/19 8:56 AM, P J P wrote: > From: Prasad J Pandit > > AHCI emulator while committing DMA buffer in ahci_commit_buf() > may do a NULL dereference if the command header 'ad->cur_cmd' > is null. Add check to avoid it. > > Reported-by: Bugs SysSec > Signed-off-by: Prasad J Pandit

Re: [Qemu-devel] [Fail] tests/test-util-filemonitor fails

2019-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2019 at 04:46:53PM +0800, Wei Yang wrote: > On Thu, Aug 08, 2019 at 09:02:29AM +0100, Daniel P. Berrangé wrote: > >On Thu, Aug 08, 2019 at 10:07:23AM +0800, Wei Yang wrote: > >> Current qemu fails tests/test-util-filemonitor. > > > >You'll need to provide more info. The test works f

Re: [Qemu-devel] [PATCH untested for-4.2] memory: fix race between TCG and accesses to dirty bitmap

2019-08-08 Thread Alex Bennée
Paolo Bonzini writes: > The race is as follows: > > vCPU thread reader thread > --- --- > TLB check -> slow path > notdirty_mem_write > write to RAM > set dirty flag >

Re: [Qemu-devel] [PATCH v2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 11:06 AM, P J P wrote: > From: Prasad J Pandit > > When executing script in lsi_execute_script(), the LSI scsi > adapter emulator advances 's->dsp' index to read next opcode. > This can lead to an infinite loop if the next opcode is empty. > Exit such loop after reading 10k empty opcode

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
+-- On Thu, 8 Aug 2019, Stefano Garzarella wrote --+ | > +if (++insn_processed > 1) { | ^ | Since we are using this "magic" number in several lines, | should we define a macro? Sent patch v2. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF C

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
+-- On Thu, 8 Aug 2019, Paolo Bonzini wrote --+ | I am not sure this is worth a CVE. True, it is a low one, as QEMU consumes cycles on the host. | The kernel can cause QEMU to break, but is there a practical case in which | an unprivileged user can do that? QEMU does not break, it keeps runnin

[Qemu-devel] RISC-V: Vector && DSP Extension

2019-08-08 Thread liuzhiwei
Hi all,    My workmate  and I have been working on Vector & Dsp extension, and I'd like to share develop status  with folks.    The spec references for  Vector extension is riscv-v-spec-0.7.1, and riscv-p-spec-0.5 for DSP extension. The code of vector extension is ready and under testing,  t

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-08 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: > > Kernel also serializes MAP/UNMAP on one inode. So you will need to run > > multiple jobs operating on different inodes to see parallel MAP/UNMAP > > (atleast from kernel's point of view

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-08 Thread Stefan Hajnoczi
On Thu, Aug 08, 2019 at 04:10:00PM +0800, piaojun wrote: > From my test, your patch set of multithreading improves iops greatly as > below: Thank you for sharing your results! Stefan signature.asc Description: PGP signature

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread Stefan Hajnoczi
On Wed, Aug 07, 2019 at 12:44:40PM +0530, Balamuruhan S wrote: > +void python_args_init_cast_int(char *args[], int arg, int pos) > +{ > +args[pos]= malloc(sizeof(int)); > +sprintf(args[pos], "%d", arg); > +} This is broken. args[pos] is a (possibly NULL) pointer to 4 bytes. sprintf() will

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread Stefan Hajnoczi
On Wed, Aug 07, 2019 at 12:20:47PM +0200, Philippe Mathieu-Daudé wrote: > > +void python_args_clean(char *args[], int nargs) > > +{ > > +for (int i = 0; i < nargs; i++) { > > +g_free(args[i]); > > +} > > +} > > > > Wondering about security, is this feature safe to enable in produc

Re: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-08 Thread Stefan Hajnoczi
On Wed, Aug 07, 2019 at 12:44:39PM +0530, Balamuruhan S wrote: > This is a proposal to extend mmio callbacks in Qemu with scripting interface > that is prototyped with python in this implementation. It gives ability to > feed runtime data through callbacks without recompiling Qemu in generic way. >

Re: [Qemu-devel] [PATCH v3 11/33] hw/s390x/ipl.c: remove qbus_reset_all registration

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 16:24:30 +0100 Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:59, Damien Hedde wrote: > > > > Replace deprecated qbus_reset_all by resettable_reset_cold_fn for > > the ipl registration in the main reset handlers. > > > > This does not impact the behavior. > > > > Signed-off-

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 11:48 AM, P J P wrote: > +-- On Thu, 8 Aug 2019, Paolo Bonzini wrote --+ > | I am not sure this is worth a CVE. > > True, it is a low one, as QEMU consumes cycles on the host. > > | The kernel can cause QEMU to break, but is there a practical case in which > | an unprivileged user can

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 12:10 PM, Stefan Hajnoczi wrote: > On Wed, Aug 07, 2019 at 12:20:47PM +0200, Philippe Mathieu-Daudé wrote: >>> +void python_args_clean(char *args[], int nargs) >>> +{ >>> +for (int i = 0; i < nargs; i++) { >>> +g_free(args[i]); >>> +} >>> +} >>> >> >> Wondering about secur

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Paolo Bonzini
On 08/08/19 11:48, P J P wrote: > +-- On Thu, 8 Aug 2019, Paolo Bonzini wrote --+ > | I am not sure this is worth a CVE. > > True, it is a low one, as QEMU consumes cycles on the host. A guest that runs an infinite loop would be an easier way to do that. I suppose this one also blocks the monit

Re: [Qemu-devel] [PATCH v3 03/14] migration.json: add AMD SEV specific migration parameters

2019-08-08 Thread Dr. David Alan Gilbert
* Singh, Brijesh (brijesh.si...@amd.com) wrote: > > On 8/7/19 6:06 AM, Dr. David Alan Gilbert wrote: > > * Singh, Brijesh (brijesh.si...@amd.com) wrote: > >> AMD SEV migration flow requires that target machine's public Diffie-Hellman > >> key (PDH) and certificate chain must be passed before initi

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread Daniel P . Berrangé
On Wed, Aug 07, 2019 at 12:44:40PM +0530, Balamuruhan S wrote: > Adds scripting interface with python library to call functions in > python modules from Qemu that can be used to feed input externally > and without recompiling Qemu that can be used for early development, > testing and can be extende

Re: [Qemu-devel] [PATCH v3 14/33] hw/s390x/s390-virtio-ccw.c: remove qdev_reset_all call

2019-08-08 Thread Cornelia Huck
On Mon, 29 Jul 2019 16:56:35 +0200 Damien Hedde wrote: > Replace deprecated qdev_reset_all by device_reset_warm. > > This does not impact the behavior. Not so sure about that; see below. > > Signed-off-by: Damien Hedde > --- > hw/s390x/s390-virtio-ccw.c | 2 +- > 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH v3 26/33] hw/s390x/s390-pci-inst.c: remove device_legacy_reset call

2019-08-08 Thread Cornelia Huck
On Mon, 29 Jul 2019 16:56:47 +0200 Damien Hedde wrote: > Replace S390PCIBusDevice legacy reset by device_reset_warm. > > The new function propagates also the reset to the sub-buses tree. > I'm not sure whether S390PCIBusDevice has bus children or not. This should be fine, I think. > > Signed-

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2019 at 11:10:13AM +0100, Stefan Hajnoczi wrote: > On Wed, Aug 07, 2019 at 12:20:47PM +0200, Philippe Mathieu-Daudé wrote: > > > +void python_args_clean(char *args[], int nargs) > > > +{ > > > +for (int i = 0; i < nargs; i++) { > > > +g_free(args[i]); > > > +} > > >

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
+-- On Thu, 8 Aug 2019, Philippe Mathieu-Daudé wrote --+ | >From user-mode? As unprivileged user? No, needs privileges inside guest. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
+-- On Thu, 8 Aug 2019, Paolo Bonzini wrote --+ | I suppose this one also blocks the monitor, but then "kill -9" is always | your friend. :) True. :) -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH v3 07/14] target/i386: sev: provide callback to setup outgoing context

2019-08-08 Thread Dr. David Alan Gilbert
* Singh, Brijesh (brijesh.si...@amd.com) wrote: > The user provides the target machine's Platform Diffie-Hellman key (PDH) > and certificate chain before starting the SEV guest migration. Cache the > certificate chain as we need them while creating the outgoing context. > > Signed-off-by: Brijesh

Re: [Qemu-devel] Quick nbdkit question

2019-08-08 Thread Eric Blake
On 8/8/19 2:41 AM, Richard W.M. Jones wrote: > On Wed, Aug 07, 2019 at 02:30:18PM -0700, ivo welch wrote: >> hi richard---please forgive us. another quickie. we created an nbd >> device. just a block device...no partitions, etc. in the guest vm, we >> wrote a short C program that writes one sec

Re: [Qemu-devel] RISC-V: Vector && DSP Extension

2019-08-08 Thread Aleksandar Markovic
On Thu, Aug 8, 2019 at 11:52 AM liuzhiwei wrote: > Hi all, > > My workmate and I have been working on Vector & Dsp extension, and > I'd like to share develop status with folks. > > The spec references for Vector extension is riscv-v-spec-0.7.1, and > riscv-p-spec-0.5 for DSP extension.

Re: [Qemu-devel] [PATCH v2 15/29] Include migration/vmstate.h less

2019-08-08 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 8/6/19 5:14 PM, Markus Armbruster wrote: >> In my "build everything" tree, changing migration/vmstate.h triggers a >> recompile of some 2700 out of 6600 objects (not counting tests and >> objects that don't depend on qemu/osdep.h). >> >> hw/hw.h supposedly inc

Re: [Qemu-devel] [PATCH 11/67] target/arm: Add stubs for aa32 decodetree

2019-08-08 Thread Aleksandar Markovic
On Fri, Jul 26, 2019 at 8:05 PM Richard Henderson < richard.hender...@linaro.org> wrote: > Add the infrastructure that will become the new decoder. > No instructions adjusted so far. > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 45 ++

Re: [Qemu-devel] [PATCH v2 12/29] Include hw/irq.h a lot less

2019-08-08 Thread Eric Blake
On 8/7/19 11:27 PM, Markus Armbruster wrote: /* * Function types */ typedef void SaveStateHandler(QEMUFile *f, void *opaque); typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); +typedef void (*qemu_irq_handler)(void *opaque, int n, int lev

Re: [Qemu-devel] Is network backend netmap worth keeping?

2019-08-08 Thread Markus Armbruster
Giuseppe Lettieri writes: > Dear Markus, > > the netmap project is alive and well, if a bit understuffed. We have > moved to github: > > https://github.com/luigirizzo/netmap > > We have users from FreeBSD, where it is part of the official kernel, > and Linux, both from Academia and industry. > >

Re: [Qemu-devel] [PATCH v2 22/29] Include hw/boards.h a bit less

2019-08-08 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Aug 07, 2019 at 08:05:50PM +0200, Philippe Mathieu-Daudé wrote: >> On 8/7/19 7:57 PM, Eduardo Habkost wrote: >> > On Wed, Aug 07, 2019 at 07:26:56PM +0200, Philippe Mathieu-Daudé wrote: >> >> On 8/6/19 5:14 PM, Markus Armbruster wrote: >> >>> hw/boards.h pulls in

Re: [Qemu-devel] [PATCH v2 16/29] Include exec/memory.h slightly less

2019-08-08 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 8/6/19 5:14 PM, Markus Armbruster wrote: >> Drop unnecessary inclusions from headers. Downgrade a few more to >> exec/hwaddr.h. >> >> Signed-off-by: Markus Armbruster >> --- >> hw/audio/lm4549.h | 1 + >> hw/display/edid-region.c

Re: [Qemu-devel] [PATCH v2 16/29] Include exec/memory.h slightly less

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 2:16 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 8/6/19 5:14 PM, Markus Armbruster wrote: >>> Drop unnecessary inclusions from headers. Downgrade a few more to >>> exec/hwaddr.h. >>> >>> Signed-off-by: Markus Armbruster >>> --- >>> hw/audio/lm4549.h

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 12:49 PM, Daniel P. Berrangé wrote: > On Wed, Aug 07, 2019 at 12:44:40PM +0530, Balamuruhan S wrote: >> Adds scripting interface with python library to call functions in >> python modules from Qemu that can be used to feed input externally >> and without recompiling Qemu that can be used

Re: [Qemu-devel] [PATCH v2 1/3] qcow2: introduce compression type feature

2019-08-08 Thread Max Reitz
On 08.08.19 02:09, Eric Blake wrote: > On 8/7/19 6:12 PM, Max Reitz wrote: > >>> >>> +static int check_compression_type(BDRVQcow2State *s, Error **errp) >>> +{ >>> +switch (s->compression_type) { >>> +case QCOW2_COMPRESSION_TYPE_ZLIB: >>> +break; >>> + >>> +default: >>> +

Re: [Qemu-devel] [PATCH v2 1/3] qcow2: introduce compression type feature

2019-08-08 Thread Max Reitz
On 08.08.19 02:18, Eric Blake wrote: > On 7/4/19 8:09 AM, Denis Plotnikov wrote: >> The patch adds some preparation parts for incompatible compression type >> feature to QCOW2 header that indicates that *all* compressed clusters >> must be (de)compressed using a certain compression type. >> >> It i

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-08 Thread Vivek Goyal
On Thu, Aug 08, 2019 at 10:53:16AM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: > > > Kernel also serializes MAP/UNMAP on one inode. So you will need to run > > > multiple jobs operating on dif

Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug()

2019-08-08 Thread Cornelia Huck
On Mon, 5 Aug 2019 17:29:39 +0200 David Hildenbrand wrote: > Let's select the ASC before calling the function and use MMU_DATA_LOAD. > This is a preparation to: > - Remove the ASC magic depending on the access mode from mmu_translate > - Implement IEP support, where we could run into access exce

Re: [Qemu-devel] [PATCH-for-4.2 v1 1/9] s390x/mmu: Better ASC selection in s390_cpu_get_phys_page_debug()

2019-08-08 Thread David Hildenbrand
On 08.08.19 14:57, Cornelia Huck wrote: > On Mon, 5 Aug 2019 17:29:39 +0200 > David Hildenbrand wrote: > >> Let's select the ASC before calling the function and use MMU_DATA_LOAD. >> This is a preparation to: >> - Remove the ASC magic depending on the access mode from mmu_translate >> - Implemen

[Qemu-devel] [PATCH] hw/ide/atapi: Use the ldst API

2019-08-08 Thread Philippe Mathieu-Daudé
The big-endian load/store functions are already provided by "qemu/bswap.h". Avoid code duplication, use the generic API. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/atapi.c | 80 ++ 1 file changed, 28 insertions(+), 52 deletions(-) diff --git

Re: [Qemu-devel] Is network backend netmap worth keeping?

2019-08-08 Thread Giuseppe Lettieri
Dear Markus, the netmap project is alive and well, if a bit understuffed. We have moved to github: https://github.com/luigirizzo/netmap We have users from FreeBSD, where it is part of the official kernel, and Linux, both from Academia and industry. But you asked about the netmap backend in

Re: [Qemu-devel] [PATCH v2 00/29] Tame a few "touch this, recompile the world" headers

2019-08-08 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> We have quite a few "touch this, recompile the world" headers. My >> "build everything" tree has some 6600 objects (not counting tests and >> objects that don't depend on qemu/osdep.h). Touching any of 54 >> headers triggers a recompile of m

Re: [Qemu-devel] [PATCH v2 2/3] qcow2: rework the cluster compression routine

2019-08-08 Thread Max Reitz
On 04.07.19 15:09, Denis Plotnikov wrote: > The patch allow to process image compression type defined > in the image header and choose an appropriate method for > image clusters (de)compression. > > Signed-off-by: Denis Plotnikov > --- > block/qcow2.c | 93 +++

Re: [Qemu-devel] Is network backend netmap worth keeping?

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 7:38 AM, Jason Wang wrote: > > On 2019/8/8 下午12:48, Markus Armbruster wrote: >> Please excuse the attention-grabbing subject. >> >> Philippe Mathieu-Daudé writes: >> >>> On 8/7/19 10:16 PM, Markus Armbruster wrote: >> [...] Can you tell me offhand what I have to install so configur

Re: [Qemu-devel] [PATCH v2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Marcelo Tosatti
On Thu, Aug 08, 2019 at 11:31:02AM +0200, Philippe Mathieu-Daudé wrote: > On 8/8/19 11:06 AM, P J P wrote: > > From: Prasad J Pandit > > > > When executing script in lsi_execute_script(), the LSI scsi > > adapter emulator advances 's->dsp' index to read next opcode. > > This can lead to an infini

Re: [Qemu-devel] RISC-V: Vector && DSP Extension

2019-08-08 Thread Chih-Min Chao
On Thu, Aug 8, 2019 at 7:29 PM Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > On Thu, Aug 8, 2019 at 11:52 AM liuzhiwei wrote: > > > Hi all, > > > > My workmate and I have been working on Vector & Dsp extension, and > > I'd like to share develop status with folks. > > > > T

Re: [Qemu-devel] [PATCH v2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Philippe Mathieu-Daudé
On 8/8/19 3:46 PM, Marcelo Tosatti wrote: > On Thu, Aug 08, 2019 at 11:31:02AM +0200, Philippe Mathieu-Daudé wrote: >> On 8/8/19 11:06 AM, P J P wrote: >>> From: Prasad J Pandit >>> >>> When executing script in lsi_execute_script(), the LSI scsi >>> adapter emulator advances 's->dsp' index to read

Re: [Qemu-devel] [PATCH v2 11/28] riscv: sifive: Rename sifive_prci.{c, h} to sifive_e_prci.{c, h}

2019-08-08 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 6:11 PM Bin Meng wrote: > On Wed, Aug 7, 2019 at 4:54 PM Chih-Min Chao > wrote: > > > > > > > > On Wed, Aug 7, 2019 at 3:49 PM Bin Meng wrote: > >> > >> Current SiFive PRCI model only works with sifive_e machine, as it > >> only emulates registers or PRCI block in the FE3

Re: [Qemu-devel] [PATCH v2 1/3] qcow2: introduce compression type feature

2019-08-08 Thread Kevin Wolf
Am 08.08.2019 um 14:50 hat Max Reitz geschrieben: > On 08.08.19 02:18, Eric Blake wrote: > > On 7/4/19 8:09 AM, Denis Plotnikov wrote: > >> The patch adds some preparation parts for incompatible compression type > >> feature to QCOW2 header that indicates that *all* compressed clusters > >> must be

Re: [Qemu-devel] [PATCH v6 01/26] configure: Define TARGET_ALIGNED_ONLY

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 08:25:37 + wrote: > Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move > defines out of target/foo/cpu.h into configure, as we do with > TARGET_WORDS_BIGENDIAN, so that it is always defined early. > > Poisoned TARGET_ALIGNED_ONLY to prevent use in common code.

Re: [Qemu-devel] [PATCH v6 02/26] tcg: TCGMemOp is now accelerator independent MemOp

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 08:26:23 + wrote: > Preparation for collapsing the two byte swaps, adjust_endianness and > handle_bswap, along the I/O path. > > Target dependant attributes are conditionalize upon NEED_CPU_H. s/conditionalize/conditionalized/ ? > > Signed-off-by: Tony Nguyen > Acked-b

Re: [Qemu-devel] RISC-V: Vector && DSP Extension

2019-08-08 Thread Aleksandar Markovic
On Thu, Aug 8, 2019 at 3:48 PM Chih-Min Chao wrote: > > > On Thu, Aug 8, 2019 at 7:29 PM Aleksandar Markovic < > aleksandar.m.m...@gmail.com> wrote: > >> On Thu, Aug 8, 2019 at 11:52 AM liuzhiwei wrote: >> >> > Hi all, >> > >> > My workmate and I have been working on Vector & Dsp extension,

Re: [Qemu-devel] [PATCH v2 26/29] Clean up inclusion of sysemu/sysemu.h

2019-08-08 Thread Alex Bennée
Markus Armbruster writes: > Alex Bennée writes: > >> Markus Armbruster writes: >> >>> In my "build everything" tree, changing sysemu/sysemu.h triggers a >>> recompile of some 5400 out of 6600 objects (not counting tests and >>> objects that don't depend on qemu/osdep.h). >>> >>> 119 of 380 #i

Re: [Qemu-devel] [PATCH v6 05/26] hw/s390x: Access MemoryRegion with MemOp

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 08:27:35 + wrote: > The memory_region_dispatch_{read|write} operand "unsigned size" is > being converted into a "MemOp op". > > Convert interfaces by using no-op size_memop. > > After all interfaces are converted, size_memop will be implemented > and the memory_region_dis

Re: [Qemu-devel] [PATCH v6 07/26] hw/virtio: Access MemoryRegion with MemOp

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 08:28:16 + wrote: > The memory_region_dispatch_{read|write} operand "unsigned size" is > being converted into a "MemOp op". > > Convert interfaces by using no-op size_memop. > > After all interfaces are converted, size_memop will be implemented > and the memory_region_dis

[Qemu-devel] [PATCH 0/6] net/eth: Remove duplicated tcp/udp_hdr structures

2019-08-08 Thread Philippe Mathieu-Daudé
This is a preparatory cleanup series. Commit 75020a70215 introduced 4 very equivalent structures: - tcp_header and tcp_hdr, - udp_header and udp_hdr. Choose the most widely use in the codebase, which happens to provide convenient bitfields manipulation macros and is not endian-specific. Philippe

[Qemu-devel] [RFC PATCH 1/6] hw/net/virtio-net: Use TCP_HEADER_FLAGS/TCP_HEADER_DATA_OFFSET macros

2019-08-08 Thread Philippe Mathieu-Daudé
"net/eth.h" provides convenient macros to avoid manipulating the TCP header flags/offset bits manually, let's use them. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Check the macro uses the correct bits hw/net/virtio-net.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff -

<    1   2