[Qemu-devel] [PATCH COLO-Frame v13 38/39] colo: Use default buffer-filter to buffer and release packets

2015-12-28 Thread zhanghailiang
Enable default filter to buffer packets and release the packets after a checkpoint. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v12: - Add a helper function to check if all netdev supports buffer packets. - Flush buffered packets when do failover. v11: - Use new helper fun

[Qemu-devel] [PATCH COLO-Frame v13 36/39] filter-buffer: Introduce a helper function to enable/disable default filter

2015-12-28 Thread zhanghailiang
The default buffer filter doesn't buffer packets in default, but we need to buffer packets for COLO or Micro-checkpoint, Here we add a helper function to enable/disable filter's buffer capability. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v12: - Rename the heler function

[Qemu-devel] [PATCH COLO-Frame v13 26/39] COLO failover: Shutdown related socket fd when do failover

2015-12-28 Thread zhanghailiang
If the net connection between COLO's two sides is broken while colo/colo incoming thread is blocked in 'read'/'write' socket fd. It will not detect this error until connect timeout. It will be a long time. Here we shutdown all the related socket file descriptors to wake up the blocking operation

[Qemu-devel] [PATCH COLO-Frame v13 35/39] filter-buffer: Accept zero interval

2015-12-28 Thread zhanghailiang
For default buffer filter, its 'interval' value is zero, so here we should accept zero interval. Signed-off-by: zhanghailiang Reviewed-by: Yang Hongyang Cc: Jason Wang --- v12: - Add Reviewed-by tag v11: - Add comment v10: - new patch --- net/filter-buffer.c | 10 -- 1 file changed, 10

[Qemu-devel] [PATCH COLO-Frame v13 37/39] filter-buffer: Introduce a helper function to release packets

2015-12-28 Thread zhanghailiang
We need to release all the packets from VM in COLO or Micro-checkpoint, here we add a new helper function to realse the packets that buffered by default buffer-filter Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v12: - Rename this helper function v11: - New patch --- inclu

[Qemu-devel] [PATCH COLO-Frame v13 29/39] COLO: Update the global runstate after going into colo state

2015-12-28 Thread zhanghailiang
If we start qemu with -S, the runstate will change from 'prelaunch' to 'running' after going into colo state. So it is necessary to update the global runstate after going into colo state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v13: - Add R

Re: [Qemu-devel] [PATCH COLO-Frame v13 00/39] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2015-12-28 Thread Hailiang Zhang
Cc: Markus Armbruster On 2015/12/29 15:08, zhanghailiang wrote: This is the 13th version of COLO (Still only support periodic checkpoint). Here is only COLO frame part, you can get the whole codes from github: https://github.com/coloft/qemu/commits/colo-v2.4-periodic-mode Please ignore patch

[Qemu-devel] [PATCH COLO-Frame v13 33/39] COLO: Split qemu_savevm_state_begin out of checkpoint process

2015-12-28 Thread zhanghailiang
It is unnecessary to call qemu_savevm_state_begin() in every checkponit process. It mainly sets up devices and does the first device state pass. These data will not change during the later checkpoint process. So, we split it out of colo_do_checkpoint_transaction(), in this way, we can reduce these

[Qemu-devel] [PATCH COLO-Frame v13 14/39] ram: Split host_from_stream_offset() into two helper functions

2015-12-28 Thread zhanghailiang
Split host_from_stream_offset() into two parts: One is to get ram block, which the block idstr may be get from migration stream, the other is to get hva (host) address from block and the offset. Besides, we will do the check working in a new helper offset_in_ramblock(). Signed-off-by: zhanghailian

[Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown command for VM in COLO state

2015-12-28 Thread zhanghailiang
If VM is in COLO FT state, we should do some extra work before normal shutdown process. SVM will ignore the shutdown command if this command is issued directly to it, PVM will send the shutdown command to SVM if it gets this command. Cc: Paolo Bonzini Signed-off-by: zhanghailiang Signed-off-by:

[Qemu-devel] [PATCH COLO-Frame v13 32/39] COLO: Separate the process of saving/loading ram and device state

2015-12-28 Thread zhanghailiang
We separate the process of saving/loading ram and device state when do checkpoint, we add new helpers for save/load ram/device. With this change, we can directly transfer ram from master to slave without using QEMUSizeBuffer as assistant, which also reduce the size of extra memory been used during

[Qemu-devel] [PATCH COLO-Frame v13 25/39] qmp event: Add COLO_EXIT event to notify users while exited from COLO

2015-12-28 Thread zhanghailiang
If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together with 'x_colo_lost_heartbeat', users can intervene in COLO's failover work immediately. If users don't want to get involved in COLO's failover verdict, it is still necessary to notify users

[Qemu-devel] [PATCH COLO-Frame v13 11/39] COLO: Add a new RunState RUN_STATE_COLO

2015-12-28 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 v13 27/39] COLO failover: Don't do failover during loading VM's state

2015-12-28 Thread zhanghailiang
We should not do failover work while the main thread is loading VM's state, otherwise it will destroy the consistent of VM's memory and device state. Here we add a new failover status 'RELAUNCH' which means we should relaunch the process of failover. Signed-off-by: zhanghailiang Signed-off-by: L

[Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-28 Thread zhanghailiang
We add each netdev (except vhost-net) a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'nop'. For the default filter-buffer, it will not buffer any packets in default. So it has no side effect for the netdev. Sign

[Qemu-devel] [PATCH COLO-Frame v13 15/39] COLO: Load PVM's dirty pages into SVM's RAM cache temporarily

2015-12-28 Thread zhanghailiang
We should not load PVM's state directly into SVM, because there maybe some errors happen when SVM is receving data, which will break SVM. We need to ensure receving all data before load the state into SVM. We use an extra memory to cache these data (PVM's ram). The ram cache in secondary side is i

[Qemu-devel] [PATCH COLO-Frame v13 23/39] COLO: Implement failover work for Primary VM

2015-12-28 Thread zhanghailiang
For PVM, if there is failover request from users. The 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 --- v13: - Add Reviewed-by tag v12: - Fix error report and

[Qemu-devel] [PATCH COLO-Frame v13 39/39] COLO: Add block replication into colo process

2015-12-28 Thread zhanghailiang
Make sure master start block replication after slave's block replication started. Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- migration/colo.c | 52 trace-events | 2 ++ 2 files changed, 54 in

[Qemu-devel] [PATCH COLO-Frame v13 06/39] migration: Integrate COLO checkpoint process into migration

2015-12-28 Thread zhanghailiang
Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state after the first live migration successfully finished. We reuse migration thread, so if colo is enabled by user, migration thread will go into the process of colo. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed

[Qemu-devel] [PATCH COLO-Frame v13 02/39] migration: Introduce capability 'x-colo' to migration

2015-12-28 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. Cc: Ju

[Qemu-devel] [PATCH COLO-Frame v13 20/39] COLO: synchronize PVM's state to SVM periodically

2015-12-28 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 review comment) --- migration/colo.c | 12

[Qemu-devel] [PATCH COLO-Frame v13 31/39] savevm: Introduce two helper functions for save/find loadvm_handlers entry

2015-12-28 Thread zhanghailiang
For COLO's checkpoint process, we will do savevm/loadvm repeatedly. So every time we call qemu_loadvm_section_start_full(), we will add all sections information into loadvm_handlers list for one time. There will be many instances in loadvm_handlers for one section, and this will lead to memory leak

[Qemu-devel] [PATCH COLO-Frame v13 30/39] savevm: Split load vm state function qemu_loadvm_state

2015-12-28 Thread zhanghailiang
qemu_loadvm_state is too long, and we can simplify it by splitting up with three helper functions. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert v13: - Add Reviewed-by tag --- migration/savevm.c | 156 +++-- 1 file changed, 92 i

