Re: [Qemu-devel] [PATCH v3 00/16] Virtio devices split from virtio-pci

2018-12-14 Thread Gonglei (Arei)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Friday, December 14, 2018 8:53 PM > To: Gonglei (Arei) > Cc: Juan Quintela ; qemu-devel@nongnu.org; Thomas > Huth ; Gerd Hoffmann > Subject: Re: [PATCH v3 00/16] Virtio devices split from virtio-pci > > On

Re: [Qemu-devel] [PATCH v5 07/73] cpu: make per-CPU locks an alias of the BQL in TCG rr mode

2018-12-14 Thread Emilio G. Cota
On Thu, Dec 13, 2018 at 00:03:47 -0500, Emilio G. Cota wrote: (snip) > diff --git a/qom/cpu.c b/qom/cpu.c > index aa15ea4af5..2ea5b1da08 100644 > --- a/qom/cpu.c > +++ b/qom/cpu.c > @@ -371,7 +371,6 @@ static void cpu_common_initfn(Object *obj) > cpu->nr_cores = 1; > cpu->nr_threads = 1;

[Qemu-devel] [PATCH 0/3] vhost-user-test fix

2018-12-14 Thread Li Qiang
Currently, the vhost-user-test is not correct. When in qtest mode, the accel is qtest, not kvm. So when the client side of vhost-user-test send 'VHOST_USER_SET_VRING_CALL' msg, the 'fd' will no be added in 'fds' in 'vhost_set_vring_file'. In 'chr_read' of the server side in the vhost-user-test,

[Qemu-devel] [PATCH 1/3] tests: vhost-user-test: initialize 'fd' in chr_read

2018-12-14 Thread Li Qiang
Currentyly when processing VHOST_USER_SET_VRING_CALL if 'qemu_chr_fe_get_msgfds' get no fd, the 'fd' will be a stack uninitialized value. Signed-off-by: Li Qiang --- tests/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhost-user-test.c

[Qemu-devel] [PATCH 3/3] util: check the return value of fcntl in qemu_set_{block, nonblock}

2018-12-14 Thread Li Qiang
Assert that the return value is not an error. This is like commit 7e6478e7d4f for qemu_set_cloexec. Signed-off-by: Li Qiang --- util/oslib-posix.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index c1bee2a581..4ce1ba9ca4

[Qemu-devel] [PATCH 2/3] vhost-user: add fds inf 'vhost_set_vring_file' in qtest

2018-12-14 Thread Li Qiang
Currently, the vhost-user-test assumes the eventfd is available. However it's not true because the accel is qtest. So the 'vhost_set_vring_file' will not add fds to the msg and the server side of vhost-user-test will be broken. This patch avoid this. Signed-off-by: Li Qiang ---

[Qemu-devel] [PATCH v3 5/7 RESEND] iotests: add filter_generated_node_ids

2018-12-14 Thread John Snow
To mimic the common filter of the same name, but for the python tests. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[Qemu-devel] [PATCH v3 7/7] iotests: add iotest 236 for testing bitmap merge

2018-12-14 Thread John Snow
New interface, new smoke test. --- tests/qemu-iotests/236 | 124 +++ tests/qemu-iotests/236.out | 200 + tests/qemu-iotests/group | 1 + 3 files changed, 325 insertions(+) create mode 100755 tests/qemu-iotests/236 create mode

[Qemu-devel] [PATCH v3 6/7] iotests: allow pretty-print for qmp_log

2018-12-14 Thread John Snow
If iotests have lines exceeding >998 characters long, git doesn't want to send it plaintext to the list. We can solve this by allowing the iotests to use pretty printed QMP output that we can match against instead. As a bonus, it's much nicer for human eyes, too. Note that this changes the sort

[Qemu-devel] [PATCH v3 4/7] iotests.py: don't abort if IMGKEYSECRET is undefined

2018-12-14 Thread John Snow
Instead of using os.environ[], use .get with a default of empty string to match the setup in check to allow us to import the iotests module (for debugging, say) without needing a crafted environment just to import the module. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by:

[Qemu-devel] [PATCH v3 3/7] block: remove 'x' prefix from experimental bitmap APIs

2018-12-14 Thread John Snow
The 'x' prefix was added because I was uncertain of the direction we'd take for the libvirt API. With the general approach solidified, I feel comfortable committing to this API for 4.0. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- blockdev.c

[Qemu-devel] [PATCH v3 1/7] blockdev: abort transactions in reverse order

2018-12-14 Thread John Snow
Presently, we abort transactions in the same order they were processed in. Bitmap commands, though, attempt to restore backup data structures on abort. To that end, though, they need to be aborted in reverse chronological order. Replace the QSIMPLEQ data structure with a QTAILQ one, so we can

