Re: [Qemu-devel] [PATCH for-3.1? 3/3] acpi: fix stringop-truncation warnings

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 16:27, Marc-André Lureau wrote: Replace strcpy() that don't mind about having dest not ending with NUL char by qemu strpadcpy(). Signed-off-by: Marc-André Lureau --- hw/acpi/aml-build.c | 6 -- hw/acpi/core.c | 13 +++-- 2 files changed, 11 insertions(+), 8 del

Re: [Qemu-devel] [PATCH 0/3] fw_cfg: fix boot bootsplash and reboot-timeout error checking

2018-11-20 Thread Markus Armbruster
Li Qiang writes: > And also do some code cleanup. > A lot of thanks to Markus's review and advice. > > Li Qiang (3): > fw_cfg: fix -boot bootsplash error checking > fw_cfg: fix -boot reboot-timeout error checking > fw_cfg: make qemu_extra_params_fw locally > > hw/nvram/fw_cfg.c | 68

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-20 Thread Paolo Bonzini
On 20/11/18 19:48, Eduardo Habkost wrote: > On Tue, Nov 20, 2018 at 07:40:01PM +0100, Paolo Bonzini wrote: >> On 20/11/18 00:00, Eduardo Habkost wrote: >>> On Mon, Nov 19, 2018 at 04:55:13PM -0500, Bandan Das wrote: baldu...@units.it writes: > hello > > I'm building qemu from