[Qemu-devel] [PATCH COLO-Frame v13 22/39] COLO failover: Introduce state to record failover process

2015-12-28 Thread zhanghailiang
When handling failover, we do different things 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 and s

[Qemu-devel] [PATCH COLO-Frame v13 24/39] COLO: Implement failover work for Secondary VM

2015-12-28 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 v12: - Improve error message that suggested by Dave - Add

[Qemu-devel] [PATCH COLO-Frame v13 09/39] COLO/migration: Create a new communication path from destination to source

2015-12-28 Thread zhanghailiang
This new communication path will be used for returning messages from destination to source. 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_get_retu

[Qemu-devel] [PATCH COLO-Frame v13 21/39] COLO failover: Introduce a new command to trigger a failover

2015-12-28 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 v13 13/39] COLO: Save PVM state to secondary side when do checkpoint

2015-12-28 Thread zhanghailiang
The main process of checkpoint is to synchronize SVM with PVM. VM's state includes ram and device state. So we will migrate PVM's state to SVM when do checkpoint, just like migration does. We will cache PVM's state in slave, we use QEMUSizedBuffer to store the data, we need to know the size of VM

[Qemu-devel] [PATCH COLO-Frame v13 18/39] COLO: Flush PVM's cached RAM into SVM's memory

2015-12-28 Thread zhanghailiang
During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after checkpoint. Instead of flushing all content of PVM's RAM

[Qemu-devel] [PATCH COLO-Frame v13 08/39] migration: Rename the'file' member of MigrationState

2015-12-28 Thread zhanghailiang
Rename the 'file' member of MigrationState to 'to_dst_file'. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag - Add the missed modification for RDMA migration. (Found by Wen Congyang) v11: - Only rename 'file' member of MigrationState --- include/m

[Qemu-devel] [PATCH COLO-Frame v13 03/39] COLO: migrate colo related info to secondary node

2015-12-28 Thread zhanghailiang
We can know if VM in destination should go into COLO mode by refer to the info that been migrated from PVM. We skip this section if colo is not enabled (i.e. migrate_set_capability colo off), so that, It not break compatibility with migration however the --enable-colo/disable-colo on the source/d

[Qemu-devel] [PATCH COLO-Frame v13 07/39] migration: Integrate COLO checkpoint process into loadvm

2015-12-28 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 threads for secondary VM, 'migration_incoming_co' records the

[Qemu-devel] [PATCH COLO-Frame v13 04/39] migration: Export migrate_set_state()

