Re: [Qemu-devel] [PATCH v3] Virt: ACPI: fix qemu assert due to re-assigned table data address

2017-12-28 Thread Andrew Jones
On Thu, Dec 28, 2017 at 09:14:40AM +0800, Shannon Zhao wrote: > From: Zhaoshenglong > > acpi_data_push uses g_array_set_size to resize the memory size. If there > is no enough contiguous memory, the address will be changed. If we use > the old value, it will assert. > qemu-kvm: hw/acpi/bios-linke

Re: [Qemu-devel] [PATCH] migration: fix small leaks

2017-12-28 Thread Vladimir Sementsov-Ogievskiy
28.12.2017 05:19, Peter Xu wrote: On Wed, Dec 27, 2017 at 03:25:23PM +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! Hmm, looks like leak is not fixed here: I've checked it while running iotest 181, that migration_instance_finalize is not called. If I understand correct, to call it we need

[Qemu-devel] [PATCH] migration: finalize current_migration object

2017-12-28 Thread Vladimir Sementsov-Ogievskiy
current_migration has .instance_finalize callback, but it is not called, because nobody unrefs current_migration. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Note: migration_object_init() is called from main() too. _finalize looks a bit weird after all _cleanp's, but it

[Qemu-devel] [PATCH 1/1] io/channel-websock: handle continuous reads without any data

2017-12-28 Thread Denis V. Lunev
From: Edgar Kaziakhmedov According to the current implementation of websocket protocol in QEMU, qio_channel_websock_handshake_io tries to read handshake from the channel to start communication over tcp socket. But this subroutine doesn't cover scenario when socket was closed while handshaking. Th

Re: [Qemu-devel] [PATCH] migration: finalize current_migration object

2017-12-28 Thread Peter Xu
On Thu, Dec 28, 2017 at 12:16:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: > current_migration has .instance_finalize callback, but it is not > called, because nobody unrefs current_migration. Fix that. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Xu -- Peter Xu

Re: [Qemu-devel] [PATCH v2 1/2] vhost: add used memslot number for vhost-user and vhost-kernel separately

2017-12-28 Thread Igor Mammedov
On Sat, 23 Dec 2017 07:09:51 + "Zhoujian (jay)" wrote: > Hi Igor, > > > -Original Message- > > From: Igor Mammedov [mailto:imamm...@redhat.com] > > Sent: Saturday, December 23, 2017 3:03 AM > > To: Zhoujian (jay) > > Cc: Huangweidong (C) ; m...@redhat.com; wangxin > > (U) ; qemu-dev