Re: [Qemu-devel] [PATCH for-3.1? 2/3] migration: fix stringop-truncation warning

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 16:27, Marc-André Lureau wrote: Adding an assert is enough to silence GCC. ~/src/qemu/migration/global_state.c: In function 'global_state_store_running': ~/src/qemu/migration/global_state.c:45:5: error: 'strncpy' specified bound 100 equals destination size [-Werror=stringop-truncati

Re: [Qemu-devel] [PATCH for-3.1? 1/3] sheepdog: fix stringop-truncation warning

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 16:27, Marc-André Lureau wrote: It seems adding an assert is enough to silence GCC. (sd_parse_snapid_or_tag() g_strlcpy() ensures that we don't get in that situation) ~/src/qemu/block/sheepdog.c: In function 'find_vdi_name': ~/src/qemu/block/sheepdog.c:1239:5: error: 'strncpy' specif

Re: [Qemu-devel] [PATCH 1/3] fw_cfg: fix -boot bootsplash error checking

2018-11-20 Thread Markus Armbruster
Li Qiang writes: > fw_cfg_bootsplash() gets option parameter "splash-time" > with qemu_opt_get(), then converts it to an integer by hand. > It neglects to check that conversion for errors. This is > needlessly complicated and error-prone. But as "splash-time > not specified" is not the same as "s

Re: [Qemu-devel] [PATCH 2/3] fw_cfg: fix -boot reboot-timeout error checking

2018-11-20 Thread Markus Armbruster
Li Qiang writes: > fw_cfg_reboot() gets option parameter "reboot-timeout" with > qemu_opt_get(), then converts it to an integer by hand. It neglects to > check that conversion for errors, and fails to reject negative values. > Positive values above the limit get reported and replaced by the limit

Re: [Qemu-devel] [PATCH 03/13] target: arm: Move all v7m helpers into their own file

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 14:54, Peter Maydell wrote: On 13 November 2018 at 16:52, Samuel Ortiz wrote: In preparation for supporting TCG disablement on ARM, we move all TCG related v7m helpers and APIs into their own file (m_helper.c for all v*-m helpers). arm_v7m_cpu_do_interrupt pulls a large number of st

Re: [Qemu-devel] [PATCH v2 01/12] i2c: Split smbus into parts

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 16:47, Peter Maydell wrote: On 16 November 2018 at 13:20, Corey Minyard wrote: On 11/15/18 4:22 PM, Philippe Mathieu-Daudé wrote: --- /dev/null +++ b/include/hw/i2c/smbus_eeprom.h @@ -0,0 +1,11 @@ You missed the copyright notice here. Other files don't have copyright notices

Re: [Qemu-devel] [PATCH 3/3] fw_cfg: make qemu_extra_params_fw locally

2018-11-20 Thread Markus Armbruster
Li Qiang writes: > qemu_extra_params_fw[] has external linkage, but is used > only in fw_cfg_bootsplash(), it makes sense to make it > locally. > > Suggested-by: Markus Armbruster > Signed-off-by: Li Qiang Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-20 Thread Michael S. Tsirkin
On Tue, Nov 20, 2018 at 01:27:05PM +0100, Andrea Bolognani wrote: > On Mon, 2018-11-19 at 14:14 -0500, Michael S. Tsirkin wrote: > > On Mon, Nov 19, 2018 at 07:56:38PM +0100, Cornelia Huck wrote: > > > On Mon, 19 Nov 2018 13:42:58 -0500 "Michael S. Tsirkin" > > > wrote: > > > > We have this assum

Re: [Qemu-devel] [PATCH] scripts/qemu.py: allow to launch the VM without a monitor

2018-11-20 Thread Eduardo Habkost
On Tue, Nov 20, 2018 at 11:53:00AM -0500, Wainer dos Santos Moschetta wrote: > QEMUMachine launches the VM with a monitor enabled, afterwards > a qmp connection is attempted on _post_launch(). In case > the QEMU process exits with an error, qmp.accept() reaches > timeout and raises an exception. >

Re: [Qemu-devel] [PATCH for-3.1] nvme: fix out-of-bounds access to the CMB

2018-11-20 Thread Paolo Bonzini
On 19/11/18 18:43, Kevin Wolf wrote: > Am 19.11.2018 um 18:09 hat Paolo Bonzini geschrieben: >> On 19/11/18 16:23, Mark Kanda wrote: >>> For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as >>> opposed to this one). Was this done in error? >> >> Probably. Kevin, can you revert

Re: [Qemu-devel] [Qemu-ppc] [PATCH for 3.1] spapr: Fix ibm, max-associativity-domains property number of nodes

2018-11-20 Thread Serhii Popovych
Greg Kurz wrote: > On Mon, 19 Nov 2018 14:48:34 +0100 > Laurent Vivier wrote: > >> On 19/11/2018 14:27, Greg Kurz wrote: >>> On Mon, 19 Nov 2018 08:09:38 -0500 >>> Serhii Popovych wrote: >>> Laurent Vivier reported off by one with maximum number of NUMA nodes provided by qemu-kvm be

Re: [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract

2018-11-20 Thread Laszlo Ersek
On 11/20/18 17:33, Igor Mammedov wrote: > On Wed, 7 Nov 2018 16:36:40 +0400 > Marc-André Lureau wrote: > >> Interfaces don't have instance, let's make the interface type really >> abstract to avoid confusion. >> >> Signed-off-by: Marc-André Lureau >> --- >> include/hw/acpi/acpi_dev_interface.h

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-20 Thread Eduardo Habkost
On Tue, Nov 20, 2018 at 07:40:01PM +0100, Paolo Bonzini wrote: > On 20/11/18 00:00, Eduardo Habkost wrote: > > On Mon, Nov 19, 2018 at 04:55:13PM -0500, Bandan Das wrote: > >> baldu...@units.it writes: > >> > >>> hello > >>> > >>> I'm building qemu from source and happily using it since a bit > >>>

[Qemu-devel] [PATCH] nvme: fix out-of-bounds access to the CMB

2018-11-20 Thread Paolo Bonzini
Because the CMB BAR has a min_access_size of 2, if you read the last byte it will try to memcpy *2* bytes from n->cmbuf, causing an off-by-one error. This is CVE-2018-16847. Another way to fix this might be to register the CMB as a RAM memory region, which would also be more efficient. However,

Re: [Qemu-devel] [PATCH v5 00/16] Don't pass flags to bdrv_reopen_queue()

2018-11-20 Thread Alberto Garcia
On Tue 20 Nov 2018 07:21:21 PM CET, Kevin Wolf wrote: > Am 12.11.2018 um 15:00 hat Alberto Garcia geschrieben: >> Hi all, >> >> when reopening a BlockDriverState using bdrv_reopen() and friends the >> new options can be specified either with a QDict or with flags. Both >> methods overlap and that

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-20 Thread Paolo Bonzini
On 20/11/18 00:00, Eduardo Habkost wrote: > On Mon, Nov 19, 2018 at 04:55:13PM -0500, Bandan Das wrote: >> baldu...@units.it writes: >> >>> hello >>> >>> I'm building qemu from source and happily using it since a bit >>> (2.3.0) >>> >>> Since 3.1.0-rc0 (including latest 3.1.0-rc1) I'm no more able

Re: [Qemu-devel] [PATCH] qom: avoid reporting errors for NULL error object

2018-11-20 Thread Markus Armbruster
Daniel P. Berrangé writes: > When debugging QEMU it is often useful to put a breakpoint on the > error_setg_internal method impl. > > Unfortunately the object_property_add / object_class_property_add > methods call object_property_find / object_class_property_find methods > to check if a property

Re: [Qemu-devel] [PATCH qemu RFC 3/7] pci: Move NVIDIA vendor id to the rest of ids

2018-11-20 Thread Alistair Francis
On Tue, Nov 13, 2018 at 12:42 AM Alexey Kardashevskiy wrote: > > sPAPR code will use it too so move it from VFIO to the common code. > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: Alistair Francis Alistair > --- > include/hw/pci/pci_ids.h | 2 ++ > hw/vfio/pci-quirks.c | 2 -- > 2

Re: [Qemu-devel] [PATCH v2 0/5] migration: improve multithreads

2018-11-20 Thread Paolo Bonzini
On 12/11/18 04:07, Xiao Guangrong wrote: > > Hi, > > Ping... Hi Guangrong, I think this isn't being reviewed because we're in freeze. Paolo > On 11/6/18 8:20 PM, guangrong.x...@gmail.com wrote: >> From: Xiao Guangrong >> >> Changelog in v2: >> These changes are based on Paolo's suggestion: >>

[Qemu-devel] [PATCH 0/2] tpm: Cleanup and locality range check

2018-11-20 Thread Stefan Berger
This series of patches removes an unnecessary parameter from tpm_tis_abort() and adds a locality range check to tpm_tis_prep_abort(). Stefan Stefan Berger (2): tpm: Remove unused locty parameter from tpm_tis_abort() tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid hw/t

Re: [Qemu-devel] [PATCH v5 05/16] block: Use bdrv_reopen_set_read_only() in stream_start/complete()

2018-11-20 Thread Alberto Garcia
On Tue 20 Nov 2018 07:00:29 PM CET, Kevin Wolf wrote: >> @@ -226,12 +226,12 @@ void stream_start(const char *job_id, BlockDriverState >> *bs, >> { >> StreamBlockJob *s; >> BlockDriverState *iter; >> -int orig_bs_flags; >> +int bs_read_only; > > bool certainly? Oops! Berto

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-20 Thread Eric Blake
On 11/20/18 11:53 AM, Daniel P. Berrangé wrote: +echo +echo "== preparing TLS creds ==" + +tls_x509_create_root_ca "ca1" +tls_x509_create_root_ca "ca2" +tls_x509_create_server "ca1" "server1" +tls_x509_create_client "ca1" "client1" +tls_x509_create_client "ca2" "client2" Looks like we can't bl

[Qemu-devel] [PATCH 1/2] tpm: Remove unused locty parameter from tpm_tis_abort()

2018-11-20 Thread Stefan Berger
Remove the unused locty parameter from tpm_tis_abort() function. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index d9322692ee..176d424ed9 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm

[Qemu-devel] [PATCH 2/2] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

2018-11-20 Thread Stefan Berger
Make sure that the new locality passed to tpm_tis_prep_abort() is valid. This is merely a precaution since none of the current callers passes an invalid locality number into this function. Add a comment to aborting_locty that it may be any locality, including TPM_TIS_NO_LOCALITY. Signed-off-by: S

Re: [Qemu-devel] [PATCH v5 00/16] Don't pass flags to bdrv_reopen_queue()

2018-11-20 Thread Kevin Wolf
Am 12.11.2018 um 15:00 hat Alberto Garcia geschrieben: > Hi all, > > when reopening a BlockDriverState using bdrv_reopen() and friends the > new options can be specified either with a QDict or with flags. Both > methods overlap and that makes the semantics and the implementation > unnecessarily co

Re: [Qemu-devel] [PATCH] tests: fix nbd test to work correctly with raw images

2018-11-20 Thread Eric Blake
On 11/20/18 11:56 AM, Daniel P. Berrangé wrote: The first qemu-io command must honour the $IMGFMT that is set rather than hardcoding qcow2. The qemu-nbd commands should also set $IMGFMT to avoid the insecure format probe warning. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/233 |

Re: [Qemu-devel] [PATCH v1] tpm: check localities index

2018-11-20 Thread P J P
Hello Stefan, +-- On Tue, 20 Nov 2018, Stefan Berger wrote --+ | On 11/20/18 2:22 AM, P J P wrote: | > From: Prasad J Pandit | > | > While performing mmio device r/w operations, guest could set 'addr' | > parameter such that 'locty' index exceeds TPM_TIS_NUM_LOCALITIES=5 | > after setting new '

Re: [Qemu-devel] [PATCH v5 00/14] arm: nRF51 Devices and Microbit Support

2018-11-20 Thread Steffen Görtz
Thank you Stefan and Peter for your thoughtful comments and all the time that went into this patch series already. I will send a revision of the patch series today or tomorrow. Best, Steffen On 19.11.18 08:02, Stefan Hajnoczi wrote: > On Mon, Nov 12, 2018 at 04:42:10PM -0500, Steffen Görtz wrote

Re: [Qemu-devel] [PATCH v5 05/16] block: Use bdrv_reopen_set_read_only() in stream_start/complete()

2018-11-20 Thread Kevin Wolf
Am 12.11.2018 um 15:00 hat Alberto Garcia geschrieben: > This patch replaces the bdrv_reopen() calls that set and remove the > BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. > > Signed-off-by: Alberto Garcia > Reviewed-by: Max Reitz > --- > block/stream.c | 20 ++---

[Qemu-devel] [PATCH] tests: fix nbd test to work correctly with raw images

2018-11-20 Thread Daniel P . Berrangé
The first qemu-io command must honour the $IMGFMT that is set rather than hardcoding qcow2. The qemu-nbd commands should also set $IMGFMT to avoid the insecure format probe warning. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/233 | 9 ++--- 1 file changed, 6 insertions(+), 3 del

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-20 Thread Daniel P . Berrangé
On Tue, Nov 20, 2018 at 11:45:54AM -0600, Eric Blake wrote: > On 11/20/18 11:27 AM, Kevin Wolf wrote: > > Am 16.11.2018 um 16:53 hat Daniel P. Berrangé geschrieben: > > > Add tests that validate it is possible to connect to an NBD server > > > running TLS mode. Also test mis-matched TLS vs non-TLS

Re: [Qemu-devel] [PATCH] block/nvme: call blk_drain in NVMe reset code to avoid lockups

2018-11-20 Thread Paolo Bonzini
On 20/11/18 18:31, Igor Druzhinin wrote: > On 14/11/2018 17:42, Igor Druzhinin wrote: >> On 06/11/2018 12:16, Igor Druzhinin wrote: >>> When blk_flush called in NVMe reset path S/C queues are already freed >>> which means that re-entering AIO handling loop having some IO requests >>> unfinished wil

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-20 Thread Eric Blake
On 11/20/18 11:27 AM, Kevin Wolf wrote: Am 16.11.2018 um 16:53 hat Daniel P. Berrangé geschrieben: Add tests that validate it is possible to connect to an NBD server running TLS mode. Also test mis-matched TLS vs non-TLS connections correctly fail. +echo +echo "== preparing TLS creds ==" + +t

Re: [Qemu-devel] [PULL 0/8] Monitor patches for 2018-10-30

2018-11-20 Thread Markus Armbruster
Peter Xu writes: > On Mon, Nov 19, 2018 at 07:08:13PM +0100, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Mon, Nov 19, 2018 at 02:17:27PM +0800, Peter Xu wrote: >> >> I reproduced the error with a FreeBSD guest and this change (which >> >> possibly can be squashed into "tests: qmp-te

Re: [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract

2018-11-20 Thread Eduardo Habkost
On Tue, Nov 20, 2018 at 05:33:24PM +0100, Igor Mammedov wrote: > On Wed, 7 Nov 2018 16:36:40 +0400 > Marc-André Lureau wrote: > > > Interfaces don't have instance, let's make the interface type really > > abstract to avoid confusion. > > > > Signed-off-by: Marc-André Lureau > > --- > > includ

[Qemu-devel] [PATCH v2] MAINTAINERS: Assign some more files in the hw/arm/ directory

2018-11-20 Thread Thomas Huth
I apparently missed some more files and even a complete machine (the "imx25-pdk") in my previous patch... but now we should hopefully have a completely coverage for all available ARM boards. Fixes: 95a5db3ae5698b49c63144610ad02913e780c828 Signed-off-by: Thomas Huth --- v2: Dropped smmu* files fr

Re: [Qemu-devel] [PATCH v2 7/9] test-string-input-visitor: Use virtual walk

2018-11-20 Thread Eric Blake
On 11/20/18 3:25 AM, David Hildenbrand wrote: We now support virtual walks, so use that instead. Reviewed-by: Markus Armbruster Signed-off-by: David Hildenbrand --- tests/test-string-input-visitor.c | 36 +++ 1 file changed, 12 insertions(+), 24 deletions(-) Re

Re: [Qemu-devel] [PATCH v2 6/9] qapi: Rewrite string-input-visitor

2018-11-20 Thread Eric Blake
On 11/20/18 3:25 AM, David Hildenbrand wrote: The input visitor has some problems right now, especially - unsigned type "Range" is used to process signed ranges, resulting in inconsistent behavior and ugly/magical code - uint64_t are parsed like int64_t, so big uint64_t values are not suppo

Re: [Qemu-devel] [PATCH] block/nvme: call blk_drain in NVMe reset code to avoid lockups

2018-11-20 Thread Igor Druzhinin
On 14/11/2018 17:42, Igor Druzhinin wrote: > On 06/11/2018 12:16, Igor Druzhinin wrote: >> When blk_flush called in NVMe reset path S/C queues are already freed >> which means that re-entering AIO handling loop having some IO requests >> unfinished will lockup or crash as their SG structures being

Re: [Qemu-devel] [PATCH v2 5/9] test-string-input-visitor: Add more tests

2018-11-20 Thread Eric Blake
On 11/20/18 11:20 AM, Eric Blake wrote: On 11/20/18 11:06 AM, Eric Blake wrote: On 11/20/18 3:25 AM, David Hildenbrand wrote: Test that very big/small values are not accepted and that ranges with only one element work. Also test that ranges are ascending and cannot have more than 65536 elements

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-20 Thread Kevin Wolf
Am 16.11.2018 um 16:53 hat Daniel P. Berrangé geschrieben: > Add tests that validate it is possible to connect to an NBD server > running TLS mode. Also test mis-matched TLS vs non-TLS connections > correctly fail. > +echo > +echo "== preparing TLS creds ==" > + > +tls_x509_create_root_ca "ca1" >

Re: [Qemu-devel] [PATCH for-3.1? 2/3] migration: fix stringop-truncation warning

2018-11-20 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi > > On Tue, Nov 20, 2018 at 9:22 PM Dr. David Alan Gilbert > wrote: > > > > * Eric Blake (ebl...@redhat.com) wrote: > > > On 11/20/18 9:27 AM, Marc-André Lureau wrote: > > > > Adding an assert is enough to silence GCC. > > > > > > > >

[Qemu-devel] [PATCH 2/2] iotests: Replace assertEquals() with assertEqual()

2018-11-20 Thread Kevin Wolf
TestCase.assertEquals() is deprecated since Python 2.7. Recent Python versions print a warning when the function is called, which makes test cases fail. Replace it with the preferred spelling assertEqual(). Signed-off-by: Kevin Wolf --- tests/qemu-iotests/041| 6 +++--- tests/qemu-iotes

[Qemu-devel] [PATCH for-3.1 0/2] iotests: More Python 3 fixes

2018-11-20 Thread Kevin Wolf
Kevin Wolf (2): iotests: Replace time.clock() with Timeout iotests: Replace assertEquals() with assertEqual() tests/qemu-iotests/041| 6 +++--- tests/qemu-iotests/118| 20 tests/qemu-iotests/iotests.py | 2 +- 3 files changed, 12 insertions(+), 16 deleti

Re: [Qemu-devel] [PATCH for-3.1? 2/3] migration: fix stringop-truncation warning

2018-11-20 Thread Marc-André Lureau
Hi On Tue, Nov 20, 2018 at 9:22 PM Dr. David Alan Gilbert wrote: > > * Eric Blake (ebl...@redhat.com) wrote: > > On 11/20/18 9:27 AM, Marc-André Lureau wrote: > > > Adding an assert is enough to silence GCC. > > > > > > ~/src/qemu/migration/global_state.c: In function > > > 'global_state_store_r

[Qemu-devel] [PATCH 1/2] iotests: Replace time.clock() with Timeout

2018-11-20 Thread Kevin Wolf
time.clock() is deprecated since Python 3.3. Current Python versions warn that the function will be removed in Python 3.8, and those warnings make the test case 118 fail. Replace it with the Timeout mechanism that is compatible with both Python 2 and 3, and makes the code even a little nicer. Sig

Re: [Qemu-devel] [PATCH for-3.1? 2/3] migration: fix stringop-truncation warning

2018-11-20 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 11/20/18 9:27 AM, Marc-André Lureau wrote: > > Adding an assert is enough to silence GCC. > > > > ~/src/qemu/migration/global_state.c: In function > > 'global_state_store_running': > > ~/src/qemu/migration/global_state.c:45:5: error: 'strncpy' specifie

Re: [Qemu-devel] [PATCH v2 5/9] test-string-input-visitor: Add more tests

2018-11-20 Thread Eric Blake
On 11/20/18 11:06 AM, Eric Blake wrote: On 11/20/18 3:25 AM, David Hildenbrand wrote: Test that very big/small values are not accepted and that ranges with only one element work. Also test that ranges are ascending and cannot have more than 65536 elements. Rename expect4 to expect5, as we will

Re: [Qemu-devel] [PATCH] hw/arm/stm32f205: Fix the UART and Timer region size

2018-11-20 Thread Alistair Francis
On Mon, Nov 19, 2018 at 3:35 AM Philippe Mathieu-Daudé wrote: > > On Mon, Nov 19, 2018 at 12:08 PM Peter Maydell > wrote: > > On 19 November 2018 at 10:43, Philippe Mathieu-Daudé > > wrote: > > > Hi Seth, > > > > > > On Mon, Nov 19, 2018 at 4:17 AM Seth K wrote: > > >> > > >> From: Seth Kinti

Re: [Qemu-devel] [PATCH 05/22] display/g364fb: Convert sysbus init function to realize function

2018-11-20 Thread Alistair Francis
On Mon, Nov 19, 2018 at 4:28 AM Mao Zhongyi wrote: > > Use DeviceClass rather than SysBusDeviceClass in > g364fb_sysbus_class_init(). > > Cc: pbonz...@redhat.com > Cc: kra...@redhat.com > Cc: f4...@amsat.org > Cc: alistair.fran...@wdc.com > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shen

Re: [Qemu-devel] [PATCH v2 5/9] test-string-input-visitor: Add more tests

2018-11-20 Thread Eric Blake
On 11/20/18 3:25 AM, David Hildenbrand wrote: Test that very big/small values are not accepted and that ranges with only one element work. Also test that ranges are ascending and cannot have more than 65536 elements. Rename expect4 to expect5, as we will be moving that to a separate ulist test a

Re: [Qemu-devel] [PATCH for-3.1? 3/3] acpi: fix stringop-truncation warnings

2018-11-20 Thread Eric Blake
On 11/20/18 9:27 AM, Marc-André Lureau wrote: Replace strcpy() that don't mind about having dest not ending with NUL char by qemu strpadcpy(). Signed-off-by: Marc-André Lureau --- hw/acpi/aml-build.c | 6 -- hw/acpi/core.c | 13 +++-- 2 files changed, 11 insertions(+), 8 d

Re: [Qemu-devel] [PATCH for-3.1? 2/3] migration: fix stringop-truncation warning

2018-11-20 Thread Eric Blake
On 11/20/18 9:27 AM, Marc-André Lureau wrote: Adding an assert is enough to silence GCC. ~/src/qemu/migration/global_state.c: In function 'global_state_store_running': ~/src/qemu/migration/global_state.c:45:5: error: 'strncpy' specified bound 100 equals destination size [-Werror=stringop-trunca

Re: [Qemu-devel] [PATCH v2 04/12] i2c: Add a length check to the SMBus write handling

2018-11-20 Thread Corey Minyard
On 11/20/18 9:33 AM, Peter Maydell wrote: On 15 November 2018 at 19:24, wrote: From: Corey Minyard Avoid an overflow. Signed-off-by: Corey Minyard --- hw/i2c/smbus_slave.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/i2c/smbus_slave.c b/hw/i2c/smbus_slave.

Re: [Qemu-devel] [PATCH for-3.1? 1/3] sheepdog: fix stringop-truncation warning

2018-11-20 Thread Eric Blake
On 11/20/18 9:27 AM, Marc-André Lureau wrote: It seems adding an assert is enough to silence GCC. (sd_parse_snapid_or_tag() g_strlcpy() ensures that we don't get in that situation) ~/src/qemu/block/sheepdog.c: In function 'find_vdi_name': ~/src/qemu/block/sheepdog.c:1239:5: error: 'strncpy' spec

Re: [Qemu-devel] [SeaBIOS] SeaBIOS booting time optimization

2018-11-20 Thread Stefano Garzarella
On Tue, Nov 20, 2018 at 5:13 PM Steve Douthit wrote: > > On 11/20/18 10:55 AM, Kevin O'Connor wrote: > > On Mon, Nov 19, 2018 at 07:38:39PM +0100, Stefano Garzarella wrote: > >> just an update, I enabled the debug prints and I saw two timeouts fired > >> with a lot > >> of time lost (~780ms betwee

Re: [Qemu-devel] [PATCH for-3.2 v3 05/14] qdev: move qdev_prop_register_global_list() to tests

2018-11-20 Thread Igor Mammedov
On Wed, 7 Nov 2018 16:36:43 +0400 Marc-André Lureau wrote: > The function is only used by a test, move it there. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Eduardo Habkost Reviewed-by: Igor Mammedov > --- > include/hw/qdev-properties.h | 1 - > hw/core/qdev-properties.c |

Re: [Qemu-devel] [PATCH for-3.2 v3 03/14] qom: make user_creatable_complete() specific to UserCreatable

2018-11-20 Thread Igor Mammedov
On Wed, 7 Nov 2018 16:36:41 +0400 Marc-André Lureau wrote: > Instead of accepting any Object*, change user_creatable_complete() to > require a UserCreatable*. Modify the callers to pass the appropriate > argument, removing redundant dynamic cast checks in object creation. Looks like it doesn't

Re: [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract

2018-11-20 Thread Igor Mammedov
On Wed, 7 Nov 2018 16:36:40 +0400 Marc-André Lureau wrote: > Interfaces don't have instance, let's make the interface type really > abstract to avoid confusion. > > Signed-off-by: Marc-André Lureau > --- > include/hw/acpi/acpi_dev_interface.h | 6 +- > include/hw/arm/linux-boot-if.h

Re: [Qemu-devel] [PATCH v2 2/5] util: introduce threaded workqueue

2018-11-20 Thread Emilio G. Cota
On Tue, Nov 20, 2018 at 18:25:25 +0800, Xiao Guangrong wrote: > On 11/14/18 2:38 AM, Emilio G. Cota wrote: > > On Tue, Nov 06, 2018 at 20:20:22 +0800, guangrong.x...@gmail.com wrote: > > > From: Xiao Guangrong (snip) > > Batching achieves higher performance at high core counts (>8), > > since work

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-20 Thread Eric Blake
On 11/20/18 3:25 AM, David Hildenbrand wrote: qemu_strtosz() & friends reject NaNs, but happily accept inifities. s/inifities/infinities/ They shouldn't. Fix that. The fix makes use of qemu_strtod_finite(). To avoid ugly casts, change the @end parameter of qemu_strtosz() & friends from char

Re: [Qemu-devel] [SeaBIOS] SeaBIOS booting time optimization

2018-11-20 Thread Steve Douthit
On 11/20/18 10:55 AM, Kevin O'Connor wrote: > On Mon, Nov 19, 2018 at 07:38:39PM +0100, Stefano Garzarella wrote: >> just an update, I enabled the debug prints and I saw two timeouts fired >> with a lot >> of time lost (~780ms between "init timer" and "Scan for VGA ..."), >> putting other prints I

Re: [Qemu-devel] [PATCH v2 1/9] cutils: Add qemu_strtod() and qemu_strtod_finite()

2018-11-20 Thread Eric Blake
On 11/20/18 3:25 AM, David Hildenbrand wrote: Let's provide a wrapper for strtod(). Reviewed-by: Eric Blake This changed enough from v1 that I would have dropped R-b to ensure that reviewers notice the differences. Signed-off-by: David Hildenbrand --- include/qemu/cutils.h | 2 ++ ut

Re: [Qemu-devel] [PATCH] qapi: add query-display-options command

2018-11-20 Thread Eric Blake
On 11/20/18 2:56 AM, Gerd Hoffmann wrote: Add query-display-options command, which allows to query the qemu s/allows to query/allows querying/ display configuration, and -- as intentional side effect -- makes s/as/as an/ DisplayOptions discoverable via query-qmp-schema so libvirt can go f

Re: [Qemu-devel] [SeaBIOS] SeaBIOS booting time optimization

2018-11-20 Thread Kevin O'Connor
On Mon, Nov 19, 2018 at 07:38:39PM +0100, Stefano Garzarella wrote: > just an update, I enabled the debug prints and I saw two timeouts fired > with a lot > of time lost (~780ms between "init timer" and "Scan for VGA ..."), > putting other prints I discovered that a lot of time is spent in the > tp

Re: [Qemu-devel] [PATCH v1] tpm: check localities index

2018-11-20 Thread Stefan Berger
On 11/20/18 2:22 AM, P J P wrote: From: Prasad J Pandit While performing mmio device r/w operations, guest could set 'addr' parameter such that 'locty' index exceeds TPM_TIS_NUM_LOCALITIES=5 after setting new 'locty' via 'tpm_tis_new_active_locality'. Add check to avoid OOB access. Do you hav

Re: [Qemu-devel] [PATCH v2 01/12] i2c: Split smbus into parts

2018-11-20 Thread Peter Maydell
On 16 November 2018 at 13:20, Corey Minyard wrote: > On 11/15/18 4:22 PM, Philippe Mathieu-Daudé wrote: >>> --- /dev/null >>> +++ b/include/hw/i2c/smbus_eeprom.h >>> @@ -0,0 +1,11 @@ >> >> >> You missed the copyright notice here. > > > Other files don't have copyright notices (i2c.h, for instance)

Re: [Qemu-devel] [PATCH v2 09/12] i2c: Add normal type name and cast to smbus_eeprom.c

2018-11-20 Thread Peter Maydell
On 15 November 2018 at 19:24, wrote: > From: Corey Minyard > > Create a type name and a cast macro and use those through the > code. > > Signed-off-by: Corey Minyard > --- > hw/i2c/smbus_eeprom.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) Reviewed-by: Peter Mayde

Re: [Qemu-devel] [PATCH for-3.2 v3 01/14] tests: qdev_prop_check_globals() doesn't return "all_used"

2018-11-20 Thread Igor Mammedov
On Wed, 7 Nov 2018 16:36:39 +0400 Marc-André Lureau wrote: > Instead, it returns 1 if an error was detected, which is the case for: > > /qdev/properties/dynamic/global/subprocess: > warning: global dynamic-prop-type-bad.prop3 has invalid class name > warning: global nohotplug-type.prop5=105 not

Re: [Qemu-devel] [PATCH v2 04/12] i2c: Add a length check to the SMBus write handling

2018-11-20 Thread Peter Maydell
On 15 November 2018 at 19:24, wrote: > From: Corey Minyard > > Avoid an overflow. > > Signed-off-by: Corey Minyard > --- > hw/i2c/smbus_slave.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/hw/i2c/smbus_slave.c b/hw/i2c/smbus_slave.c > index 83ca041b5d..fa988919

Re: [Qemu-devel] [PATCH v2 02/12] i2c: have I2C receive operation return uint8_t

2018-11-20 Thread Peter Maydell
On 15 November 2018 at 19:24, wrote: > From: Corey Minyard > > It is never supposed to fail and cannot return an error, so just > have it return the proper type. Have it return 0xff on nothing > available, since that's what would happen on a real bus. > > Signed-off-by: Corey Minyard This is

[Qemu-devel] [PATCH for-3.1? 3/3] acpi: fix stringop-truncation warnings

2018-11-20 Thread Marc-André Lureau
Replace strcpy() that don't mind about having dest not ending with NUL char by qemu strpadcpy(). Signed-off-by: Marc-André Lureau --- hw/acpi/aml-build.c | 6 -- hw/acpi/core.c | 13 +++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/

[Qemu-devel] [PATCH for-3.1? 1/3] sheepdog: fix stringop-truncation warning

2018-11-20 Thread Marc-André Lureau
It seems adding an assert is enough to silence GCC. (sd_parse_snapid_or_tag() g_strlcpy() ensures that we don't get in that situation) ~/src/qemu/block/sheepdog.c: In function 'find_vdi_name': ~/src/qemu/block/sheepdog.c:1239:5: error: 'strncpy' specified bound 256 equals destination size [-Werro

[Qemu-devel] [PATCH for-3.1? 2/3] migration: fix stringop-truncation warning

2018-11-20 Thread Marc-André Lureau
Adding an assert is enough to silence GCC. ~/src/qemu/migration/global_state.c: In function 'global_state_store_running': ~/src/qemu/migration/global_state.c:45:5: error: 'strncpy' specified bound 100 equals destination size [-Werror=stringop-truncation] strncpy((char *)global_state.runstate

[Qemu-devel] [PATCH for-3.1? 0/3] strcpy: fix stringop-truncation warnings

2018-11-20 Thread Marc-André Lureau
Hi, Some of those warnings have already been fixed, others have been delayed as it could make sense to disable/ignoring the warning, or write a custom strncpy() function. In some cases where NUL-ending string is not mandatory (because the string length is bound in some format or protocol), we can

Re: [Qemu-devel] Can't see mouse cursor on VNC viewer

2018-11-20 Thread Gerd Hoffmann
On Tue, Nov 20, 2018 at 12:37:13PM +, Guoheyi wrote: > Hi folks, > > I'm using qemu 2.8 on ARM64 with KVM enabled, and TightVNC on MS > Windows as a VNC viewer. We can see the graphic screen on VNC viewer, > but we can't see the mouse cursor after we enable "Mouse Cursor -> Let > remote server

Re: [Qemu-devel] [PATCH v3 10/11] pci/shpc: perform unplug via the hotplug handler

2018-11-20 Thread Igor Mammedov
On Tue, 20 Nov 2018 12:04:26 +0100 David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the bus hot

Re: [Qemu-devel] [PATCH] migration/block-dirty-bitmap: Silence coverity CID 1390625

2018-11-20 Thread Vladimir Sementsov-Ogievskiy
16.11.2018 21:43, John Snow wrote: > Coverity warns that backing_bs() could give us a NULL pointer, which > we then use without checking that it isn't. > > In our loop condition, we check bs && bs->drv as a point of habit, but > by nature of the block graph, we cannot have null bs pointers here. >

Re: [Qemu-devel] [PATCH v3 09/11] pci: Reuse pci-bridge hotplug handler handlers for pcie-pci-bridge

2018-11-20 Thread Igor Mammedov
On Tue, 20 Nov 2018 12:04:25 +0100 David Hildenbrand wrote: > These functions are essentially the same, we only have to use > object_get_typename() for reporting errors. So let's share the > implementation of hotplug handler callbacks. > > Suggested-by: Igor Mammedov > Signed-off-by: David Hild

Re: [Qemu-devel] [PATCH RESEND v15 10/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2018-11-20 Thread Peter Maydell
On 8 November 2018 at 10:29, Dongjiu Geng wrote: > Add SIGBUS signal handler. In this handler, it checks the SIGBUS type, > translates the host VA delivered by host to guest PA, then fill this PA > to guest APEI GHES memory, then notify guest according to the SIGBUS type. > There are two kinds of

Re: [Qemu-devel] [PATCH RESEND v15 08/10] target-arm: kvm64: inject synchronous External Abort

2018-11-20 Thread Peter Maydell
On 8 November 2018 at 10:29, Dongjiu Geng wrote: > Add synchronous external abort injection logic, setup > exception type and syndrome value. When switch to guest, > guest will jump to the synchronous external abort vector > table entry. > > The ESR_ELx.DFSC is set to synchronous external abort(0x

Re: [Qemu-devel] [PATCH RESEND v15 09/10] hw/arm/virt: Add RAS platform version for migration

2018-11-20 Thread Peter Maydell
On 8 November 2018 at 10:29, Dongjiu Geng wrote: > Support this feature since version 2.12, disable it by > default in the old version. > > Signed-off-by: Dongjiu Geng > --- > Address Shannon's comments to add platform version in [1]. > > [1]: https://lkml.org/lkml/2017/8/25/821 > --- > hw/arm/v

Re: [Qemu-devel] [PATCH RESEND v15 07/10] KVM: Move related hwpoison page functions to accel/kvm/ folder

2018-11-20 Thread Peter Maydell
On 8 November 2018 at 10:29, Dongjiu Geng wrote: > kvm_hwpoison_page_add() and kvm_unpoison_all() will be used both > by X86 and ARM platforms, so move these functions to a common > accel/kvm/ folder to avoid duplicate code. > > Signed-off-by: Dongjiu Geng > --- > Address Peter's comments to move

Re: [Qemu-devel] [PATCH 13/22] puv3_pm.c: Convert sysbus init function to realize function

2018-11-20 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > puv3_pm_class_init(). > > Cc: g...@mprc.pku.edu.cn > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- > hw/misc/puv3_pm.c | 10 -- > 1 file changed, 4 insertions(+), 6

Re: [Qemu-devel] [PATCH 14/22] nvram/ds1225y: Convert sysbus init function to realize function

2018-11-20 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > nvram_sysbus_class_init(). > > Cc: pbonz...@redhat.com > Cc: marcandre.lur...@redhat.com > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- > hw/nvram/ds1225y.c | 12 +-

Re: [Qemu-devel] [PATCH 20/22] xen_backend: Convert sysbus init function to realize function

2018-11-20 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > xen_sysdev_class_init(). > > Cc: sstabell...@kernel.org > Cc: anthony.per...@citrix.com > Cc: xen-de...@lists.xenproject.org > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- >

Re: [Qemu-devel] [PATCH 04/22] core/empty_slot: Convert sysbus init function to realize function

2018-11-20 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > empty_slot_class_init(). > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- > hw/core/empty_slot.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --g

Re: [Qemu-devel] [PATCH 11/22] milkymist-hpdmc: Convert sysbus init function to realize function

2018-11-20 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > milkymist_hpdmc_class_init(). > > Cc: g...@mprc.pku.edu.cn > Cc: mich...@walle.cc > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- > hw/intc/puv3_intc.c | 1 + > hw/mis

Re: [Qemu-devel] [PATCH 06/22] dma/puv3_dma: Convert sysbus init function to realize function

2018-11-20 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > puv3_dma_class_init(). > > Cc: g...@mprc.pku.edu.cn > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- > hw/dma/puv3_dma.c | 10 -- > 1 file changed, 4 insertions(+), 6

Re: [Qemu-devel] [PULL 0/1] [for -rc2] pc-*-3.1 machine-types

2018-11-20 Thread Peter Maydell
On 20 November 2018 at 13:49, Eduardo Habkost wrote: > Hopefully in time for -rc2. > > commit 9b4cf107 ("hyperv: only add SynIC in compatible configurations") breaks > compatibility on pc-*-3.0, so this is required as a bug fix. > > The following changes since commit 46cabfb41e9cb269affc14c8188f0c

Re: [Qemu-devel] [PATCH v7 12/12] target/arm: Send interrupts on PMU counter overflow

2018-11-20 Thread Peter Maydell
On 16 November 2018 at 21:22, Aaron Lindsay wrote: > On Nov 05 13:52, Aaron Lindsay wrote: >> Setup a QEMUTimer to get a callback when we expect counters to next >> overflow and trigger an interrupt at that time. > > Peter, > > It looks like there's probably going to be at least a v8 in this serie

Re: [Qemu-devel] [PATCH v2 09/10] pci/shpc: perform unplug via the hotplug handler

2018-11-20 Thread David Hildenbrand
On 20.11.18 15:13, Igor Mammedov wrote: > On Tue, 20 Nov 2018 11:11:46 +0100 > David Hildenbrand wrote: > diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridge.c index c634353b06..7c667bc97c 100644 --- a/hw/pci-bridge/pcie_pci_bridge.c +++ b/hw/pci

Re: [Qemu-devel] [PATCH V7 4/6] hw/arm/virt: Use the pvpanic device

2018-11-20 Thread Peter Maydell
On 16 November 2018 at 10:50, Peng Hao wrote: > Add pvpanic device in arm virt machine. > > Signed-off-by: Peng Hao > Signed-off-by: Philippe Mathieu-Daudé > --- > default-configs/arm-softmmu.mak | 1 + > hw/arm/virt.c | 21 + > include/hw/arm/virt.h

Re: [Qemu-devel] [PATCH V7 3/6] hw/misc/pvpanic: Add the MMIO interface

2018-11-20 Thread Peter Maydell
On 16 November 2018 at 10:50, Peng Hao wrote: > Add pvpanic new type "TYPE_PVPANIC_MMIO" > > Signed-off-by: Peng Hao > Signed-off-by: Philippe Mathieu-Daudé I'm not entirely sure I understand why we have two signed-off-by lines here -- who is the author of this patch? > --- > hw/misc/pvpanic.

Re: [Qemu-devel] [PATCH V7 1/6] hw/misc/pvpanic: Build the pvpanic device in $(common-obj)

2018-11-20 Thread Peter Maydell
On 16 November 2018 at 10:50, Peng Hao wrote: > From: Philippe Mathieu-Daudé > > The 'pvpanic' ISA device can be use by any machine with an ISA bus. > > Signed-off-by: Philippe Mathieu-Daudé Hi, Peng -- this should have your Signed-off-by: line below Philippe's. This shows that the patch passed

Re: [Qemu-devel] [PATCH v2 09/10] pci/shpc: perform unplug via the hotplug handler

2018-11-20 Thread Igor Mammedov
On Tue, 20 Nov 2018 11:11:46 +0100 David Hildenbrand wrote: > >> diff --git a/hw/pci-bridge/pcie_pci_bridge.c > >> b/hw/pci-bridge/pcie_pci_bridge.c > >> index c634353b06..7c667bc97c 100644 > >> --- a/hw/pci-bridge/pcie_pci_bridge.c > >> +++ b/hw/pci-bridge/pcie_pci_bridge.c > >> @@ -150,6 +150,

Re: [Qemu-devel] [PULL 1/1] hw/i386: add pc-i440fx-3.1 & pc-q35-3.1

2018-11-20 Thread Peter Maydell
On 20 November 2018 at 13:49, Eduardo Habkost wrote: > From: Marc-André Lureau > > We have a couple of PC_COMPAT_3_0, so we should have 3.1 PC machines, > and update the 3.0 machines to make use of those. As a side note, we should have 3.1 machines regardless. Every versioned machine should have

<    1   2   3   4   >