2015-12-28 Thread zhanghailiang
Fix the first parameter of migrate_set_state(), and export it. We will use it in later. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - New patch which is split from patch 'migration: Add state records for migration incoming' (Juan's sugge

[Qemu-devel] [PATCH COLO-Frame v13 16/39] ram/COLO: Record the dirty pages that SVM received

2015-12-28 Thread zhanghailiang
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. We record them by re-using migration dirty bitmap. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - Split a new helper function from ori

[Qemu-devel] [PATCH COLO-Frame v13 17/39] COLO: Load VMState into qsb before restore it

2015-12-28 Thread zhanghailiang
We should not destroy the state of SVM (Secondary VM) until we receive the whole state from the PVM (Primary VM), in case the primary fails in the middle of sending the state, so, here we cache the device state in Secondary before restore it. Besides, we should call qemu_system_reset() before loa

[Qemu-devel] [PATCH COLO-Frame v13 05/39] migration: Add state records for migration incoming

2015-12-28 Thread zhanghailiang
For migration destination, we also need to know its state, we will use it in COLO. Here we add a new member 'state' for MigrationIncomingState, and also use migrate_set_state() to modify its value. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v11: - Split exporting migra

[Qemu-devel] [PATCH COLO-Frame v13 10/39] COLO: Implement colo checkpoint protocol

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

[Qemu-devel] [PATCH COLO-Frame v13 12/39] QEMUSizedBuffer: Introduce two help functions for qsb

2015-12-28 Thread zhanghailiang
Introduce two new QEMUSizedBuffer APIs which will be used by COLO to buffer VM state: One is qsb_put_buffer(), which put the content of a given QEMUSizedBuffer into QEMUFile, this is used to send buffered VM state to secondary. Another is qsb_fill_buffer(), read 'size' bytes of data from the file i

[Qemu-devel] [PATCH COLO-Frame v13 19/39] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2015-12-28 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 --- v1

[Qemu-devel] [PATCH COLO-Frame v13 01/39] configure: Add parameter for configure to enable/disable COLO support

2015-12-28 Thread zhanghailiang
configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is On by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- v11: - Turn COLO on in default (Eric's suggestion) --- configure | 11

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

2015-12-28 Thread zhanghailiang
This is the 13th version of COLO (Still only support periodic checkpoint). Here is only COLO frame part, you can get the whole codes from github: https://github.com/coloft/qemu/commits/colo-v2.4-periodic-mode Please ignore patch 4 ~ 5 which have been picked by Dave into another series. Test proc

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-28 Thread Zhang Chen
On 12/29/2015 02:58 PM, Jason Wang wrote: On 12/29/2015 02:31 PM, Zhang Chen wrote: Hi~ Just a small ping... No news for a week. Colo proxy is a part of COLO project, we need review and comments. Thanks zhangchen Hi, will find sometime to review this this week. Thanks Thanks very much f

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-28 Thread Jason Wang
On 12/29/2015 02:31 PM, Zhang Chen wrote: > Hi~ > Just a small ping... > No news for a week. > Colo proxy is a part of COLO project, we need review and comments. > > > Thanks > zhangchen Hi, will find sometime to review this this week. Thanks > > > On 12/22/2015 06:42 PM, Zhang Chen wrote: >>

Re: [Qemu-devel] [PATCH] trace: Fix format specifiers for existing arguments

2015-12-28 Thread vrakush
valentin writes: Please disregard this patch. The patch from Mark Cave-Ayland, dated December 20, 2015 already fixed this issue. > From: Valentin Rakush > > This patch fixes compilation errors when --enable-trace-backend=stderr option > is used for configuration > > GEN trace/generated-eve

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-28 Thread Zhang Chen
Hi~ Just a small ping... No news for a week. Colo proxy is a part of COLO project, we need review and comments. Thanks zhangchen On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and i

[Qemu-devel] [Bug 1255303] Re: ALSA underruns occurr when using QEMU

2015-12-28 Thread T-artem
More info: Host: Linux 4.3.3 vanilla/CentOS 6.7 i686 ALSA: alsa-lib-1.0.22-3.el6.i686 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1255303 Title: ALSA underruns occurr when using QEMU Status in

[Qemu-devel] [Bug 1255303] Re: ALSA underruns occurr when using QEMU

2015-12-28 Thread T-artem
Qemu: 2.5 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1255303 Title: ALSA underruns occurr when using QEMU Status in QEMU: New Bug description: I'm running QEMU 1.6.1 on a 64-bit Gentoo Lin

[Qemu-devel] [Bug 1529764] [NEW] No video output with the official Windows XP VMWare VGA driver

2015-12-28 Thread T-artem
Public bug reported: Steps to reproduce: 1) Set -vga to vmware 2) Install Windows XP SP3 3) Install VGA drivers from http://packages.vmware.com/tools/releases/latest/windows/x86/VMware-tools-windows-10.0.5-3227872.iso Result: completely black screen (even after F8 -> use VGA mode). ** Affects:

[Qemu-devel] [PATCH] send readcapacity10 when readcapacity16 failed

2015-12-28 Thread Zhu Lingshan
When play with Dell MD3000 target, for sure it is a TYPE_DISK, but readcapacity16 would fail. Then we find that readcapacity10 succeeded. It looks like the target just support readcapacity10 even through it is a TYPE_DISK or have some TYPE_ROM characteristics. This patch can give a chance to send

