[Qemu-devel] [PATCH] iotests: Check for enabled drivers before testing them

2019-08-19 Thread Thomas Huth
It is possible to enable only a subset of the block drivers with the "--block-drv-rw-whitelist" option of the "configure" script. All other drivers are marked as unusable (or only included as read-only with the "--block-drv-ro-whitelist" option). If an iotest is now using such a disabled block

Re: [Qemu-devel] [PATCH for-4.2 v10 08/15] virtio-iommu: Implement map/unmap

2019-08-19 Thread Peter Xu
On Tue, Jul 30, 2019 at 07:21:30PM +0200, Eric Auger wrote: [...] > +mapping = g_tree_lookup(domain->mappings, (gpointer)()); > + > +while (mapping) { > +viommu_interval current; > +uint64_t low = mapping->virt_addr; > +uint64_t high = mapping->virt_addr +

[Qemu-devel] [PATCH 2/3] migration/postcopy: unsentmap is not necessary for postcopy

2019-08-19 Thread Wei Yang
Commit f3f491fcd6dd594ba695 ('Postcopy: Maintain unsentmap') introduced unsentmap to track not yet sent pages. This is not necessary since: * unsentmap is a sub-set of bmap before postcopy start * unsentmap is the summation of bmap and unsentmap after canonicalizing This patch just

[Qemu-devel] [PATCH 0/3] migration/postcopy: unsentmap is not necessary

2019-08-19 Thread Wei Yang
Three patches to cleanup postcopy: [1]: split canonicalize bitmap and discard page [2]: remove unsentmap since it is not necessary [3]: cleanup the get_queued_page_not_dirty Wei Yang (3): migration/postcopy: not necessary to do discard when canonicalizing bitmap migration/postcopy:

[Qemu-devel] [PATCH 1/3] migration/postcopy: not necessary to do discard when canonicalizing bitmap

2019-08-19 Thread Wei Yang
All pages, either partially sent or partially dirty, will be discarded in postcopy_send_discard_bm_ram(), since we update the unsentmap to be unsentmap = unsentmap | dirty in ram_postcopy_send_discard_bitmap(). This is not necessary to do discard when canonicalizing bitmap. And by doing so, we

[Qemu-devel] [PATCH 3/3] migration: remove sent parameter in get_queued_page_not_dirty

2019-08-19 Thread Wei Yang
This is a cleanup for previous removal of unsentmap. The sent parameter is not necessary now. Signed-off-by: Wei Yang --- migration/ram.c| 2 +- migration/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

Re: [Qemu-devel] Machine specific option ROMs

2019-08-19 Thread Gerd Hoffmann
On Mon, Aug 19, 2019 at 02:38:09AM +0200, BALATON Zoltan wrote: > Hello, > > I know about the possibility to set the option ROM of a PCIDevice with the > romfile property (that we can set on command line or in a device's init > method) but is there a way to set it depending on the machine that

Re: [Qemu-devel] [PATCH] ppc: Three floating point fixes

2019-08-19 Thread David Gibson
On Fri, Aug 16, 2019 at 02:27:49PM -0500, Paul A. Clarke wrote: > From: "Paul A. Clarke" > > - target/ppc/fpu_helper.c: > - helper_todouble() was not properly converting INFINITY from 32 bit > float to 64 bit double. > - helper_todouble() was not properly converting any denormalized > 32

Re: [Qemu-devel] [PATCH] ppc: Three floating point fixes

2019-08-19 Thread David Gibson
On Sun, Aug 18, 2019 at 10:59:01PM +0200, Aleksandar Markovic wrote: > 18.08.2019. 10.10, "Richard Henderson" је > написао/ла: > > > > On 8/16/19 11:59 PM, Aleksandar Markovic wrote: > > >> From: "Paul A. Clarke" > > ... > > >> ISA 3.0B has xscvdpspn leaving its result in word 1 of the target

Re: [Qemu-devel] [PATCH v2 1/2] memory-device: not necessary to use goto for the last check

2019-08-19 Thread Wei Yang
On Mon, Aug 19, 2019 at 05:32:14AM +, Zeng, Star wrote: > > >> -Original Message- >> From: Wei Yang [mailto:richardw.y...@linux.intel.com] >> Sent: Monday, August 19, 2019 10:39 AM >> To: David Hildenbrand >> Cc: Wei Yang ; Zeng, Star >> ; imamm...@redhat.com; qemu-devel@nongnu.org;

Re: [Qemu-devel] [RFC v2] hw/sd/aspeed_sdhci: New device

2019-08-19 Thread Cédric Le Goater
On 15/08/2019 22:13, Eddie James wrote: > > On 8/15/19 3:05 AM, Cédric Le Goater wrote: >> Hello Eddie, >> >> On 14/08/2019 22:27, Eddie James wrote: >>> The Aspeed SOCs have two SD/MMC controllers. Add a device that >>> encapsulates both of these controllers and models the Aspeed-specific >>>

Re: [Qemu-devel] [RFC v2] hw/sd/aspeed_sdhci: New device

2019-08-19 Thread Cédric Le Goater
On 15/08/2019 22:21, Eddie James wrote: > > On 8/15/19 3:13 PM, Eddie James wrote: >> >> On 8/15/19 3:05 AM, Cédric Le Goater wrote: >>> Hello Eddie, >>> >>> On 14/08/2019 22:27, Eddie James wrote: +    sdhci->slots[0].capareg = (uint64_t)(uint32_t)val; +    break; +   

Re: [Qemu-devel] [PATCH] ppc: Three floating point fixes

2019-08-19 Thread Aleksandar Markovic
19.08.2019. 08.30, "David Gibson" је написао/ла: > > On Sun, Aug 18, 2019 at 10:59:01PM +0200, Aleksandar Markovic wrote: > > 18.08.2019. 10.10, "Richard Henderson" је > > написао/ла: > > > > > > On 8/16/19 11:59 PM, Aleksandar Markovic wrote: > > > >> From: "Paul A. Clarke" > > > ... > > > >>

Re: [Qemu-devel] [PATCH] linux-user: add memfd_create

2019-08-19 Thread Marc-André Lureau
On Sat, Aug 17, 2019 at 1:28 AM Shu-Chun Weng via Qemu-devel wrote: > > Add support for the memfd_create syscall. If the host does not have the > libc wrapper, translate to a direct syscall with NC-macro. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1734792 > Signed-off-by: Shu-Chun Weng

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

2019-08-19 Thread Bin Meng
On Wed, Aug 14, 2019 at 11:33 PM Bin Meng wrote: > > 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

Re: [Qemu-devel] [EXTERNAL][PATCH v8 13/37] target/mips: Style improvements in mips_fulong2e.c

2019-08-19 Thread Aleksandar Rikalo
> From: Aleksandar Markovic > Sent: Monday, August 19, 2019 2:07 PM > To: qemu-devel@nongnu.org > Cc: phi...@redhat.com ; Aleksandar Markovic > ; Aleksandar Rikalo > Subject: [EXTERNAL][PATCH v8 13/37] target/mips: Style improvements in > mips_fulong2e.c > > From: Aleksandar Markovic > >

Re: [Qemu-devel] [PATCH 1/4] tests/docker: Use one package per line to improve readability

2019-08-19 Thread Cleber Rosa
On Mon, Aug 19, 2019 at 01:18:24AM +0200, Philippe Mathieu-Daudé wrote: > Use one package per line to improve readability. This also > helps while reviewing patches. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/dockerfiles/travis.docker | 10 +- > 1 file changed, 9

Re: [Qemu-devel] [qemu-s390x] [PATCH-for-4.2 v1 8/9] s390x/cpumodel: Prepare for changes of QEMU model

2019-08-19 Thread Thomas Huth
On 8/5/19 5:29 PM, David Hildenbrand wrote: > Setup the 4.1 compatibility model so we can add new features to the > LATEST model. > > Signed-off-by: David Hildenbrand > --- > hw/s390x/s390-virtio-ccw.c | 2 ++ > target/s390x/gen-features.c | 6 +- > 2 files changed, 7 insertions(+), 1

[Qemu-devel] [ANNOUNCE] virtio-fs v0.3 release

2019-08-19 Thread Stefan Hajnoczi
I am delighted to announce the release of virtio-fs v0.3, a shared file system that lets virtual machines access a directory tree on the host. This release is based on QEMU 4.1.0 and Linux 5.3-rc3. For more information about virtio-fs: https://virtio-fs.gitlab.io/ This is a development release

[Qemu-devel] [PULL 15/17] vpc: Do not return RAW from block_status

2019-08-19 Thread Max Reitz
vpc is not really a passthrough driver, even when using the fixed subformat (where host and guest offsets are equal). It should handle preallocation like all other drivers do, namely by returning DATA | RECURSE instead of RAW. There is no tangible difference but the fact that bdrv_is_allocated()

[Qemu-devel] [PULL 13/17] vdi: Make block_status recurse for fixed images

2019-08-19 Thread Max Reitz
Suggested-by: Vladimir Sementsov-Ogievskiy Fixes: 69f47505ee66afaa513305de0c1895a224e52c45 Signed-off-by: Max Reitz Message-id: 20190725155512.9827-2-mre...@redhat.com Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Signed-off-by: Max Reitz --- block/vdi.c | 3 ++- 1 file

[Qemu-devel] [PULL 14/17] vmdk: Make block_status recurse for flat extents

2019-08-19 Thread Max Reitz
Fixes: 69f47505ee66afaa513305de0c1895a224e52c45 Signed-off-by: Max Reitz Message-id: 20190725155512.9827-3-mre...@redhat.com Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Signed-off-by: Max Reitz --- block/vmdk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Qemu-devel] [PATCH v9] qemu-io: add pattern file for write command

2019-08-19 Thread Denis Plotnikov
The patch allows to provide a pattern file for write command. There was no similar ability before. Signed-off-by: Denis Plotnikov --- v9: * replace flag cast to int with bool [Eric] * fix the error message [Eric] * use qemu_io_free instead of qemu_vfree [Eric] * add function description

Re: [Qemu-devel] [PATCH 0/2] target/arm: Take exceptions on ATS instructions

2019-08-19 Thread Edgar E. Iglesias
On Mon, Aug 19, 2019 at 01:44:37PM +0100, Peter Maydell wrote: > On Fri, 16 Aug 2019 at 13:58, Peter Maydell wrote: > > > > The translation table walk for an ATS instruction can result in > > various faults. In general these are just reported back via the > > PAR_EL1 fault status fields, but in

[Qemu-devel] [PATCH v2] ppc: conform to processor User's Manual for xscvdpspn

2019-08-19 Thread Paul A. Clarke
From: "Paul A. Clarke" The POWER8 and POWER9 User's Manuals specify the implementation behavior for what the ISA leaves "undefined" behavior for the xscvdpspn and xscvdpsp instructions. This patch corrects the QEMU implementation to match the hardware implementation for that case. ISA 3.0B has

[Qemu-devel] [PATCH v3] linux-user: add memfd_create

2019-08-19 Thread Shu-Chun Weng via Qemu-devel
Add support for the memfd_create syscall. If the host does not have the libc wrapper, translate to a direct syscall with NC-macro. Buglink: https://bugs.launchpad.net/qemu/+bug/1734792 Signed-off-by: Shu-Chun Weng --- include/qemu/memfd.h | 4 linux-user/syscall.c | 12

Re: [Qemu-devel] [qemu-s390x] [PATCH v7 33/42] exec: Replace device_endian with MemOp

2019-08-19 Thread Paolo Bonzini
On 16/08/19 12:12, Thomas Huth wrote: > This patch is *huge*, more than 800kB. It keeps being stuck in the the > filter of the qemu-s390x list each time you send it. Please: > > 1) Try to break it up in more digestible pieces, e.g. change only one > subsystem at a time (this is also better

[Qemu-devel] [Bug 1819289] Re: Windows 95 and Windows 98 will not install or run

2019-08-19 Thread Brad Parker
I am not using anything related to migration, just launching with a simple flat qcow2 file, no snapshots, backing stores or anything like that. The host is Archlinux x64 but I'm running inside of a docker container that runs Ubuntu 18.04. The command-line is: qemu-system-i386 -spice

Re: [Qemu-devel] [qemu-s390x] [PATCH v7 33/42] exec: Replace device_endian with MemOp

2019-08-19 Thread Paolo Bonzini
On 19/08/19 20:28, Paolo Bonzini wrote: > On 16/08/19 12:12, Thomas Huth wrote: >> This patch is *huge*, more than 800kB. It keeps being stuck in the the >> filter of the qemu-s390x list each time you send it. Please: >> >> 1) Try to break it up in more digestible pieces, e.g. change only one >>

