Re: [Qemu-devel] [PATCH v4 05/13] pc: leave max apic_id_limit only in legacy cpu hotplug code

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 01:37:46PM +0200, Igor Mammedov wrote: > that's enough to make old code that depends on it > to prevent QEMU starting with more than 255 CPUs. > > Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 12:32:02PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > On Wed, Oct 12, 2016 at 08:15:02PM +0100, Dr. David Alan Gilbert wrote: > > > Hi, > > > I had a look at a couple of readline like libraries; > > > editline and linenoise

Re: [Qemu-devel] [PATCH v2] raw_bsd: add offset and size options

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 12:25:17AM +0200, Tomáš Golembiovský wrote: > Added two new options 'offset' and 'size'. This makes it possible to use > only part of the file as a device. This can be used e.g. to limit the > access only to single partition in a disk image or use a disk inside a > tar archi

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 08:15:02PM +0100, Dr. David Alan Gilbert wrote: >> Hi, >> I had a look at a couple of readline like libraries; >> editline and linenoise. A difficulty with using them is that >> they both want fd's or FILE*'s; editline takes either but >>

Re: [Qemu-devel] [PATCH v3 05/13] pc: leave max apic_id_limit only in legacy cpu hotplug code

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 08:39:05 -0200 Eduardo Habkost wrote: > On Tue, Oct 18, 2016 at 11:12:04AM +0200, Igor Mammedov wrote: > > On Mon, 17 Oct 2016 19:44:52 -0200 > > Eduardo Habkost wrote: > > > > > On Thu, Oct 13, 2016 at 11:52:39AM +0200, Igor Mammedov wrote: > > > [...] > > > > @@ -236,7

[Qemu-devel] [PATCH COLO-Frame (Base) v21 04/17] migration: Switch to COLO process after finishing loadvm

2016-10-18 Thread zhanghailiang
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. We add three new members to struct MigrationIncomingState, 'have_colo_incoming_thread' and 'colo_incoming_thread' record the COLO related thread for secondary VM, 'migration_incoming_co' records the o

[Qemu-devel] [PATCH COLO-Frame (Base) v21 12/17] COLO: Add 'x-colo-lost-heartbeat' command to trigger failover

2016-10-18 Thread zhanghailiang
We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, if the command is sent to the PVM, the Pri

[Qemu-devel] [PATCH COLO-Frame (Base) v21 15/17] COLO: Implement failover work for secondary VM

2016-10-18 Thread zhanghailiang
If users require SVM to takeover work, COLO incoming thread should exit from loop while failover BH helps backing to migration incoming coroutine. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v20: - Rebase to master v12: - Improve error message

[Qemu-devel] [PATCH COLO-Frame (Base) v21 06/17] COLO: Introduce checkpointing protocol

2016-10-18 Thread zhanghailiang
We need communications protocol of user-defined to control the checkpointing process. The new checkpointing request is started by Primary VM, and the interactive process like below: Checkpoint synchronizing points: Primary Secondary

[Qemu-devel] [PATCH COLO-Frame (Base) v21 02/17] COLO: migrate COLO related info to secondary node

2016-10-18 Thread zhanghailiang
We can determine whether or not VM in destination should go into COLO mode by referring to the info that was migrated. We skip this section if COLO is not enabled (i.e. migrate_set_capability colo off), so that, It doesn't break compatibility with migration no matter whether users configure the --

[Qemu-devel] [PATCH COLO-Frame (Base) v21 01/17] migration: Introduce capability 'x-colo' to migration

2016-10-18 Thread zhanghailiang
We add helper function colo_supported() to indicate whether colo is supported or not, with which we use to control whether or not showing 'x-colo' string to users, they can use qmp command 'query-migrate-capabilities' or hmp command 'info migrate_capabilities' to learn if colo is supported. The de

[Qemu-devel] [PATCH COLO-Frame (Base) v21 13/17] COLO: Introduce state to record failover process

2016-10-18 Thread zhanghailiang
When handling failover, COLO processes differently according to the different stage of failover process, here we introduce a global atomic variable to record the status of failover. We add four failover status to indicate the different stage of failover process. You should use the helpers to get a

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 02:08:14PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Wed, Oct 12, 2016 at 08:15:02PM +0100, Dr. David Alan Gilbert wrote: > >> Hi, > >> I had a look at a couple of readline like libraries; > >> editline and linenoise. A difficulty with usin

[Qemu-devel] [PATCH COLO-Frame (Base) v21 11/17] COLO: Synchronize PVM's state to SVM periodically

