[Qemu-devel] SCSI HBA auto-created for -drive if=scsi

2017-01-18 Thread Markus Armbruster
Some boards automatically cold-plug SCSI HBAs to honor -drive if=scsi. Which one depends on the machine: pc*, realview-eb*, versatile*: lsi53c895a spapr-machine: spapr-vscsi Should we use something less thoroughly obsolete than lsi53c895a for new machine types? Something that actually ha

[Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine

2017-01-18 Thread Igor Mammedov
it will allow generic numa code to set cpu to numa node mapping in target independent manner in the next patch. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 56 1 file changed, 56 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c

Re: [Qemu-devel] [PATCH] virtio: force VIRTIO_F_IOMMU_PLATFORM

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 10:42:48AM +0800, Jason Wang wrote: > > > On 2017年01月17日 22:44, Michael S. Tsirkin wrote: > > On Tue, Jan 17, 2017 at 12:01:00PM +0800, Jason Wang wrote: > > > We allow vhost to clear VIRITO_F_IOMMU_PLATFORM which is wrong since > > > VIRTIO_F_IOMMU_PLATFORM is mandatory f

[Qemu-devel] [RFC 12/13] pc: drop usage of legacy numa_get_node_for_cpu()

2017-01-18 Thread Igor Mammedov
Replace usage of legacy cpu_index based node_cpu bitmaps with PCMachineState.possible_cpus which have node-ids for all possible CPUs. As result: * -1 usage of global max_cpus * considering not set CPUArchId.props.node_id is 0 drop not needed (numa_get_node_for_cpu(i) < nb_numa_nodes) checks,

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 18:30:59 +0200 "Michael S. Tsirkin" wrote: > On Wed, Jan 18, 2017 at 12:45:54PM +0100, Phil Dennis-Jordan wrote: [...] > > I suspect more might be involved in enabling ACPI 2.0, and it should > > probably be an option so as to avoid regressions. I don't know what the > > be

Re: [Qemu-devel] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread Eduardo Habkost
On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: > On 01/16/2017 08:01 PM, Eduardo Habkost wrote: > > This is a follow-up to the series that implements > > query-cpu-model-expansion. Before including the test script, the > > series has some fixes to allow the results of > > query-cpu

Re: [Qemu-devel] [Qemu-stable] Data corruption in Qemu 2.7.1

2017-01-18 Thread Fabian Grünbichler
> Paolo Bonzini hat am 18. Januar 2017 um 17:30 > geschrieben: > > > > > On 18/01/2017 17:19, Fabian Grünbichler wrote: > > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda] tag#109 FAILED Result: > > hostbyte=DID_OK driverbyte=DRIVER_SENSE > > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda

Re: [Qemu-devel] [virtio-dev] RE: [virtio-dev] Re: [PATCH v15 0/2] virtio-crypto: virtio crypto device specification

2017-01-18 Thread Halil Pasic
On 01/17/2017 03:49 AM, Gonglei (Arei) wrote: > Hi Halil, > >> >> On 01/16/2017 01:43 PM, Gonglei (Arei) wrote: >>> Hi Michael and others, >>> >>> I'd like to redefine struct virtio_crypto_op_data_req is as below: >>> >>> struct virtio_crypto_op_data_req { >>> struct virtio_crypto_op_header

Re: [Qemu-devel] SCSI HBA auto-created for -drive if=scsi

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 18:15, Markus Armbruster wrote: > Some boards automatically cold-plug SCSI HBAs to honor -drive if=scsi. > Which one depends on the machine: > > pc*, realview-eb*, versatile*: lsi53c895a > spapr-machine: spapr-vscsi > > Should we use something less thoroughly obsolete than

Re: [Qemu-devel] [PATCH 0/3] cpu: numa: Fix the mapping initialization of VCPUs and NUMA nodes

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 09:26:36PM +0800, Dou Liyang wrote: > Hi, All > > > ** > > ERROR:/tmp/qemu-test/src/tests/vhost-user-test.c:668:test_migrate: > > assertion failed: (qdict_haskey(rsp, "return")) > > GTester: last random seed: R02Sf52546c4daff8087416f43fa7c146db8 > > ftruncate: Permission d

Re: [Qemu-devel] [libvirt] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread Jason J. Herne
On 01/18/2017 12:00 PM, Eduardo Habkost wrote: On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: On 01/16/2017 08:01 PM, Eduardo Habkost wrote: This is a follow-up to the series that implements query-cpu-model-expansion. Before including the test script, the series has some fixes

Re: [Qemu-devel] [PATCH v2 00/25] qmp: add async command type