Re: [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2017-12-28 Thread Vladimir Sementsov-Ogievskiy
28.12.2017 08:24, Fam Zheng wrote: On Wed, 12/20 18:49, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 +++ block/dirty-bitmap.c | 25 - 2 files changed, 19 insertions(+), 9 deletions(-)

Re: [Qemu-devel] [PATCH v2 2/2] vhost: double check used memslots number

2017-12-28 Thread Igor Mammedov
On Sat, 23 Dec 2017 08:27:25 + "Zhoujian (jay)" wrote: > > > > -Original Message- > > From: Igor Mammedov [mailto:imamm...@redhat.com] > > Sent: Saturday, December 23, 2017 2:49 AM > > To: Zhoujian (jay) > > Cc: qemu-devel@nongnu.org; m...@redhat.com; Huangweidong (C) > > ; Gonglei

Re: [Qemu-devel] [PATCH v2 2/2] vhost: double check used memslots number

2017-12-28 Thread Igor Mammedov
On Fri, 22 Dec 2017 23:15:09 +0200 "Michael S. Tsirkin" wrote: > On Fri, Dec 22, 2017 at 07:48:55PM +0100, Igor Mammedov wrote: > > On Fri, 15 Dec 2017 16:45:55 +0800 > > Jay Zhou wrote: > > > > > If the VM already has N(N>8) available memory slots for vhost user, > > > the VM will be crashed i

Re: [Qemu-devel] [PATCH v9 10/13] migration: add postcopy migration of dirty bitmaps

2017-12-28 Thread Vladimir Sementsov-Ogievskiy
28.12.2017 09:14, Fam Zheng wrote: On Wed, 12/20 18:49, Vladimir Sementsov-Ogievskiy wrote: Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty bitmap with the same nam

Re: [Qemu-devel] [PATCH v9 13/13] iotests: add dirty bitmap postcopy test

2017-12-28 Thread Vladimir Sementsov-Ogievskiy
Thank you for reviewing my code! -- Best regards, Vladimir

Re: [Qemu-devel] [PATCH v14 1/9] ACPI: add some GHES structures and macros definition

2017-12-28 Thread Igor Mammedov
On Thu, 28 Dec 2017 13:54:10 +0800 Dongjiu Geng wrote: > Add Generic Error Status Block structures and some macros > definitions, which is referred to the ACPI 4.0 or ACPI 6.1. The > HEST table generation and CPER record will use them. > > Signed-off-by: Dongjiu Geng > --- > Change since v13: >

Re: [Qemu-devel] QEMU CAN bus work

2017-12-28 Thread Pavel Pisa
Hello Oleksij and Philippe, I have found some time to update QEMU CAN patch series and test it with actual QEMU master. As QEMU 2.11 is realeased now, I hope that it is time to disscuss integration of initial/simple CAN bus emulation now. The actual version can be found on branch can-pci in our

Re: [Qemu-devel] [PATCH v5 5/7] vhost: Regenerate region list from changed sections list

2017-12-28 Thread Igor Mammedov
On Wed, 27 Dec 2017 14:19:03 +0100 Igor Mammedov wrote: > On Mon, 18 Dec 2017 20:13:38 + > "Dr. David Alan Gilbert (git)" wrote: > > > From: "Dr. David Alan Gilbert" > > > > Compare the sections list that's just been generated, and if it's > > different from the old one regenerate the reg

Re: [Qemu-devel] [PATCH v4 0/5] Add a valid_cpu_types property

2017-12-28 Thread Igor Mammedov
On Fri, 22 Dec 2017 11:47:00 -0800 Alistair Francis wrote: > On Fri, Dec 22, 2017 at 10:45 AM, Alistair Francis > wrote: > > On Wed, Dec 20, 2017 at 2:06 PM, Eduardo Habkost > > wrote: > >> On Tue, Dec 19, 2017 at 05:03:59PM -0800, Alistair Francis wrote: > >>> On Tue, Dec 19, 2017 at 4:55 PM,

Re: [Qemu-devel] [PATCH v2 1/2] vhost: add used memslot number for vhost-user and vhost-kernel separately

2017-12-28 Thread Zhoujian (jay)
> -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: Thursday, December 28, 2017 7:12 PM > To: Zhoujian (jay) > Cc: Huangweidong (C) ; m...@redhat.com; wangxin > (U) ; dgilb...@redhat.com; Liuzhe (Cloud Open > Labs, NFV) ; qemu-devel@nongnu.org; Gonglei (Arei)

Re: [Qemu-devel] [PATCH v14 5/9] target-arm: kvm64: inject synchronous External Abort

2017-12-28 Thread Igor Mammedov
On Thu, 28 Dec 2017 13:54:14 +0800 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

[Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Samuel Thibault
sched_get/setaffinity linux-user syscalls were missing conversions for little/big endian, which is hairy since longs may not be the same size either. For simplicity, this just introduces loops to convert bit by bit like is done for select. Signed-off-by: Samuel Thibault --- linux-user/syscall.c

Re: [Qemu-devel] [PATCH v14 2/9] ACPI: Add APEI GHES table generation and CPER record support

2017-12-28 Thread Igor Mammedov
On Thu, 28 Dec 2017 13:54:11 +0800 Dongjiu Geng wrote: > This implements APEI GHES Table generation and record CPER in > runtime via fw_cfg blobs.Now we only support two types of GHESv2, > which are GPIO-Signal and ARMv8 SEA. Afterwards, we can extend the > supported type if needed. For the CPER

Re: [Qemu-devel] [PATCH v14 1/9] ACPI: add some GHES structures and macros definition

2017-12-28 Thread gengdongjiu
[...] > > +/* > > * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE) > > */ > > #define ACPI_SUB_HEADER_DEF /* Common ACPI sub-structure header */\ > > @@ -474,6 +493,39 @@ struct AcpiSystemResourceAffinityTable { } > > QEMU_PACKED; typedef struct AcpiSystemResourceAffinityTabl

Re: [Qemu-devel] [PATCH v14 7/9] ARM: ACPI: Add GPIO notification type for hardware RAS error

2017-12-28 Thread Igor Mammedov
On Thu, 28 Dec 2017 13:54:16 +0800 Dongjiu Geng wrote: > In ARM platform we implements a notification of error events > via a GPIO pin. For this GPIO-signaled events, we choose GPIO > pin 4 for hardware error device (PNP0C33), So _E04 should be > added to ACPI DSDT table. When GPIO-pin 4 signaled

Re: [Qemu-devel] [PATCH v14 8/9] hw/arm/virt: Add RAS platform version for migration

2017-12-28 Thread Igor Mammedov
On Thu, 28 Dec 2017 13:54:17 +0800 Dongjiu Geng wrote: > Support this feature since version 2.10, disable it by > default in the old version. patch should go before acpi tables are actually added, otherwise it might break bisectability. > > Signed-off-by: Dongjiu Geng > --- > Address Shannon's

[Qemu-devel] [PATCH] linux-user: Add getcpu() support

2017-12-28 Thread Samuel Thibault
Signed-off-by: Samuel Thibault --- linux-user/syscall.c | 16 1 file changed, 16 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8ec7de96ce..bb8cb726f5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -296,6 +296,8 @@ _syscall3(int, sy

Re: [Qemu-devel] [PATCH v4 0/5] Add a valid_cpu_types property

2017-12-28 Thread Eduardo Habkost
On Thu, Dec 28, 2017 at 02:39:31PM +0100, Igor Mammedov wrote: > On Fri, 22 Dec 2017 11:47:00 -0800 > Alistair Francis wrote: > > > On Fri, Dec 22, 2017 at 10:45 AM, Alistair Francis > > wrote: > > > On Wed, Dec 20, 2017 at 2:06 PM, Eduardo Habkost > > > wrote: > > >> On Tue, Dec 19, 2017 at 0

Re: [Qemu-devel] [PATCH v14 9/9] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2017-12-28 Thread Igor Mammedov
On Thu, 28 Dec 2017 13:54:18 +0800 Dongjiu Geng wrote: > Add SIGBUS signal handler. In this handler, it checks the SIGBUS type, > translates the host VA which is delivered by host to guest PA, then fill > this PA to CPER and fill the CPER to guest APEI GHES memory, finally > notify guest accordin

Re: [Qemu-devel] [PATCH net-next v2 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor

2017-12-28 Thread Jason Baron via Qemu-devel
On 12/27/2017 04:43 PM, David Miller wrote: > From: Jason Baron > Date: Fri, 22 Dec 2017 16:54:01 -0500 > >> The ability to set speed and duplex for virtio_net in useful in various >> scenarios as described here: >> >> 16032be virtio_net: add ethtool support for set and get of settings >> >> Ho

[Qemu-devel] [RFC v2 1/4] numa: split out NumaOptions parsing into parse_NumaOptions()

2017-12-28 Thread Igor Mammedov
it will allow to reuse parse_NumaOptions() for parsing configuration commands received via QMP interface Signed-off-by: Igor Mammedov --- include/sysemu/numa.h | 1 + numa.c| 48 +--- 2 files changed, 30 insertions(+), 19 deletions(-)

[Qemu-devel] [RFC v2 3/4] QMP: add set-numa-node command

2017-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/core/machine.c | 1 + numa.c| 5 + qapi-schema.json | 13 + 3 files changed, 19 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index c857f3f..212dfec 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -21

[Qemu-devel] [RFC v2 0/4] enable numa configuration before machine is running from HMP/QMP

2017-12-28 Thread Igor Mammedov
As were suggested at (1) and at bof session where we discussed subj, I'm posting variant with late numa 'configuration' i.e. when QEMU is started with '-S' option in paused state and numa is configured via monitor/QMP before machine cpus are allowed to run. Suggested idea was to try 'late' numa c

[Qemu-devel] [RFC v2 2/4] HMP: add set-numa-node command

2017-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hmp.h | 1 + hmp-commands.hx | 13 + hmp.c | 23 +++ 3 files changed, 37 insertions(+) diff --git a/hmp.h b/hmp.h index a6f56b1..d861038 100644 --- a/hmp.h +++ b/hmp.h @@ -147,5 +147,6 @@ void hmp_info_ramblock

[Qemu-devel] [RFC v2 4/4] numa: pc: reset machine if numa config has changed in prelaunch time

2017-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + hw/core/machine.c | 2 +- hw/i386/pc.c| 1 + numa.c | 14 +++--- vl.c| 4 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h i

Re: [Qemu-devel] [PATCH] linux-user: Add getcpu() support

2017-12-28 Thread Laurent Vivier
Le 28/12/2017 à 16:00, Samuel Thibault a écrit : > Signed-off-by: Samuel Thibault > --- > linux-user/syscall.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 8ec7de96ce..bb8cb726f5 100644 > --- a/linux-user/syscall.c

Re: [Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Laurent Vivier
Le 28/12/2017 à 15:11, Samuel Thibault a écrit : > sched_get/setaffinity linux-user syscalls were missing conversions for > little/big endian, which is hairy since longs may not be the same size > either. > > For simplicity, this just introduces loops to convert bit by bit like is > done for selec

[Qemu-devel] [PATCH 02/10] linux-user: Rename validate_guest_space => init_guest_commpage

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker init_guest_commpage is a much more honest description of what the function does. validate_guest_space not only suggests that the function has no side-effects, but also introduces confusion as to why it is only needed on 32-bit ARM targets. Signed-off-by: Luke Shumaker ---

[Qemu-devel] [PATCH 00/10] linux-user: Speed up guest space initialization on 32-bit ARM target

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker The goal of this patchset is to fix https://bugs.launchpad.net/qemu/+bug/1740219 The gist is that the current linear search for an acceptable address range is a bad strategy when the reason we didn't get a good address on the first try is that we've having problems mapping th

[Qemu-devel] [PATCH 06/10] linux-user: init_guest_commpage: Add a comment about size check

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Signed-off-by: Luke Shumaker --- linux-user/elfload.c | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 22f2632dfa..b560f5d6fe 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -374,6 +374,11 @@ static in

[Qemu-devel] [PATCH 03/10] linux-user: init_guest_space: Clean up if we can't initialize the commpage

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker We'll just exit with an error anyway, so it doesn't really matter, but it is cleaned up in all of the other places were we error out. Signed-off-by: Luke Shumaker --- linux-user/elfload.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/elfload.c b/linux-user/

[Qemu-devel] [PATCH 08/10] linux-user: init_guest_space: Don't try to align if we'll reject it

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker If the ensure-alignment code gets triggered, then the "if (host_start && real_start != current_start)" check will always trigger, so save 2 syscalls and put that check first. Note that we can't just switch to using MAP_FIXED for that check, because then we couldn't differenti

[Qemu-devel] [PATCH 07/10] linux-user: init_guest_space: Clean up control flow a bit

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Instead of doing if (check1) { if (check2) { success; } } retry; Do a clearer if (!check1) { goto try_again; } if (!check2) { goto try_again; } su

[Qemu-devel] [PATCH 01/10] linux-user: Use #if to only call validate_guest_space for 32-bit ARM target

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Instead of defining a bogus validate_guest_space that always returns 1 on targets other than 32-bit ARM, use #if blocks to only call it on 32-bit ARM targets. This makes the "normal" flow control clearer. Signed-off-by: Luke Shumaker --- linux-user/elfload.c | 21 +

[Qemu-devel] [PATCH 05/10] linux-user: init_guest_space: Clarify page alignment logic

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker There are 3 parts to this change: - Add a comment showing the relative sizes and positions of the blocks of memory - introduce and use new aligned_{start,size} instead of adjusting real_{start_size} - When we clean up (on failure), munmap(real_start, real_size) instea

[Qemu-devel] [PATCH 04/10] linux-user: init_guest_space: Correctly handle guest_start in commpage initialization

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker init_guest_commpage needs to check if the mapped space, which ends at real_start+real_size overlaps with where it needs to put the commpage, which is (assuming sane qemu_host_page_size) guest_base + 0x000, where guest_base is real_start - guest_start. [guest_base][

[Qemu-devel] [PATCH 10/10] linux-user: init_guest_space: Try to make ARM space+commpage continuous

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker At a fixed distance after the usable memory that init_guest_space maps, for 32-bit ARM targets we also need to map a commpage. The normal init_guest_space logic doesn't keep this in mind when searching for an address range. If !host_start, then try to find a big continuous s

[Qemu-devel] [PATCH 09/10] linux-user: init_guest_space: Add a comment about search strategy

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Signed-off-by: Luke Shumaker --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 1b7583d659..7736ea2c3a 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1936,6 +1936,10 @@ unsigned

Re: [Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Samuel Thibault
Laurent Vivier, on jeu. 28 déc. 2017 18:50:14 +0100, wrote: > > +for (j = 0; j < abi_ubits; j++, bit++) { > > +if (mask[bit / ubits] & (1UL << (bit % ubits))) { > > You should use __CPUMASK() and introduce a TARGET_CPUMASK(). Err, do we really want to u

[Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Samuel Thibault
sched_get/setaffinity linux-user syscalls were missing conversions for little/big endian, which is hairy since longs may not be the same size either. For simplicity, this just introduces loops to convert bit by bit like is done for select. Signed-off-by: Samuel Thibault --- linux-user/syscall.c

Re: [Qemu-devel] [PATCH] migration: finalize current_migration object

2017-12-28 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > current_migration has .instance_finalize callback, but it is not > called, because nobody unrefs current_migration. Fix that. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171228193439.18835-1-samuel.thiba...@ens-lyon.org Subject: [Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion === TEST SCRIPT BEGIN === #!/bin/bash BASE

[Qemu-devel] [Bug 1712818] Re: live migration with storage encounter assert(!(bs->open_flags & BDRV_O_INACTIVE)) crashes

2017-12-28 Thread Matthew Schumacher
I see the same thing: 2017-12-28 21:36:26.837+: initiating migration qemu-system-x86_64: block/io.c:1537: bdrv_co_pwritev: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed. 2017-12-28 21:36:40.516+: shutting down, reason=crashed ~ Running: QEMU emulator version 2.10.1 libvirtd (lib

Re: [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2017-12-28 Thread Fam Zheng
On Thu, 12/28 14:16, Vladimir Sementsov-Ogievskiy wrote: > 28.12.2017 08:24, Fam Zheng wrote: > > On Wed, 12/20 18:49, Vladimir Sementsov-Ogievskiy wrote: > > > Signed-off-by: Vladimir Sementsov-Ogievskiy > > > --- > > > include/block/dirty-bitmap.h | 3 +++ > > > block/dirty-bitmap.c

Re: [Qemu-devel] [PATCH v6 01/20] block: Add .bdrv_co_block_status() callback

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Now that the block layer exposes byte-based allocation, > it's time to tackle the drivers. Add a new callback that operates > on as small as byte boundaries. Subsequent patches

[Qemu-devel] [PATCH v3] vhost: add used memslot number for vhost-user and vhost-kernel separately

2017-12-28 Thread Jay Zhou
Used_memslots is equal to dev->mem->nregions now, it is true for vhost kernel, but not for vhost user, which uses the memory regions that have file descriptor. In fact, not all of the memory regions have file descriptor. It is usefully in some scenarios, e.g. used_memslots is 8, and only 5 memory s

Re: [Qemu-devel] [PATCH v6 02/20] block: Switch passthrough drivers to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the generic helpers, and all passthrough clients > (blkdebug, commit, mirror, throttle) accordingly. > > Signed-off-by: Eric Blake > Reviewed-by: Vladimir Sementsov-Og

Re: [Qemu-devel] [PATCH v6 03/20] file-posix: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the file protocol driver accordingly. > > In want_zero mode, we continue to report fine-grained hole > information (the caller wants as much mapping detail as possible)

Re: [Qemu-devel] [PATCH v6 04/20] gluster: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the gluster driver accordingly. > > In want_zero mode, we continue to report fine-grained hole > information (the caller wants as much mapping detail as possible); > bu

Re: [Qemu-devel] [PATCH v6 05/20] iscsi: Switch cluster_sectors to byte-based

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert all uses of > the cluster size in sectors, along with adding assertions that we > are not dividing by zero. > > Improve some comment gramm

Re: [Qemu-devel] [PATCH v6 18/20] vpc: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the vpc driver accordingly. Drop the now-unused > get_sector_offset(). No get_sector_offset change in the patch any more, it was removed by 778b087e513ea6fdc525c5a194f

Re: [Qemu-devel] [PATCH v6 08/20] null: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the null driver accordingly. > > Signed-off-by: Eric Blake > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v6 10/20] qcow: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the qcow driver accordingly. There is no > intent to optimize based on the want_zero flag for this format. > > Signed-off-by: Eric Blake > Reviewed-by: Vladimir Semen

Re: [Qemu-devel] [PATCH v6 11/20] qcow2: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the qcow2 driver accordingly. > > For now, we are ignoring the 'want_zero' hint. However, it should > be relatively straightforward to honor the hint as a way to retur

Re: [Qemu-devel] [PATCH v6 12/20] qed: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the qed driver accordingly, taking the opportunity > to inline qed_is_allocated_cb() into its lone caller (the callback > used to be important, until we switched qed to

Re: [Qemu-devel] [PATCH v6 13/20] raw: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the raw driver accordingly. > > Signed-off-by: Eric Blake > Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v6 14/20] sheepdog: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the sheepdog driver accordingly. > > Signed-off-by: Eric Blake > Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v6 15/20] vdi: Avoid bitrot of debugging code

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > Rework the debug define so that we always get -Wformat checking, > even when debugging is disabled. > > Signed-off-by: Eric Blake > Reviewed-by: Stefan Weil > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

Re: [Qemu-devel] [PATCH v6 16/20] vdi: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the vdi driver accordingly. Note that the > TODO is already covered (the block layer guarantees bounds of its > requests), and that we can remove the now-unused s->bloc

Re: [Qemu-devel] [PATCH v6 17/20] vmdk: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the vmdk driver accordingly. Drop the > now-unused vmdk_find_index_in_cluster(). > > Also, fix a pre-existing bug: if find_extent() fails (unlikely, > since the block

Re: [Qemu-devel] [PATCH v6 07/20] iscsi: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the iscsi driver accordingly. In this case, > it is handy to teach iscsi_co_block_status() to handle a NULL map > and file parameter, even though the block layer passes

Re: [Qemu-devel] [PATCH v6 06/20] iscsi: Switch iscsi_allocmap_update() to byte-based

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert all uses of > the allocmap (no semantic change). Callers that already had bytes > available are simpler, and callers that now scale to byt

Re: [Qemu-devel] [PATCH v6 19/20] vvfat: Switch to .bdrv_co_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the vvfat driver accordingly. Note that we > can rely on the block driver having already clamped limits to our > block size, and simplify accordingly. > > Signed-off-b

Re: [Qemu-devel] [PATCH v6 20/20] block: Drop unused .bdrv_co_get_block_status()

2017-12-28 Thread Fam Zheng
On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Now that all drivers have been updated to provide the > byte-based .bdrv_co_block_status(), we can delete the sector-based > interface. > > Signed-off-by: Eric Blake Reviewe

Re: [Qemu-devel] [PATCH v14 5/9] target-arm: kvm64: inject synchronous External Abort

2017-12-28 Thread gengdongjiu
Hi, Igor, On 2017/12/28 21:49, Igor Mammedov wrote: >> so user space how to inject it. The test result that injection SEA to guest >> by Qemu >> is shown in [2]. > is it possible to inject SEA when running in TCG mode? I have tested it in TCG mode, It supports to inject SEA when running in TCG

[Qemu-devel] [PATCH 00/38] Add hppa-softmmu

2017-12-28 Thread Richard Henderson
Over the past 3 months, Helge and I have extended the existing support for hppa-linux-user to handle system mode as well. Helge has done all of the board-level hw/hppa work as well as adapting SeaBIOS for use with hppa. Sources for the latter are at https://github.com/hdeller/seabios-hppa.git

[Qemu-devel] [PATCH 06/38] target/hppa: Implement mmu_idx from IA privilege level

2017-12-28 Thread Richard Henderson
Most aspects of privilege are not yet handled. But this gives us the start from which to begin checking. Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 19 + target/hppa/cpu.c | 2 +- target/hppa/translate.c | 54 +--

[Qemu-devel] [PATCH 02/38] target/hppa: Define the rest of the PSW

2017-12-28 Thread Richard Henderson
We don't actually do anything with most of the bits yet, but at least they have names and we have somewhere to store them. Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 47 ++ target/hppa/helper.c | 53

[Qemu-devel] [PATCH 01/38] target/hppa: Skeleton support for hppa-softmmu

2017-12-28 Thread Richard Henderson
From: Helge Deller With the addition of default-configs/hppa-softmmu.mak, this will compile. It is not enabled with this patch, however. Signed-off-by: Helge Deller Signed-off-by: Richard Henderson --- include/sysemu/arch_init.h | 1 + target/hppa/cpu.h | 1 + arch_init.c

[Qemu-devel] [PATCH 03/38] target/hppa: Disable gateway page emulation for system mode

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 31d9a2a31b..8e357cc60c 100644 --- a/target/hppa/translate.c +++ b/target/hppa/tran

[Qemu-devel] [PATCH 07/38] target/hppa: Implement the system mask instructions

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/helper.h| 4 ++ target/hppa/op_helper.c | 14 +++ target/hppa/translate.c | 101 +++- 3 files changed, 117 insertions(+), 2 deletions(-) diff --git a/target/hppa/helper.h b/target/hppa/helper.

[Qemu-devel] [PATCH 10/38] target/hppa: Adjust insn mask for mfctl, w

2017-12-28 Thread Richard Henderson
While the E bit is only used for pa2.0 mfctl,w from sar, the otherwise reserved bit does not appear to be decoded. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c in

[Qemu-devel] [PATCH 18/38] target/hppa: Implement tlb_fill

2017-12-28 Thread Richard Henderson
However since HPPA has a software-managed TLB, and the relevant TLB manipulation instructions are not implemented, this does not actually do anything. Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 29 - target/hppa/int_helper.c | 12 target/hppa/mem_helper.c | 14

[Qemu-devel] [PATCH 09/38] target/hppa: Add control registers

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/hppa/target_cpu.h | 2 +- target/hppa/cpu.h| 23 +++ linux-user/main.c| 4 +-- linux-user/signal.c | 4 +-- target/hppa/gdbstub.c| 12 target/hppa/mem_helper.c | 2 +- target/hppa

[Qemu-devel] [PATCH 04/38] target/hppa: Define hardware exception types

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 39 +++ linux-user/main.c| 26 ++--- target/hppa/helper.c | 61 ++-- target/hppa/mem_helper.c | 4 +++- target/hppa/op_helper.c |

[Qemu-devel] [PATCH 12/38] target/hppa: Fill in hppa_cpu_do_interrupt/hppa_cpu_exec_interrupt

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.c | 2 + target/hppa/helper.c | 63 - target/hppa/int_helper.c | 176 ++ target/hppa/translate.c | 16 - target/hppa/Makefile.objs | 1 + 5 files changed, 192

[Qemu-devel] [PATCH 17/38] target/hppa: Implement IASQ

2017-12-28 Thread Richard Henderson
Any one TB will have only one space value. If we change spaces, we change TBs. Thus BE and BEV must exit the TB immediately. Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 48 +-- target/hppa/cpu.c| 11 +- target/hppa/helper.c | 3 +- ta

[Qemu-devel] [PATCH 13/38] target/hppa: Implement unaligned access trap

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index ca619578dd..6b2d22118d 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -48,6 +48,21 @@ static void hpp

[Qemu-devel] [PATCH 23/38] target/hppa: Implement P*TLB and P*TLBE insns

2017-12-28 Thread Richard Henderson
We now have all of the TLB manipulation instructions. Signed-off-by: Richard Henderson --- target/hppa/helper.h | 2 ++ target/hppa/mem_helper.c | 37 + target/hppa/translate.c | 40 3 files changed, 79 insertions

[Qemu-devel] [PATCH 11/38] target/hppa: Implement rfi

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 1 + target/hppa/helper.h| 2 ++ target/hppa/op_helper.c | 24 target/hppa/translate.c | 31 +-- 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/target/hppa/cp

[Qemu-devel] [PATCH 05/38] target/hppa: Split address size from register size

2017-12-28 Thread Richard Henderson
For system mode, we will need 64-bit virtual addresses even when we have 32-bit register sizes. Since the rest of QEMU equates TARGET_LONG_BITS with the address size, redefine everything related to register size in terms of a new TARGET_REGISTER_BITS. Signed-off-by: Richard Henderson --- target

[Qemu-devel] [PATCH 24/38] target/hppa: Implement LDWA

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 2c3c582913..ef953cd1d5 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.

[Qemu-devel] [PATCH 19/38] target/hppa: Implement external interrupts

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 1 + target/hppa/helper.h | 2 ++ target/hppa/cpu.c| 6 + target/hppa/int_helper.c | 59 target/hppa/translate.c | 16 - 5 files changed, 83 insertions(

[Qemu-devel] [PATCH 14/38] target/hppa: Use space registers in data operations

2017-12-28 Thread Richard Henderson
This changes the system virtual address width to 64-bit and incorporates the space registers into load/store operations. Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 14 ++ target/hppa/translate.c | 332 +++- 2 files changed, 200 ins

[Qemu-devel] [PATCH 32/38] target/hppa: Add migration for the cpu

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 1 + target/hppa/cpu.c | 1 + target/hppa/machine.c | 181 ++ target/hppa/Makefile.objs | 1 + 4 files changed, 184 insertions(+) create mode 100644 target/hppa/machine.

[Qemu-devel] [PATCH 27/38] target/hppa: Implement SYNCDMA insn

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 2e3edf8957..00a8c26afa 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2303,7 +2303,8 @

[Qemu-devel] [PATCH 20/38] target/hppa: Implement the interval timer

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 2 ++ target/hppa/helper.h | 3 +++ target/hppa/cpu.c| 8 target/hppa/int_helper.c | 6 ++ target/hppa/op_helper.c | 36 target/hppa/translate.c | 16 ---

[Qemu-devel] [PATCH 30/38] target/hppa: Optimize for flat addressing space

2017-12-28 Thread Richard Henderson
Linux sets sr4-sr7 all to the same value, which means that we need not do any runtime computation to find out what space to use in forming the GVA. Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 8 +++- target/hppa/translate.c | 32 +--- 2 files c

[Qemu-devel] [PATCH 26/38] target/hppa: Implement LCI

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 20 1 file changed, 20 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index ec61c57e55..2e3edf8957 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2453,6 +2453

[Qemu-devel] [PATCH 21/38] target/hppa: Log unimplemented instructions

2017-12-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 77d3821924..a670d9d777 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -4209,6 +4209,8 @@ static DisasJu

[Qemu-devel] [PATCH 15/38] target/hppa: Do not set cs_base to iaoq_b

2017-12-28 Thread Richard Henderson
We will need to use cs_base for iasq_f. Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 13 +++-- target/hppa/cpu.c | 4 +++- target/hppa/translate.c | 22 -- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/target/hppa/cpu.h b/ta

[Qemu-devel] [PATCH 16/38] target/hppa: Avoid privilege level decrease during branches

2017-12-28 Thread Richard Henderson
These instructions force the destination privilege level of the branch destination to be no higher than current. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 52 - 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/tar

[Qemu-devel] [PATCH 29/38] hw/hppa: Implement DINO system board

2017-12-28 Thread Richard Henderson
Now that we have the prerequisites in target/hppa/, implement the hardware for a PA7100LC. This also enables build for hppa-softmmu. Signed-off-by: Helge Deller [rth: Since it is all new code, squashed all branch development withing hw/hppa/ to a single patch.] Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH 22/38] target/hppa: Implement I*TLBA and I*TLBP insns

2017-12-28 Thread Richard Henderson
The TLB can now be populated, but it cannot yet be cleared. Signed-off-by: Richard Henderson --- target/hppa/helper.h | 2 ++ target/hppa/mem_helper.c | 80 ++-- target/hppa/translate.c | 54 ++-- 3 files changed, 132

  1   2   >