Re: [Qemu-devel] [RFC v4 08/13] ide: enumerate_slots implementation

2017-08-18 Thread Eduardo Habkost
On Wed, Aug 16, 2017 at 05:46:18PM -0400, John Snow wrote: > > > On 08/14/2017 05:57 PM, Eduardo Habkost wrote: > > Example output when using "-machine q35": > > > > { > > "available": true, > > "count": 1, > > "device-types": [ > > "ide-device" > > ], > >

Re: [Qemu-devel] [PATCH 1/4] net: move CRC32 calculation from compute_mcast_idx() into its own net_crc32() function

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 01:51 PM, Philippe Mathieu-Daudé wrote: On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: Separate out the standard ethernet CRC32 calculation into a new net_crc32() function, renaming the constant POLYNOMIAL to POLYNOMIAL_BE to make it clear that this is a big-endian CRC32

[Qemu-devel] [PATCH v7 00/11] scripts/qemu.py fixes and cleanups

2017-08-18 Thread Amador Pahim
Changes v1->v2: - Style fixes to make checkpatch.pl happy. - Rebased. Changes v2->v3: - Fix typo in patch 3 ("qemu.py: make 'args' public") commit message. Changes v3->v4: - Squash the 2 first commits since they are co-dependant. - Cleanup launch() and shutdown(). - Reorder the commits,

Re: [Qemu-devel] [PATCH for-2.11 06/27] x86: extract legacy cpu features format parser

2017-08-18 Thread Eduardo Habkost
On Fri, Aug 18, 2017 at 12:08:38PM +0200, Igor Mammedov wrote: > Move cpu_model +-feat parsing into a separate file so that it > could be reused later for parsing similar format of sparc target > > Signed-off-by: Igor Mammedov [...] > diff --git a/include/qom/cpu.h

Re: [Qemu-devel] [PATCH for-2.11 03/27] sparc: convert cpu features to qdev properties

2017-08-18 Thread Eduardo Habkost
On Fri, Aug 18, 2017 at 12:08:35PM +0200, Igor Mammedov wrote: > SPARC is the last target that uses legacy way of parsing > and initializing cpu features, drop legacy approach and > convert features to properties so that SPARC could as minimum > benefit from generic cpu_generic_init(), common with

[Qemu-devel] [PATCH for-2.10] numa: Move numa_legacy_auto_assign_ram to pc-i440fx-2.9

2017-08-18 Thread Eduardo Habkost
The 'm->numa_auto_assign_ram = numa_legacy_auto_assign_ram;' line was supposed to be in pc_i440fx_2_9_machine_options() (see commit 3bfe5716 "numa: equally distribute memory on nodes"), but the merge commit adb354dd ("Merge remote-tracking branch 'mst/tags/for_upstream' into staging") moved it to

[Qemu-devel] [PATCH v7 05/11] qemu.py: cleanup redundant calls in launch()

2017-08-18 Thread Amador Pahim
Now that shutdown() is guaranteed to always execute self._load_io_log() and self._post_shutdown(), their calls in 'except' became redundant and we can safely replace it by a call to shutdown(). Signed-off-by: Amador Pahim --- scripts/qemu.py | 6 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v14 4/5] mm: support reporting free page blocks

2017-08-18 Thread Michael S. Tsirkin
On Thu, Aug 17, 2017 at 11:26:55AM +0800, Wei Wang wrote: > This patch adds support to walk through the free page blocks in the > system and report them via a callback function. Some page blocks may > leave the free list after zone->lock is released, so it is the caller's > responsibility to

Re: [Qemu-devel] [PATCH v2] hw/acpi: Select an node with memory for mapping memory hole to

2017-08-18 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 09:26:51AM +0800, Dou Liyang wrote: > Currently, Using the fisrt node without memory on the machine makes > QEMU unhappy. With this example command line: > ... \ > -m 1024M,slots=4,maxmem=32G \ > -numa node,nodeid=0 \ > -numa node,mem=1024M,nodeid=1 \ > -numa

Re: [Qemu-devel] [PATCH v3] hw/acpi-build: Fix SRAT memory building when there is no memory in node0

2017-08-18 Thread Eduardo Habkost
On Fri, Aug 18, 2017 at 09:35:00PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 16, 2017 at 09:45:35AM +0800, Dou Liyang wrote: > > Currently, Using the fisrt node without memory on the machine makes > > QEMU unhappy. With this example command line: > > ... \ > > -m 1024M,slots=4,maxmem=32G

Re: [Qemu-devel] [PATCH v3] hw/acpi-build: Fix SRAT memory building when there is no memory in node0

2017-08-18 Thread Eduardo Habkost
On Thu, Aug 17, 2017 at 01:58:40PM +0800, Dou Liyang wrote: > Hi Igor, > > I tested this patch with following guests: > > 1. RHEL 6.5 with Linux 2.6.32 > 2. RHEL 7.0 with Linux 3.10.0 > 3. Fedora 23 with Linux 4.13.0-rc5 > 4. window 2003 service > 5. window 7 > 6. window 10 What's the

