Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls

2019-07-31 Thread Jason Wang
On 2019/7/31 下午2:42, P J P wrote: +-- On Wed, 31 Jul 2019, Jason Wang wrote --+ | On 2019/7/29 下午11:04, Stefan Hajnoczi wrote: | > This change isn't related to the topic of the patch. It's a separate bug | > fix. | > | > Please either document it in the commit description so it's clear the | >

[Qemu-devel] RESEND Re: [Qemu-ppc] [PATCH 1/2] tests.acceptance.avocado_qemu: Add support for powerpc

2019-07-31 Thread Satheesh Rajendran
- Forwarded message from Satheesh Rajendran - Date: Mon, 29 Jul 2019 11:22:50 +0530 From: Satheesh Rajendran To: Greg Kurz Cc: sathn...@linux.vnet.ibm.com, qemu-...@nongnu.org, qemu-devel@nongnu.org, c...@kaod.org Subject: Re: [Qemu-ppc] [Qemu-devel][PATCH 1/2] tests.acceptance.avocad

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Christian Borntraeger
On 30.07.19 21:20, Paolo Bonzini wrote: > On 30/07/19 18:01, Andrey Shinkevich wrote: >> Not the whole structure is initialized before passing it to the KVM. >> Reduce the number of Valgrind reports. >> >> Signed-off-by: Andrey Shinkevich > > Christian, is this the right fix? It's not expensi

[Qemu-devel] [PATCH v2 1/8] hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig

2019-07-31 Thread Thomas Huth
From: Philippe Mathieu-Daudé The XLNX_ZYNQMP config is used in multiple subdirectories (timer, intc). Move it to the root hw/Kconfig. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20190427141459.19728-2-phi...@redhat.com> Reviewed-by: Alistair Francis Signed-off-by: Thomas Huth --- hw/K

[Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches

2019-07-31 Thread Thomas Huth
Here are some more Kconfig patches that clean up the switches of existing devices and introduce proper config switches for some other devices that were always enabled before. v2: - Included Philippe's patches to avoid a conflict with XLNX_ZYNQMP - Don't rely on indirect dependencies, always "sel

[Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device

2019-07-31 Thread Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it. Signed-off-by: Thomas Huth --- hw/arm/Kconfig| 3 +++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3

[Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device

2019-07-31 Thread Thomas Huth
The "split-irq" device is currently only used by machines that use CONFIG_ARMSSE. Let's add a proper CONFIG_SPLIT_IRQ switch for this so that it only gets compiled when we really need it. Signed-off-by: Thomas Huth --- hw/arm/Kconfig| 3 +++ hw/core/Kconfig | 3 +++ hw/core/Makefil

[Qemu-devel] [PATCH v2 2/8] hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU

2019-07-31 Thread Thomas Huth
From: Philippe Mathieu-Daudé The Xilinx I/O Module Interrupt Controller is only used by the MicroBlaze PMU, not by the AArch64 machine. Move it from the generic ZynqMP object list to the PMU specific. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20190427141459.19728-3-phi...@redhat.com> R

[Qemu-devel] [PATCH v2 3/8] hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines

2019-07-31 Thread Thomas Huth
From: Philippe Mathieu-Daudé The xlnx_dpdma device is only used by the ZynqMP AArch64 machine (not the MicroBlaze PMU). Remove it from the ZynqMP generic objects. (Note, this entry was duplicated for the AArch64). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20190427141459.19728-4-phi...@

[Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device

2019-07-31 Thread Thomas Huth
The generic loader device is completely optional. Let's add a proper config switch for it so that people can disable it if they don't need it and want to create a minimalistic QEMU binary. Signed-off-by: Thomas Huth --- hw/core/Kconfig | 4 hw/core/Makefile.objs | 2 +- 2 files change

[Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device

2019-07-31 Thread Thomas Huth
The "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it. Signed-off-by: Thomas Huth --- hw/Kconfig| 1 + hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig| 1

[Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device

2019-07-31 Thread Thomas Huth
The device is only used by some few boards. Let's use a proper Kconfig switch so that we only compile this code if we really need it. Signed-off-by: Thomas Huth --- hw/arm/Kconfig| 9 + hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/s

Re: [Qemu-devel] [PATCH-4.2 v1 6/6] target/riscv: Fix Floating Point register names

2019-07-31 Thread Chih-Min Chao
On Wed, Jul 31, 2019 at 2:41 AM Alistair Francis wrote: > On Mon, Jul 29, 2019 at 8:19 AM Chih-Min Chao > wrote: > > > > > > On Fri, Jul 26, 2019 at 2:56 AM Alistair Francis < > alistair.fran...@wdc.com> wrote: > >> > >> From: Atish Patra > >> > >> As per the RISC-V spec, Floating Point registe

[Qemu-devel] [PATCH v4 0/1] configure: Define target access alignment in configure

2019-07-31 Thread tony.nguyen
Move the define of target access alignment earlier from target/foo/cpu.h to configure. Suggested in Richard Henderson's reply to "[PATCH 1/4] tcg: TCGMemOp is now accelerator independent MemOp" Analysed target/foo/cpu.h for more candidates to define earlier but did not spot any other straight for

[Qemu-devel] [PATCH v4 1/1] configure: Define target access alignment in configure

2019-07-31 Thread tony.nguyen
Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move defines out of target/foo/cpu.h into configure, as we do with TARGET_WORDS_BIGENDIAN, so that it is always defined early. Poison TARGET_ALIGNED_ONLY to prevent use in common code. Signed-off-by: Tony Nguyen Reviewed-by: Philippe Mat

Re: [Qemu-devel] [RFC] HACKING: Document 'struct' keyword usage

2019-07-31 Thread Thomas Huth
On 30/07/2019 23.07, Eduardo Habkost wrote: > Sometimes we use the 'struct' keyword to help us reduce > dependencies between header files. Document that practice. > > Signed-off-by: Eduardo Habkost > --- > I wonder if this is too terse? Should we give examples? > --- > HACKING | 2 ++ > 1 file

Re: [Qemu-devel] [PATCH] spapr: Implement better workaround in spapr-vty device

2019-07-31 Thread David Gibson
On Wed, Jul 31, 2019 at 02:36:54PM +1000, Paul Mackerras wrote: > Linux guest kernels have code which scans the string of characters > returned from the H_GET_TERM_CHAR hypercall and removes any \0 > character which comes immediately after a \r character. This is to > work around a bug which was p

Re: [Qemu-devel] When to use qemu/typedefs.h

2019-07-31 Thread Thomas Huth
On 31/07/2019 08.37, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 30/07/19 15:15, Eric Blake wrote: We occasionally give up and use types directly rather than their typedef names, flouting the coding style. This patch does. Trades messing with qemu/typedefs.h for havi

[Qemu-devel] [PATCH] numa: numa nodeid need not be sequential

2019-07-31 Thread Daniel Black
Replace all nodeid assumptions with lookups in the numa_info array and remove aspects that assume a sequential numbering of nodes. This enables non-sequential NUMA node number topoligies to be created. Default assignments of CPU->nodeid (get_default_cpu_node_id) now return a nodeid from the numa_i

Re: [Qemu-devel] [PATCH for-4.2 02/13] qcow2: Keep unknown extra snapshot data

2019-07-31 Thread Max Reitz
On 30.07.19 19:56, Eric Blake wrote: > On 7/30/19 12:24 PM, Max Reitz wrote: >> The qcow2 specification says to ignore unknown extra data fields in >> snapshot table entries. Currently, we discard it whenever we update the >> image, which is a bit different from "ignore". >> >> This patch makes th

Re: [Qemu-devel] [PATCH for-4.2 05/13] qcow2: Write v3-compliant snapshot list on upgrade

2019-07-31 Thread Max Reitz
On 30.07.19 20:10, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> qcow2 v3 requires every snapshot table entry to have two extra data >> fields: The 64-bit VM state size, and the virtual disk size. Both are >> optional for v2 images, so they may not be present. >> >> qcow2_upgrade()

Re: [Qemu-devel] [PATCH for-4.2 06/13] qcow2: Separate qcow2_check_read_snapshot_table()

2019-07-31 Thread Max Reitz
On 30.07.19 20:53, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> Reading the snapshot table can fail. That is a problem when we want to >> repair the image. >> >> Therefore, stop reading the snapshot table in qcow2_do_open() in check >> mode. Instead, add a new function qcow2_check

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Christophe de Dinechin
Christian Borntraeger writes: > On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: >> On 7/30/19 6:01 PM, Andrey Shinkevich wrote: >>> Not the whole structure is initialized before passing it to the KVM. >>> Reduce the number of Valgrind reports. >>> >>> Signed-off-by: Andrey Shinkevich >>> --- >

Re: [Qemu-devel] [PATCH for-4.2 v10 11/15] virtio-iommu: Expose the IOAPIC MSI reserved region when relevant

2019-07-31 Thread Auger Eric
Hi Kevin, Michael, On 7/31/19 1:20 AM, Tian, Kevin wrote: >> From: Michael S. Tsirkin [mailto:m...@redhat.com] >> Sent: Wednesday, July 31, 2019 3:38 AM >> >> On Tue, Jul 30, 2019 at 07:21:33PM +0200, Eric Auger wrote: >>> We introduce a new msi_bypass field which indicates whether >>> the IOAPIC

Re: [Qemu-devel] [PATCH for-4.2 08/13] qcow2: Fix broken snapshot table entries

2019-07-31 Thread Max Reitz
On 30.07.19 21:02, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> The only case where we currently reject snapshot table entries is when >> they have too much extra data. Fix them with qemu-img check -r all by >> counting it as a corruption, reducing their extra_data_size, and then >

Re: [Qemu-devel] [PATCH v3 04/33] make Device and Bus Resettable

2019-07-31 Thread Damien Hedde
On 7/31/19 7:56 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:25PM +0200, Damien Hedde wrote: >> This add Resettable interface implementation for both Bus and Device. >> >> *resetting* counter and *reset_is_cold* flag are added in DeviceState >> and BusState. >> >> Compatibility with e

[Qemu-devel] [Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl

2019-07-31 Thread Andrew Randrianasulu
Hello, Richard! No, same bug was biting me without any specific options, i tried to add -Og for better debugging, but backtrace was anyway not complete ... I think I can live with -display gtk workaround for now. -- You received this bug notification because you are a member of qemu- devel-ml,

Re: [Qemu-devel] [PATCH] numa: numa nodeid need not be sequential

2019-07-31 Thread Daniel Black
On Wed, 31 Jul 2019 18:40:33 +1000 Daniel Black wrote: > Replace all nodeid assumptions with lookups in the numa_info array Tao Xu, Sorry, only just noticed your patches of the move of numa_info and other elements into MachineState. I approve of it. Lets see if I can follow all of Igor's com

[Qemu-devel] [PATCH v5] net: tap: replace snprintf with g_strdup_printf calls

2019-07-31 Thread P J P
From: Prasad J Pandit When invoking qemu-bridge-helper in 'net_bridge_run_helper', instead of using fixed sized buffers, use dynamically allocated ones initialised and returned by g_strdup_printf(). If bridge name 'br_buf' is undefined, pass empty string ("") to g_strdup_printf() in its place, t

Re: [Qemu-devel] [PATCH for-4.2 09/13] qcow2: Fix overly long snapshot tables

2019-07-31 Thread Max Reitz
On 30.07.19 21:08, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> We currently refuse to open qcow2 images with overly long snapshot >> tables. This patch makes qemu-img check -r all drop all offending >> entries past what we deem acceptable. >> >> Signed-off-by: Max Reitz >> --- >>

Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls

2019-07-31 Thread P J P
+-- On Wed, 31 Jul 2019, Jason Wang wrote --+ | The series has been merged. Just need a patch on top and I can queue it for | next release. Sent patch v5. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH for-4.2 10/13] qcow2: Repair snapshot table with too many entries

2019-07-31 Thread Max Reitz
On 30.07.19 21:10, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> block/qcow2-snapshot.c | 14 ++ >> 1 file changed, 14 insertions(+) >> > > Same problem as for 9/13 - should we really be throwing away the user's > data like this? (9/

[Qemu-devel] [Bug 1838475] Re: qemu-system-arm exits when cortex-m4 floating point used and irq occurs

2019-07-31 Thread Alex Bennée
** Tags added: arm mprofile tcg ** Tags added: testcase -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1838475 Title: qemu-system-arm exits when cortex-m4 floating point used and irq occurs Stat

Re: [Qemu-devel] [PATCH for-4.2 12/13] iotests: Add peek_file* functions

2019-07-31 Thread Max Reitz
On 30.07.19 21:22, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/common.rc | 20 >> 1 file changed, 20 insertions(+) >> >> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc >> index 55

Re: [Qemu-devel] [PATCH v3 05/33] Switch to new api in qdev/bus

2019-07-31 Thread Damien Hedde
On 7/31/19 8:05 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:26PM +0200, Damien Hedde wrote: >> Deprecate old reset apis and make them use the new one while they >> are still used somewhere. >> >> Signed-off-by: Damien Hedde >> --- >> hw/core/qdev.c | 22 +++-

[Qemu-devel] [Bug 1838465] Re: qemu-system-x86_64 kernel panic 30% of the time starting up VM

2019-07-31 Thread Alex Bennée
Is this using TCG (i.e. emulation) rather than Hyper V virtualisation? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1838465 Title: qemu-system-x86_64 kernel panic 30% of the time starting up VM S

[Qemu-devel] [Bug 1837851] Re: hv-tlbflush malfunctions on Intel host CPUs with neither EPT nor VPID (qemu-kvm)

2019-07-31 Thread Alex Bennée
** Tags added: kvm x86 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1837851 Title: hv-tlbflush malfunctions on Intel host CPUs with neither EPT nor VPID (qemu-kvm) Status in QEMU: New Bug de

[Qemu-devel] [Bug 1837347] Re: guest userspace process core dump after raspi2 kernel boot

2019-07-31 Thread Alex Bennée
** Tags added: tcg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1837347 Title: guest userspace process core dump after raspi2 kernel boot Status in QEMU: New Bug description: Host info: ==

[Qemu-devel] [Bug 1836501] Re: cpu_address_space_init fails with assertion

2019-07-31 Thread Alex Bennée
** Tags added: kvm -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1836501 Title: cpu_address_space_init fails with assertion Status in QEMU: Confirmed Bug description: qemu-system-arm does not

Re: [Qemu-devel] [PATCH v5] net: tap: replace snprintf with g_strdup_printf calls

2019-07-31 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190731091933.17363-1-ppan...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v5] net: tap: replace snprintf with g_strdup_printf calls Message-id: 201

Re: [Qemu-devel] [PATCH for-4.2 13/13] iotests: Test qcow2's snapshot table handling

2019-07-31 Thread Max Reitz
On 30.07.19 21:56, Eric Blake wrote: > On 7/30/19 12:25 PM, Max Reitz wrote: >> Add a test how our qcow2 driver handles extra data in snapshot table >> entries, and how it repairs overly long snapshot tables. > > May need tweaking if we drop 9 and 10. > >> >> Signed-off-by: Max Reitz >> --- >>

[Qemu-devel] [Bug 1838277] Re: qemu-system-aarch64: regression in 3.1: breakpoint instructions always routed to EL_D even when current EL is higher

2019-07-31 Thread Elouan Appéré
Thanks a lot for the patch! Just nitpicking here, but commit message and in particular wiki changelog message (in 4.1/Planning) make it seem it was only an EL2 issue. I think it was also affecting EL3 (patch fixes both, anyway). -- You received this bug notification because you are a member of q

[Qemu-devel] [PATCH v4 1/1] configure: Define target access alignment in configure

2019-07-31 Thread tony.nguyen
Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move defines out of target/foo/cpu.h into configure, as we do with TARGET_WORDS_BIGENDIAN, so that it is always defined early. Poison TARGET_ALIGNED_ONLY to prevent use in common code. Signed-off-by: Tony Nguyen Reviewed-by: Philippe Mat

Re: [Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-07-31 Thread Vladimir Sementsov-Ogievskiy
30.07.2019 21:40, John Snow wrote: > > > On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >> We have detect_zeroes option, so at least for blockdev-backup user >> should define it if zero-detection is needed. For drive-backup leave >> detection enabled by default but do it through existin

Re: [Qemu-devel] [PATCH v3 09/33] add doc about Resettable interface

2019-07-31 Thread Damien Hedde
On 7/31/19 8:30 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:30PM +0200, Damien Hedde wrote: >> Signed-off-by: Damien Hedde >> --- >> docs/devel/reset.txt | 165 +++ >> 1 file changed, 165 insertions(+) >> create mode 100644 docs/devel/reset.

Re: [Qemu-devel] [PATCH v3 08/33] Add function to control reset with gpio inputs

2019-07-31 Thread Damien Hedde
On 7/31/19 8:11 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:29PM +0200, Damien Hedde wrote: >> It adds the possibility to add 2 gpios to control the warm and cold reset. >> With theses ios, the reset can be maintained during some time. >> Each io is associated with a state to detect

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-31 Thread Christophe de Dinechin
Peter Maydell writes: > On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >> >> On Tue, 30 Jul 2019 14:44:21 +0100 >> Peter Maydell wrote: >> >> > On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: >> > > I'm having a hard time figuring out what a 'cold' or a 'warm' reset is >> > > supposed

Re: [Qemu-devel] [PATCH v8 16/16] block/io_uring: adds fd registration

2019-07-31 Thread Stefan Hajnoczi
On Tue, Jul 30, 2019 at 11:04:41PM +0530, Aarushi Mehta wrote: I'm concerned about file descriptor leaks. fd_array[] keeps file descriptors basically forever, even after the file is no longer in use by the rest of QEMU. There needs to be a call to unregister whenever a file is closed elsewhere i

Re: [Qemu-devel] [PATCH v3] blockjob: drain all job nodes in block_job_drain

2019-07-31 Thread Vladimir Sementsov-Ogievskiy
30.07.2019 22:11, John Snow wrote: > > > On 7/24/19 5:40 AM, Vladimir Sementsov-Ogievskiy wrote: >> Instead of draining additional nodes in each job code, let's do it in >> common block_job_drain, draining just all job's children. >> BlockJobDriver.drain becomes unused, so, drop it at all. >> >>

Re: [Qemu-devel] [PATCH 0/3] backup fixes for 4.1?

2019-07-31 Thread Vladimir Sementsov-Ogievskiy
30.07.2019 21:41, John Snow wrote: > > > On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> Here are two small fixes. >> >> 01 is not a degradation at all, so it's OK for 4.2 >> 02 is degradation of 3.0, so it's possibly OK for 4.2 too, >> but it seems to be real bug an

Re: [Qemu-devel] When to use qemu/typedefs.h

2019-07-31 Thread Peter Maydell
On Wed, 31 Jul 2019 at 09:40, Thomas Huth wrote: > IMHO we should get rid of mandating typedefs. They are causing too much > trouble - e.g. do you also remember the issues with duplicated typedefs > in certain compiler versions in the past? (these should be hopefully > gone now, but still...) > >

Re: [Qemu-devel] When to use qemu/typedefs.h

2019-07-31 Thread Daniel P . Berrangé
On Wed, Jul 31, 2019 at 11:45:41AM +0100, Peter Maydell wrote: > On Wed, 31 Jul 2019 at 09:40, Thomas Huth wrote: > > IMHO we should get rid of mandating typedefs. They are causing too much > > trouble - e.g. do you also remember the issues with duplicated typedefs > > in certain compiler versions

Re: [Qemu-devel] [PATCH 05/28] queue: Drop superfluous #include qemu/atomic.h

2019-07-31 Thread Thomas Huth
On 26/07/2019 14.05, Markus Armbruster wrote: > When commit 5f7d05ecfda added QLIST_INSERT_HEAD_RCU() to qemu/queue.h, > it had to include qemu/atomic.h. Commit 341774fe6cc removed > QLIST_INSERT_HEAD_RCU() again, but neglected to remove the #include. > Do that now. > > Signed-off-by: Markus Armb

Re: [Qemu-devel] [PATCH v4 0/4] delete created files when block_crypto_co_create_opts_luks fails

2019-07-31 Thread Daniel Henrique Barboza
Ping On 6/28/19 4:45 PM, Daniel Henrique Barboza wrote: Changes from previous version [1]: - added an extra patch including a new qemu-iotest to exercise the fix [1] https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg07159.html Daniel Henrique Barboza (4): block: introducing 'bdrv_co

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-07-31 Thread Sergio Lopez
Andrea Bolognani writes: > On Mon, 2019-07-29 at 14:57 +0200, Sergio Lopez wrote: > [...] >> /* virtio-mmio device */ >> >> static Property virtio_mmio_properties[] = { >> DEFINE_PROP_BOOL("format_transport_address", VirtIOMMIOProxy, >> format_transport_address, tr

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-07-31 Thread Sergio Lopez
Michael S. Tsirkin writes: > On Tue, Jul 30, 2019 at 03:14:00PM +0200, Cornelia Huck wrote: >> On Tue, 30 Jul 2019 14:17:48 +0200 >> Andrea Bolognani wrote: >> >> > On Tue, 2019-07-30 at 13:35 +0200, Cornelia Huck wrote: >> > > On Tue, 30 Jul 2019 12:25:30 +0200 >> > > Andrea Bolognani wrote:

Re: [Qemu-devel] [PATCH v3 06/33] add the vmstate description for device reset state

2019-07-31 Thread Damien Hedde
On 7/31/19 8:08 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:27PM +0200, Damien Hedde wrote: >> It contains the resetting counter and cold flag status. >> >> At this point, migration of bus reset related state (counter and cold/warm >> flag) is handled by parent device. This done usin

Re: [Qemu-devel] [PATCH] ehci: Ensure that device is not NULL before calling usb_ep_get

2019-07-31 Thread Philippe Mathieu-Daudé
On 7/30/19 7:45 PM, Guenter Roeck wrote: > The following assert is seen once in a while while resetting the > Linux kernel. > > qemu-system-x86_64: hw/usb/core.c:734: usb_ep_get: > Assertion `dev != NULL' failed. > > The call to usb_ep_get() originates from ehci_execute(). > Analysis and de

Re: [Qemu-devel] [PATCH v3 05/33] Switch to new api in qdev/bus

2019-07-31 Thread Philippe Mathieu-Daudé
On 7/31/19 11:29 AM, Damien Hedde wrote: > On 7/31/19 8:05 AM, David Gibson wrote: >> On Mon, Jul 29, 2019 at 04:56:26PM +0200, Damien Hedde wrote: >>> Deprecate old reset apis and make them use the new one while they >>> are still used somewhere. >>> >>> Signed-off-by: Damien Hedde >>> --- >>> h

Re: [Qemu-devel] [PATCH v5] net: tap: replace snprintf with g_strdup_printf calls

2019-07-31 Thread Markus Armbruster
P J P writes: > From: Prasad J Pandit > > When invoking qemu-bridge-helper in 'net_bridge_run_helper', > instead of using fixed sized buffers, use dynamically allocated > ones initialised and returned by g_strdup_printf(). Does this fix a bug? > If bridge name 'br_buf' is undefined, pass empty

Re: [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device

2019-07-31 Thread Philippe Mathieu-Daudé
On 7/31/19 9:56 AM, Thomas Huth wrote: > The "register" device is only used by certain machines. Let's add > a proper config switch for it so that it only gets compiled when we > really need it. > > Signed-off-by: Thomas Huth > --- > hw/Kconfig| 1 + > hw/core/Kconfig | 3 +++ >

Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device

2019-07-31 Thread Philippe Mathieu-Daudé
On 7/31/19 9:56 AM, Thomas Huth wrote: > The device is only used by some few boards. Let's use a proper Kconfig > switch so that we only compile this code if we really need it. I'd prefer having the UnimpDevice user-creatable and always present as a core device... Maybe this can be solved by usin

Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device

2019-07-31 Thread Thomas Huth
On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote: > On 7/31/19 9:56 AM, Thomas Huth wrote: >> The device is only used by some few boards. Let's use a proper Kconfig >> switch so that we only compile this code if we really need it. > > I'd prefer having the UnimpDevice user-creatable and always pr

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Andrey Shinkevich
On 31/07/2019 10:24, Christian Borntraeger wrote: > > > On 30.07.19 21:20, Paolo Bonzini wrote: >> On 30/07/19 18:01, Andrey Shinkevich wrote: >>> Not the whole structure is initialized before passing it to the KVM. >>> Reduce the number of Valgrind reports. >>> >>> Signed-off-by: Andrey Shinkevi

Re: [Qemu-devel] [PATCH v3 1/9] block: add .bdrv_need_rw_file_child_during_reopen_rw handler

2019-07-31 Thread Max Reitz
On 25.07.19 11:18, Vladimir Sementsov-Ogievskiy wrote: > On reopen to rw parent may need rw access to child in .prepare, for > example qcow2 needs to write IN_USE flags into stored bitmaps > (currently it is done in a hacky way after commit and don't work). > So, let's introduce such logic. > > Th

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-07-31 Thread Sergio Lopez
Michael S. Tsirkin writes: > On Mon, Jul 29, 2019 at 02:57:55PM +0200, Sergio Lopez wrote: >> Implement the modern (v2) personality, according to the VirtIO 1.0 >> specification. >> >> Support for v2 among guests is not as widespread as it'd be >> desirable. While the Linux driver has had it fo

Re: [Qemu-devel] [PATCH v5 2/5] hw/block/pflash_cfi01: Use the correct READ_ARRAY value

2019-07-31 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus. > > On 7/16/19 5:12 PM, Markus Armbruster wrote: >> "Dr. David Alan Gilbert" writes: >> >>> * Markus Armbruster (arm...@redhat.com) wrote: Philippe asked me to have a look at this one, so here goes. > > Thanks a lot for your careful analysis. > >

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Christian Borntraeger
On 31.07.19 14:04, Andrey Shinkevich wrote: > On 31/07/2019 10:24, Christian Borntraeger wrote: >> >> >> On 30.07.19 21:20, Paolo Bonzini wrote: >>> On 30/07/19 18:01, Andrey Shinkevich wrote: Not the whole structure is initialized before passing it to the KVM. Reduce the number of Val

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Paolo Bonzini
On 31/07/19 11:05, Christophe de Dinechin wrote: > > Christian Borntraeger writes: > >> On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: >>> On 7/30/19 6:01 PM, Andrey Shinkevich wrote: Not the whole structure is initialized before passing it to the KVM. Reduce the number of Valgrind re

Re: [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device

2019-07-31 Thread Paolo Bonzini
On 31/07/19 13:44, Philippe Mathieu-Daudé wrote: > What about naming it REGISTER_ARRAY or REGISTER_BLOCK? > > The API is: > > RegisterInfoArray *register_init_block32(...); > > Cc'ing Alistair for better name ideas :) > I think REGISTER is okay. :) Paolo

Re: [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches

2019-07-31 Thread Paolo Bonzini
On 31/07/19 09:56, Thomas Huth wrote: > Here are some more Kconfig patches that clean up the switches of > existing devices and introduce proper config switches for some > other devices that were always enabled before. > > v2: > - Included Philippe's patches to avoid a conflict with XLNX_ZYNQMP >

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Christian Borntraeger
On 31.07.19 14:28, Christian Borntraeger wrote: > > > On 31.07.19 14:04, Andrey Shinkevich wrote: >> On 31/07/2019 10:24, Christian Borntraeger wrote: >>> >>> >>> On 30.07.19 21:20, Paolo Bonzini wrote: On 30/07/19 18:01, Andrey Shinkevich wrote: > Not the whole structure is initializ

[Qemu-devel] [PATCH] riscv: rv32: Root page table address can be larger than 32-bit

2019-07-31 Thread Bin Meng
For RV32, the root page table's PPN has 22 bits hence its address bits could be larger than the maximum bits that target_ulong is able to represent. Use hwaddr instead. Signed-off-by: Bin Meng --- target/riscv/cpu_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH RESEND v8 02/11] numa: move numa global variable nb_numa_nodes into MachineState

2019-07-31 Thread Igor Mammedov
On Wed, 31 Jul 2019 09:12:00 +0800 Tao Xu wrote: > Add struct NumaState in MachineState and move existing numa global > nb_numa_nodes(renamed as "num_nodes") into NumaState. And add variable > numa_support into MachineClass to decide which submachines support NUMA. > > Suggested-by: Igor Mammedo

[Qemu-devel] [PATCH] riscv: hmp: Add a command to show virtual memory mappings

2019-07-31 Thread Bin Meng
This adds 'info mem' command for RISC-V, to show virtual memory mappings that aids debugging. Rather than showing every valid PTE, the command compacts the output by merging all contiguous physical address mappings into one block and only shows the merged block mapping details. Signed-off-by: Bin

Re: [Qemu-devel] [PATCH v2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope

2019-07-31 Thread Marc-André Lureau
On Thu, Jul 25, 2019 at 12:44 PM Daniel P. Berrangé wrote: > > Both GCC and CLang support a C extension attribute((cleanup)) which > allows you to define a function that is invoked when a stack variable > exits scope. This typically used to free the memory allocated to it, > though you're not rest

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Paolo Bonzini
On 31/07/19 14:43, Christian Borntraeger wrote: >> if (has_xsave) { >> env->xsave_buf = qemu_memalign(4096, sizeof(struct kvm_xsave)); >> +memset(env->xsave_buf, 0, sizeof(struct kvm_xsave)); > This is memsetting 4k? > Yet another variant would be to use the RUN

Re: [Qemu-devel] [PATCH v3] blockjob: drain all job nodes in block_job_drain

2019-07-31 Thread John Snow
On 7/31/19 6:28 AM, Vladimir Sementsov-Ogievskiy wrote: > 30.07.2019 22:11, John Snow wrote: >> >> >> On 7/24/19 5:40 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Instead of draining additional nodes in each job code, let's do it in >>> common block_job_drain, draining just all job's children. >>

Re: [Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-07-31 Thread John Snow
On 7/31/19 6:01 AM, Vladimir Sementsov-Ogievskiy wrote: > 30.07.2019 21:40, John Snow wrote: >> >> >> On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >>> We have detect_zeroes option, so at least for blockdev-backup user >>> should define it if zero-detection is needed. For drive-backup

Re: [Qemu-devel] [PATCH 0/3] backup fixes for 4.1?

2019-07-31 Thread John Snow
On 7/31/19 6:29 AM, Vladimir Sementsov-Ogievskiy wrote: > 30.07.2019 21:41, John Snow wrote: >> >> >> On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >>> Hi all! >>> >>> Here are two small fixes. >>> >>> 01 is not a degradation at all, so it's OK for 4.2 >>> 02 is degradation of 3.0, so

[Qemu-devel] [Bug 1838465] Re: qemu-system-x86_64 kernel panic 30% of the time starting up VM

2019-07-31 Thread _
There are problems reliable booting the VM using TCG, HAXM, and Hyper-V. TCG fails the least often. Attached is a pic of the error using HAXM, a lot of "BUG: soft lockup detect on CPU#x!". I tried to add logging but nothing ever shows up in the log file. I tried adding "-d cpu,guest_errors -D E:\l

Re: [Qemu-devel] [PATCH 2/3] block/backup: disable copy_range for compressed backup

2019-07-31 Thread Vladimir Sementsov-Ogievskiy
30.07.2019 21:22, John Snow wrote: > > > On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >> Enabled by default copy_range ignores compress option. It's definitely >> unexpected for user. >> >> It's broken since introduction of copy_range usage in backup in >> 9ded4a011496. >> >> Signed-o

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-07-31 Thread Cornelia Huck
On Tue, 30 Jul 2019 16:18:52 -0400 "Michael S. Tsirkin" wrote: > On Tue, Jul 30, 2019 at 03:14:00PM +0200, Cornelia Huck wrote: > > On Tue, 30 Jul 2019 14:17:48 +0200 > > Andrea Bolognani wrote: > > > > > On Tue, 2019-07-30 at 13:35 +0200, Cornelia Huck wrote: > > > > On Tue, 30 Jul 2019 12

Re: [Qemu-devel] [PATCH v2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope

2019-07-31 Thread Alex Bennée
Daniel P. Berrangé writes: > Both GCC and CLang support a C extension attribute((cleanup)) which > allows you to define a function that is invoked when a stack variable > exits scope. This typically used to free the memory allocated to it, > though you're not restricted to this. For example it

Re: [Qemu-devel] [PATCH v2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope

2019-07-31 Thread Eric Blake
On 7/31/19 9:04 AM, Alex Bennée wrote: > > Daniel P. Berrangé writes: > >> Both GCC and CLang support a C extension attribute((cleanup)) which >> allows you to define a function that is invoked when a stack variable >> exits scope. This typically used to free the memory allocated to it, >> thoug

Re: [Qemu-devel] [PATCH v2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope

2019-07-31 Thread Daniel P . Berrangé
On Wed, Jul 31, 2019 at 03:04:29PM +0100, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > Both GCC and CLang support a C extension attribute((cleanup)) which > > allows you to define a function that is invoked when a stack variable > > exits scope. This typically used to free the memory

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Andrey Shinkevich
On 31/07/2019 15:32, Paolo Bonzini wrote: > On 31/07/19 11:05, Christophe de Dinechin wrote: >> >> Christian Borntraeger writes: >> >>> On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: On 7/30/19 6:01 PM, Andrey Shinkevich wrote: > Not the whole structure is initialized before passing it

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Andrey Shinkevich
On 31/07/2019 15:43, Christian Borntraeger wrote: > > > On 31.07.19 14:28, Christian Borntraeger wrote: >> >> >> On 31.07.19 14:04, Andrey Shinkevich wrote: >>> On 31/07/2019 10:24, Christian Borntraeger wrote: On 30.07.19 21:20, Paolo Bonzini wrote: > On 30/07/19 18:01, Andr

[Qemu-devel] [PATCH v3 00/18] ppc/pnv: add XIVE support for KVM guests

2019-07-31 Thread Cédric Le Goater
Hello, The QEMU PowerNV machine emulates a baremetal OpenPOWER system and acts as an hypervisor (L0). Supporting emulation of KVM to run guests (L1) requires a few more extensions, among which guest support for the XIVE interrupt controller on POWER9 processor. The following changes add new per-C

[Qemu-devel] [PATCH v3 02/18] tests/boot-serial-test: add support for all the PowerNV machines

2019-07-31 Thread Cédric Le Goater
Use the machine names specifiying the CPU type, POWER8 and POWER9. Signed-off-by: Cédric Le Goater --- tests/boot-serial-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 24852d4c7d0b..a54d007298f7 100644 --- a/

[Qemu-devel] [PATCH v3 01/18] ppc/pnv: Introduce PowerNV machines with fixed CPU models

2019-07-31 Thread Cédric Le Goater
Make the current "powernv" machine an abstract type and derive from it new machines with specific CPU models: power8 and power9. The "powernv" machine is now an alias on the "powernv9" machine. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 70 ++-

[Qemu-devel] [PATCH v3 08/18] ppc/pnv: Clarify how the TIMA is accessed on a multichip system

2019-07-31 Thread Cédric Le Goater
The TIMA MMIO space is shared among the chips and to identify the chip from which the access is being done, the PowerBUS uses a chip field in the load/store messages. QEMU does not model these messages, so instead, we extract the chip id from the CPU PIR and do a lookup at the machine level to fetc

[Qemu-devel] [PATCH v3 05/18] ppc/spapr: Implement the XiveFabric and XivePresenter interfaces

2019-07-31 Thread Cédric Le Goater
The CAM line matching sequence in the pseries machine does not change much apart from the use of the new QOM interfaces. Fixes: af53dbf6227a ("ppc/xive: introduce a simplified XIVE presenter") Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr_irq.h | 6 ++ hw/intc/spapr_xive.c

[Qemu-devel] [PATCH v3 07/18] ppc/xive: Extend the TIMA operation with a XivePresenter parameter

2019-07-31 Thread Cédric Le Goater
The TIMA operations are performed on behalf of the XIVE IVPE sub-engine (Presenter) on the thread interrupt context registers. The current operations the model supports are simple and do not require access to the controller but more complex operations we will add will need access to the controller

[Qemu-devel] [PATCH v3 03/18] ppc/xive: Introduce the XiveFabric and XivePresenter interfaces

2019-07-31 Thread Cédric Le Goater
When the XIVE IVRE sub-engine (XiveRouter) looks for a Notification Virtual Target (NVT) to notify, it broadcasts a message on the PowerBUS to find an XIVE IVPE sub-engine (Presenter) which has the NVT dispatched on one of its HW threads, and then forwards the notification if any response was recei

[Qemu-devel] [PATCH v3 10/18] ppc/xive: Introduce a xive_tctx_ipb_update() helper

2019-07-31 Thread Cédric Le Goater
We will use it to resend missed interrupts when a vCPU context is pushed a HW thread. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h | 1 + hw/intc/xive.c| 15 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/hw/ppc/xive.h b/include/hw/p

[Qemu-devel] [PATCH v3 06/18] ppc/xive: Use the XiveFabric and XivePresenter interfaces

2019-07-31 Thread Cédric Le Goater
Now that the machines have handlers implemented for the XiveFabric and XivePresenter interfaces, remove xive_presenter_match() and make use of the 'match_nvt' handler of the machine. Fixes: af53dbf6227a ("ppc/xive: introduce a simplified XIVE presenter") Signed-off-by: Cédric Le Goater --- hw/in

[Qemu-devel] [PATCH v3 04/18] ppc/pnv: Implement the XiveFabric and XivePresenter interfaces

2019-07-31 Thread Cédric Le Goater
The CAM line matching on the PowerNV machine now scans all chips of the system and all CPUs of a chip to find a dispatched NVT in the thread contexts. As there is now easy way to loop on the CPUs belonging to a chip, the PowerNV handler loops on all CPUs and filter out the external CPUs. Fixes: a

[Qemu-devel] [PATCH v3 13/18] ppc/pnv: Dump the XIVE NVT table

2019-07-31 Thread Cédric Le Goater
This is to track the configuration of the base END index of the vCPU and the Interrupt Pending Buffer. The NVT IPB is updated when an interrupt can not be presented to a vCPU. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive_regs.h | 2 ++ hw/intc/pnv_xive.c | 22

[Qemu-devel] [PATCH v3 09/18] ppc/xive: Move the TIMA operations to the controller model

2019-07-31 Thread Cédric Le Goater
This also removes the need of the get_tctx() XiveRouter handler in the core XIVE framework. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h | 3 --- hw/intc/pnv_xive.c| 48 ++- hw/intc/spapr_xive.c | 41 +++-

  1   2   3   4   >