2017-01-18 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 20170118160332.13390-1-marcandre.lur...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/25] qmp: add async command t

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Laszlo Ersek
On 01/18/17 17:26, Igor Mammedov wrote: > On Wed, 18 Jan 2017 16:42:27 +0100 > Laszlo Ersek wrote: > >> On 01/18/17 13:38, Igor Mammedov wrote: >>> On Wed, 18 Jan 2017 11:23:48 +0100 >>> Laszlo Ersek wrote: >>> On 01/18/17 11:19, Laszlo Ersek wrote: > On 01/18/17 11:03, Igor Mammed

Re: [Qemu-devel] [PATCH] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:08:24PM +0100, Igor Mammedov wrote: > On Wed, 18 Jan 2017 13:19:45 -0200 > Eduardo Habkost wrote: > > > On Wed, Jan 18, 2017 at 03:48:45PM +0100, Igor Mammedov wrote: > > > Move vcpu's assocciated numa_node field out of generic CPUState > > > into inherited classes that

[Qemu-devel] [RFC 03/13] pc: don't return cpu pointer from pc_new_cpu() as it's not needed anymore

2017-01-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2461d84..c0eba8a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1092,28 +1092,24 @@ void pc_acpi_smi_interrupt(void *opaq

Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device

2017-01-18 Thread Laszlo Ersek
On 01/18/17 18:02, Ard Biesheuvel wrote: > On 18 January 2017 at 15:55, Laszlo Ersek wrote: >> On 01/18/17 16:18, Igor Mammedov wrote: >>> On Tue, 17 Jan 2017 10:56:53 + >>> Peter Maydell wrote: >>> On 17 January 2017 at 09:49, Andrew Jones wrote: > In some cases the problem we're s

[Qemu-devel] [Bug 1657538] [NEW] qemu 2.7.x 2.8 softmmu dont work on BE machine

2017-01-18 Thread luigiburdo
Public bug reported: Build on Be machine qemu 2.7.1 and 2.8 in pure softmmu (tgc) dont work on big endian hardware . tested with ppc-softmmu,i386-softmmu,arm-softmmu same result: with : ./qemu-system-i386 Gtk-Message: Failed to load module "overlay-scrollbar" qemu-system-i386: Trying to execut

[Qemu-devel] [RFC 04/13] make possible_cpu_arch_ids() return const pointer

2017-01-18 Thread Igor Mammedov
make sure that external callers won't try to modify possible_cpus and owner of possible_cpus can access it directly when it modifies it. Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi_dev_interface.h | 2 +- include/hw/boards.h | 2 +- include/hw/i386/pc.h

Re: [Qemu-devel] [libvirt] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 12:09:28PM -0500, Jason J. Herne wrote: > On 01/18/2017 12:00 PM, Eduardo Habkost wrote: > > On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: > > > On 01/16/2017 08:01 PM, Eduardo Habkost wrote: > > > > This is a follow-up to the series that implements > > > >

[Qemu-devel] [RFC 09/13] numa: introduce '-numa cpu' cpu option

2017-01-18 Thread Igor Mammedov
It allows to specify mapping of a CPU to NUMA node on CLI. Option should be repeated for each present/possible CPU. Example for PC machine: -numa node,nodeid=0 -numa node,nodeid=1 \ -numa cpu,socket-id=0,core-id=0,thread-id=0,node-id=0 \ -numa cpu,socket-id=1,core-id=0,thread-id=0,node-id=1

Re: [Qemu-devel] [PATCH v3] hw/core/null-machine: Add the possibility to instantiate a CPU and RAM

2017-01-18 Thread Alistair Francis
On Wed, Jan 18, 2017 at 4:44 AM, Thomas Huth wrote: > Sometimes it is useful to have just a machine with CPU and RAM, without > any further hardware in it, e.g. if you just want to do some instruction > debugging for TCG with a remote GDB attached to QEMU, or run some embedded > code with the "-se

[Qemu-devel] [RFC 10/13] numa: replace cpu_index_to_socket_id() with cpu_index_to_instance_props()

2017-01-18 Thread Igor Mammedov
new cpu_index_to_instance_props() returns topo info which includes socket_id so it could be used as drop in replacement in the only user parse_numa_opts(). In follow up path cpu_index_to_instance_props() will be used in compat code to set legacy index based cpu<->node mapping using new machine.cpu

Re: [Qemu-devel] [RFC 09/13] numa: introduce '-numa cpu' cpu option

2017-01-18 Thread Eric Blake
On 01/18/2017 11:13 AM, Igor Mammedov wrote: > It allows to specify mapping of a CPU to NUMA node on CLI. > Option should be repeated for each present/possible CPU. > Example for PC machine: > -numa node,nodeid=0 -numa node,nodeid=1 \ > -numa cpu,socket-id=0,core-id=0,thread-id=0,node-id=0 \ >

[Qemu-devel] [RFC 11/13] numa: use new machine.cpu property with -numa cpus=... CLI

2017-01-18 Thread Igor Mammedov
add compat layer to legacy cpu_index based '-numa cpus=...' CLI option, which will use new machine.cpu property to set numa mapping if that propety is available. This way machine that supports machine.cpu property will not break legacy CLI but will be able to move away from using numa_info[node_id

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 18:23:45 +0100 Laszlo Ersek wrote: > On 01/18/17 17:26, Igor Mammedov wrote: > > On Wed, 18 Jan 2017 16:42:27 +0100 > > Laszlo Ersek wrote: > > > >> On 01/18/17 13:38, Igor Mammedov wrote: > >>> On Wed, 18 Jan 2017 11:23:48 +0100 > >>> Laszlo Ersek wrote: > >>> > >

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-18 Thread Richard Henderson
On 01/17/2017 01:07 AM, Kirill Batuzov wrote: +static inline TCGv_v128 tcg_global_mem_new_v128(TCGv_ptr reg, intptr_t offset, +const char *name) +{ +int idx = tcg_global_mem_new_internal(TCG_TYPE_V128, reg, offset, name); +return MAKE_TCGV_V

[Qemu-devel] [RFC 13/13] pc: cpu: make sure that cpu.node-id matches -numa mapping

2017-01-18 Thread Igor Mammedov
for PC CPU's node mapping defined statically at startup and not possible to changle at hotplug time. So check that user set cpu.node-id matches whatever values were configured with -numa options (ex|im)plicitly. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 11 ++- target/i386/cpu

Re: [Qemu-devel] [PATCH v1 11/15] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-01-18 Thread Max Reitz
On 03.01.2017 19:27, Daniel P. Berrange wrote: > This converts the qcow2 driver to make use of the QCryptoBlock > APIs for encrypting image content, using the legacyy QCow2 AES > scheme. > > With this change it is now required to use the QCryptoSecret > object for providing passwords, instead of t

Re: [Qemu-devel] [RFC 01/13] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:17PM +0100, Igor Mammedov wrote: > Move vcpu's assocciated numa_node field out of generic CPUState > into inherited classes that actually care about cpu<->numa mapping > and make monitor 'info numa' get vcpu's assocciated node id via > node-id property. > It allows to

Re: [Qemu-devel] [PATCH 10/18] tcg/i386: add support for vector opcodes

2017-01-18 Thread Richard Henderson
On 01/18/2017 05:05 AM, Kirill Batuzov wrote: Why are you not defining xmm8-15? At first I thought about supporting both x86_64 and i386 targets, but put this idea away (at least for the time being). Since defining xmm8-15 does not contradict anything (as I see it now) I'll add them too. Than

Re: [Qemu-devel] [PATCH v3] aspeed/smc: handle dummy bytes when doing fast reads in command mode

2017-01-18 Thread mar.krzeminski
W dniu 18.01.2017 o 16:01, Cédric Le Goater pisze: When doing fast read, a certain amount of dummy bytes should be sent before the read. This number is configurable in the controler CE0 Control Register and needs to be modeled using fake transfers to the flash module. This only supports command

Re: [Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:24PM +0100, Igor Mammedov wrote: > it will allow generic numa code to set cpu to numa node mapping > in target independent manner in the next patch. > > Signed-off-by: Igor Mammedov This looks like a creative way to abuse the QOM property system. What's the problem

Re: [Qemu-devel] [RFC 11/13] numa: use new machine.cpu property with -numa cpus=... CLI

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:27PM +0100, Igor Mammedov wrote: > add compat layer to legacy cpu_index based '-numa cpus=...' > CLI option, which will use new machine.cpu property to set > numa mapping if that propety is available. > > This way machine that supports machine.cpu property will > not

Re: [Qemu-devel] [PATCH v3] hw/core/null-machine: Add the possibility to instantiate a CPU and RAM

2017-01-18 Thread Thomas Huth
On 18.01.2017 18:57, Alistair Francis wrote: > On Wed, Jan 18, 2017 at 4:44 AM, Thomas Huth wrote: >> Sometimes it is useful to have just a machine with CPU and RAM, without >> any further hardware in it, e.g. if you just want to do some instruction >> debugging for TCG with a remote GDB attached

Re: [Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:24PM +0100, Igor Mammedov wrote: > it will allow generic numa code to set cpu to numa node mapping > in target independent manner in the next patch. > > Signed-off-by: Igor Mammedov > --- > hw/i386/pc.c | 56 >

Re: [Qemu-devel] [PATCH v6 wave 2 0/3] q35: add negotiable broadcast SMI

2017-01-18 Thread Michael S. Tsirkin
On Thu, Jan 12, 2017 at 07:24:43PM +0100, Laszlo Ersek wrote: > Previous version (v5): > http://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg01902.html > > Changes in v6 (see the individual patches for details): > - pick up feedback tags > - rename "smi_broadcast" to "x-smi-broadcast" [Edua

Re: [Qemu-devel] [PULL 04/41] virtio: convert to use DMA api

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 12:59:03PM +0100, Paolo Bonzini wrote: > > > On 10/01/2017 06:39, Michael S. Tsirkin wrote: > > -void virtqueue_map(VirtQueueElement *elem) > > +void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem) > > { > > -virtqueue_map_iovec(elem->in_sg, elem->in_addr, &

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Laszlo Ersek
On 01/18/17 19:06, Igor Mammedov wrote: > On Wed, 18 Jan 2017 18:23:45 +0100 > Laszlo Ersek wrote: > [snip] >> If you agree with my participation as outlined above; that is, >> - I care about this exact patch, as posted, >> - someone else looks into cpu_synchronize_all_states(), > CCing Radim w

Re: [Qemu-devel] [libvirt] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread David Hildenbrand
Am 18.01.2017 um 18:34 schrieb Eduardo Habkost: > On Wed, Jan 18, 2017 at 12:09:28PM -0500, Jason J. Herne wrote: >> On 01/18/2017 12:00 PM, Eduardo Habkost wrote: >>> On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: On 01/16/2017 08:01 PM, Eduardo Habkost wrote: > This is a

[Qemu-devel] [PATCH v2 1/2] linux-user: fix settime old value location

2017-01-18 Thread Pranith Kumar
From: Marc-André Lureau old_value is the 4th argument of timer_settime(), not the 2nd. CC: Laurent Vivier Signed-off-by: Marc-André Lureau [pranith: review comments] Signed-off-by: Pranith Kumar Reviewed-by: Alex Bennée --- linux-user/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 d

[Qemu-devel] [PATCH v2 2/2] linux-user: fix tcg/mmap test

2017-01-18 Thread Pranith Kumar
From: Marc-André Lureau tests/tcg/mmap test fails with values other than default target page size. When creating a map beyond EOF, extra anonymous pages are added up to the target page boundary. Currently, this operation is performed only when qemu_real_host_page_size < TARGET_PAGE_SIZE, but it s

Re: [Qemu-devel] [PATCH V9 2/7] nios2: Add architecture emulation support

2017-01-18 Thread Richard Henderson
On 01/16/2017 04:44 PM, Marek Vasut wrote: +TCGv_i32 tmp = tcg_const_i32(instr.imm5 + 32); +gen_helper_mmu_write(dc->cpu_env, tmp, load_gpr(dc, instr.a)); +tcg_temp_free_i32(tmp); +#endif +break; +} + +default: +tcg_gen_mov_tl(dc->cpu_R[instr.imm5 +

Re: [Qemu-devel] [PATCH V5 7/7] nios2: Add support for Nios-II R1

2017-01-18 Thread Richard Henderson
On 01/16/2017 04:44 PM, Marek Vasut wrote: +F: target-nios2/ Filename change. r~

Re: [Qemu-devel] SCSI HBA auto-created for -drive if=scsi

2017-01-18 Thread Markus Armbruster
Paolo Bonzini writes: > On 18/01/2017 18:15, Markus Armbruster wrote: >> Some boards automatically cold-plug SCSI HBAs to honor -drive if=scsi. >> Which one depends on the machine: >> >> pc*, realview-eb*, versatile*: lsi53c895a >> spapr-machine: spapr-vscsi >> >> Should we use somethin

Re: [Qemu-devel] [PATCH] virtio: fix up max size checks

2017-01-18 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1484768294-23336-1-git-send-email-...@redhat.com Subject: [Qemu-devel] [PATCH] virtio: fix up max size checks Type

[Qemu-devel] [PATCH] virtio: fix up max size checks

2017-01-18 Thread Michael S. Tsirkin
Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too) is wrong because elem->out_sg is a pointer. However, the check is not in the right place and the max_size argument of virtqueue_map_iovec can be removed. The check on in_num/out_num should be moved to qemu_get_virtqueue_eleme

Re: [Qemu-devel] [PATCH v2 1/2] linux-user: fix settime old value location

2017-01-18 Thread Laurent Vivier
Le 18/01/2017 à 20:24, Pranith Kumar a écrit : > From: Marc-André Lureau > > old_value is the 4th argument of timer_settime(), not the 2nd. > > CC: Laurent Vivier > Signed-off-by: Marc-André Lureau > [pranith: review comments] > Signed-off-by: Pranith Kumar > Reviewed-by: Alex Bennée > --- >

Re: [Qemu-devel] [PATCH v2 1/2] linux-user: fix settime old value location

2017-01-18 Thread Pranith Kumar
On Wed, Jan 18, 2017 at 2:59 PM, Laurent Vivier wrote: > Le 18/01/2017 à 20:24, Pranith Kumar a écrit : >> From: Marc-André Lureau >> >> old_value is the 4th argument of timer_settime(), not the 2nd. >> >> CC: Laurent Vivier >> Signed-off-by: Marc-André Lureau >> [pranith: review comments] >> S

[Qemu-devel] [PATCH 1/4] virtio: fix up max size checks

2017-01-18 Thread Michael S. Tsirkin
Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too) is wrong because elem->out_sg is a pointer. However, the check is not in the right place and the max_size argument of virtqueue_map_iovec can be removed. The check on in_num/out_num should be moved to qemu_get_virtqueue_eleme

[Qemu-devel] [PATCH 0/4] virtio: ARRAY_SIZE fixups

2017-01-18 Thread Michael S. Tsirkin
Turns out virtio kept using ARRAY_SIZE on fields which stopped being arrays, this was noticed by a coverity scan. Fix this up, and fix up the ARRAY_SIZE macro so that this bug does not reappear in any other place. Michael S. Tsirkin (4): virtio: fix up max size checks compiler: drop ; after BU

[Qemu-devel] [PATCH 4/4] ARRAY_SIZE: check that argument is an array

2017-01-18 Thread Michael S. Tsirkin
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to ARRAY_SI

[Qemu-devel] [PATCH 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
All users include the trailing ;, let's require that so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not produce unexpected results. Not a huge problem for QEMU since our style requires the use of {} but seems cleaner nevertheless. Signed-off-by: Michael S. Tsirkin --- include/qemu/compiler

[Qemu-devel] [PATCH 3/4] compiler: expression version of QEMU_BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
QEMU_BUILD_BUG_ON uses a typedef in order to be safe to use outside functions, but sometimes it's useful to have a version that can be used within an expression. Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO that return zero after checking condition at build time. Signed-off-by: Mich

Re: [Qemu-devel] [PATCH 0/4] virtio: ARRAY_SIZE fixups

2017-01-18 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1484771412-28024-1-git-send-email-...@redhat.com Subject: [Qemu-devel] [PATCH 0/4] virtio: ARRAY_SIZE fixups Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-devel] [PATCH RFC v2 02/12] vfio: linux-headers update for vfio-ccw

2017-01-18 Thread Alex Williamson
On Wed, 18 Jan 2017 13:41:47 +0100 Cornelia Huck wrote: > On Wed, 18 Jan 2017 10:51:17 +0800 > Dong Jia Shi wrote: > > > * Alex Williamson [2017-01-17 14:51:42 -0700]: > > > > > On Thu, 12 Jan 2017 08:25:03 +0100 > > > Dong Jia Shi wrote: > > > > > > > From: Xiao Feng Ren > > > > > >

Re: [Qemu-devel] [PATCH] virtio: fix up max size checks

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 11:42:57AM -0800, no-re...@patchew.org wrote: > Hi, > > Your series failed automatic build test. Posted a wrong patch. Pls ignore, will repost. > Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > lo

Re: [Qemu-devel] [PATCH 0/4] virtio: ARRAY_SIZE fixups

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 12:40:50PM -0800, no-re...@patchew.org wrote: > Hi, > > Your series seems to have some coding style problems. See output below for > more information: Not sure we really do care as this matches existing code, but I'll fix it up. > Message-id: 1484771412-28024-1-git-send-

[Qemu-devel] [PATCH v2 1/4] virtio: fix up max size checks

2017-01-18 Thread Michael S. Tsirkin
Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too) is wrong because elem->out_sg is a pointer. However, the check is not in the right place and the max_size argument of virtqueue_map_iovec can be removed. The check on in_num/out_num should be moved to qemu_get_virtqueue_eleme

[Qemu-devel] [PATCH v2 3/4] compiler: expression version of QEMU_BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
QEMU_BUILD_BUG_ON uses a typedef in order to be safe to use outside functions, but sometimes it's useful to have a version that can be used within an expression. Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO that return zero after checking condition at build time. Signed-off-by: Mich

[Qemu-devel] [PATCH v2 0/4] virtio: ARRAY_SIZE fixups

2017-01-18 Thread Michael S. Tsirkin
Turns out virtio kept using ARRAY_SIZE on fields which stopped being arrays, this was noticed by a coverity scan. Fix this up, and fix up the ARRAY_SIZE macro so that this bug does not reappear in any other place. Michael S. Tsirkin (4): virtio: fix up max size checks compiler: drop ; after BU

[Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
All users include the trailing ;, let's require that so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not produce unexpected results. Not a huge problem for QEMU since our style requires the use of {} but seems cleaner nevertheless. Signed-off-by: Michael S. Tsirkin --- include/qemu/compiler

[Qemu-devel] [PATCH v2 4/4] ARRAY_SIZE: check that argument is an array

2017-01-18 Thread Michael S. Tsirkin
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to ARRAY_SI

[Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU

2017-01-18 Thread Laurent Vivier
This series modifies the original ColdFire FPU implementation to use floatx80 instead of float64 internally as this is the native datatype for 680x0. I didn't keep the float64 type for ColdFire, but if someone thinks it's required I can update this series in this way. The series also adds the FPU

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > All users include the trailing ;, let's require that > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > produce unexpected results. When would it ever make sense for a build-time assert to be the only thing inside a runtime conditi

[Qemu-devel] [PATCH 1/7] target-m68k: move FPU helpers to fpu_helper.c

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/Makefile.objs | 2 +- target/m68k/fpu_helper.c | 112 ++ target/m68k/helper.c | 88 3 files changed, 113 insertions(+), 89 deletions(-) create mode 100644 targe

[Qemu-devel] [PATCH 3/7] softfloat: define 680x0 specific values

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- fpu/softfloat-specialize.h | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index f5aed72..8bd3fa9 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softflo

[Qemu-devel] [PATCH 6/7] target-m68k: introduce fscc.

2017-01-18 Thread Laurent Vivier
use DisasCompare with FPU conditions in fscc and fbcc. Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 228 1 file changed, 153 insertions(+), 75 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 49c0b0

[Qemu-devel] [PATCH 2/7] target-m68k: define ext_opsize

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 9f60fbc..d9ba735 100644 --- a/target/m68k/translate.c +++ b/target/m6

Re: [Qemu-devel] [PATCH v2 0/4] virtio: ARRAY_SIZE fixups

2017-01-18 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1484772931-16272-1-git-send-email-...@redhat.com Subject: [Qemu-devel] [PATCH v2 0/4] virtio: ARRAY_SIZE fixups Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(g

[Qemu-devel] [PATCH 7/7] target-m68k: implements more FPU instructions

2017-01-18 Thread Laurent Vivier
Add fmovecr, fsinh, flognp1, ftanh, fatan, fasin, fatanh, fsin, ftan, fetox, ftwotox, ftentox, flogn, flog10, facos, fcos, fgetexp, fgetman, fmod, fsgldiv, fscale, fsglmul, sin, cos, frestore, fsave. Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 1 + target/m68k/fpu_helper.c | 3

[Qemu-devel] [PATCH 5/7] target-m68k: add fmovem

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 6 +++ target/m68k/helper.h | 1 + target/m68k/translate.c | 99 +++- 3 files changed, 80 insertions(+), 26 deletions(-) diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > > All users include the trailing ;, let's require that > > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > > produce unexpected results. > > When would it ever make

[Qemu-devel] [PATCH 4/7] target-m68k: use floatx80 internally

2017-01-18 Thread Laurent Vivier
Coldfire uses float64, but 680x0 use floatx80. This patch introduces the use of floatx80 internally and enable FPU for 680x0. Signed-off-by: Laurent Vivier --- configure| 2 +- gdb-xml/m68k-fp.xml | 21 ++ target/m68k/cpu.c| 13 +- target/m68k/cpu.h| 74

Re: [Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU

2017-01-18 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1484773521-16530-1-git-send-email-laur...@vivier.eu Subject: [Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 to

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 11:16:07PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: > > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > > > All users include the trailing ;, let's require that > > > so that uses such as if (a) QEMU_BUILD_BU

Re: [Qemu-devel] [PATCH v2] vfio/pci: Support error recovery

2017-01-18 Thread Alex Williamson
On Tue, 10 Jan 2017 17:11:01 +0200 "Michael S. Tsirkin" wrote: > On Tue, Jan 10, 2017 at 07:46:17PM +0800, Cao jin wrote: > > > > > > On 01/10/2017 07:04 AM, Michael S. Tsirkin wrote: > > > On Sat, Dec 31, 2016 at 05:15:36PM +0800, Cao jin wrote: > > >> Support serious device error recovery

Re: [Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU

2017-01-18 Thread Richard Henderson
On 01/18/2017 01:05 PM, Laurent Vivier wrote: This series modifies the original ColdFire FPU implementation to use floatx80 instead of float64 internally as this is the native datatype for 680x0. I didn't keep the float64 type for ColdFire, but if someone thinks it's required I can update this se

Re: [Qemu-devel] [PATCH RFC v11 0/4] vfio-pci: pass non-fatal error to guest

2017-01-18 Thread Alex Williamson
On Sat, 31 Dec 2016 17:13:04 +0800 Cao jin wrote: > As previous discussion suggest, we could take a step back to handle non-fatal > error first, this will make this patchset much more thinner, because we could > drop all the configuration restriction related patches. > > FYI: patch 1 has been ch

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 21:23, Michael S. Tsirkin wrote: > On Wed, Jan 18, 2017 at 11:16:07PM +0200, Michael S. Tsirkin wrote: >> On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: >> > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: >> > > All users include the trailing ;, let's

[Qemu-devel] [PATCH V5 4/7] nios2: Add IIC interrupt controller emulation

2017-01-18 Thread Marek Vasut
From: Chris Wulff Add the Altera Nios2 internal interrupt controller model. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet Cc: Alexander Graf Cc: Richard Henderson Reviewed-by: Alexander Graf --- V3: Checkpatch cl

[Qemu-devel] [PATCH 0/7] Nios2 architecture support

2017-01-18 Thread Marek Vasut
This patchset adds support for new Nios2 architecture as well as the initial set of models for hardware blocks and emulation of the Altera 10M50 GHRD devkit. Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet Cc: Alexander Graf Cc: Richard Henderson

[Qemu-devel] [PATCH V5 3/7] nios2: Add usermode binaries emulation

2017-01-18 Thread Marek Vasut
Add missing bits for qemu-user required for emulating Altera Nios2 userspace binaries. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet Cc: Alexander Graf Cc: Richard Henderson Reviewed-by: Alexander Graf --- V3: Chec

[Qemu-devel] [PATCH V5 5/7] nios2: Add periodic timer emulation

2017-01-18 Thread Marek Vasut
From: Chris Wulff Add the Altera timer model. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet Cc: Alexander Graf Cc: Richard Henderson Reviewed-by: Alexander Graf --- V3: Checkpatch cleanup V4: Rebase on top of qem

[Qemu-devel] [PATCH V6 6/7] nios2: Add Altera 10M50 GHRD emulation

2017-01-18 Thread Marek Vasut
Add the Altera 10M50 Nios2 GHRD model. This allows emulating the 10M50 development kit with the Nios2 GHRD loaded in the FPGA. It is possible to boot Linux kernel and run userspace, thus far only from initrd as storage support is not yet implemented. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc

[Qemu-devel] [PATCH V6 7/7] nios2: Add support for Nios-II R1

2017-01-18 Thread Marek Vasut
Add remaining bits of the Altera NiosII R1 support into qemu, which is documentation, MAINTAINERS file entry, configure bits, arch_init and configuration files for both linux-user (userland binaries) and softmmu (hardware emulation). Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva

[Qemu-devel] [PATCH V10 2/7] nios2: Add architecture emulation support

2017-01-18 Thread Marek Vasut
From: Chris Wulff Add support for emulating Altera NiosII R1 architecture into qemu. This patch is based on previous work by Chris Wulff from 2012 and updated to latest mainline QEMU. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves

Re: [Qemu-devel] [PATCH V5 7/7] nios2: Add support for Nios-II R1

2017-01-18 Thread Marek Vasut
On 01/18/2017 08:35 PM, Richard Henderson wrote: > On 01/16/2017 04:44 PM, Marek Vasut wrote: >> +F: target-nios2/ > > Filename change. > > r~ OK -- Best regards, Marek Vasut

[Qemu-devel] [PATCH V4 1/7] nios2: Add disas entries

2017-01-18 Thread Marek Vasut
Add nios2 disassembler support. This patch is composed from binutils files from commit "Opcodes and assembler support for Nios II R2". The files from binutils used in this patch are: include/opcode/nios2.h include/opcode/nios2r1.h include/opcode/nios2r2.h opcodes/nios2-opc.c op

Re: [Qemu-devel] [PATCH v2 5/6] qmp/hmp: add set-vm-generation-id commands

2017-01-18 Thread Ben Warren
> On Jan 18, 2017, at 12:55 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2017 11:20:57 -0800 > b...@skyportsystems.com wrote: > >> From: Igor Mammedov >> >> Add set-vm-generation-id command to set Virtual Machine >> Generation ID counter. >> >> QMP command exa

Re: [Qemu-devel] [PATCH V9 2/7] nios2: Add architecture emulation support

2017-01-18 Thread Marek Vasut
On 01/18/2017 08:33 PM, Richard Henderson wrote: > On 01/16/2017 04:44 PM, Marek Vasut wrote: >> +TCGv_i32 tmp = tcg_const_i32(instr.imm5 + 32); >> +gen_helper_mmu_write(dc->cpu_env, tmp, load_gpr(dc, instr.a)); >> +tcg_temp_free_i32(tmp); >> +#endif >> +break; >> +

Re: [Qemu-devel] [PATCH RFC v11 2/4] vfio: new function to init aer cap for vfio device

2017-01-18 Thread Alex Williamson
On Sat, 31 Dec 2016 17:13:06 +0800 Cao jin wrote: > From: Chen Fan > > Introduce new function to initilize AER capability registers > for vfio-pci device. > > Signed-off-by: Chen Fan > Signed-off-by: Dou Liyang > Signed-off-by: Cao jin > --- > hw/vfio/pci.c | 87 >

Re: [Qemu-devel] [PATCH RFC v11 3/4] vfio-pci: pass the aer error to guest

2017-01-18 Thread Alex Williamson
On Sat, 31 Dec 2016 17:13:07 +0800 Cao jin wrote: > From: Chen Fan > > When physical device has uncorrectable error hanppened, the vfio_pci > driver will signal the uncorrectable error status register value to > corresponding QEMU's vfio-pci device via the eventfd registered by this > device, t

Re: [Qemu-devel] [PATCH RFC v11 4/4] vfio: add 'aer' property to expose aercap

2017-01-18 Thread Alex Williamson
On Sat, 31 Dec 2016 17:13:08 +0800 Cao jin wrote: > From: Chen Fan > > Add 'aer' property, let user choose whether expose the aer capability > or not. But that's not what it does, it only controls the behavior in response to non-fatal errors, the capability is exposed regardless. > Should dis

Re: [Qemu-devel] [PATCH V4 1/7] nios2: Add disas entries

2017-01-18 Thread Richard Henderson
On 01/18/2017 02:01 PM, Marek Vasut wrote: Add nios2 disassembler support. This patch is composed from binutils files from commit "Opcodes and assembler support for Nios II R2". The files from binutils used in this patch are: include/opcode/nios2.h include/opcode/nios2r1.h include/op

[Qemu-devel] [PULL 11/30] target-sparc: implement UA2005 hypervisor traps

2017-01-18 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 1 + target/sparc/int64_helper.c | 37 - target/sparc/win_helper.c | 6 ++ 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 00

[Qemu-devel] [PULL 03/30] target-sparc: use explicit mmu register pointers

2017-01-18 Thread Artyom Tarasenko
Use explicit register pointers while accessing D/I-MMU registers. Call cpu_unassigned_access on access to missing registers. Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target/sparc/cpu.h | 4 +++ target/sparc/ldst_helper.c | 66 ++

[Qemu-devel] [PULL 01/30] target-sparc: ignore MMU-faults if MMU is disabled in hypervisor mode

2017-01-18 Thread Artyom Tarasenko
while IMMU/DMMU is disabled - ignore MMU-faults in hypervisorv mode or if CPU doesn't have hypervisor - signal TT_INSN_REAL_TRANSLATION_MISS/TT_DATA_REAL_TRANSLATION_MISS otherwise Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 2 ++ target/sparc/ldst_helper.c | 15 +++

[Qemu-devel] [PULL 02/30] target-sparc: store cpu super- and hypervisor flags in TB

2017-01-18 Thread Artyom Tarasenko
Suggested-by: Richard Henderson Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 17 + target/sparc/translate.c | 24 +++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index e815a19..1e65

[Qemu-devel] [PULL 14/30] target-sparc: fix immediate UA2005 traps

2017-01-18 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 399a8ac..1099976 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -3298,7 +3298,7 @@ st

[Qemu-devel] [PULL 08/30] target-sparc: implement UA2005 scratchpad registers

2017-01-18 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/asi.h | 1 + target/sparc/cpu.h | 1 + target/sparc/ldst_helper.c | 24 3 files changed, 26 insertions(+) diff --git a/target/sparc/asi.h b/target/sparc/asi.h index c9a1849..d8d6284 100644 --- a/target/sp

<    1   2   3   4   >