About MONITOR/MWAIT in i386 CPU model

2019-11-13 Thread Tao Xu
Hi Eduardo, After kvm use "-overcommit cpu-pm=on" to expose MONITOR/MWAIT (commit id 6f131f13e68d648a8e4f083c667ab1acd88ce4cd), the MONITOR/MWAIT feature in CPU model (phenom core2duo coreduo n270 Opteron_G3 EPYC Snowridge Denverton) may be unused. For example, when we boot a guest with Denver

Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup

2019-11-13 Thread Sergio Lopez
no-re...@patchew.org writes: > Patchew URL: https://patchew.org/QEMU/20191112113012.71136-1-...@redhat.com/ > > > > Hi, > > This series failed the docker-quick@centos7 build test. Please find the > testing commands and > their output below. If you have Docker installed, you can probably reprodu

[PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Gerd Hoffmann
Specifically port->driver.lchs needs clearing, otherwise seabios will try interpret whatever random crap happens to be there as disk geometry, which may or may not break boot depending on how lucky you are. Signed-off-by: Gerd Hoffmann --- src/hw/ahci.c | 1 + 1 file changed, 1 insertion(+) dif

How to extend QEMU's vhost-user tests after implementing vhost-user-blk device backend

2019-11-13 Thread Coiby Xu
Hi, I've implemented vhost-user-blk device backend by following https://wiki.qemu.org/Google_Summer_of_Code_2019#vhost-user-blk_device_backend. But I'm not sure what kind of tests I should write or to extend to take advantage of implemented vhost-user-blk device backend. The existing two tests rel

Re: [PATCH 2/2] iotests: Test multiple blockdev-snapshot calls

2019-11-13 Thread Kevin Wolf
Am 12.11.2019 um 17:07 hat Peter Krempa geschrieben: > On Fri, Nov 08, 2019 at 09:53:12 +0100, Kevin Wolf wrote: > > Test that doing a second blockdev-snapshot doesn't make the first > > overlay's backing file go away. > > > > Signed-off-by: Kevin Wolf > > --- > > tests/qemu-iotests/273 | 7

Re: [PATCH 2/2] iotests: Test multiple blockdev-snapshot calls

2019-11-13 Thread Kevin Wolf
Am 08.11.2019 um 15:32 hat Alberto Garcia geschrieben: > On Fri 08 Nov 2019 09:53:12 AM CET, Kevin Wolf wrote: > > +# Test large write to a qcow2 image > > This doesn't belong here I guess :) Yes, fixed. > I wonder if this test could go in 245 instead. The headline for 245 is "Test cases for th

Re: [PATCH V4] target/i386/kvm: Add Hyper-V direct tlb flush support

2019-11-13 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Tue, Nov 12, 2019 at 11:34:27AM +0800, lantianyu1...@gmail.com wrote: >> From: Tianyu Lan >> >> Hyper-V direct tlb flush targets KVM on Hyper-V guest. >> Enable direct TLB flush for its guests meaning that TLB >> flush hypercalls are handled by Level 0 hypervisor (Hyper

Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Laszlo Ersek
On 11/13/19 10:18, Gerd Hoffmann wrote: > Specifically port->driver.lchs needs clearing, otherwise seabios will s/driver/drive/ > try interpret whatever random crap happens to be there as disk geometry, > which may or may not break boot depending on how lucky you are. > > Signed-off-by: Gerd Hof

[Bug 1852115] Re: qemu --static user build fails with fedora rawhide glibc-2.30.9000

2019-11-13 Thread Laurent Vivier
Fixed by 0f1f2d4596ae ("linux-user: remove host stime() syscall") ** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1852115 Title: qemu -

[Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available

2019-11-13 Thread Laurent Vivier
rng-builtin is the new RNG default backend for virtio-rng and is based on getrandom(). 0198c2621a1e virtio-rng: change default backend to rng-builtin 5f7655f6ef15 virtio-rng: Keep the default backend out of VirtIORNGConf 6c4e9d487fea rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

Re: [PATCH V4] target/i386/kvm: Add Hyper-V direct tlb flush support

2019-11-13 Thread Roman Kagan
On Wed, Nov 13, 2019 at 10:29:00AM +0100, Vitaly Kuznetsov wrote: > Roman Kagan writes: > > On Tue, Nov 12, 2019 at 11:34:27AM +0800, lantianyu1...@gmail.com wrote: > >> From: Tianyu Lan > >> > >> Hyper-V direct tlb flush targets KVM on Hyper-V guest. > >> Enable direct TLB flush for its guests

[PATCH] enable translating statx syscalls on more arches

2019-11-13 Thread Aleksandar Markovic
On Tuesday, November 12, 2019, Andrew Kelley wrote: > ping > > Hello, Andrew. I just want to advise you to send, if possible, a new version of the patch, addressing whatt said in his review. It is better if you send it sooner rather than later, given the stage of our dev cycle. For MIPS parts:

Re: virtio,iommu_platform=on

2019-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2019 at 03:44:28PM +1100, Alexey Kardashevskiy wrote: > > > On 12/11/2019 18:08, Michael S. Tsirkin wrote: > > On Tue, Nov 12, 2019 at 02:53:49PM +1100, Alexey Kardashevskiy wrote: > >> Hi! > >> > >> I am enabling IOMMU for virtio in the pseries firmware (SLOF) and seeing > >> pro

Re: [PATCH RFC] virtio-pci: disable vring processing when bus-mastering is disabled

2019-11-13 Thread Michael S. Tsirkin
On Tue, Nov 12, 2019 at 11:43:01PM -0600, Michael Roth wrote: > Currently the SLOF firmware for pseries guests will disable/re-enable > a PCI device multiple times via IO/MEM/MASTER bits of PCI_COMMAND > register after the initial probe/feature negotiation, as it tends to > work with a single devic

[Bug 1734792] Re: linux-user mode does not support memfd_create syscall

2019-11-13 Thread Laurent Vivier
9bdfa4d23f43 linux-user: add memfd_create ** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1734792 Title: linux-user mode does not suppo

Re: [PATCH V4] target/i386/kvm: Add Hyper-V direct tlb flush support

2019-11-13 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Wed, Nov 13, 2019 at 10:29:00AM +0100, Vitaly Kuznetsov wrote: >> Roman Kagan writes: >> > On Tue, Nov 12, 2019 at 11:34:27AM +0800, lantianyu1...@gmail.com wrote: >> >> From: Tianyu Lan >> >> >> >> Hyper-V direct tlb flush targets KVM on Hyper-V guest. >> >> Enable di

Re: [PATCH v9 Kernel 1/5] vfio: KABI for migration interface for device state

2019-11-13 Thread Cornelia Huck
On Tue, 12 Nov 2019 15:30:05 -0700 Alex Williamson wrote: > On Tue, 12 Nov 2019 22:33:36 +0530 > Kirti Wankhede wrote: > > > - Defined MIGRATION region type and sub-type. > > - Used 3 bits to define VFIO device states. > > Bit 0 => _RUNNING > > Bit 1 => _SAVING > > Bit 2 => _RESUMIN

Re: QEMU for Qualcomm Hexagon - KVM Forum talk and code available

2019-11-13 Thread Alex Bennée
Taylor Simpson writes: > I had discussions with several people at the KVM Forum, and I’ve been > thinking about how to divide up the code for community review. Here is my > proposal for the steps. > > 1. linux-user changes + linux-user/hexagon + skeleton of target/hexagon > This is the mi

Re: [PATCH v9 Qemu 00/15] Add migration support for VFIO devices

2019-11-13 Thread Cornelia Huck
On Tue, 12 Nov 2019 22:35:09 +0530 Kirti Wankhede wrote: > Hi, > > This Patch set adds migration support for VFIO devices in QEMU. > > This Patch set include patches as below: > Patch 1-3: > - Define KABI for VFIO device for migration support for device state and newly > added ioctl definatio

Re: [PATCH] enable translating statx syscalls on more arches

2019-11-13 Thread Laurent Vivier
Le 13/11/2019 à 10:55, Aleksandar Markovic a écrit : > > > On Tuesday, November 12, 2019, Andrew Kelley > wrote: > > ping > > > > Hello, Andrew. > > I just want to advise you to send, if possible, a new version of the > patch, addressing whatt said in his revi

Re: [RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option

2019-11-13 Thread Kevin Wolf
Am 12.11.2019 um 15:25 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > This adds and parses the --monitor option, so that a QMP monitor can be > > used in the storage daemon. The monitor offers commands defined in the > > QAPI schema at storage-daemon/qapi/qapi-schema.json. > > I f

Re: [PATCH v2 05/15] stubs: add stubs for io_uring interface

2019-11-13 Thread Stefan Hajnoczi
On Mon, Nov 11, 2019 at 12:13:47PM +0100, Kevin Wolf wrote: > Am 25.10.2019 um 18:04 hat Stefan Hajnoczi geschrieben: > > From: Aarushi Mehta > > > > Signed-off-by: Aarushi Mehta > > Signed-off-by: Stefan Hajnoczi > > This commit message needs to answer at least where these stubs are > actuall

Re: [PATCH v2 03/15] block/block: add BDRV flag for io_uring

2019-11-13 Thread Stefan Hajnoczi
On Mon, Nov 11, 2019 at 05:25:04PM +0100, Max Reitz wrote: > On 11.11.19 11:57, Kevin Wolf wrote: > > Am 25.10.2019 um 18:04 hat Stefan Hajnoczi geschrieben: > >> From: Aarushi Mehta > >> > >> Signed-off-by: Aarushi Mehta > >> Reviewed-by: Maxim Levitsky > >> Signed-off-by: Stefan Hajnoczi > >>

Re: [PATCH v2 00/15] io_uring: add Linux io_uring AIO engine

2019-11-13 Thread Stefan Hajnoczi
On Mon, Nov 04, 2019 at 11:32:33AM +0100, Stefan Hajnoczi wrote: > On Fri, Oct 25, 2019 at 06:04:29PM +0200, Stefan Hajnoczi wrote: > > v11: > > * Drop fd registration because it breaks QEMU's file locking and will need > > to > >be resolved in a separate patch series > > * Drop line-wrappin

[PATCH v1 5/5] .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS

2019-11-13 Thread Alex Bennée
The older clangs are still struggling to build and run everything withing the 50 minute timeout so lets lighten the load a bit more. We still have coverage for GCC and hopefully no obscure 32 bit guest only breakages slip through the cracks. Signed-off-by: Alex Bennée --- .travis.yml | 2 +- 1 f

[PATCH v1 1/5] tests/vm: make --interactive (and therefore DEBUG=1) unconditional

2019-11-13 Thread Alex Bennée
While the concept of only dropping to ssh if a test fails is nice it is more useful for this to be unconditional. You usually just want to get the build up and running and then noodle around debugging or attempting to replicate. Cc: Peter Maydell Signed-off-by: Alex Bennée --- v2 - fix spelli

[PATCH for 4.2-rc2 v1 0/5] misc doc and testing fixes

2019-11-13 Thread Alex Bennée
Hi, As we approach release I'm just bundling up my random fixes for 4.2 into one tree for each release candidate. This has a minor fix for debugging vm builds and a number of minor documentation fixes including moving the MTTCG docs across to rst format. The final patch is a tweak to Travis to dro

[PATCH v1 2/5] docs/devel: rename plugins.rst to tcg-plugins.rst

2019-11-13 Thread Alex Bennée
This makes it a bit clearer what this is about. Signed-off-by: Alex Bennée --- docs/devel/index.rst| 2 +- docs/devel/{plugins.rst => tcg-plugins.rst} | 0 MAINTAINERS | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename docs/deve

[PATCH v1 3/5] docs/devel: update tcg-plugins.rst with API versioning details

2019-11-13 Thread Alex Bennée
While we are at it fix up the quoted code sections with the inline :: approach. Signed-off-by: Alex Bennée --- v2 - fix grammar - mention we also will fail to load outside the range - clean-up code sections --- docs/devel/tcg-plugins.rst | 27 +-- 1 file changed, 2

[PATCH v1 4/5] docs/devel: convert multi-thread-tcg to a .rst document

2019-11-13 Thread Alex Bennée
Signed-off-by: Alex Bennée --- docs/devel/index.rst | 1 + ...ti-thread-tcg.txt => multi-thread-tcg.rst} | 28 --- 2 files changed, 19 insertions(+), 10 deletions(-) rename docs/devel/{multi-thread-tcg.txt => multi-thread-tcg.rst} (96%) diff --git a/doc

Re: [PATCH v2 1/4] aspeed/sdmc: Make ast2600 default 1G

2019-11-13 Thread Alex Bennée
Joel Stanley writes: > Most boards have this much. > > Reviewed-by: Cédric Le Goater > Signed-off-by: Joel Stanley > --- > hw/misc/aspeed_sdmc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c > index f3a63a2e01db..

Re: [PATCH v2 2/4] aspeed/scu: Fix W1C behavior

2019-11-13 Thread Alex Bennée
Joel Stanley writes: > This models the clock write one to clear registers, and fixes up some > incorrect behavior in all of the write to clear registers. > > There was also a typo in one of the register definitions. > > Reviewed-by: Cédric Le Goater > Signed-off-by: Joel Stanley > --- > hw/m

Re: [PATCH v2 3/4] watchdog/aspeed: Improve watchdog timeout message

2019-11-13 Thread Alex Bennée
Joel Stanley writes: > Users benefit from knowing which watchdog timer has expired. The address > of the watchdog's registers unambiguously indicates which has expired, > so log that. > > Reviewed-by: Cédric Le Goater > Signed-off-by: Joel Stanley > --- > v2: Use HWADDR_PRIx > --- > hw/watch

Re: [PATCH v2 4/4] watchdog/aspeed: Fix AST2600 frequency behaviour

2019-11-13 Thread Alex Bennée
Joel Stanley writes: > The AST2600 control register sneakily changed the meaning of bit 4 > without anyone noticing. It no longer controls the 1MHz vs APB clock > select, and instead always runs at 1MHz. > > The AST2500 was always 1MHz too, but it retained bit 4, making it read > only. We can m

Re: [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-11-13 Thread Denis Plotnikov
On 06.11.2019 15:03, Michael S. Tsirkin wrote: > On Thu, Oct 24, 2019 at 11:34:34AM +, Denis Lunev wrote: >> On 10/24/19 12:28 AM, Michael S. Tsirkin wrote: >>> On Fri, Oct 18, 2019 at 02:55:47PM +0300, Denis Plotnikov wrote: From: "Denis V. Lunev" Linux guests submit IO reque

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-13 Thread Markus Armbruster
Jason Andryuk writes: > Currently, mon->commands is uninitialized until CHR_EVENT_OPENED where > it is set to &qmp_cap_negotiation_commands. After capability > negotiation, it is set to &qmp_commands. If the chardev is closed, > CHR_EVENT_CLOSED, mon->commands remains as &qmp_commands. Only on

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-13 Thread Marc-André Lureau
Hi On Wed, Nov 13, 2019 at 4:41 PM Markus Armbruster wrote: > > Jason Andryuk writes: > > > Currently, mon->commands is uninitialized until CHR_EVENT_OPENED where > > it is set to &qmp_cap_negotiation_commands. After capability > > negotiation, it is set to &qmp_commands. If the chardev is clo

Re: [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2019 at 12:38:48PM +, Denis Plotnikov wrote: > > > On 06.11.2019 15:03, Michael S. Tsirkin wrote: > > On Thu, Oct 24, 2019 at 11:34:34AM +, Denis Lunev wrote: > >> On 10/24/19 12:28 AM, Michael S. Tsirkin wrote: > >>> On Fri, Oct 18, 2019 at 02:55:47PM +0300, Denis Plotnik

Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup

2019-11-13 Thread Sergio Lopez
Sergio Lopez writes: > no-re...@patchew.org writes: > >> Patchew URL: https://patchew.org/QEMU/20191112113012.71136-1-...@redhat.com/ >> >> >> >> Hi, >> >> This series failed the docker-quick@centos7 build test. Please find the >> testing commands and >> their output below. If you have Docker

Re: [PATCH v1 5/5] .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS

2019-11-13 Thread Thomas Huth
On 13/11/2019 12.59, Alex Bennée wrote: > The older clangs are still struggling to build and run everything > withing the 50 minute timeout so lets lighten the load a bit more. We > still have coverage for GCC and hopefully no obscure 32 bit guest only > breakages slip through the cracks. > > Sign

Re: [PATCH v1 1/5] tests/vm: make --interactive (and therefore DEBUG=1) unconditional

2019-11-13 Thread Thomas Huth
On 13/11/2019 12.59, Alex Bennée wrote: > While the concept of only dropping to ssh if a test fails is nice it > is more useful for this to be unconditional. You usually just want to > get the build up and running and then noodle around debugging or > attempting to replicate. > > Cc: Peter Maydell

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-13 Thread Jason Andryuk
On Wed, Nov 13, 2019 at 8:18 AM Marc-André Lureau wrote: > > Hi > > On Wed, Nov 13, 2019 at 4:41 PM Markus Armbruster wrote: > > > > Jason Andryuk writes: > > > > > Currently, mon->commands is uninitialized until CHR_EVENT_OPENED where > > > it is set to &qmp_cap_negotiation_commands. After cap

[PATCH v2 1/5] MAINTAINERS: Add a section on UI translation

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic There should be a person who will quickly evaluate new UI translation, and find a way to update existing ones should something changes in UI. Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAIN

[PATCH v2 2/5] MAINTAINERS: Adjust maintainership for Fulong 2E board

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Change the maintainership for Fulong 2E board to improve its quality. Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fd9ba32..3bf2144 100644 --- a/MAINTAINER

[PATCH v2 0/5] MAINTAINERS: Fine adjustment for (mostly mips) content

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic v1->v2: - removed patch on new git infrastructure section - added a patch that adds two files in Malta section The goal of this series is to: * reduce the amount of "unmainatined" files (not having their maintainer in "MAINTAINERS") * reduce the amount of

[PATCH v2 4/5] MAINTAINERS: Adjust maintainership for R4000 systems

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Change the maintainership for R4000 systems to improve its quality. Acked-by: Aurelien Jarno Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6afec32..ba9ca98 1

[PATCH v2 5/5] MAINTAINERS: Add two files to Malta section

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Add two files that were recently introduced in a refactoring, that Malta emulation relies on. They are added by this patch to Malta section, but they are not added to the general MIPS section, since they are really not MIPS-specific, and there may be some non-MIPS hardwa

[PATCH v2 3/5] MAINTAINERS: Adjust maintainership for Malta board

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Change the maintainership for Malta board to improve its quality. Acked-by: Aurelien Jarno Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3bf2144..6afec32 100

Re: [RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option

2019-11-13 Thread Markus Armbruster
Kevin Wolf writes: > Am 12.11.2019 um 15:25 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > This adds and parses the --monitor option, so that a QMP monitor can be >> > used in the storage daemon. The monitor offers commands defined in the >> > QAPI schema at storage-daemon/qap

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Gerd Hoffmann
On Wed, Nov 13, 2019 at 10:35:03AM +0100, Laszlo Ersek wrote: > On 11/13/19 10:18, Gerd Hoffmann wrote: > > Specifically port->driver.lchs needs clearing, otherwise seabios will > > s/driver/drive/ > Reviewed-by: Laszlo Ersek Typo fixed & pushed. thanks, Gerd

[PULL 0/1] Seabios 20191113 patches

2019-11-13 Thread Gerd Hoffmann
The following changes since commit 9f2ce35dfa4ea4a31dbb765dd02bed2500891887: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-2019' into staging (2019-11-11 16:54:16 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/seabios-20191113-pull-re

Re: [RFC PATCH 01/18] qemu-storage-daemon: Add barebone tool

2019-11-13 Thread Kevin Wolf
Am 24.10.2019 um 15:50 hat Eric Blake geschrieben: > On 10/17/19 8:01 AM, Kevin Wolf wrote: > > This adds a new binary qemu-storage-daemon that doesn't yet do more than > > some typical initialisation for tools and parsing the basic command > > options --version, --help and --trace. > > > > Signed

[RFC PATCH] scripts/tap-driver: report "slow" tests (HACK)

2019-11-13 Thread Alex Bennée
Some tests seem to run slower on CI systems but we don't really get visibility of which it is unless we happen to hang the test at the end of a run. This hacky change exposes "slow" tests in the tap output. [AJB: my perl is rusty, I'm sure this could be more idiomatic] Signed-off-by: Alex Bennée

Re: [RFC PATCH v2 03/26] qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()

2019-11-13 Thread Alberto Garcia
On Wed 30 Oct 2019 03:24:08 PM CET, Max Reitz wrote: >> static void calculate_l2_meta(BlockDriverState *bs, uint64_t host_offset, >>uint64_t guest_offset, uint64_t bytes, >> - QCowL2Meta **m, bool keep_old) >> +

[PATCH for-5.0 00/16] Complete the implementation of -accel

2019-11-13 Thread Paolo Bonzini
This series completes the implementation of -accel: - Alternative accelerators can be specified with multiple -accel options, and each -accel option will configure the respective accelerator. This is implemented in patches 1 to 6, with a small addendum in patch 7. - Accelerators can now suppo

[PATCH 02/16] vl: extract accelerator option processing to a separate function

2019-11-13 Thread Paolo Bonzini
As a first step towards supporting multiple "-accel" options, push -icount and -accel semantics into a new function, and use qemu_opts_foreach to retrieve the key/value lists instead of stashing them into globals. Signed-off-by: Paolo Bonzini --- vl.c | 40 ---

[PATCH 01/16] memory: do not look at current_machine->accel

2019-11-13 Thread Paolo Bonzini
"info mtree" prints the wrong accelerator name if used with for example "-machine accel=kvm:tcg". The right thing to do is to fetch the name from the AccelClass, which will also work nicely once current_machine->accel stops existing. Signed-off-by: Paolo Bonzini --- memory.c | 5 + 1 file c

[PATCH 07/16] vl: warn for unavailable accelerators, clarify messages

2019-11-13 Thread Paolo Bonzini
So far, specifying an accelerator that was not compiled in did not result in an error; fix that. While at it, clarify the mysterious "Back to TCG" message. Signed-off-by: Paolo Bonzini --- vl.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index dd895db..

[PATCH 05/16] vl: introduce object_parse_property_opt

2019-11-13 Thread Paolo Bonzini
We will reuse the parsing loop of machine_set_property soon for "-accel", but we do not want the "_" -> "-" conversion since "-accel" can just standardize on dashes. We will also add a bunch of legacy option handling to keep the QOM machine object clean. Extract the loop into a separate function,

[PATCH 06/16] vl: configure accelerators from -accel options

2019-11-13 Thread Paolo Bonzini
Drop the "accel" property from MachineState, and instead desugar "-machine accel=" to a list of "-accel" options. This has a semantic change due to removing merge_lists from -accel. For example: - "-accel kvm -accel tcg" all but ignored "-accel kvm". This is a bugfix. - "-accel kvm -accel threa

[PATCH 03/16] vl: merge -accel processing into configure_accelerators

2019-11-13 Thread Paolo Bonzini
The next step is to move the parsing of "-machine accel=..." into vl.c, unifying it with the configure_accelerators() function that has just been introduced. This way, we will be able to desugar it into multiple "-accel" options, without polluting accel/accel.c. The CONFIG_TCG and CONFIG_KVM symb

[PATCH 04/16] vl: move icount configuration earlier

2019-11-13 Thread Paolo Bonzini
Once qemu_tcg_configure is turned into a QOM property setter, it will not be able to set a default value for mttcg_enabled. Setting the default will move to the TCG init_machine method, which currently runs after "-icount" is processed. However, it is harmless to do configure_icount for all accel

[PATCH 08/16] qom: introduce object_register_sugar_prop

2019-11-13 Thread Paolo Bonzini
Similar to the existing "-rtc driftfix" option, we will convert some legacy "-machine" command line options to global properties on accelerators. Because accelerators are not devices, we cannot use qdev_prop_register_global. Instead, provide a slot in the generic object_compat_props arrays for comm

[PATCH 10/16] accel: pass object to accel_init_machine

2019-11-13 Thread Paolo Bonzini
We will have to set QOM properties before accel_init_machine, based on the options provided to -accel. Construct the object outside it so that it will be possible to insert the iteration between object_new_with_class and accel_init_machine. Signed-off-by: Paolo Bonzini --- accel/accel.c

[PATCH 09/16] qom: add object_new_with_class

2019-11-13 Thread Paolo Bonzini
Similar to CPU and machine classes, "-accel" class names are mangled, so we have to first get a class via accel_find and then instantiate it. Provide a new function to instantiate a class without going through object_class_get_name, and use it for CPUs and machines already. Signed-off-by: Paolo Bo

[PATCH 11/16] tcg: convert "-accel threads" to a QOM property

2019-11-13 Thread Paolo Bonzini
Replace the ad-hoc qemu_tcg_configure with generic code invoking QOM property getters and setters. This will be extended in the next patches, which will turn accelerator-related "-machine" options into QOM properties as well. Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-all.c | 111

[PATCH 16/16] kvm: convert "-machine kernel_irqchip" to an accelerator property

2019-11-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 59 ++- hw/core/machine.c | 61 - include/hw/boards.h | 3 --- qemu-options.hx | 9 +--- vl.c| 3 ++- 5 files cha

[PATCH 12/16] tcg: add "-accel tcg,tb-size" and deprecate "-tb-size"

2019-11-13 Thread Paolo Bonzini
-tb-size fits nicely in the new framework for accelerator-specific options. It is a very niche option, so insta-deprecate the old version. Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-all.c| 40 +--- include/sysemu/accel.h | 2 -- qemu-deprecated.texi

[PATCH 15/16] kvm: introduce kvm_kernel_irqchip_* functions

2019-11-13 Thread Paolo Bonzini
The KVMState struct is opaque, so provide accessors for the fields that will be moved from current_machine to the accelerator. For now they just forward to the machine object, but this will change. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 23 +++ hw/ppc/e500.c

[PATCH 13/16] xen: convert "-machine igd-passthru" to an accelerator property

2019-11-13 Thread Paolo Bonzini
The first machine property to fall is Xen's Intel integrated graphics passthrough. The "-machine igd-passthru" option does not set anymore a property on the machine object, but desugars to a GlobalProperty on accelerator objects. The setter is very simple, since the value ends up in a global vari

[PATCH 14/16] kvm: convert "-machine kvm_shadow_mem" to an accelerator property

2019-11-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 43 +++ hw/core/machine.c | 39 --- include/hw/boards.h | 2 -- qemu-options.hx | 6 +++--- target/i386/kvm.c | 2 +- vl.c| 4 6 file

Re: FW: [PATCH v1 3/5] docs/devel: update tcg-plugins.rst with API versioning details

2019-11-13 Thread Robert Foley
On Wed, 13 Nov 2019 at 07:00, Alex Bennée wrote: > > While we are at it fix up the quoted code sections with the inline :: > approach. > > Signed-off-by: Alex Bennée > > --- > v2 > - fix grammar > - mention we also will fail to load outside the range > - clean-up code sections > --- > docs

[PATCH] target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR

2019-11-13 Thread Paolo Bonzini
This is required to disable ITLB multihit mitigations in nested hypervisors. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a624163ac2..2f60df37c4 100644 --- a/target/i386/cpu.c ++

[PATCH] target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR

2019-11-13 Thread Paolo Bonzini
From: speck for Paolo Bonzini This is required to disable ITLB multihit mitigations in nested hypervisors. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a624163ac2..2f60df37c4 1

Re: [PATCH v2] WHPX: support for xcr0

2019-11-13 Thread Paolo Bonzini
On 12/11/19 19:52, Sunil Muthuswamy wrote: > > >> -Original Message- >> From: Sunil Muthuswamy >> Sent: Thursday, November 7, 2019 11:49 AM >> To: Paolo Bonzini ; Richard Henderson >> ; Eduardo Habkost >> Cc: qemu-devel@nongnu.org >> Subject: [PATCH v2] WHPX: support for xcr0 >> >> Supp

Re: [PATCH] spapr/kvm: Set default cpu model for all machine classes

2019-11-13 Thread Jiri Denemark
Hi David. On Wed, Oct 30, 2019 at 17:32:43 +0100, David Gibson wrote: > We have to set the default model of all machine classes, not just for the > active one. Otherwise, "query-machines" will indicate the wrong CPU model > ("qemu-s390x-cpu" instead of "host-s390x-cpu") as "default-cpu-type". > >

Re: [PATCH] WHPX: refactor load library

2019-11-13 Thread Paolo Bonzini
On 08/11/19 21:31, Sunil Muthuswamy wrote: > > +typedef enum WHPFunctionList { > +WINHV_PLATFORM_FNS_DEFAULT, > +WINHV_EMULATION_FNS_DEFAULT, > +} WHPFunctionList; > What does "default" stand for? I assume you have more changes to this function in the future. > + * Load the functions

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Sam Eiderman
Hi, Does this fix a bug that actually happened? I just noticed that in my lchs patches I assumed that lchs struct is zeroed out in all devices (not only ahci): 9caa19be0e53 (geometry: Apply LCHS values for boot devices) Seems like this is not the case but why only ahci is affected? The list of

Re: [PATCH] spapr/kvm: Set default cpu model for all machine classes

2019-11-13 Thread Greg Kurz
On Wed, 13 Nov 2019 15:43:44 +0100 Jiri Denemark wrote: > Hi David. > > On Wed, Oct 30, 2019 at 17:32:43 +0100, David Gibson wrote: > > We have to set the default model of all machine classes, not just for the > > active one. Otherwise, "query-machines" will indicate the wrong CPU model > > ("qe

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Sam Eiderman
We should make sure drive.lchs is zeroed out for the following devices: git grep "drive_s drive" src/hw/ata.h:struct drive_s drive; src/hw/esp-scsi.c:struct drive_s drive; src/hw/lsi-scsi.c:struct drive_s drive; src/hw/megasas.c:struct drive_s drive; src/hw/mpt-scsi.c:struct d

Re: [PATCH v1 3/5] Add use of RCU for qemu_logfile.

2019-11-13 Thread Alex Bennée
Robert Foley writes: > On Tue, 12 Nov 2019 at 12:36, Alex Bennée wrote: >> >> >> > } >> > +atomic_rcu_set(&qemu_logfile, logfile); >> > } >> > -qemu_mutex_unlock(&qemu_logfile_mutex); >> > +logfile = qemu_logfile; >> >> Isn't this read outside of the protection of

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: > qemu_thread_cancel() added to destroy a given running thread. > This will be needed in the following patches. > > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > Signed-off-by: Elena Ufimtseva > --- > inclu

Re: [PATCH] spapr/kvm: Set default cpu model for all machine classes

2019-11-13 Thread Peter Maydell
On Wed, 13 Nov 2019 at 15:10, Greg Kurz wrote: > David is away until the 19th of November, which is the release date > of rc2 according to the planning [*]. Then we have rc3 the 26th, and > final release (or rc4) the 3rd of December, so it should be ok. Please don't actively plan to delay putting

Re: [RFC v4 PATCH 03/49] multi-process: add a command line option for debug file

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:44AM -0400, Jagannathan Raman wrote: > From: Elena Ufimtseva > > Can be used with -d rdebug command options when starting qemu. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannathan Raman > Signed-off-by: John G Johnson > --- > include/qemu/log.h | 1 +

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Jag Raman
On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: qemu_thread_cancel() added to destroy a given running thread. This will be needed in the following patches. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signe

Re: [RFC v4 PATCH 07/49] multi-process: define mpqemu-link object

2019-11-13 Thread Jag Raman
On 11/11/2019 11:41 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:48AM -0400, Jagannathan Raman wrote: +int mpqemu_msg_recv(MPQemuLinkState *s, MPQemuMsg *msg, MPQemuChannel *chan) +{ +int rc; +uint8_t *data; +union { +char control[CMSG_SPACE(REMOTE_MAX_FDS * si

Re: [RFC v4 PATCH 07/49] multi-process: define mpqemu-link object

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:48AM -0400, Jagannathan Raman wrote: > +#ifndef MPQEMU_LINK_H > +#define MPQEMU_LINK_H > + > +#include "qemu/osdep.h" > +#include "qemu-common.h" > + > +#include > +#include These are already included by "qemu/osdep.h". > +#include Is needed? > + > +#include "q

Re: [RFC v4 PATCH 41/49] multi-process/mig: Enable VMSD save in the Proxy object

2019-11-13 Thread Daniel P . Berrangé
On Thu, Oct 24, 2019 at 05:09:22AM -0400, Jagannathan Raman wrote: > Collect the VMSD from remote process on the source and save > it to the channel leading to the destination > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > New patc

Re: [PATCH v2 1/2] nbd: Don't send oversize strings

2019-11-13 Thread Eric Blake
On 10/15/19 11:16 AM, Vladimir Sementsov-Ogievskiy wrote: @@ -1561,6 +1569,8 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset,    exp->export_bitmap = bm;    exp->export_bitmap_context = g_strdup_printf("qemu:dirty-bitmap:%s",    

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Sam Eiderman
Sorry the correct list (which includes ahci) is: git grep "drive_s * drive" src/hw/ahci.h:struct drive_s drive; src/hw/ata.h:struct drive_s drive; src/hw/esp-scsi.c:struct drive_s drive; src/hw/lsi-scsi.c:struct drive_s drive; src/hw/megasas.c:struct drive_s drive; src/hw/

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Daniel P . Berrangé
On Wed, Nov 13, 2019 at 10:38:06AM -0500, Jag Raman wrote: > > > On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: > > On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: > > > qemu_thread_cancel() added to destroy a given running thread. > > > This will be needed in the following pat

Re: [PATCH] spapr/kvm: Set default cpu model for all machine classes

2019-11-13 Thread Greg Kurz
On Wed, 13 Nov 2019 15:31:58 + Peter Maydell wrote: > On Wed, 13 Nov 2019 at 15:10, Greg Kurz wrote: > > David is away until the 19th of November, which is the release date > > of rc2 according to the planning [*]. Then we have rc3 the 26th, and > > final release (or rc4) the 3rd of December

Re: [RFC v4 PATCH 30/49] multi-process: send heartbeat messages to remote

2019-11-13 Thread Jag Raman
On 11/11/2019 11:27 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:11AM -0400, Jagannathan Raman wrote: +static void broadcast_msg(MPQemuMsg *msg, bool need_reply) +{ +PCIProxyDev *entry; +unsigned int pid; +int wait; + +QLIST_FOREACH(entry, &proxy_dev_list.devices,

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Jag Raman
On 11/13/2019 10:51 AM, Daniel P. Berrangé wrote: On Wed, Nov 13, 2019 at 10:38:06AM -0500, Jag Raman wrote: On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: qemu_thread_cancel() added to destroy a given running thread. This

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Philippe Mathieu-Daudé
Hi Sam, On 11/13/19 4:03 PM, Sam Eiderman wrote: Hi, Does this fix a bug that actually happened? I just noticed that in my lchs patches I assumed that lchs struct is zeroed out in all devices (not only ahci): 9caa19be0e53 (geometry: Apply LCHS values for boot devices) Seems like this is not

Re: [RFC v4 PATCH 09/49] multi-process: setup PCI host bridge for remote device

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:50AM -0400, Jagannathan Raman wrote: > +static void remote_host_realize(DeviceState *dev, Error **errp) > +{ > +PCIHostState *pci = PCI_HOST_BRIDGE(dev); > +RemPCIHost *s = REMOTE_HOST_DEVICE(dev); > + > +/* > + * TODO: the name of the bus would be prov

Re: [RFC v4 PATCH 32/49] multi-process: Use separate MMIO communication channel

2019-11-13 Thread Jag Raman
On 11/11/2019 11:21 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:13AM -0400, Jagannathan Raman wrote: Using a separate communication channel for MMIO helps with improving Performance Why? Typical initiation of IO operations involves multiple MMIO accesses per IO operation. In

Re: [RFC v4 PATCH 33/49] multi-process: perform device reset in the remote process

2019-11-13 Thread Jag Raman
On 11/11/2019 11:19 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:14AM -0400, Jagannathan Raman wrote: +void proxy_device_reset(DeviceState *dev) +{ +PCIProxyDev *pdev = PCI_PROXY_DEV(dev); +MPQemuMsg msg; + +memset(&msg, 0, sizeof(MPQemuMsg)); + +msg.bytestream = 0

Re: [RFC v4 PATCH 47/49] multi-process: Enable support for multiple devices in remote

2019-11-13 Thread Jag Raman
On 11/11/2019 11:15 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:28AM -0400, Jagannathan Raman wrote: @@ -93,7 +94,8 @@ static void process_config_write(MPQemuMsg *msg) struct conf_data_msg *conf = (struct conf_data_msg *)msg->data2; qemu_mutex_lock_iothread(); -

Re: [RFC v4 PATCH 10/49] multi-process: setup a machine object for remote device process

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:51AM -0400, Jagannathan Raman wrote: > +static NotifierList machine_init_done_notifiers = > +NOTIFIER_LIST_INITIALIZER(machine_init_done_notifiers); > + > +bool machine_init_done; > + > +void qemu_add_machine_init_done_notifier(Notifier *notify) > +{ > +notifie

  1   2   3   >