2016-10-18 Thread zhanghailiang
Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - Fix wrong sleep time for checkpoint period. (Dave's comment) --- migration/colo.c | 12 1 fil

[Qemu-devel] [PATCH COLO-Frame (Base) v21 09/17] COLO: Load VMState into QIOChannelBuffer before restore it

2016-10-18 Thread zhanghailiang
We should not destroy the state of SVM (Secondary VM) until we receive the complete data of PVM's state, in case the primary fails in the process of sending the state, so we cache the VM's state in secondary side before load it into SVM. Besides, we should call qemu_system_reset() before load VM s

[Qemu-devel] [PATCH COLO-Frame (Base) v21 17/17] configure: Support enable/disable COLO feature

2016-10-18 Thread zhanghailiang
configure --enable-colo/--disable-colo to switch COLO support on/off. COLO feature is enabled by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- v19: - fix colo_supported() to return true v11: - Turn COLO on in defa

[Qemu-devel] [PATCH COLO-Frame (Base) v21 07/17] COLO: Add a new RunState RUN_STATE_COLO

2016-10-18 Thread zhanghailiang
Guest will enter this state when paused to save/restore VM state under COLO checkpoint. Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake --- qapi-schema.json | 5 ++

[Qemu-devel] [PATCH COLO-Frame (Base) v21 03/17] migration: Enter into COLO mode after migration if COLO is enabled

2016-10-18 Thread zhanghailiang
Add a new migration state: MIGRATION_STATUS_COLO. Migration source side enters this state after the first live migration successfully finished if COLO is enabled by command 'migrate_set_capability x-colo on'. We reuse migration thread, so the process of checkpointing will be handled in migration t

[Qemu-devel] [PATCH COLO-Frame (Base) v21 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-10-18 Thread zhanghailiang
This is the 21th version of COLO frame series. Rebase to the latest master. Cc: Juan Quintela Cc: Amit Shah Cc: Hai Huang Cc: Weidong Han Cc: Dong eddie Cc: Stefan Hajnoczi Cc: Jason Wang Cc: Dr. David Alan Gilbert (git) zhanghailiang (17): migration: Introduce capability 'x-colo' to

[Qemu-devel] [PATCH COLO-Frame (Base) v21 10/17] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2016-10-18 Thread zhanghailiang
Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v2

[Qemu-devel] [PATCH COLO-Frame (Base) v21 14/17] COLO: Implement the process of failover for primary VM

2016-10-18 Thread zhanghailiang
For primary side, if COLO gets failover request from users. To be exact, gets 'x_colo_lost_heartbeat' command. COLO thread will exit the loop while the failover BH does the cleanup work and resumes VM. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --

[Qemu-devel] [PATCH COLO-Frame (Base) v21 05/17] COLO: Establish a new communicating path for COLO

2016-10-18 Thread zhanghailiang
This new communication path will be used for returning messages from Secondary side to Primary side. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v13: - Remove useless error report v12: - Add Reviewed-by tag v11: - Rebase master to use qemu_file

[Qemu-devel] [PATCH] target-arm: Implement new HLT trap for semihosting

2016-10-18 Thread Peter Maydell
Version 2.0 of the semihosting specification introduces new trap instructions for AArch32: HLT 0xF000 for A32 and HLT 0x3C for T32. Implement these (in the same way we implement the existing HLT semihosting trap for A64). The old traps via SVC and BKPT are unaffected. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH COLO-Frame (Base) v21 16/17] docs: Add documentation for COLO feature

2016-10-18 Thread zhanghailiang
Introduce the design of COLO, and how to test it. Signed-off-by: zhanghailiang --- v21: - Fix some minor typos and grammar from Eric --- docs/COLO-FT.txt | 189 +++ 1 file changed, 189 insertions(+) create mode 100644 docs/COLO-FT.txt diff --

[Qemu-devel] [PATCH COLO-Frame (Base) v21 08/17] COLO: Send PVM state to secondary side when do checkpoint

2016-10-18 Thread zhanghailiang
VM checkpointing is to synchronize the state of PVM to SVM, just like migration does, we re-use save helpers to achieve migrating PVM's state to Secondary side. COLO need to cache the data of VM's state in the secondary side before synchronize it to SVM. COLO need the size of the data to determine

Re: [Qemu-devel] [PATCH 1/2] script/clean-includes: added duplicate #include check

2016-10-18 Thread Anand J
On Tue, Oct 18, 2016 at 4:03 PM, Anand J wrote: > Added script to check duplicate #include entries. This check will scan > and print the files in which duplicate #include entries are present. > > Script might output false positive entries as well. Such entries should > not be removed. So if it fi

Re: [Qemu-devel] [PATCH 2/2] clean-up: removed duplicate #includes

2016-10-18 Thread Anand J
On Tue, Oct 18, 2016 at 4:03 PM, Anand J wrote: > Some files contain multiple #includes of the same header file. > Removed most of those unnecessary duplicate entries using > scripts/clean-includes. > > Signed-off-by: Anand J > --- > accel.c | 1 - > cputlb.c

Re: [Qemu-devel] [PATCH v3 06/13] pc: apic_common: extend APIC ID property to 32bit

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 08:56:28 -0200 Eduardo Habkost wrote: > On Thu, Oct 13, 2016 at 11:52:40AM +0200, Igor Mammedov wrote: > > ACPI ID is 32 bit wide on CPUs with x2APIC support. > > Extend 'id' property to support it. > > > > Signed-off-by: Igor Mammedov > > --- > > v3: > >keep original be

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-18 Thread Jike Song
On 10/18/2016 12:02 AM, Alex Williamson wrote: > On Fri, 14 Oct 2016 15:19:01 -0700 > Neo Jia wrote: > >> On Fri, Oct 14, 2016 at 10:51:24AM -0600, Alex Williamson wrote: >>> On Fri, 14 Oct 2016 09:35:45 -0700 >>> Neo Jia wrote: >>> On Fri, Oct 14, 2016 at 08:46:01AM -0600, Alex Williams

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > On Tue, Oct 18, 2016 at 02:08:14PM +0200, Markus Armbruster wrote: > > "Daniel P. Berrange" writes: > > > > > On Wed, Oct 12, 2016 at 08:15:02PM +0100, Dr. David Alan Gilbert wrote: > > >> Hi, > > >> I had a look at a couple of readline like l

Re: [Qemu-devel] [PATCH 1/8] libqos: Give qvirtio_config_read*() consistent semantics

2016-10-18 Thread Laurent Vivier
On 18/10/2016 12:52, David Gibson wrote: > The 'addr' parameter to qvirtio_config_read*() doesn't have a consistent > meaning: when using the virtio-pci versions, it's a full PCI space address, > but for virtio-mmio, it's an offset from the device's base mmio address. > > This means that the cal

Re: [Qemu-devel] [PATCH v4 13/13] pc: require IRQ remapping and EIM if there could be x2APIC CPUs

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 09:27:37 -0200 Eduardo Habkost wrote: > On Fri, Oct 14, 2016 at 01:25:35PM +0200, Igor Mammedov wrote: > > it would prevent starting guest with incorrect configs > > where interrupts couldn't be delivered to CPUs with > > APIC IDs > 255. > > > > Signed-off-by: Igor Mammedov

Re: [Qemu-devel] [PATCH v3 01/13] pc: acpi: x2APIC support for MADT table

2016-10-18 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 11:52:35AM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost But I have a few questions below that are not directly related to this patch: > --- > include/hw/acpi/acpi-defs.h | 18 +++ > hw/i386/acpi-build.c| 78 >

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: >> >> On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: >>> >>> On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: >>> One more relatively easy question though, will we include @port as an

Re: [Qemu-devel] [PATCH v4 13/13] pc: require IRQ remapping and EIM if there could be x2APIC CPUs

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 02:44:55PM +0200, Igor Mammedov wrote: > On Tue, 18 Oct 2016 09:27:37 -0200 > Eduardo Habkost wrote: > > > On Fri, Oct 14, 2016 at 01:25:35PM +0200, Igor Mammedov wrote: > > > it would prevent starting guest with incorrect configs > > > where interrupts couldn't be deliver

Re: [Qemu-devel] [PATCH v3 06/13] pc: apic_common: extend APIC ID property to 32bit

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 02:36:10PM +0200, Igor Mammedov wrote: > On Tue, 18 Oct 2016 08:56:28 -0200 > Eduardo Habkost wrote: > > > On Thu, Oct 13, 2016 at 11:52:40AM +0200, Igor Mammedov wrote: > > > ACPI ID is 32 bit wide on CPUs with x2APIC support. > > > Extend 'id' property to support it. > >

Re: [Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()

2016-10-18 Thread Andrew Jones
On Mon, Oct 17, 2016 at 05:20:22PM -0200, Eduardo Habkost wrote: > On Sat, Oct 15, 2016 at 12:52:48AM +0200, Laurent Vivier wrote: > > Modify all CPUs to call it from XXX_cpu_realizefn() function. > > > > Remove all the cannot_destroy_with_object_finalize_yet as > > unsafe references have been mov

Re: [Qemu-devel] [PATCH v3 01/13] pc: acpi: x2APIC support for MADT table

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 10:47:02 -0200 Eduardo Habkost wrote: > On Thu, Oct 13, 2016 at 11:52:35AM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > Reviewed-by: Eduardo Habkost > > But I have a few questions below that are not directly related to > this patch: > > > --- > > in

Re: [Qemu-devel] [PATCH v2] raw_bsd: add offset and size options

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 00:25 hat Tomáš Golembiovský geschrieben: > Added two new options 'offset' and 'size'. This makes it possible to use > only part of the file as a device. This can be used e.g. to limit the > access only to single partition in a disk image or use a disk inside a > tar archive (like

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: > On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: > > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: > >> > >> On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: > >>> > >>> On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: > >>> > >>

Re: [Qemu-devel] [PATCH v3 02/13] pc: acpi: x2APIC support for SRAT table

2016-10-18 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 11:52:36AM +0200, Igor Mammedov wrote [...] > @@ -2441,18 +2440,33 @@ build_srat(GArray *table_data, BIOSLinker *linker, > MachineState *machine) > > for (i = 0; i < apic_ids->len; i++) { > int j = numa_get_node_for_cpu(i); > -int apic_id = apic_ids-

Re: [Qemu-devel] [PATCH v3 01/13] pc: acpi: x2APIC support for MADT table

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 10:47:02AM -0200, Eduardo Habkost wrote: > On Thu, Oct 13, 2016 at 11:52:35AM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > Reviewed-by: Eduardo Habkost Reviewed-by withdrawn. See below: [...] > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 6:34 PM, Kevin Wolf wrote: > Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: >> On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: >> > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: >> >> >> >> On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: >> >>> >> >>

[Qemu-devel] [PULL v2 01/22] linux-user: Add support for adjtimex() syscall

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. Its declaration is: int adjtimex(struct timex *buf); The cor

[Qemu-devel] [PULL v2 00/22] linux-user changes

2016-10-18 Thread riku . voipio
iku.voipio/qemu.git tags/pull-linux-user-20161018 for you to fetch changes up to cee1d8afec98e0e686c894b06982e08b8bf242ba: linux-user: disable unicore32 linux-user build (2016-10-18 11:57:57 +0300) Linux-user changes, mostly bu

[Qemu-devel] [PULL v2 04/22] linux-user: Fix msgrcv() and msgsnd() syscalls support

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES, EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG. By examining negative scenarios of these syscalls for Mips, it was established that ENOMSG does not have the same value accross all platforms, but

[Qemu-devel] [PULL v2 06/22] linux-user: Fix syslog() syscall support

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly valid value for the second argument

Re: [Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 03:00:07PM +0200, Andrew Jones wrote: > On Mon, Oct 17, 2016 at 05:20:22PM -0200, Eduardo Habkost wrote: > > On Sat, Oct 15, 2016 at 12:52:48AM +0200, Laurent Vivier wrote: > > > Modify all CPUs to call it from XXX_cpu_realizefn() function. > > > > > > Remove all the cannot

[Qemu-devel] [PULL v2 05/22] linux-user: Fix socketcall() syscall support

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic Since not all Linux host platforms support socketcall() (most notably Intel), do_socketcall() function in Qemu's syscalls.c is implemented to mirror the corespondant implementation of socketcall() in Linux kernel, and to utilise individual socket operations that are supp

[Qemu-devel] [PULL v2 03/22] linux-user: Fix mq_open() syscall support

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic Conversion of file creation flags (O_CREAT, ...) from target to host was missing. Also, this patch implements better error handling. Signed-off-by: Aleksandar Markovic Signed-off-by: Riku Voipio --- linux-user/syscall.c | 16 +--- 1 file changed, 9 inser

[Qemu-devel] [PULL v2 08/22] linux-user: sparc64: Use correct target SHMLBA in shmat()

2016-10-18 Thread riku . voipio
From: Peter Maydell In commit 40df8c0c0722 support was added for target-specific handling of SHMLBA. Unfortunately the sparc64-specific part of the change got lost somewhere between the patch being posted to the list and going into master: http://patchwork.ozlabs.org/patch/646980/ http://patchw

[Qemu-devel] [PULL v2 15/22] linux-user: Add support for syncfs() syscall

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic This patch implements Qemu user mode syncfs() syscall support. Syscall syncfs() syncs the filesystem containing file determined by the open file descriptor passed as the argument to syncfs(). The implementation consists of a straightforward invocation of host's syncfs()

[Qemu-devel] [PULL v2 02/22] linux-user: Add support for ustat() syscall

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. Its declaration is: int ustat(dev_t dev, struct ustat *ubuf); Its Linux kernel implementation is at fs/compat.c, line 334. The Qemu implemen

[Qemu-devel] [PULL v2 07/22] linux-user: Remove a duplicate item from strace.list

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic There is a duplicate item in strace.list. It is benign, but it shouldn't be there, since it may lead to confusion and even bugs in the future. It is the only duplicate in strace.list. This patch removes it. Signed-off-by: Aleksandar Markovic Signed-off-by: Riku Voipio

[Qemu-devel] [PULL v2 13/22] linux-user: Fix definition of target_sigevent for 32-bit guests

2016-10-18 Thread riku . voipio
From: Peter Maydell The sigevent structure includes a union with some fields which are pointers. For the QEMU target_sigevent structure we must represent these as abi_ulongs, not host function pointers. This error was causing the compiler to believe it should 8-align the _sigev_un union on a 64-

[Qemu-devel] [PULL v2 14/22] linux-user: Add support for clock_adjtime() syscall

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic This patch implements Qemu user mode clock_adjtime() syscall support. The implementation is based on invocation of host's clock_adjtime(). Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Riku Voipio --- configure | 18

[Qemu-devel] [PULL v2 12/22] linux-user: use libc wrapper instead of direct mremap syscall

2016-10-18 Thread riku . voipio
From: Felix Janda This commit essentially reverts commit 3af72a4d98dca033492102603734cbc63cd2694a, which has replaced five-argument calls to mremap() by direct mremap syscalls for compatibility with glibc older than version 2.4. The direct syscall was buggy for 64bit targets on 32bit hosts becau

[Qemu-devel] [PULL v2 11/22] linux-user: Don't use alloca() for epoll_wait's epoll event array

2016-10-18 Thread riku . voipio
From: Peter Maydell The epoll event array which epoll_wait() allocates has a size determined by the guest which could potentially be quite large. Use g_try_new() rather than alloca() so that we can fail more cleanly if the guest hands us an oversize value. (ENOMEM is not a documented return value

[Qemu-devel] [PULL v2 09/22] linux-user: add kcmp() syscall

2016-10-18 Thread riku . voipio
From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3396d4b..e005401 100644 --- a/linux-user/syscall.

[Qemu-devel] [PULL v2 18/22] linux-user: Redirect termbits.h for Mips64 to termbits.h for Mips32

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic linux-user/mips64/termbits.h and linux-user/mips/termbits.h originate from the same files in Linux kernel. There is no plan to split original headers in Linux kernel into Mips32 and Mips64 versions any time soon. Therefore, it is better not to have separate Mips32 and Mi

[Qemu-devel] [PULL v2 16/22] linux-user: Update mips_syscall_args[] array in main.c

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic Array mips_syscall_args[] determines number of arguments for each syscall on Mips32. It wasn't updated with newer syscalls. Also, preadv and pwritev have 5 arguments, not 6. Signed-off-by: Aleksandar Markovic Signed-off-by: Riku Voipio --- linux-user/main.c | 24

[Qemu-devel] [PULL v2 19/22] linux-user: Fix fadvise64() syscall support for Mips32

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic By looking at the file arch/mips/kernel/scall32-o32.S in Linux kernel, it can be deduced that, for Mips32 platform, syscall corresponding to number _NR_fadvise64 as defined in kernel file arch/mips/include/uapi/asm/unistd.h translates to kernel function sys_fadvise64_64,

[Qemu-devel] [PULL v2 10/22] linux-user: add RTA_PRIORITY in netlink

2016-10-18 Thread riku . voipio
From: Laurent Vivier Used by fedora21 on ppc64 in the network initialization Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e005401..bbdf316 100644 --- a/li

[Qemu-devel] [PULL v2 20/22] linux-user: added support for preadv() system call.

2016-10-18 Thread riku . voipio
From: Dejan Jovicevic This system call performs the same task as the readv() system call, with the exception of having the fourth argument, offset, which specifes the file offset at which the input operation is to be performed. Because of this, the preadv() implementation is based on the readv()

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > On Tue, Oct 18, 2016 at 12:32:02PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > On Wed, Oct 12, 2016 at 08:15:02PM +0100, Dr. David Alan Gilbert wrote: > > > > Hi, > > > > I had a look at a cou

[Qemu-devel] [PULL v2 17/22] linux-user: Update ioctls definitions for Mips32

2016-10-18 Thread riku . voipio
From: Aleksandar Markovic Update linux-user/mips/termbits.h with ioctl definitions from kernel file arch/mips/include/uapi/asm/ioctls.h. Signed-off-by: Aleksandar Markovic Signed-off-by: Riku Voipio --- linux-user/mips/termbits.h | 12 1 file changed, 12 insertions(+) diff --git

[Qemu-devel] [PULL v2 22/22] linux-user: disable unicore32 linux-user build

2016-10-18 Thread riku . voipio
From: Riku Voipio In order to cleanup linux-user, we need support for most relatively modern syscalls. unicore32 lacks support for syscalls like epoll_pwait, preventing cleaning up the CONFIG_EPOLL mess. This patch can be reverted when unicore32 starts either supporting the syscalls as defined i

Re: [Qemu-devel] [PATCH 2/4] tests/test-vmstate.c: prove VMStateField.start broken

2016-10-18 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > The handling of VMStateField.start is currently quite broken if > VMS_ALLOC is present (that is for VMSTATE_VBUFFER_ALLOC_UINT32) but > fortunately also quite underutilized -- nobody is using .start != 0. > > Let's prove with this patch that it's r

[Qemu-devel] [PULL v2 21/22] linux-user: added support for pwritev() system call.

2016-10-18 Thread riku . voipio
From: Dejan Jovicevic This system call performs the same task as the writev() system call, with the exception of having the fourth argument, offset, which specifes the file offset at which the input operation is to be performed. Because of this, the pwritev() implementation is based on the writev

Re: [Qemu-devel] [PATCH v3 03/13] acpi: cphp: support x2APIC entry in cpu._MAT

2016-10-18 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 11:52:37AM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > hw/acpi/cpu.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c > index 902f5c9..5ac89fe 100644 > --- a/hw/acpi/cpu.c > +++ b/hw/acpi/cpu.c > @@ -531,6

Re: [Qemu-devel] [PATCH v2] vl: exit qemu on guest panic if -no-shutdown is not set

2016-10-18 Thread Eric Blake
On 10/18/2016 02:29 AM, Christian Borntraeger wrote: > For automated testing purposes it can be helpful to exit qemu > (poweroff) when the guest panics. Make this the default unless > -no-shutdown is specified. > > For internal-errors like errors from KVM_RUN the behaviour is > not changed, in oth

Re: [Qemu-devel] [PATCH 1/8] libqos: Give qvirtio_config_read*() consistent semantics

2016-10-18 Thread Greg Kurz
On Tue, 18 Oct 2016 21:52:06 +1100 David Gibson wrote: > The 'addr' parameter to qvirtio_config_read*() doesn't have a consistent > meaning: when using the virtio-pci versions, it's a full PCI space address, > but for virtio-mmio, it's an offset from the device's base mmio address. > > This mean

Re: [Qemu-devel] [PATCH 2/8] libqos: Handle PCI IO de-multiplexing in common code

2016-10-18 Thread Laurent Vivier
On 18/10/2016 12:52, David Gibson wrote: > The PCI IO space (aka PIO, aka legacy IO) and PCI memory space (aka MMIO) > are distinct address spaces by the PCI spec (although parts of one might be > aliased to parts of the other in some cases). > > However, qpci_io_read*() and qpci_io_write*() can

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 15:14 hat Ashijeet Acharya geschrieben: > On Tue, Oct 18, 2016 at 6:34 PM, Kevin Wolf wrote: > > Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: > >> On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: > >> > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: > >> >> > >>

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-18 Thread Radim Krčmář
2016-10-17 15:20-0200, Marcelo Tosatti: > On Mon, Oct 17, 2016 at 04:50:09PM +0200, Radim Krčmář wrote: >> 2016-10-17 07:47-0200, Marcelo Tosatti: >> > On Fri, Oct 14, 2016 at 06:20:31PM -0300, Eduardo Habkost wrote: >> >> I have been wondering: should we allow live migration with the >> >> invtsc

Re: [Qemu-devel] qemu master tests/vmstate prints "Failed to load simple/primitive:b_1" etc

2016-10-18 Thread Paolo Bonzini
On 18/10/2016 11:54, Dr. David Alan Gilbert wrote: > I've not quite figured it out but we're linked against the stubs/ monitor > code rather than the real monitor code; and the stubs monitor_vprintf discards > and the stubs monitor_cur_is_qmp() always returns false, so to silence things > we just

Re: [Qemu-devel] [PATCH v2 6/6] tests/vhost-user-bridge: use contrib/libvhost-user

2016-10-18 Thread Eric Blake
On 10/18/2016 04:24 AM, Marc-André Lureau wrote: > Use the libvhost-user library. > > This ended up being a rather large patch that cannot be easily splitted, s/splitted/split/ (One of those weird English verbs that has the same spelling in multiple tenses) > due to massive code move and API cha

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 02:25:25PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > On Tue, Oct 18, 2016 at 12:32:02PM +0100, Dr. David Alan Gilbert wrote: > > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > > On Wed, Oct 12, 2016 at 08:15:02PM

Re: [Qemu-devel] [PATCH v3 02/13] pc: acpi: x2APIC support for SRAT table

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 11:07:21 -0200 Eduardo Habkost wrote: > On Thu, Oct 13, 2016 at 11:52:36AM +0200, Igor Mammedov wrote > [...] > > @@ -2441,18 +2440,33 @@ build_srat(GArray *table_data, BIOSLinker *linker, > > MachineState *machine) > > > > for (i = 0; i < apic_ids->len; i++) { > >

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-18 Thread Radim Krčmář
2016-10-18 15:36+0200, Radim Krčmář: > 2016-10-17 18:24+0200, Paolo Bonzini: >> We should also blacklist the TSC deadline timer when invtsc is not >> available. > > True. > > I was thinking that with Wanpeng's VMX preemption patches, we might not > need the TSC nor paravirtual deadline timer, the

Re: [Qemu-devel] [PATCH v3 03/13] acpi: cphp: support x2APIC entry in cpu._MAT

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 11:34:55 -0200 Eduardo Habkost wrote: > On Thu, Oct 13, 2016 at 11:52:37AM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/acpi/cpu.c | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c > > index 902f

Re: [Qemu-devel] [PATCH 05/15] util: add a helper to mmap private anonymous memory

2016-10-18 Thread Alex Bennée
Michael S. Tsirkin writes: > On Tue, Jun 28, 2016 at 11:01:29AM +0200, Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> include/qemu/mmap-alloc.h | 6 ++ >> util/mmap-alloc.c | 17 + >> 2 files changed, 23 insertions(+) >> >> diff --git a/include/qemu/m

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-18 Thread Radim Krčmář
2016-10-17 18:24+0200, Paolo Bonzini: > On 17/10/2016 16:50, Radim Krčmář wrote: >> 2016-10-17 07:47-0200, Marcelo Tosatti: >>> On Fri, Oct 14, 2016 at 06:20:31PM -0300, Eduardo Habkost wrote: I have been wondering: should we allow live migration with the invtsc flag enabled, if TSC scali

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-18 Thread Paolo Bonzini
On 18/10/2016 01:58, Marcelo Tosatti wrote: > > We should also blacklist the TSC deadline timer when invtsc is not > > available. > > Actually, a nicer fix would be to check the different > frequencies and scale the deadline relative to the difference. You cannot know what exactly the guest wa

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-18 Thread Radim Krčmář
2016-10-17 21:58-0200, Marcelo Tosatti: > On Mon, Oct 17, 2016 at 07:11:01PM -0200, Eduardo Habkost wrote: >> On Mon, Oct 17, 2016 at 06:24:38PM +0200, Paolo Bonzini wrote: >> > On 17/10/2016 16:50, Radim Krčmář wrote: >> > > 2016-10-17 07:47-0200, Marcelo Tosatti: >> [...] >> > >> since Linux gues

Re: [Qemu-devel] [PATCH v3 06/13] pc: apic_common: extend APIC ID property to 32bit

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 10:59:17 -0200 Eduardo Habkost wrote: > On Tue, Oct 18, 2016 at 02:36:10PM +0200, Igor Mammedov wrote: > > On Tue, 18 Oct 2016 08:56:28 -0200 > > Eduardo Habkost wrote: > > > > > On Thu, Oct 13, 2016 at 11:52:40AM +0200, Igor Mammedov wrote: > > > > ACPI ID is 32 bit wid

Re: [Qemu-devel] [PATCH v3 01/13] pc: acpi: x2APIC support for MADT table

2016-10-18 Thread Igor Mammedov
On Tue, 18 Oct 2016 11:05:47 -0200 Eduardo Habkost wrote: > On Tue, Oct 18, 2016 at 10:47:02AM -0200, Eduardo Habkost wrote: > > On Thu, Oct 13, 2016 at 11:52:35AM +0200, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > > > Reviewed-by: Eduardo Habkost > > Reviewed-by withdra

Re: [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-18 Thread Fam Zheng
On Mon, 10/17 22:56, Auger Eric wrote: > > make[1]: *** No rule to make target `../hw/core/platform-bus-stub.o', > > needed by `qemu-system-x86_64'. Stop. > I can't figure out why this rule is missing? > > I compiled on x86 and aarch64 with > ./configure --target-list="x86_64-softmmu" --enable-w

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-18 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > On Tue, Oct 18, 2016 at 02:25:25PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > On Tue, Oct 18, 2016 at 12:32:02PM +0100, Dr. David Alan Gilbert wrote: > > > > * Daniel P. Berrange (berra...@redh

Re: [Qemu-devel] [PATCH v3 04/13] acpi: cphp: force switch to modern cpu hotplug if APIC ID > 254

2016-10-18 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 11:52:38AM +0200, Igor Mammedov wrote: > Switch to modern cpu hotplug at machine startup time if > a cpu present at boot has apic-id in range unsupported > by legacy cpu hotplug interface (i.e. > 254), to avoid > killing QEMU from legacy cpu hotplug code with error: >"ac

Re: [Qemu-devel] [PATCH v3 03/13] acpi: cphp: support x2APIC entry in cpu._MAT

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 03:46:05PM +0200, Igor Mammedov wrote: > On Tue, 18 Oct 2016 11:34:55 -0200 > Eduardo Habkost wrote: > > > On Thu, Oct 13, 2016 at 11:52:37AM +0200, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > > --- > > > hw/acpi/cpu.c | 5 + > > > 1 file changed, 5 i

Re: [Qemu-devel] [PATCH] e1000e: Don't zero out buffer address in rx descriptor

2016-10-18 Thread Dmitry Fleytman
> On 17 Oct 2016, at 01:35 AM, Kevin Wolf wrote: > > The e1000e emulation zeroes out any used rx descriptor and then writes a > completely newly constructed value there. By doing this, it doesn't only > update the write-back area of the descriptors (as it's supposed to do), > but it also clears t

Re: [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-18 Thread Auger Eric
Hi Fam, On 18/10/2016 15:34, Fam Zheng wrote: > On Mon, 10/17 22:56, Auger Eric wrote: >>> make[1]: *** No rule to make target `../hw/core/platform-bus-stub.o', >>> needed by `qemu-system-x86_64'. Stop. >> I can't figure out why this rule is missing? >> >> I compiled on x86 and aarch64 with >> .

Re: [Qemu-devel] [PATCH 0/6] qdev class properties + abstract class support on device-list-properties

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 12:20:09AM +0200, Andreas Färber wrote: > Am 17.10.2016 um 23:04 schrieb Eduardo Habkost: > > On Tue, Oct 11, 2016 at 05:41:13PM -0300, Eduardo Habkost wrote: > >> Eduardo Habkost (6): > >> qdev: qdev_class_set_props() function > > s/qdev_/device_/? I used qdev_ because

Re: [Qemu-devel] [PATCH v3 06/13] pc: apic_common: extend APIC ID property to 32bit

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 04:01:56PM +0200, Igor Mammedov wrote: > On Tue, 18 Oct 2016 10:59:17 -0200 > Eduardo Habkost wrote: > > > On Tue, Oct 18, 2016 at 02:36:10PM +0200, Igor Mammedov wrote: > > > On Tue, 18 Oct 2016 08:56:28 -0200 > > > Eduardo Habkost wrote: > > > > > > > On Thu, Oct 13,

Re: [Qemu-devel] [PATCH 2/4] tests/test-vmstate.c: prove VMStateField.start broken

2016-10-18 Thread Halil Pasic
On 10/18/2016 03:27 PM, Dr. David Alan Gilbert wrote: > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: >> > The handling of VMStateField.start is currently quite broken if >> > VMS_ALLOC is present (that is for VMSTATE_VBUFFER_ALLOC_UINT32) but >> > fortunately also quite underutilized -- nobody

Re: [Qemu-devel] [PATCH v2 5/6] contrib: add libvhost-user

2016-10-18 Thread Felipe Franciosi
> On 18 Oct 2016, at 10:24, Marc-André Lureau > wrote: > > Add a library to help implementing vhost-user backend (or slave). > > Dealing with vhost-user as an application developper isn't so easy: you s/developper/developer/ Felipe > have all the trouble with any protocol: validation, unix

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Eric Blake
On 10/18/2016 08:33 AM, Kevin Wolf wrote: >> I have successfully converted NFS block driver to use this set of >> runtime opts which I think is the required condition to add >> blockdev-add compatibility later. Also, since I do not have 'port' as >> a runtime option, I can directly add blockdev-ad

Re: [Qemu-devel] [PATCH 2/4] tests/test-vmstate.c: prove VMStateField.start broken

2016-10-18 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > > > On 10/18/2016 03:27 PM, Dr. David Alan Gilbert wrote: > > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > >> > The handling of VMStateField.start is currently quite broken if > >> > VMS_ALLOC is present (that is for VMSTATE_VBUFFER_ALLOC_UIN

Re: [Qemu-devel] [PATCH 0/2] tests: A few check-qom-proplist fixes

2016-10-18 Thread Eduardo Habkost
On Tue, Oct 18, 2016 at 12:07:30AM +0200, Andreas Färber wrote: > Am 17.10.2016 um 23:02 schrieb Eduardo Habkost: > > Ping? > > > > Markus, do you want to merge this through your tree? > > > > On Tue, Oct 11, 2016 at 09:37:45AM -0300, Eduardo Habkost wrote: > >> A few fixes on check-qom-proplist

<    1   2   3   4   >