[Qemu-devel] [PATCH v2 03/16] qcow2: Add Error ** to qcow2_read_snapshots()

2019-08-19 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.h | 2 +- block/qcow2-snapshot.c | 7 ++- block/qcow2.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index fc1b0d3c1e..175708cee0 100644 ---

[Qemu-devel] [PATCH v2 02/16] qcow2: Use endof()

2019-08-19 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index d0e7fa9311..752883e5c3 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -92,11 +92,12 @@ int

[Qemu-devel] [PATCH v2 04/16] qcow2: Keep unknown extra snapshot data

2019-08-19 Thread Max Reitz
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 the qcow2 driver keep all unknown extra data fields when updating an image's snapshot table.

Re: [Qemu-devel] RISCV: when will the CLIC be ready?

2019-08-19 Thread Alistair Francis
On Mon, Aug 19, 2019 at 6:44 AM liuzhiwei wrote: > > > On 2019/8/17 上午1:29, Alistair Francis wrote: > > On Thu, Aug 15, 2019 at 8:39 PM liuzhiwei wrote: > >> Hi, Palmer > >> > >> When Michael Clark still was the maintainer of RISCV QEMU, he wrote in the > >> mail list, "the CLIC interrupt

Re: [Qemu-devel] [PATCH] iotests: Add more "skip_if_unsupported" statements to the python tests

