Re: [Qemu-devel] [PATCH v2 4/4] hw/core/machine: Officially deprecate the enforce-config-section parameter

2018-09-20 Thread Peter Xu
On Thu, Sep 20, 2018 at 10:50:16AM +0200, Thomas Huth wrote: > Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter > to the documentation, including a note that it is deprecated. But it > has never been added to the "Deprecated features" appendix, which is > our official way to

Re: [Qemu-devel] [PATCH v4 3/3] x86: define a new MSR based feature word -- FEATURE_WORDS_ARCH_CAPABILITIES

2018-09-20 Thread Robert Hoo
On Thu, 2018-09-20 at 14:18 -0300, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 05:55:48PM +0800, Robert Hoo wrote: > > On Thu, 2018-09-20 at 00:13 -0300, Eduardo Habkost wrote: > > > On Sun, Sep 02, 2018 at 07:46:07PM +0800, Robert Hoo wrote: > > > > Note RSBA is specially treated -- no

Re: [Qemu-devel] [PATCH] target/i386: fix translation for icount mode

2018-09-20 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 20/09/2018 09:17, Pavel Dovgalyuk wrote: > > This patch fixes the checking of boundary crossing instructions. > > In icount mode only first instruction of the block may cross > > the page boundary to keep the translation deterministic. > >

Re: [Qemu-devel] [PATCH v2] Drop "qemu:" prefix from error_report() arguments

2018-09-20 Thread David Gibson
On Thu, Sep 20, 2018 at 10:05:30PM -0400, Mao Zhongyi wrote: > error_report and friends already add a "qemu-system-xxx" prefix > to the string, so a "qemu:" prefix is redundant in the string. > Just drop it. > > Reported-by: Thomas Huth > Signed-off-by: Mao Zhongyi > Reviewed-by: Eduardo