Re: [Qemu-devel] [PATCH 2/4] net: introduce net_crc32_le() function

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: This provides a standard ethernet CRC32 little-endian implementation. Signed-off-by: Mark Cave-Ayland --- include/net/net.h |2 ++ net/net.c | 22 ++ 2 files changed, 24

Re: [Qemu-devel] [PATCH v3 for-2.11 07/18] s390x: drop inclusion of sysemu/kvm.h from some files

2017-08-18 Thread David Hildenbrand
On 18.08.2017 18:08, Thomas Huth wrote: > On 18.08.2017 13:43, David Hildenbrand wrote: >> s390-stattrib.c needs definition of TARGET_PAGE_SIZE, solve it via cpu.h. > > Why not simply #include "exec/cpu-all.h" ? If cpu.h is not really needed > here... > > Thomas > > Git grep showed me that

[Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error

2017-08-18 Thread Alistair Francis
As discussed with Paolo and Markus let's combine libqemustub.a into libqemuutil.a to avoid circular dependencies. Alistair Francis (2): Makefile: Remove libqemustub.a Convert remaining single line fprintf() to warn_report() Makefile| 7 +++ Makefile.target

Re: [Qemu-devel] [PATCH v2] hw/acpi: Select an node with memory for mapping memory hole to

2017-08-18 Thread Eduardo Habkost
On Fri, Aug 18, 2017 at 09:28:55PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 16, 2017 at 09:26:51AM +0800, Dou Liyang wrote: > > Currently, Using the fisrt node without memory on the machine makes > > QEMU unhappy. With this example command line: > > ... \ > > -m 1024M,slots=4,maxmem=32G

Re: [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a

2017-08-18 Thread Alistair Francis
On Fri, Aug 18, 2017 at 12:29 PM, Philippe Mathieu-Daudé wrote: > Hi Alistair, > > > On 08/18/2017 03:47 PM, Alistair Francis wrote: >> >> Using two libraries (libqemuutil.a and libqemustub.a) would sometimes >> result in circular dependencies. To avoid these issues let's just >>

Re: [Qemu-devel] [PATCH for-2.11 v2 4/5] qmp-shell: Accept QMP command as argument

2017-08-18 Thread Eduardo Habkost
On Wed, Aug 16, 2017 at 08:25:41AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Tue, Aug 15, 2017 at 12:03:53PM +0200, Markus Armbruster wrote: > >> Eduardo Habkost writes: > >> > >> Suggest to insert here: > >> > >> If

[Qemu-devel] [PATCH v7 06/11] qemu.py: improve message on negative exit code

2017-08-18 Thread Amador Pahim
The current message shows 'self._args', which contains only part of the options used in the Qemu command line. This patch makes the qemu full args list an instance variable and then uses it in the negative exit code message. Message was moved outside the 'if is_running' block to make sure it

[Qemu-devel] [PATCH v7 11/11] qemu.py: refactor launch()

2017-08-18 Thread Amador Pahim
This is just an refactor to separate the exception handler from the actual launch procedure, improving the readability and making future maintenances in this piece of code easier. Signed-off-by: Amador Pahim --- scripts/qemu.py | 33 - 1 file

[Qemu-devel] [PATCH v7 03/11] qemu.py: use os.path.null instead of /dev/null

2017-08-18 Thread Amador Pahim
For increased portability, let's use os.path.devnull. Signed-off-by: Amador Pahim --- scripts/qemu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index ef531bb23b..51545f7f97 100644 --- a/scripts/qemu.py +++

[Qemu-devel] [PATCH v7 01/11] qemu.py: fix is_running() return before first launch()

2017-08-18 Thread Amador Pahim
is_running() returns None when called before the first time we call launch(): >>> import qemu >>> vm = qemu.QEMUMachine('qemu-system-x86_64') >>> vm.is_running() >>> It should return False instead. This patch fixes that. For consistence, this patch removes the parenthesis from

Re: [Qemu-devel] [PATCH v3 for-2.11 08/18] target/s390x: move gtod_*() declarations to s390-virtio.h

2017-08-18 Thread David Hildenbrand
On 18.08.2017 18:11, Thomas Huth wrote: > Suggesting to add a patch description like: "The functions are not used > in target/s390x/ so a header in hw/s390x/ is a better place" ? Sure, I will include that, thanks! > > On 18.08.2017 13:43, David Hildenbrand wrote: >> Signed-off-by: David

Re: [Qemu-devel] [PATCH 1/4] net: move CRC32 calculation from compute_mcast_idx() into its own net_crc32() function

2017-08-18 Thread Mark Cave-Ayland
On 18/08/17 18:06, Philippe Mathieu-Daudé wrote: > On 08/18/2017 01:51 PM, Philippe Mathieu-Daudé wrote: >> On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: >>> Separate out the standard ethernet CRC32 calculation into a new >>> net_crc32() >>> function, renaming the constant POLYNOMIAL to

Re: [Qemu-devel] [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2017-08-18 Thread Michael S. Tsirkin
On Fri, Aug 18, 2017 at 04:41:41PM +0800, Wei Wang wrote: > On 08/18/2017 10:13 AM, Michael S. Tsirkin wrote: > > On Thu, Aug 17, 2017 at 11:26:56AM +0800, Wei Wang wrote: > > > Add a new vq to report hints of guest free pages to the host. > > Please add some text here explaining the

Re: [Qemu-devel] [RFC 25/29] vhu: enable = false on get_vring_base

2017-08-18 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Jun 28, 2017 at 08:00:43PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > When we receive a GET_VRING_BASE message set enable = false > > to stop any new received packets modifying

Re: [Qemu-devel] Help with Windows NT 4.0

2017-08-18 Thread John Snow
On 08/18/2017 09:36 AM, Programmingkid wrote: > >> On Aug 18, 2017, at 4:46 AM, Artyom Tarasenko wrote: >> >> On Fri, Aug 18, 2017 at 6:31 AM, Programmingkid >> wrote: >>> On Aug 15, 2017, at 6:27 PM, Paolo Bonzini

Re: [Qemu-devel] Help with Windows NT 4.0

2017-08-18 Thread Programmingkid
> On Aug 18, 2017, at 3:23 PM, John Snow wrote: > > > > On 08/18/2017 09:36 AM, Programmingkid wrote: >> >>> On Aug 18, 2017, at 4:46 AM, Artyom Tarasenko wrote: >>> >>> On Fri, Aug 18, 2017 at 6:31 AM, Programmingkid >>>

Re: [Qemu-devel] [PATCH 2/8] mips: introduce internal.h and cleanup cpu.h

2017-08-18 Thread Philippe Mathieu-Daudé
Hi Igor, On 08/17/2017 12:06 PM, Philippe Mathieu-Daudé wrote: no logical change, only code movement (and fix a comment typo). while at that fix checkpatch errors or first fix checkpatch noted issues in cpu.h and then move it in next patch to internal.h After asking confirmation on IRC

[Qemu-devel] [PATCH v7 07/11] qemu.py: include debug information on launch error

2017-08-18 Thread Amador Pahim
When launching a VM, if an exception happens and the VM is not initiated, it might be useful to see the qemu command line and the qemu command output. This patch creates that message. Notice that self._iolog needs to be cleaned up in the beginning of the launch() to make sure we will not expose

Re: [Qemu-devel] [PATCH 4/4] eepro100: switch e100_compute_mcast_idx() over to use net_crc32()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/net/eepro100.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index 5a4774a..4226572 100644

[Qemu-devel] [PATCH v7 10/11] qemu.py: don't launch again before shutdown()

2017-08-18 Thread Amador Pahim
If a VM is launched, files are created and a cleanup is required before a new launch. This cleanup is executed by shutdown(), so shutdown() must be called even if the VM is manually terminated (i.e. using kill). This patch creates a control to make sure launch() will not be executed again if

[Qemu-devel] [PATCH v7 04/11] qemu.py: use poll() instead of 'returncode'

2017-08-18 Thread Amador Pahim
The 'returncode' Popen attribute is not guaranteed to be updated. It actually depends on a call to either poll(), wait() or communicate(). On the other hand, poll() will: "Check if child process has terminated. Set and return returncode attribute." Let's use the poll() to check whether the

[Qemu-devel] [PATCH v7 09/11] qemu.py: launch vm only if it's not running

2017-08-18 Thread Amador Pahim
A new call to launch() with a running VM will fall in exception and consequently call shutdown(). This patch makes launch() to raise an exception when it's called with VM already running. Signed-off-by: Amador Pahim --- scripts/qemu.py | 3 +++ 1 file changed, 3

Re: [Qemu-devel] [PATCH v2 5/5] Convert single line fprintf() to warn_report()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 02:32 AM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 08/17/2017 02:55 PM, Alistair Francis wrote: On 15/08/2017 09:30, Markus Armbruster wrote: The stupid fix is to repeat libraries until the link succeeds: test-util-obj-y =

Re: [Qemu-devel] [PATCH v3 1/2] pc: add 2.11 machine type

2017-08-18 Thread Eduardo Habkost
On Tue, Aug 15, 2017 at 08:06:18PM -0400, Lan Tianyu wrote: > Signed-off-by: Lan Tianyu > --- > hw/i386/pc_piix.c| 14 +++--- > hw/i386/pc_q35.c | 14 +++--- > include/hw/compat.h | 3 +++ > include/hw/i386/pc.h | 3 +++ > 4 files changed, 28

Re: [Qemu-devel] [PATCH] x86: Skip check apic_id_limit for Xen

2017-08-18 Thread Eduardo Habkost
On Thu, Aug 17, 2017 at 09:37:10AM +0800, Lan Tianyu wrote: > On 2017年08月16日 19:21, Paolo Bonzini wrote: > > On 16/08/2017 02:22, Lan Tianyu wrote: > >> Xen vIOMMU device model will be in Xen hypervisor. Skip vIOMMU > >> check for Xen here when vcpu number is more than 255. > > > > I think you

Re: [Qemu-devel] [PATCH] x86: Skip check apic_id_limit for Xen

2017-08-18 Thread Paolo Bonzini
On 18/08/2017 18:38, Eduardo Habkost wrote: >>> I think you still need to do a check for vIOMMU being enabled. >> >> Yes, this will be done in the Xen tool stack and Qemu doesn't have such >> knowledge. Operations of create, destroy Xen vIOMMU will be done in the >> Xen tool stack. > > Shouldn't

Re: [Qemu-devel] [PATCH 3/4] pcnet: switch lnc_mchash() over to use net_crc32_le()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 01:59 PM, Philippe Mathieu-Daudé wrote: On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/net/pcnet.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/hw/net/pcnet.c

Re: [Qemu-devel] [PATCH v2 5/5] Convert single line fprintf() to warn_report()

2017-08-18 Thread Alistair Francis
On Thu, Aug 17, 2017 at 10:32 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 08/17/2017 02:55 PM, Alistair Francis wrote: > On 15/08/2017 09:30, Markus Armbruster wrote: >> The stupid fix is to repeat libraries until the link

[Qemu-devel] [PATCH v7 08/11] qemu.py: make sure we only remove files we create

2017-08-18 Thread Amador Pahim
To launch a VM, we need to create basically two files: the monitor socket (if it's a UNIX socket) and the qemu log file. For the qemu log file, we currently just open the path, which will create the file if it does not exist or overwrite the file if it does exist. For the monitor socket, if it

[Qemu-devel] [PATCH v7 02/11] qemu.py: avoid writing to stdout/stderr

2017-08-18 Thread Amador Pahim
This module should not write directly to stdout/stderr. Instead, it should either raise exceptions or just log the messages and let the callers handle them and decide what to do. For example, scripts could choose to send the log messages stderr or/and write them to a file if verbose or debugging

Re: [Qemu-devel] [PATCH 1/2] target-i386: cpu: convert plus/minus properties to global properties

2017-08-18 Thread Eduardo Habkost
On Thu, Aug 17, 2017 at 04:07:56PM +0200, Igor Mammedov wrote: > Since > (commit d4a606b3 i386: Don't override -cpu options on -cpu host/max) > it became possible to delete hack where it was necessary to > postpone applying plus/minus features to realize time > after max_features were applied to

Re: [Qemu-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-18 Thread Michael S. Tsirkin
On Fri, Aug 18, 2017 at 04:19:57PM +0200, Igor Mammedov wrote: > > > > > > > > Clean it up after 2.10. > > > > > > > > So is the v2 good enough or do I need to resend it? > Do you really need it in 2.10? > it's only 2 days left till release so unless it's blocker > I'd wait till after release

Re: [Qemu-devel] [PATCH for-2.10] numa: Move numa_legacy_auto_assign_ram to pc-i440fx-2.9

2017-08-18 Thread Eduardo Habkost
On Fri, Aug 18, 2017 at 04:09:43PM -0300, Eduardo Habkost wrote: > The 'm->numa_auto_assign_ram = numa_legacy_auto_assign_ram;' line > was supposed to be in pc_i440fx_2_9_machine_options() (see commit > 3bfe5716 "numa: equally distribute memory on nodes"), but the > merge commit adb354dd ("Merge

Re: [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 03:47 PM, Alistair Francis wrote: Convert any remaining uses of fprintf(stderr, "warning:"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using this command: find ./* -type f -exec

[Qemu-devel] [PATCH] .dir-locals.el: Explicitly set indentation level

2017-08-18 Thread Thiago Jung Bauermann
At least in some configurations, setting c-file-style is not enough to conform to the QEMU coding style, so explicitly set c-basic-offset as well. Signed-off-by: Thiago Jung Bauermann --- My emacs was using indentation level of 8 spaces and this patch convinced it

[Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a

2017-08-18 Thread Alistair Francis
Using two libraries (libqemuutil.a and libqemustub.a) would sometimes result in circular dependencies. To avoid these issues let's just combine both into a single library that functions as both. Signed-off-by: Alistair Francis --- Makefile| 7

[Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report()

2017-08-18 Thread Alistair Francis
Convert any remaining uses of fprintf(stderr, "warning:"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using this command: find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig'

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 09/12] ppc440: Add emulation of plb-pcix controller found in some 440 SoCs

2017-08-18 Thread luigi burdo
hi Balaton, > I know about this and if you read the cover message (RFC PATCH 00/12) I link > to a fixed version of that U-Boot firmware (rebuilt from source with the > mentioned patches) which works with this emulation. (The original one from > the updater also starts but cannot boot due to

Re: [Qemu-devel] [PATCH 1/4] net: move CRC32 calculation from compute_mcast_idx() into its own net_crc32() function

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: Separate out the standard ethernet CRC32 calculation into a new net_crc32() function, renaming the constant POLYNOMIAL to POLYNOMIAL_BE to make it clear that this is a big-endian CRC32 calculation. Then remove the existing implementation from

Re: [Qemu-devel] [PATCH v3] hw/acpi-build: Fix SRAT memory building when there is no memory in node0

2017-08-18 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 09:45:35AM +0800, Dou Liyang wrote: > Currently, Using the fisrt node without memory on the machine makes > QEMU unhappy. With this example command line: > ... \ > -m 1024M,slots=4,maxmem=32G \ > -numa node,nodeid=0 \ > -numa node,mem=1024M,nodeid=1 \ > -numa

Re: [Qemu-devel] [PATCH for-2.11 08/27] sparc: replace cpu_sparc_init() with cpu_generic_init()

2017-08-18 Thread Philippe Mathieu-Daudé
I succeed booting a SPARC image once applying 1 to 8 (this commit), so not being able to boot the image previously is probably due to patch order, which mean current order is not bisect-able. On 08/18/2017 07:08 AM, Igor Mammedov wrote: it's just a wrapper, drop it and use cpu_generic_init()

Re: [Qemu-devel] [PATCH 18/28] xtensa: replace cpu_xtensa_init() with cpu_generic_init()

2017-08-18 Thread Eduardo Habkost
On Thu, Aug 17, 2017 at 04:32:23PM +0200, Igor Mammedov wrote: > On Wed, 16 Aug 2017 16:56:40 -0300 > Eduardo Habkost wrote: > > > On Fri, Jul 14, 2017 at 03:52:09PM +0200, Igor Mammedov wrote: > > > call xtensa_irq_init() at realize time which makes > > > cpu_xtensa_init()

Re: [Qemu-devel] [PATCH 3/4] pcnet: switch lnc_mchash() over to use net_crc32_le()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 11:15 AM, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/net/pcnet.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index 6544553..c050993 100644 ---

[Qemu-devel] [PATCH] hw/arm/allwinner: Fix crash with -nodefaults -M cubieboard

2017-08-18 Thread Thomas Huth
The allwinner-a10 device uses serial_hds[0] without checking whether it is available or not. So using the cubieboard with -nodefaults currently results in a segmentation fault. Fix it by adding a proper check here. And while we're at it, mark the device as "user_creatable = false" since this

Re: [Qemu-devel] [PATCH] hw/arm/allwinner: Fix crash with -nodefaults -M cubieboard

2017-08-18 Thread Peter Maydell
On 18 August 2017 at 18:08, Thomas Huth wrote: > The allwinner-a10 device uses serial_hds[0] without checking whether > it is available or not. So using the cubieboard with -nodefaults > currently results in a segmentation fault. Fix it by adding a > proper check here. > And

Re: [Qemu-devel] [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2017-08-18 Thread Michael S. Tsirkin
On Fri, Aug 18, 2017 at 04:36:06PM +0800, Wei Wang wrote: > On 08/18/2017 10:28 AM, Michael S. Tsirkin wrote: > > On Thu, Aug 17, 2017 at 11:26:56AM +0800, Wei Wang wrote: > > > Add a new vq to report hints of guest free pages to the host. > > > > > > Signed-off-by: Wei Wang

[Qemu-devel] [Bug 1711602] Re: --copy-storage-all failing with qemu 2.10

2017-08-18 Thread Dr. David Alan Gilbert
The 'host doesn't support requested feature' is probably a red-herring in this case The fact it's failing with an IO error but nothing else suggests either: a) it's something closing the socket between the two qemu's b) The I/O error is from storage/NBD Assuming it fails on precopy, I'd look

Re: [Qemu-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-18 Thread Michael S. Tsirkin
On Fri, Aug 18, 2017 at 05:00:18PM +0100, Anthony PERARD wrote: > > > > > > > > > > Clean it up after 2.10. > > > > > > > > > > > So is the v2 good enough or do I need to resend it? > > Do you really need it in 2.10? > > it's only 2 days left till release so unless it's blocker > > I'd wait

Re: [Qemu-devel] [PATCH for-2.11 01/27] sparc: convert cpu models to SPARC cpu subclasses

2017-08-18 Thread Philippe Mathieu-Daudé
Hi Igor, On 08/18/2017 07:08 AM, Igor Mammedov wrote: QOMfy cpu models handling introducing propper cpu types for each cpu model. Signed-off-by: Igor Mammedov --- with this and conversion of features to properties, it would be possible to replace cpu_sparc_init() with

Re: [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a

2017-08-18 Thread Philippe Mathieu-Daudé
Hi Alistair, On 08/18/2017 03:47 PM, Alistair Francis wrote: Using two libraries (libqemuutil.a and libqemustub.a) would sometimes result in circular dependencies. To avoid these issues let's just combine both into a single library that functions as both. Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH 0/8] QOMify MIPS cpu

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/17/2017 12:22 PM, Igor Mammedov wrote: On Thu, 17 Aug 2017 01:30:54 -0300 Philippe Mathieu-Daudé wrote: [...] Also I couldn't test it with KVM. Tested in TCG mode (boots debian mips/mips64 kernel with different cpu types), and new CPU leaf types show up on QOM tree as

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 09/12] ppc440: Add emulation of plb-pcix controller found in some 440 SoCs

2017-08-18 Thread François Revol
Le 18/08/2017 à 21:43, luigi burdo a écrit : > can i ask you something ? why you dont try to integrate in qemu the > pegasos 2 or the efika machine. i have the feeling that probably it > can be more simple because more old machine and components. > Except they are antique, and the Pegasos at

[Qemu-devel] [PATCH v5 13/13] numa-test: Use hmp()

2017-08-18 Thread Eric Blake
Don't open-code something that has a convenient helper available. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- tests/numa-test.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/tests/numa-test.c

Re: [Qemu-devel] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-18 Thread John Snow
On 08/18/2017 05:15 PM, Eric Blake wrote: > libqtest provides two layers of functions: qtest_*() that operate > on an explicit object, and a plain version that operates on the > 'global_qtest' object. However, very few tests care about the > distinction, and even the tests that manipulate

Re: [Qemu-devel] [PATCH v7 2/6] qmp: Create IOThrottle structure

2017-08-18 Thread Pradeep Kiruvale
On Aug 16, 2017 11:41 PM, "Markus Armbruster" wrote: Eric Blake writes: > On 08/16/2017 11:13 AM, Markus Armbruster wrote: >> Markus Armbruster writes: >> > >>> >>> Conclusion: no consensus, yet. >> >> All right, let's start over and

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Alexey Kardashevskiy
On 19/08/17 12:46, Alexey Kardashevskiy wrote: > On 19/08/17 01:18, Eric Blake wrote: >> On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: >>> Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) >>> * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and >>>

[Qemu-devel] [PATCH v5 05/13] libqtest: Use qemu_strtoul()

2017-08-18 Thread Eric Blake
This will keep checkpatch happy when the next patch does code motion. Fix the include order to match HACKING when adding the needed header. Signed-off-by: Eric Blake --- tests/libqtest.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v5 04/13] libqtest: Let socket_send() compute length

2017-08-18 Thread Eric Blake
Rather than make multiple callers call strlen(), it's easier if socket_send() itself can compute a length via strlen() if none was provided (caller passes -1). Callers that can get at the length more efficiently are left that way. Signed-off-by: Eric Blake ---

Re: [Qemu-devel] [PATCH v5 03/13] libqtest: Remove dead qtest_instances variable

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 06:15 PM, Eric Blake wrote: Prior to commit 063c23d9, we were tracking a list of parallel qtest objects, in order to safely clean up a SIGABRT handler only after the last connection quits. But when we switched to more of glib's infrastructure, the list became dead code that is

Re: [Qemu-devel] [PATCH v5 13/13] numa-test: Use hmp()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 06:15 PM, Eric Blake wrote: Don't open-code something that has a convenient helper available. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- tests/numa-test.c | 21

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Alexey Kardashevskiy
On 18/08/17 23:31, Stefan Hajnoczi wrote: > Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and > s->cluster_data when the first read operation is performance on a > compressed cluster. > > The buffers are

[Qemu-devel] [PATCH v5 07/13] libqtest: Inline qtest_query_target_endianness()

2017-08-18 Thread Eric Blake
There was only one caller; it's easier to inline things. Signed-off-by: Eric Blake --- tests/libqtest.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 5d16351e24..b6dd26e54a 100644 ---

[Qemu-devel] [PATCH v5 09/13] libqtest: Shorten a couple more qtest_* functions

2017-08-18 Thread Eric Blake
qtest_rtas_call() and qtest_big_endian() did not have a short version with an implied global_qtest; but changing these two functions fits with the theme of the previous patch. It doesn't hurt that we are now no longer ambiguous with the qtest_rtas_call() of include/hw/ppc/spapr_rtos.h.

[Qemu-devel] [PATCH v5 11/13] libqtest: Drop many static inline qtest_ wrappers

2017-08-18 Thread Eric Blake
None of the tests were calling the long qtest_*() form, except via the static inline short forms. Remove a layer of indirection by only supporting the short form, and using global_qtest directly in the .c file. (Yes, this flies in the face of thread-safety, by relying on a global instead of

Re: [Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion

2017-08-18 Thread Eric Blake
On 08/18/2017 04:39 PM, Eric Blake wrote: > On 08/18/2017 04:33 PM, Philippe Mathieu-Daudé wrote: >> Hi Eric, >> >> On 08/18/2017 06:15 PM, Eric Blake wrote: >>> Assertions should be separate from the side effects, since in >>> theory, g_assert() can be disabled (in practice, we can't really >>>

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Alexey Kardashevskiy
On 19/08/17 01:18, Eric Blake wrote: > On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: >> Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) >> * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and >> s->cluster_data when the first read operation is performance on

[Qemu-devel] [PATCH v5 00/13] Preliminary libqtest cleanups

2017-08-18 Thread Eric Blake
Markus gave some good advice on my 'v4: Clean up around qmp() and hmp()' series [1]. Among other things, we agreed that if I'm going to get rid of the qtest_* layer of function wrappers, I should do it all the way (rather than just on the qmp() functions), and up front. So that's what this

[Qemu-devel] [PATCH v5 01/13] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code

2017-08-18 Thread Eric Blake
Back when the test was introduced, in commit 62c39b307, the test was set up to run qemu-ga directly on the host performing the test, and defaults to limiting itself to safe commands. At the time, it was envisioned that setting QGA_TEST_SIDE_EFFECTING in the environment could cover a few more

[Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion

2017-08-18 Thread Eric Blake
Assertions should be separate from the side effects, since in theory, g_assert() can be disabled (in practice, we can't really ever do that). Signed-off-by: Eric Blake --- qtest.c | 80 ++--- 1 file changed, 57

[Qemu-devel] [PATCH v5 12/13] libqtest: Use global_qtest in qtest_sendf() and qtest_rsp()

2017-08-18 Thread Eric Blake
All callers are now passing global_qtest, just remove the parameter instead. While at it, improve the naming of the va_list variant of socket_sendf() to be more like the printf/vprintf naming scheme. Signed-off-by: Eric Blake --- tests/libqtest.c | 77

Re: [Qemu-devel] [PATCH v5 05/13] libqtest: Use qemu_strtoul()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 06:15 PM, Eric Blake wrote: This will keep checkpatch happy when the next patch does code motion. Fix the include order to match HACKING when adding the needed header. Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [PATCH v5 07/13] libqtest: Inline qtest_query_target_endianness()

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 06:15 PM, Eric Blake wrote: There was only one caller; it's easier to inline things. What's the benefit of this change? Having a separate function ease code reading. You might add the 'inline' qualifier but the compiler is smart enough to inline it. Instead of this change I'd

[Qemu-devel] [PATCH v5 03/13] libqtest: Remove dead qtest_instances variable

2017-08-18 Thread Eric Blake
Prior to commit 063c23d9, we were tracking a list of parallel qtest objects, in order to safely clean up a SIGABRT handler only after the last connection quits. But when we switched to more of glib's infrastructure, the list became dead code that is never assigned to. Signed-off-by: Eric Blake

Re: [Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion

2017-08-18 Thread Eric Blake
On 08/18/2017 04:58 PM, Eric Blake wrote: >> NDEBUG doesn't affect g_assert() (only assert(), but that wasn't in use >> here) - I have to double-check glib documentation to see whether >> g_assert() can be crippled in a manner similar to how I know assert() >> can be crippled. Ideally, we have a

[Qemu-devel] [RFC PATCH] osdep.h: Prohibit disabling assert() in supported builds

2017-08-18 Thread Eric Blake
We already have several files that knowingly require assert() to work. While we do NOT want to encourage the use of 'assert(side-effects)' (that is a bad practice that prevents copy-and-paste of code to other projects that CAN disable assertions; plus it costs unnecessary reviewer mental cycles

Re: [Qemu-devel] [RFC PATCH] osdep.h: Prohibit disabling assert() in supported builds

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 07:23 PM, Eric Blake wrote: We already have several files that knowingly require assert() to work. While we do NOT want to encourage the use of 'assert(side-effects)' (that is a bad practice that prevents copy-and-paste of code to other projects that CAN disable assertions; plus

Re: [Qemu-devel] [PATCH] scsi-bus: correct responses for INQUIRY and REQUEST SENSE

2017-08-18 Thread Laszlo Ersek
Hello Hannes, On 08/18/17 11:37, Hannes Reinecke wrote: > According to SPC-3 INQUIRY and REQUEST SENSE should return GOOD > even on unsupported LUNS. > > Signed-off-by: Hannes Reinecke > --- > hw/scsi/scsi-bus.c | 29 + > 1 file changed, 25

[Qemu-devel] [PATCH v5 06/13] libqtest: Topologically sort functions

2017-08-18 Thread Eric Blake
Put static functions prior to public headers, in part so that improvements to qtest_start() can benefit from the static helpers without needing forward references. Code motion, with no semantic change. Signed-off-by: Eric Blake --- tests/libqtest.c | 263

[Qemu-devel] [PATCH v5 10/13] libqtest: Drop qtest_init() and qtest_qmp_discard_response()

2017-08-18 Thread Eric Blake
Most of our tests were using qtest_start() to initialize the connection and then set global_qtest; the few tests that were using qtest_init() instead are still setting global_qtest shortly afterwards. So it makes more sense to just always set global_qtest, and have all callers go through a single

[Qemu-devel] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-18 Thread Eric Blake
libqtest provides two layers of functions: qtest_*() that operate on an explicit object, and a plain version that operates on the 'global_qtest' object. However, very few tests care about the distinction, and even the tests that manipulate multiple qtest connections at once are just fine

Re: [Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion

2017-08-18 Thread Eric Blake
On 08/18/2017 04:33 PM, Philippe Mathieu-Daudé wrote: > Hi Eric, > > On 08/18/2017 06:15 PM, Eric Blake wrote: >> Assertions should be separate from the side effects, since in >> theory, g_assert() can be disabled (in practice, we can't really >> ever do that). > > What about the suggestion on

Re: [Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion

2017-08-18 Thread Philippe Mathieu-Daudé
On 08/18/2017 06:39 PM, Eric Blake wrote: On 08/18/2017 04:33 PM, Philippe Mathieu-Daudé wrote: Hi Eric, On 08/18/2017 06:15 PM, Eric Blake wrote: Assertions should be separate from the side effects, since in theory, g_assert() can be disabled (in practice, we can't really ever do that).

Re: [Qemu-devel] [PATCH v2] scsi-block: Add qdev error properties

2017-08-18 Thread Paolo Bonzini
On 18/08/2017 05:38, Fam Zheng wrote: > On Thu, 08/17 16:23, Paolo Bonzini wrote: >>> +if (scsi_sense_matches(r, SENSE_CODE(NO_MEDIUM))) { >>> +error = ENOMEDIUM; >>> +} else if (scsi_sense_matches(r, SENSE_CODE(TARGET_FAILURE))) { >>> +error = ENOMEM; >>> +

Re: [Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion

2017-08-18 Thread Philippe Mathieu-Daudé
Hi Eric, On 08/18/2017 06:15 PM, Eric Blake wrote: Assertions should be separate from the side effects, since in theory, g_assert() can be disabled (in practice, we can't really ever do that). What about the suggestion on your "Hacks for building on gcc 7 / Fedora 26" series about avoid

Re: [Qemu-devel] [PATCH v5 07/13] libqtest: Inline qtest_query_target_endianness()

2017-08-18 Thread Eric Blake
On 08/18/2017 04:46 PM, Philippe Mathieu-Daudé wrote: > On 08/18/2017 06:15 PM, Eric Blake wrote: >> There was only one caller; it's easier to inline things. > > What's the benefit of this change? Having a separate function ease code > reading. You might add the 'inline' qualifier but the

Re: [Qemu-devel] [PATCH 2/6] tests: Add network filter tests to the check-qtest-s390x list

2017-08-18 Thread Thomas Huth
On 18.08.2017 09:54, Cornelia Huck wrote: > On Thu, 17 Aug 2017 16:02:00 +0200 > Thomas Huth wrote: > >> On 17.08.2017 10:41, Cornelia Huck wrote: [...] >>> I'm wondering if we could unify selection of the network device >>> somehow. There's probably two cases: >>> - Test a

Re: [Qemu-devel] Help with Windows NT 4.0

2017-08-18 Thread Artyom Tarasenko
On Fri, Aug 18, 2017 at 6:31 AM, Programmingkid wrote: > >> On Aug 15, 2017, at 6:27 PM, Paolo Bonzini wrote: >> >> On 15/08/2017 20:46, Programmingkid wrote: >>> On Aug 14, 2017, at 2:51 AM, Paolo Bonzini wrote:

Re: [Qemu-devel] RFH: difference in read-only mapped bios.bin - memory corruption?

2017-08-18 Thread Dr. David Alan Gilbert
* Philipp Hahn (h...@univention.de) wrote: > Hello, > > Am 15.08.2017 um 13:25 schrieb Laszlo Ersek: > > On 08/14/17 20:39, Dr. David Alan Gilbert wrote: > >> * Philipp Hahn (h...@univention.de) wrote: > >>> I'm currently investigating a problem, were a Linux VM does not reboot > >>> and gets

Re: [Qemu-devel] [PATCH v5 5/6] block: add throttle block filter driver

2017-08-18 Thread Manos Pitsidianakis
On Fri, Aug 18, 2017 at 10:23:09AM +0200, Alberto Garcia wrote: On Fri 18 Aug 2017 05:10:18 AM CEST, Manos Pitsidianakis wrote: block/throttle.c uses existing I/O throttle infrastructure inside a block filter driver. I/O operations are intercepted in the filter's read/write coroutines, and

  1   2   3   >