2019-08-19 Thread Max Reitz
On 19.08.19 11:21, Thomas Huth wrote: > The python code already contains a possibility to skip tests if the > corresponding driver is not available in the qemu binary - use it > in more spots to avoid that the tests are failing if the driver has > been disabled. > > Signed-off-by: Thomas Huth >

Re: [Qemu-devel] [PATCH 0/3] pc: Fix die-id validation and compatibility with libvirt

2019-08-19 Thread Michael S. Tsirkin
On Thu, Aug 15, 2019 at 03:38:00PM -0300, Eduardo Habkost wrote: > Currently, if die-id is omitted on -device for CPUs, we get a > very confusing error message: > > $ qemu-system-x86_64 -smp 1,sockets=6,maxcpus=6 \ > -device qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0 >

[Qemu-devel] [PATCH] ppc: Fix emulated INFINITY and NAN conversions

2019-08-19 Thread Paul A. Clarke
From: "Paul A. Clarke" helper_todouble() was not properly converting INFINITY from 32 bit float to 64 bit double. (Normalized operand conversion is unchanged, other than indentation.) Signed-off-by: Paul A. Clarke --- target/ppc/fpu_helper.c | 15 +++ 1 file changed, 11

Re: [Qemu-devel] [PATCH v2 13/16] qcow2: Repair snapshot table with too many entries

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 PM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- Short on the reasoning why this isn't a problem in practice. (Again, because we only do it via opt-in qemu-img -r; you can already learn if qemu-img will have problem with your file created externally without destroying the