Re: [Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-28 Thread Jason Wang
On 12/28/2015 06:54 PM, P J P wrote: > From: Prasad J Pandit > > While processing transmit(tx) descriptors in 'tx_consume' routine > the switch emulator suffers from an off-by-one error, if a > descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX=16) > fragments. Fix an incorrect bounds

[Qemu-devel] ping Re: [PATCH v12] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-12-28 Thread Programmingkid
I do realize you are busy Kevin, but I would appreciate knowing my patch is in line for review. https://patchwork.ozlabs.org/patch/555945/ On Dec 11, 2015, at 10:27 PM, Programmingkid wrote: > Mac OS X can be picky when it comes to allowing the user > to use physical devices in QEMU. Most mount

[Qemu-devel] [PATCH] target-mips: Fix ALIGN instruction when bp=0

2015-12-28 Thread Miodrag Dinic
Hello to everyone, We have uncovered a use-case with ALIGN instruction which is not handled correctly by QEMU. It impacts both, user and system mode emulation. Using ALIGN instruction with bp=0 as the last argument, should behave as a register to register move with sign extension if running on a

Re: [Qemu-devel] [Qemu-arm] command line args for qemu-test image

2015-12-28 Thread Peter Maydell
On 27 December 2015 at 23:48, John Davis wrote: > Hello > > I am trying to test my build from source to see if I have a working > qemu-system-arm build. I pulled the test image from this page: > http://wiki.qemu.org/Testing > > It has a readme in the archive which says to use this syntax > ./qemu

Re: [Qemu-devel] [Qemu-arm] v7m reset vs rom loading ordering

2015-12-28 Thread Peter Maydell
(You forgot to cc qemu-devel, which meant this message got hung up in the "people who haven't posted to qemu-arm yet end up in the semi-automatic moderation" machinery, and nobody saw it because there was no qemu-devel cc.) On 26 December 2015 at 19:07, Dr. David Alan Gilbert wrote: > Hi, > I'm

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 06/26] armv7m: fix I and F flag handling

2015-12-28 Thread Peter Maydell
On 28 December 2015 at 01:59, Michael Davidsaver wrote: > On 12/17/2015 10:18 AM, Peter Maydell wrote: >> because the function you're calling here is in armv7m_nvic.c, >> which isn't compiled into the linux-user binary. > > Is there any reason to include the armv7m code in linux-user at all? It's

Re: [Qemu-devel] [PATCH v2 05/26] armv7m: add armv7m_excp_running_prio()

2015-12-28 Thread Peter Maydell
On 27 December 2015 at 20:56, Michael Davidsaver wrote: > On 12/17/2015 09:36 AM, Peter Maydell wrote: >> On 3 December 2015 at 00:18, Michael Davidsaver >> wrote: >>> Implements v7m exception priority algorithm >>> using FAULTMASK, PRIMASK, BASEPRI, and the highest >>> priority active exception

Re: [Qemu-devel] [PATCH v2 03/26] armv7m: Explicit error for bad vector table