[Qemu-devel] [PATCH v3 2/7] blockdev: n-ary bitmap merge

2018-12-14 Thread John Snow
Especially outside of transactions, it is helpful to provide all-or-nothing semantics for bitmap merges. This facilitates the coalescing of multiple bitmaps into a single target for the "checkpoint" interpretation when assembling bitmaps that represent arbitrary points in time from component

[Qemu-devel] [PATCH v3 0/7] bitmaps: remove x- prefix from QMP api

2018-12-14 Thread John Snow
Touch up a few last things and remove the x- prefix. V3: - Reworked qmp_log to pretty-print the outgoing command, too [Vladimir] - Modified test to log only bitmap information [Vladimir] - Test disable/enable transaction toggle [Eric] Note that the filter I added is now unused, but I think we

Re: [Qemu-devel] [PATCH for-4.0 0/6] vhost-user-blk: Add support for backend reconnecting

2018-12-14 Thread Michael S. Tsirkin
On Fri, Dec 14, 2018 at 10:33:54AM +0800, Yongji Xie wrote: > On Fri, 14 Dec 2018 at 10:20, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 09:56:41AM +0800, Yongji Xie wrote: > > > On Thu, 13 Dec 2018 at 22:45, Michael S. Tsirkin wrote: > > > > > > > > On Thu, Dec 06, 2018 at

Re: [Qemu-devel] [PATCH] hw/pci-bridge: check invalid slot number for root and downstream port

2018-12-14 Thread Michael S. Tsirkin
On Wed, Dec 05, 2018 at 05:41:26PM +0800, Huan Xiong wrote: > Since root and downstream port have only one slot, device should be > connected to them using slot 0. QEMU doesn't have a check for that > and starts up when a non-zero slot is specified, though the device > is not seen in guest OS. >

Re: [Qemu-devel] [PATCH v11 0/7] virtio-balloon: free page hint support

2018-12-14 Thread Michael S. Tsirkin
On Tue, Dec 11, 2018 at 04:24:46PM +0800, Wei Wang wrote: > This is the deivce part implementation to add a new feature, > VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device > receives the guest free page hints from the driver and clears the > corresponding bits in the dirty

Re: [Qemu-devel] [PULL 01/15] contrib: add a basic gitdm config

2018-12-14 Thread Alex Bennée
Alex Bennée writes: > This is a QEMU specific version of a gitdm config for generating > reports on the contributor base of the project. I've added enough > group maps and domain aliases to ensure the current top ten is as > reflective as it can be. As of this commit running: > +# Also group

[Qemu-devel] [PATCH v4] contrib: add a basic gitdm config

2018-12-14 Thread Alex Bennée
This is a QEMU specific version of a gitdm config for generating reports on the contributor base of the project. I've added enough group maps and domain aliases to ensure the current top ten is as reflective as it can be. As of this commit running: git log --numstat --since "Last Year" | gitdm

Re: [Qemu-devel] [PATCH v2 6/7] iotests: allow pretty-print for qmp_log

2018-12-14 Thread John Snow
On 12/13/18 8:09 AM, Vladimir Sementsov-Ogievskiy wrote: > 13.12.2018 4:50, John Snow wrote: >> If iotests have lines exceeding >998 characters long, git doesn't >> want to send it plaintext to the list. We can solve this by allowing >> the iotests to use pretty printed QMP output that we can

Re: [Qemu-devel] Loading snapshot with readonly qcow2 image

2018-12-14 Thread Eric Blake
On 12/14/18 10:03 AM, Michael Spradling wrote: Can you combine -s (create a writable temp file) with -l to get what you want? /me tries: I can confirm that 'qemu-nbd -s a' lets me write data that is discarded on disconnect (lsof says a temp file in /var/tmp/vl.XX was created); and that

Re: [Qemu-devel] [PATCH] qemu: avoid memory leak while remove disk

2018-12-14 Thread Michael S. Tsirkin
On Fri, Dec 07, 2018 at 09:53:06AM +0800, wangjian wrote: > Memset vhost_dev to zero in the vhost_dev_cleanup function. > This causes dev.vqs to be NULL, so that > vqs does not free up space when calling the g_free function. > This will result in a memory leak. But you can't release vqs > directly

[Qemu-devel] [PATCH] target/arm: Convert ARM_TBFLAG_* to FIELDs

2018-12-14 Thread Richard Henderson
Use "register" TBFLAG_ANY to indicate shared state between A32 and A64, and "registers" TBFLAG_A32 & TBFLAG_A64 for fields that are specific to the given cpu state. Move ARM_TBFLAG_BE to shared state, instead of its current placement within "Bit usage when in AArch32 state". Signed-off-by:

Re: [Qemu-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-14 Thread Eric Blake
On 12/13/18 4:37 PM, Paolo Bonzini wrote: Most files that have TABs only contain a handful of them. Change them to spaces so that we don't confuse people. disas, standard-headers, linux-headers and libdecnumber are imported from other projects and probably should be exempted from the check.

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Emilio G. Cota
On Fri, Dec 14, 2018 at 18:47:42 +, Aaron Lindsay wrote: > On Dec 14 12:50, Emilio G. Cota wrote: > > On Fri, Dec 14, 2018 at 12:08:22 -0500, Emilio G. Cota wrote: > > > On Fri, Dec 14, 2018 at 15:57:32 +, Aaron Lindsay wrote: > > (snip) > > > > I added a function to the user-facing plugin

[Qemu-devel] [PATCH v1 1/1] target/riscv/pmp.c: Fix pmp_decode_napot()

2018-12-14 Thread Alistair Francis
From: Anup Patel Currently, start and end address of a PMP region are not decoded correctly by pmp_decode_napot(). Let's say we have a 128KB PMP region with base address as 0x8000. Now, the PMPADDRx CSR value for this region will be 0x20003fff. The current pmp_decode_napot() implementation

Re: [Qemu-devel] [PULL 0/3] 9p patches 2018-12-13

2018-12-14 Thread Peter Maydell
On Thu, 13 Dec 2018 at 09:03, Greg Kurz wrote: > > The following changes since commit bb9bf94b3e8926553290bc9a7cb84315af422086: > > Merge remote-tracking branch > 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 > 19:18:58 +) > > are available in the Git

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Aaron Lindsay
On Dec 14 12:50, Emilio G. Cota wrote: > On Fri, Dec 14, 2018 at 12:08:22 -0500, Emilio G. Cota wrote: > > On Fri, Dec 14, 2018 at 15:57:32 +, Aaron Lindsay wrote: > (snip) > > > I added a function to the user-facing plugin API in my own version of > > > Pavel's plugin patchset to clear all

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Emilio G. Cota
On Fri, Dec 14, 2018 at 17:59:20 +, Aaron Lindsay wrote: > On Dec 14 12:08, Emilio G. Cota wrote: (snip) > > The idea is that a plugin can "reset" itself, so that (1) all > > its CBs are cleared and (2) the plugin can register new callbacks. > > This would all happen in an atomic context (no

Re: [Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Wainer dos Santos Moschetta
On 12/14/2018 04:15 PM, Paolo Bonzini wrote: On 14/12/18 19:06, Wainer dos Santos Moschetta wrote: IIUC above block handles the lines between lead and trail. So it would fix (but it doesn't) this: # cat foo /*  comment 1  comment 2  */ # scripts/fix-multiline-comments.sh foo /*  comment

Re: [Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Paolo Bonzini
On 14/12/18 19:06, Wainer dos Santos Moschetta wrote: > > IIUC above block handles the lines between lead and trail. So it would > fix (but it doesn't) this: > > # cat foo > /* >  comment 1 >  comment 2 >  */ > > # scripts/fix-multiline-comments.sh foo > /* >  comment 1 >  comment 2 >  */ Not

Re: [Qemu-devel] [PATCH] .shippable.yml: disable the win cross tests

2018-12-14 Thread Philippe Mathieu-Daudé
Le ven. 14 déc. 2018 16:17, Alex Bennée a écrit : > The pkg.mxe.cc package repositories have been down for the last two > weeks causing the builds to fail when shippable re-builds the > containers. > > This is really just a sticking plaster until we can get our own docker > hub images properly

Re: [Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Wainer dos Santos Moschetta
On 12/14/2018 07:48 AM, Paolo Bonzini wrote: Since we're adding checkpatch rules to enforce 4-line multiline comment format, i.e. with lone /* and */, this script can be run on existing code so that the comment style does not become inconsistent within a file. The alternative to

[Qemu-devel] [Bug 1808565] [NEW] Reading /proc/self/task//maps is not remapped to the target

2018-12-14 Thread Alan Jones
Public bug reported: Seeing this in qemu-user 3.1.0 The code in is_proc_myself which supports remapping of /proc/self/maps and /proc//maps does not support remapping of /proc/self/task//maps or /proc//task//maps. Extending is_proc_myself to cover these cases causes the maps to be rewritten

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Aaron Lindsay
On Dec 14 12:08, Emilio G. Cota wrote: > On Fri, Dec 14, 2018 at 15:57:32 +, Aaron Lindsay wrote: > > Emilio, > > > > First, thanks for putting this together - I think everyone doing this > > sort of thing will benefit if we're able to agree on one upstream plugin > > interface. > > > > One

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Emilio G. Cota
On Fri, Dec 14, 2018 at 12:08:22 -0500, Emilio G. Cota wrote: > On Fri, Dec 14, 2018 at 15:57:32 +, Aaron Lindsay wrote: (snip) > > I added a function to the user-facing plugin API in my own version of > > Pavel's plugin patchset to clear all existing plugin instrumentation, (snip) > I think

Re: [Qemu-devel] [PULL 00/27] ppc-for-4.0 queue 20181213

2018-12-14 Thread Cédric Le Goater
On 12/14/18 5:03 PM, Peter Maydell wrote: > On Thu, 13 Dec 2018 at 04:01, David Gibson > wrote: >> >> The following changes since commit 4b3aab204204ca742836219b97b538d90584f4f2: >> >> Merge remote-tracking branch >> 'remotes/vivier2/tags/trivial-patches-pull-request' into staging (2018-12-11

[Qemu-devel] [PATCH v5 3/3] tcg/i386: enable dynamic TLB sizing

2018-12-14 Thread Emilio G. Cota
As the following experiments show, this series is a net perf gain, particularly for memory-heavy workloads. Experiments are run on an Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz. 1. System boot + shudown, debian aarch64: - Before (v3.1.0): Performance counter stats for './die.sh v3.1.0' (10 runs):

[Qemu-devel] [Bug 1808563] [NEW] Listing the contents of / lists QEMU_LD_PREFIX instead

2018-12-14 Thread Alan Jones
Public bug reported: Seeing this in qemu-user version 3.1.0 Demo: $ QEMU_LD_PREFIX=$(pwd)/usr/armv7a-cros-linux-gnueabi ../run/qemu-arm /tmp/coreutils --coreutils-prog=ls / etc lib usr $ ls / boot etc lib lib64 lost+found mntroot sbin sys usr bin dev export home

[Qemu-devel] [PATCH v5 2/3] tcg: introduce dynamic TLB sizing

2018-12-14 Thread Emilio G. Cota
Disabled in all TCG backends for now. Signed-off-by: Emilio G. Cota --- include/exec/cpu-defs.h | 48 +- include/exec/cpu_ldst.h | 21 + tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h| 1 + tcg/mips/tcg-target.h| 1 +

[Qemu-devel] [PATCH v5 1/3] cputlb: do not evict empty entries to the vtlb

2018-12-14 Thread Emilio G. Cota
Currently we evict an entry to the victim TLB when it doesn't match the current address. But it could be that there's no match because the current entry is empty (i.e. all -1's, for instance via tlb_flush). Do not evict the entry to the vtlb in that case. This change will help us keep track of

[Qemu-devel] [PATCH v5 0/3] Dynamic TLB sizing

2018-12-14 Thread Emilio G. Cota
v4: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02679.html Changes since v4: - Rebase on v3.1.0. Quite a few conflicts, but the resulting diffs are simpler than in v4. - Re-run benchmarks on a different Skylake machine (this one is a server with a lower clock frequency). - Add

[Qemu-devel] [PATCH] virtio: add ORDER_PLATFORM feature support

2018-12-14 Thread Ilya Maximets
This patch adds new property "order_platform" which is required to allow VIRTIO_F_ORDER_PLATFORM feature negotiation. Disabled by default because needed only for HW assited vhost backends. Enabling of this feature will request guest drivers to use heavier (platform dependent) techniques for

Re: [Qemu-devel] [PULL v2 00/46] Misc patches for 2018-12-13

2018-12-14 Thread Peter Maydell
On Thu, 13 Dec 2018 at 18:15, Paolo Bonzini wrote: > > The following changes since commit bb9bf94b3e8926553290bc9a7cb84315af422086: > > Merge remote-tracking branch > 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 > 19:18:58 +) > > are available in the Git

Re: [Qemu-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-14 Thread Aleksandar Markovic
On Dec 13, 2018 11:40 PM, "Paolo Bonzini" wrote: > > Most files that have TABs only contain a handful of them. Change > them to spaces so that we don't confuse people. > > disas, standard-headers, linux-headers and libdecnumber are imported > from other projects and probably should be exempted

Re: [Qemu-devel] [PATCH for-3.1] hw/xen/xen_pt_graphics: Don't trust the BIOS ROM contents so much

2018-12-14 Thread Stefano Stabellini
On Fri, 14 Dec 2018, Peter Maydell wrote: > On Mon, 26 Nov 2018 at 15:03, Anthony PERARD > wrote: > > > > On Mon, Nov 19, 2018 at 04:26:58PM +, Peter Maydell wrote: > > > Coverity (CID 796599) points out that xen_pt_setup_vga() trusts > > > the rom->size field in the BIOS ROM from a PCI

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Emilio G. Cota
On Fri, Dec 14, 2018 at 15:57:32 +, Aaron Lindsay wrote: > Emilio, > > First, thanks for putting this together - I think everyone doing this > sort of thing will benefit if we're able to agree on one upstream plugin > interface. > > One thing I'd like to see is support for unregistering

[Qemu-devel] [RFC PATCH 3/5] qdev-properties: add r/o 64bit bitfield property

2018-12-14 Thread Roman Kagan
Add a version 64bit bitfield property with no setter, useful for introspecting the device state without being able to modify it. Signed-off-by: Roman Kagan --- include/hw/qdev-properties.h | 9 + hw/core/qdev-properties.c| 9 - 2 files changed, 17 insertions(+), 1

[Qemu-devel] [RFC PATCH 2/5] qmp: further consolidate listing of device and object properties

2018-12-14 Thread Roman Kagan
Take the approach of commit 35f63767dc77d85bebff6c6565aceaf74023776a "qmp: Merge ObjectPropertyInfo and DevicePropertyInfo" one step further: drop device property-specific code from qmp_device_list_properties and consolidate the resulting common part with qmp_qom_list_properties. Signed-off-by:

[Qemu-devel] [RFC PATCH 4/5] virtio: drop DEFINE_VIRTIO_COMMON_FEATURES

2018-12-14 Thread Roman Kagan
This macro is only used in one place so seems to be unnecessary. Signed-off-by: Roman Kagan --- include/hw/virtio/virtio.h | 12 hw/virtio/virtio.c | 11 ++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/hw/virtio/virtio.h

[Qemu-devel] [RFC PATCH 1/5] qom: preserve get/set presence in aliased properties

2018-12-14 Thread Roman Kagan
Usually in order to tell if a property is read-only, write-only, or read-write, one has to look at whether it has .get or .set methods. However, property aliases are always defined with both, and it's not until the call to the getter or setter when the support for the corresponding operation can

[Qemu-devel] [RFC PATCH 0/5] expose negotiated virtio features in r/o properties

2018-12-14 Thread Roman Kagan
This series is an attempt to make virtio features acknowledged by the guest visible as read-only QOM properties. One potential usecase of this is debugging; another is when the upper layer needs to do something only when/if the guest has acknowledged the support for a feature (e.g. hot-plug a

[Qemu-devel] [RFC PATCH 5/5] virtio: expose negotiated features in r/o properties

2018-12-14 Thread Roman Kagan
Make virtio features acknowledged by the guest visible through QOM as read-only properties. One potential usecase of this is debugging; another is when the upper layer needs to do something only when/if the guest has acknowledged the support for a feature (e.g. hot-plug a VFIO device once the

[Qemu-devel] [PATCH v3] s390x/pci: add common function measurement block

2018-12-14 Thread Pierre Morel
From: Yi Min Zhao Common function measurement block is used to report zPCI internal counters of successful pcilg/stg/stb and rpcit instructions to a memory location provided by the program. This patch introduces a new ZpciFmb structure and schedules a timer callback to copy the zPCI measures to

[Qemu-devel] [PATCH v3] s390x/pci: add common fmb

2018-12-14 Thread Pierre Morel
After the last review round I worked on endianness. Doing this I found some errors in the code and in the interpretation of the documentation. The new patch changed the following from previous version: In s390-pci-bus: - Initialize the FMB Format. In s390-pci-bus.h - re-organization of the

Re: [Qemu-devel] [PULL 00/37] target-arm queue

2018-12-14 Thread Peter Maydell
On Thu, 13 Dec 2018 at 14:56, Peter Maydell wrote: > > First target-arm pullreq of the 4.0 series; most of this > is Mao's cleanups that finally let us drop sysbus::init; > the most interesting user-visible feature is RTH's patches > adding some v8.1 and v8.2 architecture features. > > thanks >

Re: [Qemu-devel] [PATCH v1 1/2] target/arm: kvm64 make guest debug AA32 break point aware

2018-12-14 Thread Ard Biesheuvel
On Fri, 14 Dec 2018 at 17:26, Alex Bennée wrote: > > > Richard Henderson writes: > > > On 12/13/18 8:55 AM, Alex Bennée wrote: > >> > >> Ard Biesheuvel writes: > >> > >>> Hi Alex, > >>> > >>> Thanks again for looking into this. > >>> > >>> On Thu, 13 Dec 2018 at 12:55, Alex Bennée wrote: > >>

Re: [Qemu-devel] [PATCH v1 1/2] target/arm: kvm64 make guest debug AA32 break point aware

2018-12-14 Thread Alex Bennée
Richard Henderson writes: > On 12/13/18 8:55 AM, Alex Bennée wrote: >> >> Ard Biesheuvel writes: >> >>> Hi Alex, >>> >>> Thanks again for looking into this. >>> >>> On Thu, 13 Dec 2018 at 12:55, Alex Bennée wrote: >> >>> int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct

Re: [Qemu-devel] [PATCH v10 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-12-14 Thread Vladimir Sementsov-Ogievskiy
03.12.2018 13:14, Anton Nefedov wrote: > If COW areas of the newly allocated clusters are zeroes on the backing image, > efficient bdrv_write_zeroes(flags=BDRV_REQ_ALLOCATE) can be used on the whole > cluster instead of writing explicit zero buffers later in perform_cow(). > > iotest 060: > write

Re: [Qemu-devel] [PATCH v3] s390x/pci: add common function measurement block

2018-12-14 Thread Pierre Morel
On 14/12/2018 15:20, Cornelia Huck wrote: On Fri, 14 Dec 2018 15:11:18 +0100 Pierre Morel wrote: From: Yi Min Zhao Common function measurement block is used to report zPCI internal counters of successful pcilg/stg/stb and rpcit instructions to a memory location provided by the program.

Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block

2018-12-14 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 14 Dec 2018 at 12:31, Markus Armbruster wrote: >> Peter Maydell writes: >> > On Fri, 14 Dec 2018 at 06:29, Markus Armbruster wrote: >> > I have to admit I never really understood what tweak >> > you wanted making to the commit message. I'm happy >> > to make it

Re: [Qemu-devel] Loading snapshot with readonly qcow2 image

2018-12-14 Thread Michael Spradling
On Dec 13 15:43, Eric Blake wrote: > On 12/13/18 12:33 PM, Michael Spradling wrote: > > > > > My question is has anyone looked into loading snapshots from a backing > > > > file? I have attempted to look through the code and this looks to be > > > > difficult. If I attempt to add support for

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Aaron Lindsay
On Dec 14 10:57, Aaron Lindsay wrote: > One thing I'd like to see is support for unregistering callbacks once > they are registered. By the way, I'm willing to work on this if we agree it sounds reasonable and fits in with the rest of your implementation. -Aaron

Re: [Qemu-devel] [PULL 00/27] ppc-for-4.0 queue 20181213

2018-12-14 Thread Peter Maydell
On Thu, 13 Dec 2018 at 04:01, David Gibson wrote: > > The following changes since commit 4b3aab204204ca742836219b97b538d90584f4f2: > > Merge remote-tracking branch > 'remotes/vivier2/tags/trivial-patches-pull-request' into staging (2018-12-11 > 22:26:44 +) > > are available in the Git

Re: [Qemu-devel] [RFC v2 05/38] plugin: add user-facing API

2018-12-14 Thread Aaron Lindsay
Emilio, First, thanks for putting this together - I think everyone doing this sort of thing will benefit if we're able to agree on one upstream plugin interface. One thing I'd like to see is support for unregistering callbacks once they are registered. For instance, you can imagine that a plugin

[Qemu-devel] [PATCH v3] Add getsockopt for settable SOL_IPV6 options

2018-12-14 Thread tom . deseyn
From: Tom Deseyn Thank you for reviewing Laurant. Sorry for missing history, I'm not used to sending patches via mail. I got an email about code style. For now, I'm sticking to the style that is used in the function. v2: default to unimplemented v3: match kernel behavior Signed-off-by: Tom

Re: [Qemu-devel] [PATCH v4 16/18] xen: automatically create XenBlockDevice-s

2018-12-14 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Paul Durrant > Sent: 14 December 2018 14:50 > To: 'Kevin Wolf' > Cc: xen-de...@lists.xenproject.org; Stefano Stabellini > ; qemu-devel@nongnu.org; qemu-bl...@nongnu.org; > Max Reitz >

Re: [Qemu-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-14 Thread Michael S. Tsirkin
On Thu, Dec 13, 2018 at 11:37:37PM +0100, Paolo Bonzini wrote: > Most files that have TABs only contain a handful of them. Change > them to spaces so that we don't confuse people. > > disas, standard-headers, linux-headers and libdecnumber are imported > from other projects and probably should

[Qemu-devel] [PATCH] .shippable.yml: disable the win cross tests

2018-12-14 Thread Alex Bennée
The pkg.mxe.cc package repositories have been down for the last two weeks causing the builds to fail when shippable re-builds the containers. This is really just a sticking plaster until we can get our own docker hub images properly setup so we can avoid having dependencies on external repos.

Re: [Qemu-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-14 Thread Stefan Hajnoczi
On Thu, Dec 13, 2018 at 11:37:37PM +0100, Paolo Bonzini wrote: > Most files that have TABs only contain a handful of them. Change > them to spaces so that we don't confuse people. > > disas, standard-headers, linux-headers and libdecnumber are imported > from other projects and probably should

Re: [Qemu-devel] [PATCH v3 08/16] virtio: split vhost user scsi bits from virtio-pci

2018-12-14 Thread Felipe Franciosi
> On Dec 14, 2018, at 9:14 AM, Thomas Huth wrote: > > On 2018-12-13 22:00, Juan Quintela wrote: >> Reviewed-by: Laurent Vivier >> Signed-off-by: Juan Quintela >> --- >> hw/virtio/Makefile.objs | 1 + >> hw/virtio/vhost-user-scsi-pci.c | 101 >>

Re: [Qemu-devel] [Bug 1806824] Re: SIE-200 (TrustZone) MPC: BLK_MAX returns an incorrect value

2018-12-14 Thread Alex Bennée
Peter Maydell writes: > On Fri, 14 Dec 2018 at 13:56, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >> > Thanks for the bug report and the test program. The fix seems >> > straightforward -- just adjust what we return for the register value. I've >> > sent a patch: >> >

Re: [Qemu-devel] Hosted CI for FreeBSD - Cirrus CI

2018-12-14 Thread Ed Maste
On Fri, 7 Dec 2018 at 04:54, Daniel P. Berrangé wrote: > > Looking at this more generally I see they support Linux containers, > native Windows containers, macOS and FreeBSD. IOW, they offer more > platforms than our current Travis setup does and aren't stuck on an > amcient Ubuntu version.

Re: [Qemu-devel] [PATCH v4 16/18] xen: automatically create XenBlockDevice-s

2018-12-14 Thread Paul Durrant
> -Original Message- [snip] > > + > > +blockdev->auto_iothread = iothread; > > + > > +object_property_set_bool(OBJECT(dev), true, "realized", > _err); > > +if (local_err) { > > +error_propagate_prepend(errp, local_err, > > +

[Qemu-devel] [PULL 19/22] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize()

2018-12-14 Thread Peter Maydell
In sdhci_sysbus_realize() we override the initialization of s->iomem that sdhci_common_realize() performs. However we don't destroy the old memory region before reinitializing it, which means that the memory allocated for mr->name in memory_region_do_init() is leaked. Since sdhci_initfn() already

[Qemu-devel] [PULL 15/22] hw/core/loader.c: Remove load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is now no longer used anywhere, so we can remove it completely. (Use load_image_size() or g_file_get_contents() instead.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Eric Blake

[Qemu-devel] [PULL 22/22] virt: Fix broken indentation

2018-12-14 Thread Peter Maydell
From: Eduardo Habkost I introduced indentation using tabs instead of spaces in another commit. Peter reported the problem, and I failed to fix that before sending my pull request. Reported-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-id:

[Qemu-devel] [PULL 18/22] hw/arm/mps2-tz.c: Free mscname string in make_dma()

2018-12-14 Thread Peter Maydell
The clang leak sanitizer spots a (one-off, trivial) memory leak in make_dma() due to a missing free. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181204132952.2601-3-peter.mayd...@linaro.org --- hw/arm/mps2-tz.c | 1 + 1 file

[Qemu-devel] [PULL 16/22] include/hw/loader.h: Document load_image_size()

2018-12-14 Thread Peter Maydell
Add a documentation comment for load_image_size(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Eric Blake Message-id: 20181130151712.2312-11-peter.mayd...@linaro.org --- include/hw/loader.h | 16

[Qemu-devel] [PULL 11/22] hw/i386/pc.c: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Use the glib g_file_get_contents() function instead, which does the whole "allocate memory for the file and read it in" operation. Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 12/22] hw/i386/multiboot.c: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). While we are converting the code, add the missing error check. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by:

[Qemu-devel] [PULL 17/22] target/arm: Free name string in ARMCPRegInfo hashtable entries

2018-12-14 Thread Peter Maydell
When we add a new entry to the ARMCPRegInfo hash table in add_cpreg_to_hashtable(), we allocate memory for tehe ARMCPRegInfo struct itself, and we also g_strdup() the name string. So the hashtable's value destructor function must free the name string as well as the struct. Spotted by clang's leak

[Qemu-devel] [PULL 07/22] hw/ppc/mac_newworld, mac_oldworld: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Use the glib g_file_get_contents() function instead, which does the whole "allocate memory for the file and read it in" operation. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH] microbit: make -kernel optional

2018-12-14 Thread Stefan Hajnoczi
ARMv7M machine types support -kernel for ELF and raw image files. Microbit programs are typically in Intel HEX (.hex) format. The generic loader supports .hex files but it doesn't work as expected: $ qemu-system-arm -M microbit -device loader,file=microbit.hex Guest image must be specified

[Qemu-devel] [PULL 09/22] hw/smbios/smbios.c: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by:

[Qemu-devel] [PULL 14/22] device_tree.c: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by:

[Qemu-devel] [PULL 05/22] monitor: Use address_space_read() to read memory

2018-12-14 Thread Peter Maydell
Currently monitor.c reads physical memory using cpu_physical_memory_read(). This effectively hard-codes assuming that all CPUs have the same view of physical memory. Switch to address_space_read() instead, which lets us use the AddressSpace for the CPU we're reading memory for (falling back to

[Qemu-devel] [PULL 20/22] tests/test-arm-mptimer: Don't leak string memory

2018-12-14 Thread Peter Maydell
The test-arm-mptimer setup creates a lot of test names using g_strdup_printf() and never frees them. This is entirely harmless since it's one-shot test code, but it clutters up the output from clang's LeakSanitizer. Refactor to use a helper function so we can free the memory. Signed-off-by: Peter

[Qemu-devel] [PULL 08/22] hw/ppc/ppc405_boards: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by:

[Qemu-devel] [PULL 13/22] hw/block/tc58128.c: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by:

[Qemu-devel] [PULL 04/22] disas.c: Use address_space_read() to read memory

2018-12-14 Thread Peter Maydell
Currently disas.c reads physical memory using cpu_physical_memory_read(). This effectively hard-codes assuming that all CPUs have the same view of physical memory. Switch to address_space_read() instead, which lets us use the AddressSpace for the CPU we're disassembling for. Signed-off-by: Peter

[Qemu-devel] [PULL 03/22] Rename cpu_physical_memory_write_rom() to address_space_write_rom()

2018-12-14 Thread Peter Maydell
The API of cpu_physical_memory_write_rom() is odd, because it takes an AddressSpace, unlike all the other cpu_physical_memory_* access functions. Rename it to address_space_write_rom(), and bring its API into line with address_space_write(). Signed-off-by: Peter Maydell Reviewed-by: Philippe

[Qemu-devel] [PULL 10/22] hw/pci/pci.c: Don't use load_image()

2018-12-14 Thread Peter Maydell
The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). While we are converting this code, add an error-check for read failure. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 21/22] target/arm: Create timers in realize, not init

2018-12-14 Thread Peter Maydell
The timer_new() function allocates memory; this means that if we call it in the CPU's init method we would need to provide an instance_finalize method to free it. Defer the timer creation to the realize function instead. This fixes a memory leak spotted by clang LeakSanitizer when a CPU object is

[Qemu-devel] [PULL 01/22] scripts/checkpatch.pl: Enforce multiline comment syntax

2018-12-14 Thread Peter Maydell
We now require Linux-kernel-style multiline comments: /* * line one * line two */ Enforce this in checkpatch.pl, by backporting the relevant parts of the Linux kernel's checkpatch.pl. (The only changes needed are that Linux's checkpatch.pl WARN() function takes an extra

[Qemu-devel] [PULL 06/22] elf_ops.h: Use address_space_write() to write memory

2018-12-14 Thread Peter Maydell
Currently the load_elf function in elf_ops.h uses cpu_physical_memory_write() to write the ELF file to memory if it is not handling it as a ROM blob. This means we ignore the AddressSpace that the function is passed to define where it should be loaded. Use address_space_write() instead.

[Qemu-devel] [PULL 02/22] exec.c: Rename cpu_physical_memory_write_rom_internal()

2018-12-14 Thread Peter Maydell
Rename cpu_physical_memory_write_rom_internal() to address_space_write_rom_internal(), and make it take MemTxAttrs and return a MemTxResult. This brings its API into line with address_space_write(). This is an internal function to exec.c; fixing its API will allow us to change the global function

[Qemu-devel] [PULL 00/22] misc queue

2018-12-14 Thread Peter Maydell
/pull-request-2018-12-12' into staging (2018-12-14 10:19:47 +) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-misc-20181214 for you to fetch changes up to bbac02f1e8edfd0663543f6fdad1e7094d860b29: virt: Fix broken indentation (2018

Re: [Qemu-devel] [PATCH v2] qdev/core: Can not replug device on bus that allows one device

2018-12-14 Thread Tony Krowiak
On 12/14/18 7:09 AM, Halil Pasic wrote: On Thu, 13 Dec 2018 11:26:42 -0500 Tony Krowiak wrote: If the maximum number of devices allowed on a bus is 1 and a device which is plugged into the bus is subsequently unplugged, attempting to replug the device fails with error "Bus 'xxx' does not

Re: [Qemu-devel] [PATCH v2] qdev/core: Can not replug device on bus that allows one device

2018-12-14 Thread Tony Krowiak
On 12/14/18 4:16 AM, Pierre Morel wrote: On 13/12/2018 17:26, Tony Krowiak wrote: If the maximum number of devices allowed on a bus is 1 and a device which is plugged into the bus is subsequently unplugged, attempting to replug the device fails with error "Bus 'xxx' does not support

  1   2   3   >