Re: [Qemu-devel] [PATCH] block/io.c: fix for the allocation failure

2019-08-19 Thread Denis V. Lunev
On 8/17/19 5:56 PM, Eric Blake wrote: > On 8/17/19 9:49 AM, Eric Blake wrote: > >>> This change is a regression of sorts. Now, you are unconditionally >>> attempting the fallback for ALL failures (such as EIO) and for all >>> drivers, even when that was not previously attempted and increases the

Re: [Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call

2019-08-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190819185348.221825-1-...@google.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call Message-id:

[Qemu-devel] [PATCH 11/15] ipmi: Add PCI IPMI interfaces

2019-08-19 Thread minyard
From: Corey Minyard Pretty straightforward, just hook the current KCS and BT code into the PCI system with the proper configuration. Cc: Michael S. Tsirkin Cc: M: Marcel Apfelbaum Signed-off-by: Corey Minyard --- default-configs/i386-softmmu.mak | 2 + hw/i386/Kconfig |

[Qemu-devel] [PATCH 06/15] ipmi: Add a UUID device property

2019-08-19 Thread minyard
From: Corey Minyard Using the UUID that qemu generates probably isn't the best thing to do, allow it to be passed in via properties, and use QemuUUID for the type. If the UUID is not set, return an unsupported command error. This way we are not providing an all-zero (or randomly generated)

[Qemu-devel] [PATCH 02/15] ipmi: Fix the get watchdog command

2019-08-19 Thread minyard
From: Corey Minyard It wasn't returning the set timeout like it should have been. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 8f63bb7181..afb99e33d7 100644 ---

[Qemu-devel] [PATCH v3 1/8] iotests: Add -display none to the qemu options

2019-08-19 Thread Max Reitz
Without this argument, qemu will print an angry message about not being able to connect to a display server if $DISPLAY is not set. For me, that breaks iotests.supported_formats() because it thus only sees ["Could", "not", "connect"] as the supported formats. Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v3 6/8] iotests: Test driver whitelisting in 093

2019-08-19 Thread Max Reitz
null-aio may not be whitelisted. Skip all test cases that require it. Signed-off-by: Max Reitz --- tests/qemu-iotests/093 | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index 50c1e7f2ec..f03fa24a07 100755 ---

Re: [Qemu-devel] [PATCH v4 18/28] riscv: sifive_u: Generate hfclk and rtcclk nodes

2019-08-19 Thread Alistair Francis
On Sun, Aug 18, 2019 at 10:29 PM Bin Meng wrote: > > To keep in sync with Linux kernel device tree, generate hfclk and > rtcclk nodes in the device tree, to be referenced by PRCI node. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > --- > > Changes in v4: None > Changes

Re: [Qemu-devel] [PATCH v3 2/8] iotests: Prefer null-co over null-aio

