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

2017-01-16 Thread Ard Biesheuvel
On 16 January 2017 at 22:35, Laszlo Ersek wrote: > On 01/16/17 22:23, Ard Biesheuvel wrote: >> On 16 January 2017 at 21:13, Laszlo Ersek wrote: >>> On 01/16/17 20:31, Ard Biesheuvel wrote: On 16 January 2017 at 18:20, Peter Maydell wrote: > On 16 January 2017 at 17:30, Ard Biesheu

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

2017-01-16 Thread Alexandre DERUMIER
Hi, proxmox users have reported recently corruption with qemu 2.7 and scsi-block (with passing physical /dev/sdX to virtio-scsi). working fine with qemu 2.6. qemu 2.7 + scsi-hd works fine https://forum.proxmox.com/threads/proxmox-4-4-virtio_scsi-regression.31471/page-2 - Mail original -

Re: [Qemu-devel] [RFC PATCH 0/3] scsi-generic and BLKSECTGET

2017-01-16 Thread Fam Zheng
On Mon, 01/16 22:11, Eric Farman wrote: > (cc'ing linux-scsi for the cover-letter; patches only to QEMU lists.) > > In the Linux kernel, I see two (three) places where the BLKSECTGET ioctl is > handled: > > (1) block/(compat_)ioctl.c -- (compat_)blkdev_ioctl > (2) drivers/scsi/sg.c -- sg_ioctl >

Re: [Qemu-devel] [PATCH 3/3] block: get max_transfer limit for char (scsi-generic) devices

2017-01-16 Thread Fam Zheng
On Mon, 01/16 22:12, Eric Farman wrote: > Commit 6f607174 introduced a routine to get the maximum number > of bytes for a single I/O transfer for block devices, however > scsi generic devices are character devices, not block. Add > a condition for this, with slightly different logic because > the

Re: [Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-16 Thread Cao jin
forget to cc maintainers in this new patch On 01/17/2017 02:18 PM, Cao jin wrote: > Doesn't do it for megasas & hcd-xhci, later patches will fix them. > > Signed-off-by: Cao jin > --- > hw/net/e1000e.c| 4 > hw/net/rocker/rocker.c | 5 + > hw/net/vmxnet3.c | 6 +- >

[Qemu-devel] [Bug 1657010] [NEW] RFE: Please implement -cpu best or a CPU fallback option

2017-01-16 Thread Richard Jones
Public bug reported: QEMU should implement a -cpu best option or some other way to make this work: qemu -M pc,accel=kvm:tcg -cpu best qemu -M pc,accel=kvm:tcg -cpu host:qemu64 See also: https://bugzilla.redhat.com/show_bug.cgi?id=1277744#c6 ** Affects: qemu Importance: Undecided

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

2017-01-16 Thread Fam Zheng
On Fri, 01/13 11:44, Peter Lieven wrote: > Hi, > > i currently facing a problem in our testing environment where I see file > system corruption with 2.7.1 on iSCSI and Local Storage (LVM). > Trying to bisect, but has anyone observed this before? The information here is too scarce to tell but a fi

[Qemu-devel] [PATCH v9 07/11] megasas: undo the overwrites of msi user configuration

2017-01-16 Thread Cao jin
Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/scsi/megasas.c | 7

[Qemu-devel] [PATCH v9 06/11] hcd-xhci: change behaviour of msix switch

2017-01-16 Thread Cao jin
Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. CC: Gerd Hoffmann CC: Michael S. Tsirkin CC: Markus Armbruster CC: Marcel Apfelbaum Reviewed-by: Gerd Hoffmann Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signe

[Qemu-devel] [PATCH v9 09/11] vmxnet3: remove unnecessary internal msix flag

2017-01-16 Thread Cao jin
Internal flag msix_used is unnecessary, it has the same effect as msix_enabled(). The corresponding msi flag is already dropped in commit 1070048e. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Dmitry Fleytman Ac

[Qemu-devel] [PATCH v9 08/11] vmxnet3: fix reference leak issue

2017-01-16 Thread Cao jin
On migration target, msix_vector_use() will be called in vmxnet3_post_load() in second time, without a matching second call to msi_vector_unuse(), which results in vector reference leak. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Michael S. Tsirkin Reviewed-by: Markus Armbru

[Qemu-devel] [PATCH v9 05/11] megasas: change behaviour of msix switch

2017-01-16 Thread Cao jin
Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. Also undo the overwrites of user configuration of msix. CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum Reviewed-by: Mar

[Qemu-devel] [PATCH v9 10/11] msi_init: convert assert to return -errno

2017-01-16 Thread Cao jin
According to the disscussion: http://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg08215.html Let leaf function returns reasonable -errno, let caller decide how to handle the return value. Suggested-by: Markus Armbruster CC: Markus Armbruster CC: Michael S. Tsirkin CC: Marcel Apfelbaum

[Qemu-devel] [PATCH v9 03/11] pci: Convert msix_init() to Error and fix callers

2017-01-16 Thread Cao jin
msix_init() reports errors with error_report(), which is wrong when it's used in realize(). The same issue was fixed for msi_init() in commit 1108b2f. In order to make the API change as small as possible, leave the return value check to later patch. For some devices(like e1000e, vmxnet3, nvme) wh

[Qemu-devel] [PATCH v9 11/11] megasas: remove unnecessary megasas_use_msix()

2017-01-16 Thread Cao jin
Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Hannes Reinecke Signed-off-by: Cao jin --- hw/scsi/megasas.c | 19 ++

[Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-16 Thread Cao jin
Doesn't do it for megasas & hcd-xhci, later patches will fix them. Signed-off-by: Cao jin --- hw/net/e1000e.c| 4 hw/net/rocker/rocker.c | 5 + hw/net/vmxnet3.c | 6 +- hw/virtio/virtio-pci.c | 13 +++-- 4 files changed, 21 insertions(+), 7 deletions(-) dif

[Qemu-devel] [PATCH v9 02/11] hcd-xhci: check & correct param before using it

2017-01-16 Thread Cao jin
usb_xhci_realize() corrects invalid values of property "intrs" automatically, but the uncorrected value is passed to msi_init(), which chokes on invalid values. Delay that until after the correction. Resources allocated by usb_xhci_init() are leaked when msi_init() fails. Fix by calling it after

[Qemu-devel] [PATCH v9 00/11] Convert msix_init() to error

2017-01-16 Thread Cao jin
v9 changelog: 1. split previous patch 3 into two separate patches(3 & 4), per mst's review. test: 1. make check ok. 2. detailed test on megasas/megasas-gen2, hcd-xhci, vmxnet3. megasas/megasas-gen2(M q35...bus=pcie.0): install a distro ./qemu-system-x86_64 --enable-kvm -m 1024 -device meg

[Qemu-devel] [PATCH v9 01/11] msix: Follow CODING_STYLE

2017-01-16 Thread Cao jin
CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 0ec1cb14fc60..

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-16 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 12/01/2017 13:19, Pavel Dovgalyuk wrote: > >> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > >> On 12 January 2017 at 11:28, Pavel Dovgalyuk wrote: > From: Max Filippov [mailto:jcmvb...@gmail.co

[Qemu-devel] [PATCH] migration: expose qemu_announce_self() via qmp

2017-01-16 Thread Germano Veit Michel
qemu_announce_self() is triggered by qemu at the end of migrations to update the network regarding the path to the guest l2addr. however it is also useful when there is a network change such as an active bond slave swap. Essentially, it's the same as a migration from a network perspective - the gu

Re: [Qemu-devel] [RFC PATCH 05/17] target/ppc/POWER9: Adapt LPCR handling for POWER9

2017-01-16 Thread David Gibson
On Tue, Jan 17, 2017 at 11:48:31AM +1100, Suraj Jitindar Singh wrote: > On Tue, 2017-01-17 at 08:40 +1100, David Gibson wrote: > > On Fri, Jan 13, 2017 at 05:28:11PM +1100, Suraj Jitindar Singh wrote: > > > > > > The logical partitioning control register controls a threads > > > operation > > > ba

[Qemu-devel] [PATCH] Makefile: Fix owner and group for qemu-version.h.tmp

2017-01-16 Thread Lin Ma
By commit 67a1de0d, When we perform 'git pull && make && sudo make install', In 'make' stage a qemu-version.h.tmp will be generated. If the content of qemu-version.h.tmp and qemu-version.h aren't consistent, The qemu-version.h.tmp will be renamed to qemu-version.h. Because of the target FORCE, The

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

2017-01-16 Thread Jason Wang
We allow vhost to clear VIRITO_F_IOMMU_PLATFORM which is wrong since VIRTIO_F_IOMMU_PLATFORM is mandatory for security. Fixing this by enforce it after vdc->get_features(). Signed-off-by: Jason Wang --- hw/virtio/virtio-bus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 0/2] migration capability to discard the migrated ram pages

2017-01-16 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: 20170116155113.21034-1-pbutsy...@virtuozzo.com Subject: [Qemu-devel] [PATCH 0/2] migration capability to discard t

[Qemu-devel] [PATCH 1/2] add 'discard-ram' migrate capability

2017-01-16 Thread Pavel Butsykin
This feature frees the migrated memory on the source during postcopy-ram migration. In the second step of postcopy-ram migration when the source vm is put on pause we can free unnecessary memory. It will allow, in particular, to start relaxing the memory stress on the source host in a load-balancin

Re: [Qemu-devel] [PATCH 0/2] virtio: revert virtio_queue_set_notification() nesting

2017-01-16 Thread Michael S. Tsirkin
On Mon, Jan 16, 2017 at 04:03:28PM -0500, Doug Goldstein wrote: > On 1/16/17 5:46 AM, Stefan Hajnoczi wrote: > > On Fri, Jan 13, 2017 at 09:15:49AM -0600, Doug Goldstein wrote: > >> On 1/13/17 6:02 AM, Stefan Hajnoczi wrote: > >>> On Thu, Jan 12, 2017 at 10:57:53AM -0600, Doug Goldstein wrote: > >>

[Qemu-devel] [PATCH] target-xtensa: implement RER/WER instructions

2017-01-16 Thread Max Filippov
RER and WER are privileged instructions for accessing external registers. External register address space is local to processor core. There's no alignment requirements, addressable units are 32-bit wide registers. Signed-off-by: Max Filippov --- target/xtensa/cpu.c | 6 ++ target/x

[Qemu-devel] [PATCH v2] qtest: virtio: zeroed last vring_desc after allocate

2017-01-16 Thread Longpeng(Mike)
As qvring_indirect_desc_setup() wouldn't initialize last vring_desc, so it's filled with dirty data, this might cause virtio backend broken. For example, the last bit of this vring_desc's flags might be 1, so virtqueue_read_next_desc() would report "Desc next is ***". Signed-off-by: Longpeng(Mike

Re: [Qemu-devel] [PATCH] qtest: virtio: zeroed last VRingDesc after allocate

2017-01-16 Thread Longpeng (Mike)
Hi Stefan, On 2017/1/16 22:13, Stefan Hajnoczi wrote: > On Sat, Jan 14, 2017 at 05:59:36PM +0800, Longpeng(Mike) wrote: .. >> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c >> index ec30cb9..b29c69e 100644 >> --- a/tests/libqos/virtio.c >> +++ b/tests/libqos/virtio.c >> @@ -171,12

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

2017-01-16 Thread Gonglei (Arei)
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 header; > > > > union { > > struct virtio

[Qemu-devel] [PATCH v2] arm: virt: Fix the segmentation fault when specifying an unsupported CPU

2017-01-16 Thread Shannon Zhao
From: Shannon Zhao For example, using -cpu generic will cause qemu segmentation fault. Signed-off-by: Shannon Zhao --- V2: Just remove the member NULL instead of checking twice --- hw/arm/virt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7a03f84..95a

Re: [Qemu-devel] [PATCH v15 1/2] virtio-crypto: Add virtio crypto device specification

2017-01-16 Thread Gonglei (Arei)
Hi Stefan, > > On Wed, Jan 04, 2017 at 06:03:04PM +0800, Gonglei wrote: > > +The general header of dataq: > > + > > +\begin{lstlisting} > > +struct virtio_crypto_op_header { > > +#define VIRTIO_CRYPTO_CIPHER_ENCRYPT \ > > +VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x00) > > +#define

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

2017-01-16 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: 20170117010204.4909-1-ehabk...@redhat.com Type: series Subject: [Qemu-devel] [PATCH 0/9] i386: query-cpu-model-exp

Re: [Qemu-devel] [PATCH] arm: virt: Fix the segmentation fault when specifying an unsupported CPU

2017-01-16 Thread Shannon Zhao
On 2017/1/17 1:27, Peter Maydell wrote: > On 15 January 2017 at 10:51, Shannon Zhao wrote: >> From: Shannon Zhao >> >> For example, using -cpu generic will cause qemu segmentation fault. >> >> Signed-off-by: Shannon Zhao >> --- >> hw/arm/virt.c | 2 +- >> 1 file changed, 1 insertion(+), 1 del

[Qemu-devel] [PATCH 9/9] tests: Test case for query-cpu-model-expansion

2017-01-16 Thread Eduardo Habkost
Test code to sanity-check the results of query-cpu-model-expansion. Signed-off-by: Eduardo Habkost --- tests/Makefile.include| 3 + tests/query-cpu-model-test.py | 398 ++ 2 files changed, 401 insertions(+) create mode 100755 tests/query-cpu-mod

[Qemu-devel] [PATCH 8/9] tests: Add rules to non-gtester qtest test cases

2017-01-16 Thread Eduardo Habkost
Today, simple non-gtester binaries can be run easily by a single Makefile rule (e.g. check-tests/qemu-iotest-quick.sh), but we don't have anything to help us automatically run the same test binary for multiple architectures. This add check-simpleqtest-* rules that will help us run binaries present

[Qemu-devel] [PATCH 5/9] qtest.py: Support QTEST_LOG environment variable

2017-01-16 Thread Eduardo Habkost
qtest logs everything to stderr by default, but we don't want it to be the default behavior on test cases. Implement the same behavior of libqtest.c, and redirect the qtest log to /dev/null by default unless the QTEST_LOG environment variable is set. Signed-off-by: Eduardo Habkost --- Patch orig

[Qemu-devel] [PATCH 4/9] qemu.py: Make logging optional

2017-01-16 Thread Eduardo Habkost
If a test case doesn't make QEMU generate any output, there's no need to redirect stdout and stderr to a file. On those cases, logging can be disabled so any errors are included on the test case output. Signed-off-by: Eduardo Habkost --- Patch originally submitted as part of series: * [RFC v2 00/

[Qemu-devel] [PATCH 3/9] cpu: Support comma escaping when parsing -cpu

2017-01-16 Thread Eduardo Habkost
Currently it's impossible to use commas inside any option value in -cpu due to the simple way the parser splits the options. Change both cpu_common_parse_features() and x86_cpu_parse_featurestr() to use get_opt_*() parsing options, that can handle handle ",," escaping of commas. The ideal solutio

[Qemu-devel] [PATCH 1/9] target-i386: Move "host" properties to base class

2017-01-16 Thread Eduardo Habkost
Make the "pmu" and "host-cache-info" properties configurable on all CPU model classes. This way, query-cpu-model-expansion will be able to return the value of those properties when returning expansion data using the "base" CPU model as base. Signed-off-by: Eduardo Habkost --- target/i386/cpu.c |

[Qemu-devel] [PATCH 7/9] qtest.py: Make 'binary' parameter optional

2017-01-16 Thread Eduardo Habkost
If the 'binary' parameter is omitted, use the $QTEST_QEMU_BINARY environment variable. Signed-off-by: Eduardo Habkost --- Patch originally submitted as part of series: * [RFC v2 00/20] qmp: Report bus information on 'query-machines' --- scripts/qtest.py | 4 +++- 1 file changed, 3 insertions(+),

[Qemu-devel] [PATCH 6/9] qtest.py: make logging optional

2017-01-16 Thread Eduardo Habkost
Support the 'logging' parameter on QEMUQtestMachine, for test cases that don't require logging. Signed-off-by: Eduardo Habkost --- Patch originally submitted as part of series: * [RFC v2 00/20] qmp: Report bus information on 'query-machines' --- scripts/qtest.py | 5 +++-- 1 file changed, 3 inse

[Qemu-devel] [PATCH 2/9] target-i386: Allow short strings to be used as vendor ID

2017-01-16 Thread Eduardo Habkost
If a short string is specified, it will be padded with zeroes. Without this, "query-cpu-model-expansion model=base" would return an expansion that would never work in the command-line. Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 11 +++ 1 file changed, 7 insertions(+), 4 delet

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

2017-01-16 Thread Eduardo Habkost
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-model-expansion to be used in the QEMU command-line. The script probably will work on s390x too, but I couldn't test it yet. T

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

2017-01-16 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 Reviewed-by: Alexander Graf --- V3: Checkpatch cleanup V4: Rebase on top of qemu/ma

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

2017-01-16 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 Reviewed-by: Alexander Graf --- V3: Checkpatch cleanup V4: Rebase on top of qemu/master V5: - Rebase on top of qemu/master

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

2017-01-16 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

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

2017-01-16 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 Reviewed-by: Alexander Graf --- V3: Checkpatch cleanup V4: Rebase on top of qemu/master V5:

Re: [Qemu-devel] [RFC PATCH 05/17] target/ppc/POWER9: Adapt LPCR handling for POWER9

2017-01-16 Thread Suraj Jitindar Singh
On Tue, 2017-01-17 at 08:40 +1100, David Gibson wrote: > On Fri, Jan 13, 2017 at 05:28:11PM +1100, Suraj Jitindar Singh wrote: > > > > The logical partitioning control register controls a threads > > operation > > based on the partition it is currently executing. Add new > > definitions and > > up

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

2017-01-16 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 V9 2/7] nios2: Add architecture emulation support

2017-01-16 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

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

2017-01-16 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. Chris Wulff (3): nios2: Add architecture emulation support nios2: Add IIC interrupt controller emulation nios2: Add periodic timer emu

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

2017-01-16 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

Re: [Qemu-devel] [RFC PATCH 04/17] target/ppc/POWER9: Add ISAv3.00 MMU definition

2017-01-16 Thread Suraj Jitindar Singh
On Tue, 2017-01-17 at 08:36 +1100, David Gibson wrote: > On Fri, Jan 13, 2017 at 05:28:10PM +1100, Suraj Jitindar Singh wrote: > > > > POWER9 processors implement the mmu as defined in version 3.00 of > > the ISA. > > > > Add a definition for this mmu model and set the POWER9 cpu model to > > use

[Qemu-devel] [PATCH 0/2] migration capability to discard the migrated ram pages

2017-01-16 Thread Pavel Butsykin
This feature frees the migrated memory on the source during postcopy-ram migration. In the second step of postcopy-ram migration when the source vm is put on pause we can free unnecessary memory. It will allow, in particular, to start relaxing the memory stress on the source host in a load-balancin

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

2017-01-16 Thread Marek Vasut
On 01/16/2017 11:21 PM, Alexander Graf wrote: > > > On 31/12/2016 14:22, Marek Vasut wrote: >> 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. >> >>

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

2017-01-16 Thread Marek Vasut
On 01/16/2017 11:36 PM, Alexander Graf wrote: > > > On 31/12/2016 14:22, Marek Vasut wrote: >> 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 >

Re: [Qemu-devel] [RFC PATCH 05/17] target/ppc/POWER9: Adapt LPCR handling for POWER9

2017-01-16 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:11PM +1100, Suraj Jitindar Singh wrote: > The logical partitioning control register controls a threads operation > based on the partition it is currently executing. Add new definitions and > update the mask used when writing to the LPCR based on the POWER9 spec. > > S

Re: [Qemu-devel] [RFC PATCH 04/17] target/ppc/POWER9: Add ISAv3.00 MMU definition

2017-01-16 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:10PM +1100, Suraj Jitindar Singh wrote: > POWER9 processors implement the mmu as defined in version 3.00 of the ISA. > > Add a definition for this mmu model and set the POWER9 cpu model to use > this mmu model. > > Signed-off-by: Suraj Jitindar Singh > --- > target

Re: [Qemu-devel] [RFC PATCH 03/17] target/ppc: Add pcr_supported to POWER9 cpu class definition

2017-01-16 Thread David Gibson
On Fri, Jan 13, 2017 at 05:28:09PM +1100, Suraj Jitindar Singh wrote: > pcr_supported is used to define the supported PCR values for a given > processor. A POWER9 processor can support 3.00, 2.07, 2.06 and 2.05 > compatibility modes, thus we set this accordingly. > > Signed-off-by: Suraj Jitindar

Re: [Qemu-devel] [PULL 00/67] ppc-for-2.9 queue 20170112

2017-01-16 Thread David Gibson
On Fri, Jan 13, 2017 at 10:54:33AM +, Peter Maydell wrote: > On 12 January 2017 at 02:02, David Gibson wrote: > > The following changes since commit b44486dfb9447c88e4b216e730adcc780190852c: > > > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20170110-1' > > into staging (2017

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

2017-01-16 Thread Sandra Loosemore
On 01/16/2017 03:21 PM, Alexander Graf wrote: +static void nios2_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +{ +/* NOTE: NiosII R2 is not supported yet. */ +info->mach = bfd_arch_nios2; +#ifdef TARGET_WORDS_BIGENDIAN +info->print_insn = print_insn_big_nios2; +#else +

Re: [Qemu-devel] [PATCH 0/2] virtio: revert virtio_queue_set_notification() nesting

2017-01-16 Thread Laszlo Ersek
On 01/12/17 12:46, Stefan Hajnoczi wrote: > The virtio_queue_set_notification() nesting introduced for AioContext polling > raised an assertion with virtio-net (even in non-polling mode). Converting > virtio-net and virtio-crypto to use virtio_queue_set_notification() in a > nesting fashion would

Re: [Qemu-devel] [PATCH v4 13/25] block/nbd: Implement bdrv_dirname()

2017-01-16 Thread Eric Blake
On 01/16/2017 02:49 PM, Max Reitz wrote: > The idea behind this implementation is that the export name might be > interpreted as a path (which is the only apparent interpretation of > relative filenames for NBD paths). > > The default implementation of bdrv_dirname() would handle that just fine >

Re: [Qemu-devel] [PATCH v4 12/25] quorum: Make bdrv_dirname() return NULL

2017-01-16 Thread Eric Blake
On 01/16/2017 02:49 PM, Max Reitz wrote: > While the common implementation for bdrv_dirname() should return NULL > for quorum BDSs already (because they do not have a file node and their > exact_filename field should be empty), there is no reason not to make > that explicit. > > Signed-off-by: Max

Re: [Qemu-devel] [PATCH v4 11/25] blkverify: Make bdrv_dirname() return NULL

2017-01-16 Thread Eric Blake
On 01/16/2017 02:49 PM, Max Reitz wrote: > blkverify's BDSs have a file BDS, but we do not want this to be > preferred over the raw node. There is no way to decide between the two > (and not really a reason to, either), so just return NULL in blkverify's > implementation of bdrv_dirname(). > > Sig

Re: [Qemu-devel] [PULL 14/65] target-arm: Use new deposit and extract ops

2017-01-16 Thread Laszlo Ersek
On 01/14/17 21:13, Richard Henderson wrote: > On 01/14/2017 11:41 AM, Laszlo Ersek wrote: >> On 01/11/17 03:17, Richard Henderson wrote: >>> Use the new primitives for UBFX and SBFX. >>> >>> Signed-off-by: Richard Henderson >>> --- >>> target/arm/translate-a64.c | 81 >>> +

Re: [Qemu-devel] [PATCH v4 10/25] block: Add bdrv_dirname()

2017-01-16 Thread Eric Blake
On 01/16/2017 02:49 PM, Max Reitz wrote: > This function may be implemented by block drivers to derive a directory > name from a BDS. Concatenating this g_free()-able string with a relative > filename must result in a valid (not necessarily existing) filename, so > this is a function that should ge

Re: [Qemu-devel] [PATCH] linux-user: Update m68k syscall definitions to match Linux 4.6

2017-01-16 Thread Laurent Vivier
Le 16/01/2017 à 23:49, John Paul Adrian Glaubitz a écrit : > Signed-off-by: John Paul Adrian Glaubitz > --- > linux-user/m68k/syscall_nr.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h > index 4b50fb29b6..d239551b34 100644

[Qemu-devel] [PATCH v2] linux-user: Update m68k syscall definitions to match Linux

2017-01-16 Thread John Paul Adrian Glaubitz
Fixed a copy-and-paste error: s/file_range/copy_file_range/. Cheers, Adrian

[Qemu-devel] [PATCH] linux-user: Update m68k syscall definitions to match Linux 4.6

2017-01-16 Thread John Paul Adrian Glaubitz
Signed-off-by: John Paul Adrian Glaubitz --- linux-user/m68k/syscall_nr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h index 4b50fb29b6..d239551b34 100644 --- a/linux-user/m68k/syscall_nr.h +++ b/linux-user/m68k/syscall_nr.h @@

Re: [Qemu-devel] [PATCH] linux-user: Update m68k syscall definitions to match Linux 4.6

2017-01-16 Thread John Paul Adrian Glaubitz
On 01/16/2017 11:44 PM, John Paul Adrian Glaubitz wrote: > +#define TARGET_NR_file_range376 > +#define TARGET_NR_preadv2 377 > +#define TARGET_NR_pwritev2 378 Oops, there's a copy-and-paste error. This should be TARGET_NR_copy_file_range. Will update in a sec

[Qemu-devel] [PATCH] linux-user: Update m68k syscall definitions to match Linux 4.6

2017-01-16 Thread John Paul Adrian Glaubitz
Signed-off-by: John Paul Adrian Glaubitz --- linux-user/m68k/syscall_nr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h index 4b50fb29b6..4e9e6ebeac 100644 --- a/linux-user/m68k/syscall_nr.h +++ b/linux-user/m68k/syscall_nr.h @@

[Qemu-devel] [Bug 1656927] [NEW] Network (TCP) access regression

2017-01-16 Thread Joan Moreau
Public bug reported: Starting a VM with /usr/bin/qemu-system-x86_64 -machine pc-i440fx-1.7,accel=kvm -usb -usbdevice tablet -usbdevice keyboard -enable-kvm -cpu core2duo -smp 2 -drive file=winp ro.qcow,index=0,media=disk,format=qcow2 -m 4096 -vga vmware -vnc :3 -k en-us -device rtl8139,netdev=n

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, Marek Vasut wrote: 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

[Qemu-devel] linux-user: Update sh4 syscall definitions to match Linux 4.8

2017-01-16 Thread John Paul Adrian Glaubitz
Hi! Same as with my previous patch for the sh4 target, here is the updated syscall definition table for Linux 4.6+. Since the last update to 4.4, three new syscalls were added. Thanks, Adrian

Re: [Qemu-devel] [PATCH] linux-user: Update sh4 syscall definitions to match Linux 4.8

2017-01-16 Thread Laurent Vivier
Le 16/01/2017 à 23:31, John Paul Adrian Glaubitz a écrit : > Signed-off-by: John Paul Adrian Glaubitz > --- > linux-user/sh4/syscall_nr.h | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h > index e99f73589d..d6c1e05

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, Marek Vasut wrote: 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. Sig

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, Marek Vasut wrote: 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 --- V3: Checkpatch cleanup V4: Rebase on top of qemu/master --- hw/timer/Makef

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, Marek Vasut wrote: 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 --- V3: Checkpatch cleanup V4: Rebase on top of q

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

2017-01-16 Thread Laszlo Ersek
On 01/16/17 22:23, Ard Biesheuvel wrote: > On 16 January 2017 at 21:13, Laszlo Ersek wrote: >> On 01/16/17 20:31, Ard Biesheuvel wrote: >>> On 16 January 2017 at 18:20, Peter Maydell wrote: On 16 January 2017 at 17:30, Ard Biesheuvel wrote: > On 16 January 2017 at 17:25, Peter May

[Qemu-devel] [PATCH] linux-user: Update sh4 syscall definitions to match Linux 4.8

2017-01-16 Thread John Paul Adrian Glaubitz
Signed-off-by: John Paul Adrian Glaubitz --- linux-user/sh4/syscall_nr.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h index e99f73589d..d6c1e059f6 100644 --- a/linux-user/sh4/syscall_nr.h +++ b/linux-user/sh4/syscall

[Qemu-devel] [PATCH] linux-user: Update sh4 syscall definitions to match Linux 4.8

2017-01-16 Thread John Paul Adrian Glaubitz
Hi! While setting up a fresh Debian unstable sh4 chroot with qemu-sh4-user, I noticed the syscall definition table for sh4 is not up to date: Setting up dh-strip-nondeterminism (0.029-2) ... Setting up libgdk-pixbuf2.0-dev (2.36.3-1) ... Setting up systemd (232-8) ... qemu: Unsupported syscall: 3

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, Marek Vasut wrote: 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 --- V3: Checkpatch cleanup V4: Rebase on

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, Marek Vasut wrote: 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:

Re: [Qemu-devel] [PATCH v4 09/25] block: Fix bdrv_find_backing_image()

2017-01-16 Thread Eric Blake
On 01/16/2017 02:49 PM, Max Reitz wrote: > bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or > bdrv_make_absolute_filename() instead of trying to do what those > functions do by itself. > > path_combine_deprecated() can now be dropped, so let's do that. > > Signed-off-by: M

Re: [Qemu-devel] [PATCH v4 07/25] block: bdrv_get_full_backing_filename's ret. val.

2017-01-16 Thread Eric Blake
On 01/16/2017 02:48 PM, Max Reitz wrote: > Make bdrv_get_full_backing_filename() return an allocated string instead > of placing the result in a caller-provided buffer. > > Signed-off-by: Max Reitz > --- > include/block/block.h | 3 +-- > block.c | 26 +- >

Re: [Qemu-devel] qemu-pcc 2.8.0 linux-user segfaults

2017-01-16 Thread Aníbal Limón
On 01/16/2017 03:56 PM, Aníbal Limón wrote: > Hi folks, > > I'm trying to upgrade qemu to 2.8.0 in Openembedded-core and segfaults > in qemu-ppc when is executing: > > /home/alimon/repos/poky/build-ppc/tmp/work/x86_64-linux/qemu-native/2.8.0-r0/build/ppc-linux-user/qemu-ppc > -s 16M -r 3.2.0 -c

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

2017-01-16 Thread Alexander Graf
On 31/12/2016 14:22, 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/opc

[Qemu-devel] qemu-pcc 2.8.0 linux-user segfaults

2017-01-16 Thread Aníbal Limón
Hi folks, I'm trying to upgrade qemu to 2.8.0 in Openembedded-core and segfaults in qemu-ppc when is executing: /home/alimon/repos/poky/build-ppc/tmp/work/x86_64-linux/qemu-native/2.8.0-r0/build/ppc-linux-user/qemu-ppc -s 16M -r 3.2.0 -cpu 7400 -L /home/alimon/repos/poky/build-ppc/tmp/sysroots/qe

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

2017-01-16 Thread Marek Vasut
On 12/31/2016 02:22 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 >

Re: [Qemu-devel] CMSIS SVD based peripheral definitions

2017-01-16 Thread Liviu Ionescu
> On 16 Jan 2017, at 21:23, Peter Maydell wrote: > > doing that is somewhere between "grey area" and > "GPL violation". too bad for GPL. :-( the fact is that I'll continue to improve support for Cortex-M in my branch of QEMU, and the SVD definitions are part of it. if you are not comfortable

Re: [Qemu-devel] [PATCH v6 6/9] qemu-img: Use bdrv_filename() for map

2017-01-16 Thread Eric Blake
On 01/16/2017 10:15 AM, Max Reitz wrote: > Replaces bs->filename by the result of bdrv_filename() in the > qemu-img map subcommand. Since that value is queried relatively often, > however, we should try to reuse the last result. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 31 ++

Re: [Qemu-devel] [PATCH v2 1/6] docs: vm generation id device's description

2017-01-16 Thread Eric Blake
On 01/16/2017 02:08 PM, Ben Warren wrote: >>> >>> Signed-off-by: Ben Warren >> > >>> Cc: Gal Hammer mailto:gham...@redhat.com>> >> >> If you are basing this patch off of earlier work (for example, you >> mentioned Igor's work), you may need additional S-o-b lines fo

[Qemu-devel] [PATCH 1/3] hw/scsi: Fix debug message of cdb structure in scsi-generic

2017-01-16 Thread Eric Farman
When running with debug enabled, the scsi-generic cdb that is dumped skips byte 0 of the command, which is the opcode. This makes identifying which command is being issued/completed a little difficult. Example: 0x00 0x00 0x01 0x00 0x00 scsi-generic: scsi_read_data 0x0 scsi-generic: Data re

[Qemu-devel] [PATCH v2 3/4] target-i386: Define static "base" CPU model

2017-01-16 Thread Eduardo Habkost
The query-cpu-model-expand QMP command needs at least one static model, to allow the "static" expansion mode to be implemented. Instead of defining static versions of every CPU model, define a "base" CPU model that has absolutely no feature flag enabled. Despite having no CPUID data set at all, "-

[Qemu-devel] [PATCH v2 2/4] qapi-schema: Comment about full expansion of non-migration-safe models

2017-01-16 Thread Eduardo Habkost
Add a note warning that static expansion may not be 100% accurate when the CPU model is not migration-safe. This will be the case on x86 when expansing the "host" CPU model, because there are "host" features that can't have a migration-safe representation (e.g. "host-cache-info"). Signed-off-by: E

[Qemu-devel] [PATCH v2 1/4] target-i386: Reorganize and document CPUID initialization steps

2017-01-16 Thread Eduardo Habkost
CPU runnability checks and CPU model expansion have slightly different requirements. Document the steps involved in loading a CPU model and realizing a CPU, so their requirements and purpose are clearly defined. This patch doesn't change any implementation. It just add comments, rename the x86_cpu

Re: [Qemu-devel] [PATCH v6 5/9] block: Add bdrv_filename()

2017-01-16 Thread Eric Blake
On 01/13/2017 02:52 PM, Max Reitz wrote: > Split the part which actually refreshes the BlockDriverState.filename > field off of bdrv_refresh_filename() into a more generic function > bdrv_filename(), which first calls bdrv_refresh_filename() and then > stores a qemu-usable filename in the given buf

  1   2   3   4   >