2015-12-28 Thread Peter Maydell
On 27 December 2015 at 20:43, Michael Davidsaver wrote: > On 12/17/2015 08:25 AM, Peter Maydell wrote: >> On 3 December 2015 at 00:18, Michael Davidsaver >> wrote: >>> ... >>> +static >>> +uint32_t arm_v7m_load_vector(ARMCPU *cpu) >>> + >>> +{ >>> +CPUState *cs = &cpu->parent_obj; >> This is

Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack

2015-12-28 Thread Peter Maydell
On 27 December 2015 at 20:22, Michael Davidsaver wrote: > On 12/17/2015 10:38 AM, Peter Maydell wrote: >> On 3 December 2015 at 00:18, Michael Davidsaver >> wrote: >>> Add CPU unassigned access handler in place of special >>> MemoryRegion to catch exception returns. >>> >>> The unassigned handle

Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack

2015-12-28 Thread Peter Maydell
On 28 December 2015 at 01:55, Michael Davidsaver wrote: > On 12/17/2015 10:38 AM, Peter Maydell wrote: >> We could use a comment here (a) explaining what we're doing and (b) >> mentioning that this isn't architecturally correct -- ideally we should >> catch these exception exits on execution of th

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-28 Thread Lan, Tianyu
On 12/25/2015 8:11 PM, Michael S. Tsirkin wrote: As long as you keep up this vague talk about performance during migration, without even bothering with any measurements, this patchset will keep going nowhere. I measured network service downtime for "keep device alive"(RFC patch V1 presented

[Qemu-devel] [PATCH v2 51/51] pc: acpi: remove unused ASL templates and related blobs/utils

2015-12-28 Thread Igor Mammedov
QEMU now uses internally composed DSDT so drop now empty *.dsl templates and related *.generated binary blobs. Also since templates are not used anymore/obolete remove utility scripts used for extracting/patching AML blobs compiled by IASL and for updating them in git tree. Signed-off-by: Igor Ma

[Qemu-devel] [PATCH v2 50/51] pc: acpi: switch to AML API composed DSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 235 +-- 1 file changed, 115 insertions(+), 120 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ebeab17..ce27051 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acp

[Qemu-devel] [PATCH v2 48/51] pc: acpi: q35: move PCI0 device definition into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 14 +- hw/i386/q35-acpi-dsdt.dsl | 13 - 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4effa32..d9925cd 100644 --- a/hw/i386/acpi-build.c +++ b/

[Qemu-devel] [PATCH v2 44/51] pc: acpi: q35: move PRTA routing table into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 61 +++ hw/i386/q35-acpi-dsdt.dsl | 57 --- 2 files changed, 61 insertions(+), 57 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c

[Qemu-devel] [PATCH v2 39/51] pc: acpi: q35: move link devices to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 9 + hw/i386/q35-acpi-dsdt.dsl | 40 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4edd989..9736da3 100644 --- a/hw/i

[Qemu-devel] [PATCH v2 49/51] pc: acpi: q35: PCST, PCSB opregions and PCIB field into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 10 ++ hw/i386/q35-acpi-dsdt.dsl | 5 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d9925cd..ebeab17 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi

[Qemu-devel] [PATCH v2 38/51] pc: acpi: q35: move GSI links to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 47 +++ hw/i386/q35-acpi-dsdt.dsl | 34 -- 2 files changed, 55 insertions(+), 26 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index df

[Qemu-devel] [PATCH v2 34/51] pc: acpi: piix4: move IQST() into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 10 ++ hw/i386/acpi-dsdt.dsl | 9 - 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 45bc6b1..8b23363 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-bui

[Qemu-devel] [PATCH v2 36/51] pc: acpi: piix4: move remaining PCI hotplug bits into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 43 +++ hw/i386/acpi-dsdt.dsl | 40 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index fd81b40.

[Qemu-devel] [PATCH v2 47/51] pc: acpi: q35: move PCI0._OSC() method into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 56 ++ hw/i386/q35-acpi-dsdt.dsl | 57 --- 2 files changed, 56 insertions(+), 57 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-buil

[Qemu-devel] [PATCH v2 28/51] pc: acpi: move LPT device from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 36 hw/i386/acpi-dsdt-isa.dsl | 16 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9ca428a..3585849 100644 --- a/h

[Qemu-devel] [PATCH v2 45/51] pc: acpi: q35: move PRTP routing table into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 2 ++ hw/i386/q35-acpi-dsdt.dsl | 79 --- 2 files changed, 2 insertions(+), 79 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1e12696..5948366 100644 --- a/hw/i3

[Qemu-devel] [PATCH v2 33/51] pc: acpi: piix4: move IQCR() into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 20 hw/i386/acpi-dsdt.dsl | 11 --- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 891a29c..45bc6b1 100644 --- a/hw/i386/acpi-build.c +++ b/hw/

[Qemu-devel] [PATCH v2 43/51] pc: acpi: q35: move _PRT() into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 21 + hw/i386/q35-acpi-dsdt.dsl | 12 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4fdab96..0174e80 100644 --- a/hw/i386/acpi-build.c

[Qemu-devel] [PATCH v2 15/51] pc: acpi: drop unused CPU_STATUS_LEN from DSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl index 1aff746..53e1389 100644 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ b/hw/i386/acpi-dsdt-cpu-hotplug.ds

[Qemu-devel] [PATCH v2 27/51] pc: acpi: move FDC0 device from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 40 hw/i386/acpi-dsdt-isa.dsl | 18 -- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 207dfb9..9ca428a 100644 -

[Qemu-devel] [PATCH v2 23/51] pc: acpi: move DBUG() from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 36 hw/i386/acpi-dsdt-dbug.dsl | 41 - hw/i386/acpi-dsdt.dsl | 2 -- hw/i386/q35-acpi-dsdt.dsl | 2 -- 4 files changed, 36 insertions(+), 45 deletions

[Qemu-devel] [PATCH v2 46/51] pc: acpi: q35: move _PIC() method into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 8 hw/i386/q35-acpi-dsdt.dsl | 10 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5948366..4176f15 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/a

[Qemu-devel] [PATCH v2 40/51] pc: acpi: q35: move IQCR() into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 51 ++- hw/i386/q35-acpi-dsdt.dsl | 9 - 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9736da3..94f18ea 100644 ---

[Qemu-devel] [PATCH v2 32/51] pc: acpi: pci: move link devices into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 77 +++ hw/i386/acpi-dsdt.dsl | 49 2 files changed, 82 insertions(+), 44 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a28963f.

[Qemu-devel] [PATCH v2 21/51] pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 174 --- 1 file changed, 94 insertions(+), 80 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1cbc305..26655db 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-

[Qemu-devel] [PATCH v2 42/51] pc: acpi: q35: move ISA bridge into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 54 +++ hw/i386/q35-acpi-dsdt.dsl | 46 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c in

[Qemu-devel] [PATCH v2 20/51] pc: acpi: cpuhp: move \_GPE._E02() into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug_acpi_table.c | 2 +- hw/i386/acpi-build.c | 12 +--- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 23 --- hw/i386/acpi-dsdt.dsl | 9 - hw/i386/q35-acpi-dsdt.dsl | 9 - incl

[Qemu-devel] [PATCH v2 31/51] pc: acpi: move remaining GPE handlers into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- * unflod _L0X methods building loop and opencode it, with intent to remove these (unused) handlers later at refactoring time. --- hw/i386/acpi-build.c | 30 +- hw/i386/acpi-dsdt.dsl | 40 --

[Qemu-devel] [PATCH v2 35/51] pc: acpi: piix4: move PCI0._PRT() into SSDT

2015-12-28 Thread Igor Mammedov
PCI routing table for expander buses is build with help of build_prt() using AML API. And it's almost the same as PRT for PCI0 bus except of power-management device. So make existing build_prt() build PRT table for PCI0 bus as well. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum ---

[Qemu-devel] [PATCH v2 29/51] pc: acpi: move COM devices from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 48 +++ hw/i386/acpi-dsdt-isa.dsl | 52 --- hw/i386/acpi-dsdt.dsl | 3 --- hw/i386/q35-acpi-dsdt.dsl | 3 --- 4 files changed, 48 insertions(+), 5

[Qemu-devel] [PATCH v2 41/51] pc: acpi: q35: move IQST() into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 26 +++--- hw/i386/q35-acpi-dsdt.dsl | 8 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 94f18ea..4b36364 100644 --- a/hw/i386/acpi-build.

[Qemu-devel] [PATCH v2 30/51] pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT

2015-12-28 Thread Igor Mammedov
and also move PRQx fields declaration as it can't be split out into separate patch since fields use PCI0.ISA.P40C operation region and OperationRegion must be declared in the same table as a Field that uses it. If this condition is not statisfied Windows will BSOD ans IASL (make check) will error o

[Qemu-devel] [PATCH v2 19/51] pc: acpi: cpuhp: move PRSC() method into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug_acpi_table.c | 64 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 39 +--- hw/i386/acpi-dsdt.dsl | 2 +- hw/i386/q35-acpi-dsdt.dsl

[Qemu-devel] [PATCH v2 37/51] pc: acpi: piix4: acpi move PCI0 device to SSDT

2015-12-28 Thread Igor Mammedov
leave Scope(\_SB) definition in DSDT so that iasl would be able to compile DSDT since we are still need definition block for table. After Q35 ASL is converted, DSDT templates will be completly replaced by AML API generated tables. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 8 ++

[Qemu-devel] [PATCH v2 24/51] pc: acpi: move RTC device from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 26 ++ hw/i386/acpi-dsdt-isa.dsl | 9 - 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index c5b9ca2..aa40132 100644 --- a/hw/i386/acpi-build.

[Qemu-devel] [PATCH v2 12/51] pc: acpi: factor out memhp code from build_ssdt() into separate function

2015-12-28 Thread Igor Mammedov
before consolidating memhp code in memory_hotplug_acpi_table.c and for simplifying review, first factor out memhp code into new function build_memory_devices() in i386/acpi-build.c Signed-off-by: Igor Mammedov PS: no functional change, only code movement. --- hw/i386/acpi-build.c | 239 +

[Qemu-devel] [PATCH v2 25/51] pc: acpi: move KBD device from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 22 ++ hw/i386/acpi-dsdt-isa.dsl | 12 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index aa40132..8c4c003 100644 --- a/hw/i386/acpi-build.

[Qemu-devel] [PATCH v2 13/51] pc: acpi: memhp: move \_GPE._E03 into SSDT

2015-12-28 Thread Igor Mammedov
in addition remove no longer needed acpi-dsdt-mem-hotplug.dsl. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 6 ++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 16 hw/i386/acpi-dsdt.dsl | 5 - hw/i386/q35-acpi-dsdt.dsl | 5 - incl

[Qemu-devel] [PATCH v2 26/51] pc: acpi: move MOU device from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 21 + hw/i386/acpi-dsdt-isa.dsl | 10 -- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 8c4c003..207dfb9 100644 --- a/hw/i386/acpi-build.c +

[Qemu-devel] [PATCH v2 22/51] pc: acpi: move HPET from DSDT to SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 53 ++ hw/i386/acpi-dsdt-hpet.dsl | 48 - hw/i386/acpi-dsdt.dsl | 2 -- hw/i386/q35-acpi-dsdt.dsl | 3 --- hw/timer/hpet.c| 2 +-

[Qemu-devel] [PATCH v2 18/51] pc: acpi: cpuhp: move CPST() method into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug_acpi_table.c | 22 ++ hw/i386/acpi-build.c | 3 ++- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 12 include/hw/acpi/cpu_hotplug.h | 1 + 4 files changed, 25 insertions(+), 13 deletions(-) diff --git

[Qemu-devel] [PATCH v2 06/51] pc: acpi: memhp: move MHPD.MRST method into SSDT

2015-12-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/memory_hotplug_acpi_table.c | 23 +++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 15 --- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c

[Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device into SSDT

2015-12-28 Thread Igor Mammedov
move remnants of MHPD device from DSDT into SSDT. i.e. Device(MHPD), _UID, _HID Signed-off-by: Igor Mammedov --- hw/acpi/memory_hotplug_acpi_table.c | 6 +- hw/i386/acpi-dsdt-mem-hotplug.dsl | 7 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/acpi/memory_hotplug

[Qemu-devel] [PATCH v2 14/51] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage

2015-12-28 Thread Igor Mammedov
most of MEMORY_foo defines are not shared with ASL anymore and are used only inside of memory_hotplug_acpi_table.c, so move them there and make them strings. As result we can replace stringify(MEMORY_foo) with just MEMORY_foo, which makes code a bit cleaner. No AML change introduced by this patch.

  1   2   >