2019-08-19 Thread Max Reitz
On 19.08.19 22:18, Max Reitz wrote: > We use null-co basically everywhere in the iotests. Unless we want to > test null-aio specifically, we should use it instead (for consistency). > > Signed-off-by: Max Reitz > Reviewed-by: John Snow Hm, sorry, I just noticed that I probably should have

[Qemu-devel] qemu icount mode timer accuracy

2019-08-19 Thread Wu, Wentong
Could you please give some comments about this? Thanks a lot!

Re: [Qemu-devel] [PATCH] block/io.c: fix for the allocation failure

2019-08-19 Thread Denis V. Lunev
On 8/19/19 11:30 PM, Eric Blake wrote: > On 8/19/19 2:46 PM, Denis V. Lunev wrote: >> On 8/17/19 5:56 PM, Eric Blake wrote: >>> On 8/17/19 9:49 AM, Eric Blake wrote: >>> > This change is a regression of sorts. Now, you are unconditionally > attempting the fallback for ALL failures (such

[Qemu-devel] [PATCH v2 12/16] qcow2: Fix overly long snapshot tables

2019-08-19 Thread Max Reitz
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 --- block/qcow2-snapshot.c | 88 +- 1 file changed, 78

[Qemu-devel] [PATCH v2 08/16] qcow2: Separate qcow2_check_read_snapshot_table()

2019-08-19 Thread Max Reitz
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_read_snapshot_table() that reads the snapshot table at a later point. In the future, we

Re: [Qemu-devel] [PATCH v2 04/16] qcow2: Keep unknown extra snapshot data

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 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 the qcow2 driver keep all unknown extra data

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

2019-08-19 Thread Alistair Francis
On Sat, Aug 17, 2019 at 3:24 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 Reviewed-by: Alistair Francis Alistair > --- >

[Qemu-devel] [PATCH 07/15] ipmi: Split out KCS-specific code from ISA KCS code

2019-08-19 Thread minyard
From: Corey Minyard Get ready for PCI and other KCS interfaces. No functional changes, just split the code into the generic KCS code and the ISA-specific code. Signed-off-by: Corey Minyard --- hw/ipmi/Makefile.objs | 2 +- hw/ipmi/ipmi_kcs.c | 408

[Qemu-devel] [PATCH 13/15] acpi: Add i2c serial bus CRS handling

2019-08-19 Thread minyard
From: Corey Minyard This will be required for getting IPMI SSIF (SMBus interface) into the ACPI tables. Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Corey Minyard --- hw/acpi/aml-build.c | 40 + include/hw/acpi/aml-build.h | 18

[Qemu-devel] [PATCH v3 0/8] iotests: Selfish patches

2019-08-19 Thread Max Reitz
Hi, Nothing has changed too much since the previous version, thus I’ll start with a link to its cover letter: https://lists.nongnu.org/archive/html/qemu-block/2019-06/msg01102.html What has changed is this: v3: - Patches 2 and 3: Resolved rebase conflicts - Added patch 4. It seems useful to

[Qemu-devel] [PATCH 04/15] tests:ipmi: Fix IPMI BT tests

2019-08-19 Thread minyard
From: Corey Minyard The IPMI BT tests had a race condition, if it receive an IPMI command to enable interrupt, it would write the message to enable interrupts after it wrote the command response. So the test code could receive the command response and issue the next command before the device

[Qemu-devel] [PATCH v3 4/8] iotests: Use case_skip() in skip_if_unsupported()

2019-08-19 Thread Max Reitz
skip_if_unsupported() should use the stronger variant case_skip(), because this allows it to be used even with setUp() (in a meaningful way). Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 08/15] ipmi: Split out BT-specific code from ISA BT code

2019-08-19 Thread minyard
From: Corey Minyard Get ready for PCI and other BT interfaces. No functional changes, just split the code into generic BT code and ISA-specific BT code. Signed-off-by: Corey Minyard --- hw/ipmi/Makefile.objs | 2 +- hw/ipmi/ipmi_bt.c | 426

Re: [Qemu-devel] [PATCH] iotests: Add more "skip_if_unsupported" statements to the python tests

2019-08-19 Thread Max Reitz
On 19.08.19 21:13, Max Reitz wrote: > On 19.08.19 11:21, Thomas Huth wrote: >> The python code already contains a possibility to skip tests if the >> corresponding driver is not available in the qemu binary - use it >> in more spots to avoid that the tests are failing if the driver has >> been

[Qemu-devel] [PATCH v3 5/8] iotests: Let skip_if_unsupported() accept a method