Re: [Qemu-devel] [PATCH v4 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-09-20 Thread Eduardo Habkost
On Fri, Sep 21, 2018 at 08:28:24AM +0800, Robert Hoo wrote: > On Thu, 2018-09-20 at 14:22 -0300, Eduardo Habkost wrote: > > On Thu, Sep 20, 2018 at 03:45:42PM +0800, Robert Hoo wrote: > > [...] > > > > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > > > > > index a252c26..0160e97 100644 > >

Re: [Qemu-devel] [PATCH] target/ppc: fix dcbz, dcbzep, dcbtst and insn type

2018-09-20 Thread Peter Maydell
On 20 September 2018 at 02:34, Roman Kapl wrote: > dcbz was broken with the refactoring introduced in the External PID patch. The > GETPC() call is moved directly to the helper in this patch, to report correct > PC > address. The issue did not always manifest: if the compiler decided to inline >

Re: [Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread David Gibson
On Thu, Sep 20, 2018 at 07:08:32AM -0400, Mao Zhongyi wrote: > error_report and friends already add a "qemu-system-xxx" prefix > to the string, so a "qemu:" prefix is redundant in the string. > Just drop it. > > Reported-by: Thomas Huth > Signed-off-by: Mao Zhongyi ppc parts Acked-by: David

Re: [Qemu-devel] [PATCH] target/ppc: fix dcbz, dcbzep, dcbtst and insn type

2018-09-20 Thread David Gibson
On Thu, Sep 20, 2018 at 01:17:59PM +0200, Roman Kapl wrote: > On 09/20/2018 01:13 PM, Philippe Mathieu-Daudé wrote: > > > > > Fixes: ea8073c10d ("target/ppc: add external PID support") > > > > Your previous patch is now d12a22c5c7 in David Gibson's tree, so I think > > here squashing your fixes

Re: [Qemu-devel] [PATCH 0/5] 40p: LSI SCSI IRQ routing patch roll-up

2018-09-20 Thread David Gibson
On Thu, Sep 20, 2018 at 06:34:05AM +0100, Mark Cave-Ayland wrote: > On 20/09/2018 05:26, Peter Maydell wrote: > > > On 19 September 2018 at 19:55, David Gibson > > wrote: > >> On Wed, Sep 19, 2018 at 06:20:56PM +0100, Mark Cave-Ayland wrote: > >>> Here is the final set of 40p LSI SCSI routing

Re: [Qemu-devel] [PATCH 0/5] 40p: LSI SCSI IRQ routing patch roll-up

2018-09-20 Thread David Gibson
On Wed, Sep 19, 2018 at 09:26:33PM -0700, Peter Maydell wrote: > On 19 September 2018 at 19:55, David Gibson > wrote: > > On Wed, Sep 19, 2018 at 06:20:56PM +0100, Mark Cave-Ayland wrote: > >> Here is the final set of 40p LSI SCSI routing patches with reviewer tags > >> rebased upon ppc-for-3.1

Re: [Qemu-devel] [PATCH] target/ppc: fix dcbz, dcbzep, dcbtst and insn type

2018-09-20 Thread David Gibson
On Fri, Sep 21, 2018 at 10:55:56AM +1000, David Gibson wrote: > On Thu, Sep 20, 2018 at 01:17:59PM +0200, Roman Kapl wrote: > > On 09/20/2018 01:13 PM, Philippe Mathieu-Daudé wrote: > > > > > > > Fixes: ea8073c10d ("target/ppc: add external PID support") > > > > > > Your previous patch is now

Re: [Qemu-devel] [RFC v2 8/8] virtio: guest driver reload for vhost-net

2018-09-20 Thread Jason Wang
On 2018年09月21日 04:39, Maxime Coquelin wrote: Hi Wei, Jason, On 06/19/2018 09:53 AM, Wei Xu wrote: On Wed, Jun 06, 2018 at 11:48:19AM +0800, Jason Wang wrote: On 2018å¹´06月06æ—¥ 03:08, w...@redhat.com wrote: From: Wei Xu last_avail, avail_wrap_count, used_idx and used_wrap_count are

[Qemu-devel] [PATCH v2] Drop "qemu:" prefix from error_report() arguments

2018-09-20 Thread Mao Zhongyi
error_report and friends already add a "qemu-system-xxx" prefix to the string, so a "qemu:" prefix is redundant in the string. Just drop it. Reported-by: Thomas Huth Signed-off-by: Mao Zhongyi Reviewed-by: Eduardo Habkost --- hw/i386/multiboot.c | 8 hw/ppc/e500.c | 4 ++--

Re: [Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread Mao Zhongyi
On 9/20/18 1:34 PM, Eduardo Habkost wrote: On Thu, Sep 20, 2018 at 07:08:32AM -0400, Mao Zhongyi wrote: error_report and friends already add a "qemu-system-xxx" prefix to the string, so a "qemu:" prefix is redundant in the string. Just drop it. Reported-by: Thomas Huth Signed-off-by: Mao

Re: [Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread Mao Zhongyi
On 9/20/18 1:39 PM, Peter Maydell wrote: if (flags & 0x0004) { /* MULTIBOOT_HEADER_HAS_VBE */ -error_report("qemu: multiboot knows VBE. we don't."); +error_report("multiboot knows VBE. we don't."); Since this one is intended to be a user-facing error message rather

Re: [Qemu-devel] [PATCH RFC v3 7/7] qemu_thread_create: propagate the error to callers to handle

2018-09-20 Thread Fam Zheng
On Thu, 09/20 18:19, Fei Li wrote: > > > On 09/19/2018 11:51 PM, Fam Zheng wrote: > > On Wed, 09/19 21:35, Fei Li wrote: > > > Make qemu_thread_create() return a Boolean to indicate if it succeeds > > > rather than failing with an error. And add an Error parameter to hold > > > the error message

Re: [Qemu-devel] [PATCH v4 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-09-20 Thread Robert Hoo
On Thu, 2018-09-20 at 14:22 -0300, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 03:45:42PM +0800, Robert Hoo wrote: > [...] > > > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > > > > index a252c26..0160e97 100644 > > > > --- a/target/i386/cpu.c > > > > +++ b/target/i386/cpu.c > > > >

Re: [Qemu-devel] [RFC v2 0/2] Add BPF suuport to Qemu

2018-09-20 Thread Alex Bennée
Sameeh Jubran writes: > From: Sameeh Jubran > > The Berkeley Packet Filter has been in the kernel for a while now and I > think it is time that it is introduced to Qemu. This patch is an > infrastructure for any future usage of the BPF in Qemu. > > It is important to note that the tun driver

Re: [Qemu-devel] [PATCH v5 6/8] target/mips: Define the R5900 CPU

2018-09-20 Thread Maciej W. Rozycki
Hi Philippe, > > diff --git a/target/mips/translate_init.inc.c > > b/target/mips/translate_init.inc.c > > index b3320b9dc7..71fd83de06 100644 > > --- a/target/mips/translate_init.inc.c > > +++ b/target/mips/translate_init.inc.c > > @@ -410,6 +410,53 @@ const mips_def_t mips_defs[] = > >

Re: [Qemu-devel] [PATCH 1/2] Bootstrap Python venv for tests

2018-09-20 Thread Philippe Mathieu-Daudé
Hi Cleber, On 9/20/18 5:19 PM, Cleber Rosa wrote: > A number of QEMU tests are written in Python, and may benefit > from an untainted Python venv. > > By using make rules, tests that depend on specific Python libs > can set that rule as a requiment, along with rules that require > the presence

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Philippe Mathieu-Daudé
On 9/21/18 12:06 AM, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 11:18:46PM +0200, Philippe Mathieu-Daudé wrote: >> On 9/20/18 10:14 PM, Eduardo Habkost wrote: >>> On Thu, Sep 20, 2018 at 04:00:27PM -0400, Cleber Rosa wrote: On 9/20/18 2:58 PM, Eduardo Habkost wrote: > On Thu, Sep

Re: [Qemu-devel] [PATCH v5 6/8] target/mips: Define the R5900 CPU

2018-09-20 Thread Philippe Mathieu-Daudé
Hi Fredrik, On 9/15/18 11:50 AM, Fredrik Noring wrote: > The primary purpose of this change is to support programs compiled by > GCC for the R5900 target and thereby run R5900 Linux distributions, for > example Gentoo. In particular, this avoids issues with cross compilation. > > This change has

[Qemu-devel] virtio-vhost-user with virtio-scsi: end-to-end setup

2018-09-20 Thread Nikos Dragazis
Dear Stefan, I hope you are the right person to contact about this, please point me to the right direction otherwise. I am also Cc:ing the SPDK and qemu-devel mailing lists, to solicit community feedback. As part of my internship at Arrikto, I have spent the last few months working on the SPDK

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 11:18:46PM +0200, Philippe Mathieu-Daudé wrote: > On 9/20/18 10:14 PM, Eduardo Habkost wrote: > > On Thu, Sep 20, 2018 at 04:00:27PM -0400, Cleber Rosa wrote: > >> On 9/20/18 2:58 PM, Eduardo Habkost wrote: > >>> On Thu, Sep 20, 2018 at 11:19:56AM -0400, Cleber Rosa wrote:

[Qemu-devel] [Bug 1793608] [NEW] qemu doesn't seem to support lxvwsx for POWER9 target

2018-09-20 Thread Sergey Evlashev
Public bug reported: When running a simple program built for POWER9 on QEMU 3.0.0 in linux- user mode, it crashes with a message: "illegal instruction". It turns out that lxvwsx instruction "Load Word and Splat Indexed" is not supported. If workaround is implemented by issuing two separate

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Philippe Mathieu-Daudé
On 9/20/18 10:14 PM, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 04:00:27PM -0400, Cleber Rosa wrote: >> On 9/20/18 2:58 PM, Eduardo Habkost wrote: >>> On Thu, Sep 20, 2018 at 11:19:56AM -0400, Cleber Rosa wrote: The acceptance (aka functional, aka Avocado-based) tests are Python

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Cleber Rosa
On 9/20/18 4:14 PM, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 04:00:27PM -0400, Cleber Rosa wrote: >> >> >> On 9/20/18 2:58 PM, Eduardo Habkost wrote: >>> On Thu, Sep 20, 2018 at 11:19:56AM -0400, Cleber Rosa wrote: The acceptance (aka functional, aka Avocado-based) tests are

Re: [Qemu-devel] [RFC v2 8/8] virtio: guest driver reload for vhost-net

2018-09-20 Thread Maxime Coquelin
Hi Wei, Jason, On 06/19/2018 09:53 AM, Wei Xu wrote: On Wed, Jun 06, 2018 at 11:48:19AM +0800, Jason Wang wrote: On 2018年06月06日 03:08, w...@redhat.com wrote: From: Wei Xu last_avail, avail_wrap_count, used_idx and used_wrap_count are needed to support vhost-net backend, all these are

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 04:00:27PM -0400, Cleber Rosa wrote: > > > On 9/20/18 2:58 PM, Eduardo Habkost wrote: > > On Thu, Sep 20, 2018 at 11:19:56AM -0400, Cleber Rosa wrote: > >> The acceptance (aka functional, aka Avocado-based) tests are > >> Python files located in "tests/acceptance" that

Re: [Qemu-devel] [PATCH 00/35] exec: drop BQL from interrupt handling

2018-09-20 Thread Mark Cave-Ayland
On 17/09/2018 17:30, Emilio G. Cota wrote: > This series comes originally from a series of patches that Paolo > sent to me a long time ago. I have kept most of his S-o-b tags, > but I have done the forward port of the patches to the current > QEMU code base, so please blame all possible bugs on

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Cleber Rosa
On 9/20/18 2:58 PM, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 11:19:56AM -0400, Cleber Rosa wrote: >> The acceptance (aka functional, aka Avocado-based) tests are >> Python files located in "tests/acceptance" that need to be run >> with the Avocado libs and test runner. >> >> Let's

Re: [Qemu-devel] [PATCH v2 5/6] qapi: add block-dirty-bitmap-merge

2018-09-20 Thread Eric Blake
[reviving an old patch] On 1/16/18 6:54 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 38 ++ include/block/dirty-bitmap.h | 2 ++ block/dirty-bitmap.c | 18

Re: [Qemu-devel] [PATCH] sm501: Adjust endianness of pixel value in rectangle fill

2018-09-20 Thread BALATON Zoltan
On Wed, 19 Sep 2018, Marcus Comstedt wrote: BALATON Zoltan writes: Thanks for testing on big endian host and fixing this bug. Have you also tried KVM? That would be interesting but I think it may have problems currently and maybe only PR KVM would work as it need to emulate PPC440 on server

Re: [Qemu-devel] Wanted: reviewers for english style and grammar

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 01:57:34PM -0500, Eric Blake wrote: > On 9/20/18 1:45 PM, Eduardo Habkost wrote: > > When reviewing some patches that touch documentation or error > > messages, I often think we could improve readability, but I don't > > trust my english skills completely when suggesting

Re: [Qemu-devel] [PATCH v2 0/2] qemu-error: advanced report_once handling

2018-09-20 Thread Markus Armbruster
Cornelia Huck writes: > [Markus: I've decided to not include your R-b, as I did too many changes > to feel comfortable with that.] > > [Also note that I'm about to disappear on vacation, so don't expect > quick responses. I just want to get it out before I forget about it.] > > Based on previous

Re: [Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Sep 20, 2018 at 07:08:32AM -0400, Mao Zhongyi wrote: >> error_report and friends already add a "qemu-system-xxx" prefix >> to the string, so a "qemu:" prefix is redundant in the string. >> Just drop it. >> >> Reported-by: Thomas Huth >> Signed-off-by: Mao

Re: [Qemu-devel] [PATCH v2 2/2] qemu-error: make use of {error, warn}_report_once_cond

2018-09-20 Thread Markus Armbruster
Cornelia Huck writes: > On Fri, 31 Aug 2018 08:01:39 +0200 > Markus Armbruster wrote: > >> Cornelia Huck writes: >> >> > {error,warn}_report_once() are a special case of the new functions >> > and can simply switch to them. >> > >> > Signed-off-by: Cornelia Huck >> > --- >> >

Re: [Qemu-devel] [PATCH v5 0/8] target/mips: Support R5900 GCC programs in user mode

2018-09-20 Thread Aleksandar Markovic
> From: Fredrik Noring > Sent: Wednesday, September 19, 2018 7:48 PM Fredrik, first of all, many thanks for your efforts. There is a visible progress in the way you create, organize, and present the changes you devised. However, I will be mainly expressing criticism in this mail, but this

Re: [Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 11:19:56AM -0400, Cleber Rosa wrote: > The acceptance (aka functional, aka Avocado-based) tests are > Python files located in "tests/acceptance" that need to be run > with the Avocado libs and test runner. > > Let's provide a convenient way for QEMU developers to run them,

Re: [Qemu-devel] Wanted: reviewers for english style and grammar

2018-09-20 Thread Eric Blake
On 9/20/18 1:45 PM, Eduardo Habkost wrote: When reviewing some patches that touch documentation or error messages, I often think we could improve readability, but I don't trust my english skills completely when suggesting improvements. I wonder if we could find a group of people that would

[Qemu-devel] Wanted: reviewers for english style and grammar

2018-09-20 Thread Eduardo Habkost
When reviewing some patches that touch documentation or error messages, I often think we could improve readability, but I don't trust my english skills completely when suggesting improvements. I wonder if we could find a group of people that would volunteer to be listed on MAINTAINERS as willing

Re: [Qemu-devel] [PATCH] Deprecate QMP `cpu-add`

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 02:27:02PM +0200, Markus Armbruster wrote: > Kashyap Chamarthy writes: [...] > > --- > > qapi/misc.json | 6 +- > > qemu-deprecated.texi | 5 + > > 2 files changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/qapi/misc.json b/qapi/misc.json > >

Re: [Qemu-devel] [PATCH v2 3/4] net/slirp: Deprecate the [hub_id name] parameter tuple

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > The "name" in the [hub_id name] parameter tuple is the same as a > "netdev_id" (which should be unique), so specifying the hub_id here > is just redundant (it was likely just necessary in the past when > the network subsystem was still using "vlans" only and when it did >

Re: [Qemu-devel] [PATCH v2 2/4] net: Deprecate the "name" parameter of -net

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > In early times, network backends were specified by a "vlan" and "name" > tuple. With the introduction of netdevs, the "name" was replaced by an > "id" (which is supposed to be unique), but the "name" parameter stayed > as an alias which could be used instead of "id".

Re: [Qemu-devel] [PATCH v2 1/4] Makefile: Add missing dependency for qemu-deprecated.texi

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > Make sure that the docs get correctly regenerated when the > file qemu-deprecated.texi has been changed. > > Fixes: 44c67847e32c91a6071fb0440c357b9489f08bc6 > Signed-off-by: Thomas Huth > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [Qemu-devel] [PATCH v2 4/4] hw/core/machine: Officially deprecate the enforce-config-section parameter

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter > to the documentation, including a note that it is deprecated. But it > has never been added to the "Deprecated features" appendix, which is > our official way to deprecate legacy parameters. So let's do

Re: [Qemu-devel] [PATCH] qdev: fix a typo in comment

2018-09-20 Thread Markus Armbruster
Could be merged via qemu-trivial (cc'ed). Li Qiang writes: > Found by reading code. > > Signed-off-by: Li Qiang > --- > hw/core/qdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > index 529b82de18..7e4bfcb8f7 100644 > ---

Re: [Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread Peter Maydell
On 20 September 2018 at 10:34, Eduardo Habkost wrote: > On Thu, Sep 20, 2018 at 07:08:32AM -0400, Mao Zhongyi wrote: >> error_report and friends already add a "qemu-system-xxx" prefix >> to the string, so a "qemu:" prefix is redundant in the string. >> Just drop it. >> >> Reported-by: Thomas Huth

Re: [Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 07:08:32AM -0400, Mao Zhongyi wrote: > error_report and friends already add a "qemu-system-xxx" prefix > to the string, so a "qemu:" prefix is redundant in the string. > Just drop it. > > Reported-by: Thomas Huth > Signed-off-by: Mao Zhongyi Reviewed-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH v4 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 03:45:42PM +0800, Robert Hoo wrote: [...] > > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > > > index a252c26..0160e97 100644 > > > --- a/target/i386/cpu.c > > > +++ b/target/i386/cpu.c > > > @@ -3670,7 +3670,7 @@ static uint32_t > > >

Re: [Qemu-devel] [PATCH v4 3/3] x86: define a new MSR based feature word -- FEATURE_WORDS_ARCH_CAPABILITIES

2018-09-20 Thread Eduardo Habkost
On Thu, Sep 20, 2018 at 05:55:48PM +0800, Robert Hoo wrote: > On Thu, 2018-09-20 at 00:13 -0300, Eduardo Habkost wrote: > > On Sun, Sep 02, 2018 at 07:46:07PM +0800, Robert Hoo wrote: > > > Note RSBA is specially treated -- no matter host support it or not, > > > qemu > > > pretends it is

[Qemu-devel] [PATCH] Add "boot_linux" acceptance test

2018-09-20 Thread Cleber Rosa
This acceptance test, validates that a full blown Linux guest can successfully boot in QEMU. In this specific case, the guest chosen is Fedora version 28. By passing parameters, the same test can attempt to boot different distros, arches, etc. The method for checking the successfull boot is

[Qemu-devel] [PATCH v3 16/19] test-bdrv-drain: AIO_WAIT_WHILE() in job .commit/.abort

2018-09-20 Thread Kevin Wolf
This adds tests for calling AIO_WAIT_WHILE() in the .commit and .abort callbacks. Both reasons why .abort could be called for a single job are tested: Either .run or .prepare could return an error. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/test-bdrv-drain.c | 116

Re: [Qemu-devel] [PATCH] RFC: mark non-volatile memory region

2018-09-20 Thread Michael S. Tsirkin
On Thu, Sep 20, 2018 at 07:17:30PM +0400, Marc-André Lureau wrote: > This is RFC patch to show how NVDIMM could set a flag on the > MemoryRegion that would be propagated down to the flat view. > > This way, guest_phys_blocks_region_add() can skip the NV memory > regions for dumps and TCG memory

[Qemu-devel] [PATCH v3 19/19] test-bdrv-drain: Test draining job source child and parent

2018-09-20 Thread Kevin Wolf
For the block job drain test, don't only test draining the source and the target node, but create a backing chain for the source (source_backing <- source <- source_overlay) and test draining each of the nodes in it. When using iothreads, the source node (and therefore the job) is in a different

Re: [Qemu-devel] [PATCH v3 11/19] block-backend: Decrease in_flight only after callback

2018-09-20 Thread Paolo Bonzini
On 20/09/2018 18:19, Kevin Wolf wrote: > Request callbacks can do pretty much anything, including operations that > will yield from the coroutine (such as draining the backend). In that > case, a decreased in_flight would be visible to other code and could > lead to a drain completing while the

[Qemu-devel] [PATCH v3 10/19] block-backend: Fix potential double blk_delete()

2018-09-20 Thread Kevin Wolf
blk_unref() first decreases the refcount of the BlockBackend and calls blk_delete() if the refcount reaches zero. Requests can still be in flight at this point, they are only drained during blk_delete(): At this point, arbitrary callbacks can run. If any callback takes a temporary BlockBackend

[Qemu-devel] [PATCH v3 18/19] block: Use a single global AioWait

2018-09-20 Thread Kevin Wolf
When draining a block node, we recurse to its parent and for subtree drains also to its children. A single AIO_WAIT_WHILE() is then used to wait for bdrv_drain_poll() to become true, which depends on all of the nodes we recursed to. However, if the respective child or parent becomes quiescent and

[Qemu-devel] [PATCH v3 15/19] job: Avoid deadlocks in job_completed_txn_abort()

2018-09-20 Thread Kevin Wolf
Amongst others, job_finalize_single() calls the .prepare/.commit/.abort callbacks of the individual job driver. Recently, their use was adapted for all block jobs so that they involve code calling AIO_WAIT_WHILE() now. Such code must be called under the AioContext lock for the respective job, but

[Qemu-devel] [PATCH v3 07/19] test-bdrv-drain: Test AIO_WAIT_WHILE() in completion callback

2018-09-20 Thread Kevin Wolf
This is a regression test for a deadlock that occurred in block job completion callbacks (via job_defer_to_main_loop) because the AioContext lock was taken twice: once in job_finish_sync() and then again in job_defer_to_main_loop_bh(). This would cause AIO_WAIT_WHILE() to hang. Signed-off-by:

[Qemu-devel] [PATCH v3 12/19] blockjob: Lie better in child_job_drained_poll()

2018-09-20 Thread Kevin Wolf
Block jobs claim in .drained_poll() that they are in a quiescent state as soon as job->deferred_to_main_loop is true. This is obviously wrong, they still have a completion BH to run. We only get away with this because commit 91af091f923 added an unconditional aio_poll(false) to the drain

[Qemu-devel] [PATCH v3 17/19] test-bdrv-drain: Fix outdated comments

2018-09-20 Thread Kevin Wolf
Commit 89bd030533e changed the test case from using job_sleep_ns() to using qemu_co_sleep_ns() instead. Also, block_job_sleep_ns() became job_sleep_ns() in commit 5d43e86e11f. In both cases, some comments in the test case were not updated. Do that now. Reported-by: Max Reitz Signed-off-by:

[Qemu-devel] [PATCH v3 13/19] block: Remove aio_poll() in bdrv_drain_poll variants

2018-09-20 Thread Kevin Wolf
bdrv_drain_poll_top_level() was buggy because it didn't release the AioContext lock of the node to be drained before calling aio_poll(). This way, callbacks called by aio_poll() would possibly take the lock a second time and run into a deadlock with a nested AIO_WAIT_WHILE() call. However, it

[Qemu-devel] [PATCH v3 06/19] job: Use AIO_WAIT_WHILE() in job_finish_sync()

2018-09-20 Thread Kevin Wolf
job_finish_sync() needs to release the AioContext lock of the job before calling aio_poll(). Otherwise, callbacks called by aio_poll() would possibly take the lock a second time and run into a deadlock with a nested AIO_WAIT_WHILE() call. Also, job_drain() without aio_poll() isn't necessarily

[Qemu-devel] [PATCH v3 09/19] block-backend: Add .drained_poll callback

2018-09-20 Thread Kevin Wolf
A bdrv_drain operation must ensure that all parents are quiesced, this includes BlockBackends. Otherwise, callbacks called by requests that are completed on the BDS layer, but not quite yet on the BlockBackend layer could still create new requests. Signed-off-by: Kevin Wolf Reviewed-by: Fam

[Qemu-devel] [PATCH v3 14/19] test-bdrv-drain: Test nested poll in bdrv_drain_poll_top_level()

2018-09-20 Thread Kevin Wolf
This is a regression test for a deadlock that could occur in callbacks called from the aio_poll() in bdrv_drain_poll_top_level(). The AioContext lock wasn't released and therefore would be taken a second time in the callback. This would cause a possible AIO_WAIT_WHILE() in the callback to hang.

[Qemu-devel] [PATCH v3 04/19] test-bdrv-drain: Drain with block jobs in an I/O thread

2018-09-20 Thread Kevin Wolf
This extends the existing drain test with a block job to include variants where the block job runs in a different AioContext. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng --- tests/test-bdrv-drain.c | 92 + 1 file changed, 86 insertions(+), 6

[Qemu-devel] [PATCH v3 11/19] block-backend: Decrease in_flight only after callback

2018-09-20 Thread Kevin Wolf
Request callbacks can do pretty much anything, including operations that will yield from the coroutine (such as draining the backend). In that case, a decreased in_flight would be visible to other code and could lead to a drain completing while the callback hasn't actually completed yet.

[Qemu-devel] [PATCH v3 08/19] block: Add missing locking in bdrv_co_drain_bh_cb()

2018-09-20 Thread Kevin Wolf
bdrv_do_drained_begin/end() assume that they are called with the AioContext lock of bs held. If we call drain functions from a coroutine with the AioContext lock held, we yield and schedule a BH to move out of coroutine context. This means that the lock for the home context of the coroutine is

[Qemu-devel] [PATCH v3 03/19] aio-wait: Increase num_waiters even in home thread

2018-09-20 Thread Kevin Wolf
Even if AIO_WAIT_WHILE() is called in the home context of the AioContext, we still want to allow the condition to change depending on other threads as long as they kick the AioWait. Specfically block jobs can be running in an I/O thread and should then be able to kick a drain in the main loop

[Qemu-devel] [PATCH v3 00/19] Fix some jobs/drain/aio_poll related hangs

2018-09-20 Thread Kevin Wolf
Especially the combination of iothreads, block jobs and drain tends to lead to hangs currently. This series fixes a few of these bugs, although there are more of them, to be addressed in separate patches. The primary goal of this series is to fix the scenario from:

[Qemu-devel] [PATCH v3 02/19] blockjob: Wake up BDS when job becomes idle

2018-09-20 Thread Kevin Wolf
In the context of draining a BDS, the .drained_poll callback of block jobs is called. If this returns true (i.e. there is still some activity pending), the drain operation may call aio_poll() with blocking=true to wait for completion. As soon as the pending activity is completed and the job

[Qemu-devel] [PATCH v3 05/19] test-blockjob: Acquire AioContext around job_cancel_sync()

2018-09-20 Thread Kevin Wolf
All callers in QEMU proper hold the AioContext lock when calling job_finish_sync(). test-blockjob should do the same when it calls the function indirectly through job_cancel_sync(). Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng --- include/qemu/job.h| 6 ++ tests/test-blockjob.c | 6

[Qemu-devel] [PATCH v3 01/19] job: Fix missing locking due to mismerge

2018-09-20 Thread Kevin Wolf
job_completed() had a problem with double locking that was recently fixed independently by two different commits: "job: Fix nested aio_poll() hanging in job_txn_apply" "jobs: add exit shim" One fix removed the first aio_context_acquire(), the other fix removed the other one. Now we have a bug

Re: [Qemu-devel] [PULL 6/7] monitor: move init global earlier

2018-09-20 Thread Markus Armbruster
Wolfgang Bumiller writes: > On Thu, Sep 20, 2018 at 04:10:00PM +0800, Peter Xu wrote: >> On Thu, Sep 20, 2018 at 10:02:22AM +0200, Wolfgang Bumiller wrote: >> >> > Either way, spawning the iothread on demand can still make sense, as >> > does updating the check in resume()/suspend(). >> >>

Re: [Qemu-devel] [PULL 6/7] monitor: move init global earlier

2018-09-20 Thread Markus Armbruster
Wolfgang Bumiller writes: > On Thu, Sep 20, 2018 at 04:10:00PM +0800, Peter Xu wrote: >> On Thu, Sep 20, 2018 at 10:02:22AM +0200, Wolfgang Bumiller wrote: >> > On Thu, Sep 20, 2018 at 10:59:56AM +0800, Peter Xu wrote: >> > > On Wed, Sep 19, 2018 at 04:58:06PM +0200, Wolfgang Bumiller wrote: >>

[Qemu-devel] [PATCH 2/2] Acceptance tests: add make rule for running them

2018-09-20 Thread Cleber Rosa
The acceptance (aka functional, aka Avocado-based) tests are Python files located in "tests/acceptance" that need to be run with the Avocado libs and test runner. Let's provide a convenient way for QEMU developers to run them, by making use of the tests-venv with the required setup. Also, while

[Qemu-devel] [PATCH 1/2] Bootstrap Python venv for tests

2018-09-20 Thread Cleber Rosa
A number of QEMU tests are written in Python, and may benefit from an untainted Python venv. By using make rules, tests that depend on specific Python libs can set that rule as a requiment, along with rules that require the presence or installation of specific libraries. The

[Qemu-devel] [PATCH] Bootstrap Python venv and acceptance/functional tests

2018-09-20 Thread Cleber Rosa
TL;DR = Allow acceptance tests to be run with `make check-acceptance`. Details === This introduces a Python virtual environment that will be setup within the QEMU build directory, that will contain the exact environment that tests may require. There's one current caveat: it requires

[Qemu-devel] [PATCH] RFC: mark non-volatile memory region

2018-09-20 Thread Marc-André Lureau
This is RFC patch to show how NVDIMM could set a flag on the MemoryRegion that would be propagated down to the flat view. This way, guest_phys_blocks_region_add() can skip the NV memory regions for dumps and TCG memory clear. qemu-system-x86_64 -machine pc,nvdimm -m 2G,slots=4,maxmem=16G

[Qemu-devel] 64-bit MMIO aperture expansion

2018-09-20 Thread Laszlo Ersek
Hi Marcel, this email should actually be an RFC patch. But RFC patches tend to turn into real PATCHes (if the submitter is lucky, that is), and I can't really promise sending multiple versions of a PATCH at this time. So please consider this a "maybe bug report". In commit 9fa99d2519cb

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-20 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Thu, 20 Sep 2018 10:20:49 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Eduardo Habkost (ehabk...@redhat.com) wrote: > > > On Wed, Sep 19, 2018 at 08:15:25PM +0100, Dr. David Alan Gilbert wrote: > > > > * Igor Mammedov (imamm...@redhat.com)

[Qemu-devel] [Bug 1793539] [NEW] qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6003ddc5

2018-09-20 Thread Andreas Schwab
Public bug reported: During the build of gedit for RISC-V this error occurs: $ qemu-riscv64 -E LD_LIBRARY_PATH=gedit/.libs ./gedit/.libs/gedit qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6003ddc5 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x69e4

Re: [Qemu-devel] [RFC v2 2/8] virtio: memory cache for packed ring

2018-09-20 Thread Maxime Coquelin
On 06/05/2018 09:07 PM, w...@redhat.com wrote: From: Wei Xu Mostly reuse memory cache with 1.0 except for the offset calculation. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2 2/2] qemu-error: make use of {error, warn}_report_once_cond

2018-09-20 Thread Cornelia Huck
On Fri, 31 Aug 2018 08:01:39 +0200 Markus Armbruster wrote: > Cornelia Huck writes: > > > {error,warn}_report_once() are a special case of the new functions > > and can simply switch to them. > > > > Signed-off-by: Cornelia Huck > > --- > > include/qemu/error-report.h | 34

Re: [Qemu-devel] Freeze / spin in virtio blk...flatview do translate

2018-09-20 Thread Frank Yang via Qemu-devel
(Not reproducible locally) On Thu, Sep 20, 2018 at 7:16 AM Frank Yang wrote: > I have added more logging code and it seems that there is a hang that > happens with 4096 MB RAM on Mac in virtio_blk_handle_vq: > > #define VIRTIO_BLK_UNUSUAL_ITER_COUNT 1024 > > bool

Re: [Qemu-devel] Freeze / spin in virtio blk...flatview do translate

2018-09-20 Thread Frank Yang via Qemu-devel
I have added more logging code and it seems that there is a hang that happens with 4096 MB RAM on Mac in virtio_blk_handle_vq: #define VIRTIO_BLK_UNUSUAL_ITER_COUNT 1024 bool virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq) { VirtIOBlockReq *req; MultiReqBuffer mrb = {}; bool

Re: [Qemu-devel] [RFC v2 6/8] virtio: flush/push for packed ring

2018-09-20 Thread Maxime Coquelin
On 06/05/2018 09:08 PM, w...@redhat.com wrote: From: Wei Xu Signed-off-by: Wei Xu Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 109 ++--- 1 file changed, 96 insertions(+), 13 deletions(-) diff --git a/hw/virtio/virtio.c

Re: [Qemu-devel] [PATCH v2 1/2] qemu-error: add {error, warn}_report_once_cond

2018-09-20 Thread Cornelia Huck
On Fri, 31 Aug 2018 07:57:24 +0200 Markus Armbruster wrote: > Cornelia Huck writes: > > > Add two functions to print an error/warning report once depending > > on a passed-in condition variable and flip it if printed. This is > > useful if you want to print a message not once-globally, but

Re: [Qemu-devel] [PATCH] target/i386: fix translation for icount mode

2018-09-20 Thread Paolo Bonzini
On 20/09/2018 09:17, Pavel Dovgalyuk wrote: > This patch fixes the checking of boundary crossing instructions. > In icount mode only first instruction of the block may cross > the page boundary to keep the translation deterministic. > These conditions already existed, but compared the wrong

Re: [Qemu-devel] [RFC-PATCH V2] hw/pci/pci_example.c : Added a new pci example device

2018-09-20 Thread Cornelia Huck
On Wed, 5 Sep 2018 12:38:00 +0300 Yoni Bettan wrote: > The main goal is to add 2 example devices to be used as templates or guideline > for contributors when they wish to create a new device, the first is a PCI > device and the second will be a VirtIO device. > > Those devices may be compiled

Re: [Qemu-devel] [RFC PATCH 1/1] memory: Support unaligned accesses on aligned-only models

2018-09-20 Thread Andrew Jeffery
On Thu, 20 Sep 2018, at 21:43, Cédric Le Goater wrote: > Andrew, > > On 07/14/2017 08:20 AM, Andrew Jeffery wrote: > > Hi Paolo, > > > > Thanks for taking a look! > > > > On Thu, 2017-07-13 at 14:05 +0200, Paolo Bonzini wrote: > >> On 30/06/2017 05:00, Andrew Jeffery wrote: > >>> This RFC patch

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-20 Thread Laszlo Ersek
On 09/20/18 15:20, Igor Mammedov wrote: > On Thu, 20 Sep 2018 10:20:49 +0100 > "Dr. David Alan Gilbert" wrote: > >> * Eduardo Habkost (ehabk...@redhat.com) wrote: >>> On Wed, Sep 19, 2018 at 08:15:25PM +0100, Dr. David Alan Gilbert wrote: * Igor Mammedov (imamm...@redhat.com) wrote:

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-20 Thread Igor Mammedov
On Thu, 20 Sep 2018 10:20:49 +0100 "Dr. David Alan Gilbert" wrote: > * Eduardo Habkost (ehabk...@redhat.com) wrote: > > On Wed, Sep 19, 2018 at 08:15:25PM +0100, Dr. David Alan Gilbert wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > > On Wed, 19 Sep 2018 13:14:05 +0100 > > >

Re: [Qemu-devel] [PATCH] Deprecate QMP `cpu-add`

2018-09-20 Thread Kashyap Chamarthy
On Thu, Sep 20, 2018 at 02:27:02PM +0200, Markus Armbruster wrote: > Kashyap Chamarthy writes: [...] > When I try this, JSON gets formatted slightly differently: > > { > "execute": "query-hotpluggable-cpus", > "arguments": {} > } > { > "return": [ >

[Qemu-devel] [PATCH] Drop the "qemu:" prefix from error_report()

2018-09-20 Thread Mao Zhongyi
error_report and friends already add a "qemu-system-xxx" prefix to the string, so a "qemu:" prefix is redundant in the string. Just drop it. Reported-by: Thomas Huth Signed-off-by: Mao Zhongyi --- hw/i386/multiboot.c | 8 hw/ppc/e500.c | 4 ++-- hw/ppc/sam460ex.c | 8

Re: [Qemu-devel] [PATCH] Deprecate QMP `cpu-add`

2018-09-20 Thread Markus Armbruster
Kashyap Chamarthy writes: > The intended functionality of QMP command `cpu-add` is replaced by > `device_add` (and `query-hotpluggable-cpus`). So let's deprecate > `cpu-add`. > > A complete example of vCPU hotplug with the recommended way, using > `device_add`: > > (1) Launch QEMU as follows

Re: [Qemu-devel] [PATCH] tcg/i386: fix vector operations on 32-bit hosts

2018-09-20 Thread Roman Kapl
Hi, On 09/20/2018 02:19 PM, Philippe Mathieu-Daudé wrote: On 8/24/18 3:17 PM, Roman Kapl wrote: The TCG backend uses LOWREGMASK to get the low 7 bits of register numbers. This 7 = 0b111: the low 3 bits? Yes, low 3 bits, 8 registers, the commit message is wrong. Thanks, Roman Kapl

Re: [Qemu-devel] [PATCH] tcg/i386: fix vector operations on 32-bit hosts

2018-09-20 Thread Philippe Mathieu-Daudé
On 8/24/18 3:17 PM, Roman Kapl wrote: > The TCG backend uses LOWREGMASK to get the low 7 bits of register numbers. > This 7 = 0b111: the low 3 bits? > was defined as no-op for 32-bit x86, with the assumption that we have eight > registers anyway. This assumption is not true once we have xmm

Re: [Qemu-devel] [RFC PATCH 1/1] memory: Support unaligned accesses on aligned-only models

2018-09-20 Thread Cédric Le Goater
Andrew, On 07/14/2017 08:20 AM, Andrew Jeffery wrote: > Hi Paolo, > > Thanks for taking a look! > > On Thu, 2017-07-13 at 14:05 +0200, Paolo Bonzini wrote: >> On 30/06/2017 05:00, Andrew Jeffery wrote: >>> This RFC patch stems from a discussion on a patch for an ADC model[1] where >>> it >>>

  1   2   >