2019-08-19 Thread Max Reitz
This lets tests use skip_if_unsupported() with a potentially variable list of required formats. Suggested-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py

Re: [Qemu-devel] [PATCH] ppc: Fix emulated INFINITY and NAN conversions

2019-08-19 Thread Richard Henderson
On 8/19/19 12:19 PM, Paul A. Clarke wrote: > From: "Paul A. Clarke" > > helper_todouble() was not properly converting INFINITY from 32 bit > float to 64 bit double. > > (Normalized operand conversion is unchanged, other than indentation.) > > Signed-off-by: Paul A. Clarke > --- >

Re: [Qemu-devel] [PATCH v7 25/42] hw/misc: Declare device little or big endian

2019-08-19 Thread Paolo Bonzini
On 16/08/19 12:04, Philippe Mathieu-Daudé wrote: >> diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c >> index 4307f00..3de8cd3 100644 >> --- a/hw/misc/a9scu.c >> +++ b/hw/misc/a9scu.c >> @@ -94,7 +94,7 @@ static void a9_scu_write(void *opaque, hwaddr offset, >>  static const MemoryRegionOps

[Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call

2019-08-19 Thread Shu-Chun Weng via Qemu-devel
timer_getoverrun returns the "overrun count" for the timer, which is not a file descriptor and thus should not call fd_trans_unregister on it. Signed-off-by: Shu-Chun Weng --- linux-user/syscall.c | 1 - 1 file changed, 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c

Re: [Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call

2019-08-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190819185348.221825-1-...@google.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call Message-id:

[Qemu-devel] [PATCH v2 10/16] qcow2: Fix broken snapshot table entries

2019-08-19 Thread Max Reitz
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 letting qcow2_check_fix_snapshot_table() do the rest. Signed-off-by: Max Reitz ---

Re: [Qemu-devel] [PATCH v2 01/16] include: Move endof() up from hw/virtio/virtio.h

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 PM, Max Reitz wrote: > endof() is a useful macro, we can make use of it outside of virtio. > > Signed-off-by: Max Reitz > --- > include/hw/virtio/virtio.h | 7 --- > include/qemu/compiler.h| 7 +++ > hw/block/virtio-blk.c | 4 ++-- > hw/net/virtio-net.c

Re: [Qemu-devel] [PATCH] linux-user: erroneous fd_trans_unregister call

2019-08-19 Thread Laurent Vivier
Le 19/08/2019 à 20:53, Shu-Chun Weng via Qemu-devel a écrit : > timer_getoverrun returns the "overrun count" for the timer, which is not > a file descriptor and thus should not call fd_trans_unregister on it. > > Signed-off-by: Shu-Chun Weng > --- > linux-user/syscall.c | 1 - > 1 file changed,

Re: [Qemu-devel] [PATCH v2 12/16] qcow2: Fix overly long snapshot tables

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 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 > --- > block/qcow2-snapshot.c | 88

Re: [Qemu-devel] [PATCH v4 05/28] riscv: roms: Remove executable attribute of opensbi images

2019-08-19 Thread Alistair Francis
On Sun, Aug 18, 2019 at 10:15 PM Bin Meng wrote: > > Like other binary files, the executable attribute of opensbi images > should not be set. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > > --- > > Changes in v4: > - new patch to remove executable attribute of opensbi

[Qemu-devel] [PATCH 01/15] ipmi: Fix watchdog NMI handling

2019-08-19 Thread minyard
From: Corey Minyard The wrong logic was used for detection (so it wouldn't work at all) and the wrong interface was used to inject the NMI if the detection logic was correct. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi.c | 6 +++--- hw/ipmi/ipmi_bmc_sim.c | 2 +- 2 files changed, 4

[Qemu-devel] [PATCH 00/15] IPMI updates for 4.3

2019-08-19 Thread minyard
These changes contain the following: * Fixes for the IPMI watchdog pretimeout handling.. * Allow the IPMI UUID to be passed in, don't use the standard QEMU one. * Add PCI support for IPMI interfaces. Not a lot of systems use this, but I use it often for testing, and maybe someone will

Re: [Qemu-devel] [PATCH] block/io.c: fix for the allocation failure

2019-08-19 Thread Eric Blake
On 8/19/19 2:46 PM, Denis V. Lunev wrote: > On 8/17/19 5:56 PM, Eric Blake wrote: >> On 8/17/19 9:49 AM, Eric Blake wrote: >> This change is a regression of sorts. Now, you are unconditionally attempting the fallback for ALL failures (such as EIO) and for all drivers, even when

Re: [Qemu-devel] [PATCH v2 16/16] iotests: Test qcow2's snapshot table handling

2019-08-19 Thread Eric Blake
On 8/19/19 1:56 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. > > Signed-off-by: Max Reitz > --- > +++ b/tests/qemu-iotests/261.out > @@ -0,0 +1,346 @@ > +QA output created by 261 > + > +===

[Qemu-devel] [PATCH v3 3/8] iotests: Allow skipping test cases

2019-08-19 Thread Max Reitz
case_notrun() does not actually skip the current test case. It just adds a "notrun" note and then returns to the caller, who manually has to skip the test. Generally, skipping a test case is as simple as returning from the current function, but not always: For example, this model does not allow

Re: [Qemu-devel] [qemu-s390x] [PATCH v7 33/42] exec: Replace device_endian with MemOp

2019-08-19 Thread Richard Henderson
On 8/19/19 11:29 AM, Paolo Bonzini wrote: > On 19/08/19 20:28, Paolo Bonzini wrote: >> On 16/08/19 12:12, Thomas Huth wrote: >>> This patch is *huge*, more than 800kB. It keeps being stuck in the the >>> filter of the qemu-s390x list each time you send it. Please: >>> >>> 1) Try to break it up in

[Qemu-devel] [PATCH v2 01/16] include: Move endof() up from hw/virtio/virtio.h

2019-08-19 Thread Max Reitz
endof() is a useful macro, we can make use of it outside of virtio. Signed-off-by: Max Reitz --- include/hw/virtio/virtio.h | 7 --- include/qemu/compiler.h| 7 +++ hw/block/virtio-blk.c | 4 ++-- hw/net/virtio-net.c| 10 +- 4 files changed, 14 insertions(+),

[Qemu-devel] [PATCH v2 05/16] qcow2: Make qcow2_write_snapshots() public

2019-08-19 Thread Max Reitz
Updating the snapshot list will be useful when upgrading a v2 image to v3, so we will need to call this function in qcow2.c. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.h | 1 + block/qcow2-snapshot.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v2 06/16] qcow2: Put qcow2_upgrade() into its own function

2019-08-19 Thread Max Reitz
This does not make sense right now, but it will make sense once we need to do more than to just update s->qcow_version. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 43 ++- 1 file changed, 38 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH v2 09/16] qcow2: Add qcow2_check_fix_snapshot_table()

2019-08-19 Thread Max Reitz
qcow2_check_read_snapshot_table() can perform consistency checks, but it cannot fix everything. Specifically, it cannot allocate new clusters, because that should wait until the refcount structures are known to be consistent (i.e., after qcow2_check_refcounts()). Thus, it cannot call

[Qemu-devel] [PATCH v2 13/16] qcow2: Repair snapshot table with too many entries

2019-08-19 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 366d9f574c..dac8a778e4 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -444,6 +444,14 @@ int

[Qemu-devel] [PATCH v2 15/16] iotests: Add peek_file* functions

2019-08-19 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- 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 5502c3da2f..78decfd5d5 100644 --- a/tests/qemu-iotests/common.rc +++

[Qemu-devel] [PATCH v2 16/16] iotests: Test qcow2's snapshot table handling

2019-08-19 Thread Max Reitz
Add a test how our qcow2 driver handles extra data in snapshot table entries, and how it repairs overly long snapshot tables. Signed-off-by: Max Reitz --- tests/qemu-iotests/261 | 523 + tests/qemu-iotests/261.out | 346

Re: [Qemu-devel] [PATCH v2 02/16] qcow2: Use endof()

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 PM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block/qcow2-snapshot.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) What, the file got larger in spite of using a helper macro for ease of readability? Good thing that 'lines of code' is not the only

Re: [Qemu-devel] [PATCH v2 04/16] qcow2: Keep unknown extra snapshot data

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 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 the qcow2 driver keep all unknown extra data

Re: [Qemu-devel] [PATCH v2 11/16] qcow2: Keep track of the snapshot table length

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 PM, Max Reitz wrote: > When repairing the snapshot table, we truncate entries that have too > much extra data. This frees up space that we do not have to count > towards the snapshot table size. > > Signed-off-by: Max Reitz > --- > block/qcow2-snapshot.c | 14 +- >

[Qemu-devel] [PATCH 05/15] qdev: Add a no default uuid property

2019-08-19 Thread minyard
From: Corey Minyard This is for IPMI, which will behave differently if the UUID is not set. Signed-off-by: Corey Minyard Cc: Fam Zheng Cc: Michael S. Tsirkin Cc: Marc-André Lureau --- include/hw/qdev-properties.h | 7 +++ 1 file changed, 7 insertions(+) diff --git

[Qemu-devel] [PATCH 09/15] ipmi: Allow a size value to be passed for I/O space

2019-08-19 Thread minyard
From: Corey Minyard PCI device I/O must be >= 8 bytes in length or they don't work. Allow the size to be passed in, the default size of 2 or 3 won't work. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bt.c | 19 +++ hw/ipmi/ipmi_kcs.c | 23

[Qemu-devel] [PATCH 03/15] ipmi: Generate an interrupt on watchdog pretimeout expiry

2019-08-19 Thread minyard
From: Corey Minyard Add the watchdog pretimeout to the bits that cause an interrupt on attn. Otherwise the user won't know. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c

Re: [Qemu-devel] [PATCH v4 17/28] riscv: sifive: Implement PRCI model for FU540

2019-08-19 Thread Alistair Francis
On Sun, Aug 18, 2019 at 10:30 PM Bin Meng wrote: > > This adds a simple PRCI model for FU540 (sifive_u). It has different > register layout from the existing PRCI model for FE310 (sifive_e). > > Signed-off-by: Bin Meng > > --- > > Changes in v4: > - prefix all macros/variables/functions with

[Qemu-devel] [PATCH v2 00/16] qcow2: Let check -r all repair some snapshot bits

2019-08-19 Thread Max Reitz
Hi, See the v1 cover letter here if you haven’t already: https://lists.nongnu.org/archive/html/qemu-block/2019-07/msg01290.html I kept all patches from the previous version because Eric deemed the patches I might have dropped useful. I kept the way I implemented fixing overly long snapshot

[Qemu-devel] [PATCH v2 11/16] qcow2: Keep track of the snapshot table length

2019-08-19 Thread Max Reitz
When repairing the snapshot table, we truncate entries that have too much extra data. This frees up space that we do not have to count towards the snapshot table size. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v2 07/16] qcow2: Write v3-compliant snapshot list on upgrade

2019-08-19 Thread Max Reitz
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() therefore should update the snapshot table to ensure all entries have these extra data

[Qemu-devel] [PATCH v2 14/16] qcow2: Fix v3 snapshot table entry compliancy

2019-08-19 Thread Max Reitz
qcow2 v3 images require every snapshot table entry to have at least 16 bytes of extra data. If they do not, let qemu-img check -r all fix it. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/qcow2-snapshot.c

Re: [Qemu-devel] [PATCH v2 07/16] qcow2: Write v3-compliant snapshot list on upgrade

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 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() therefore should update the snapshot table

Re: [Qemu-devel] [PATCH v3 0/8] Kconfig switches

2019-08-19 Thread Thomas Huth
On 8/19/19 7:47 PM, Paolo Bonzini wrote: > On 17/08/19 12:19, 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. > > Thomas, you can go ahead and

Re: [Qemu-devel] [PATCH v2 10/16] qcow2: Fix broken snapshot table entries

2019-08-19 Thread Eric Blake
On 8/19/19 1:55 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 > letting qcow2_check_fix_snapshot_table()

Re: [Qemu-devel] [PATCH v2 14/16] qcow2: Fix v3 snapshot table entry compliancy

2019-08-19 Thread Eric Blake
On 8/19/19 1:56 PM, Max Reitz wrote: > qcow2 v3 images require every snapshot table entry to have at least 16 > bytes of extra data. If they do not, let qemu-img check -r all fix it. > > Signed-off-by: Max Reitz > --- > block/qcow2-snapshot.c | 18 ++ > 1 file changed, 18

[Qemu-devel] [PATCH 10/15] smbios:ipmi: Ignore IPMI devices with no fwinfo function

2019-08-19 Thread minyard
From: Corey Minyard Not all devices have fwinfo (like the coming PCI one), so ignore them if the their fwinfo function is NULL. Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Corey Minyard --- hw/smbios/smbios_type_38.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Qemu-devel] [PATCH 14/15] ipmi: Fix SSIF ACPI handling to use the right CRS

2019-08-19 Thread minyard
From: Corey Minyard Pass in the CRS so that it can be set to the SMBus for IPMI later. Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Corey Minyard --- hw/acpi/ipmi-stub.c| 2 +- hw/acpi/ipmi.c | 13 +++-- hw/i386/acpi-build.c | 2 +- include/hw/acpi/ipmi.h

[Qemu-devel] [PATCH 12/15] ipmi: Add an SMBus IPMI interface

2019-08-19 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard --- default-configs/i386-softmmu.mak | 1 + hw/i386/Kconfig | 1 + hw/ipmi/Kconfig | 5 + hw/ipmi/Makefile.objs| 1 + hw/ipmi/smbus_ipmi.c | 384 +++ 5

  1   2   3   4   >