[Qemu-devel] [PATCH COLO-Frame v16 22/35] COLO failover: Shutdown related socket fd when do failover

2016-04-07 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 v16 29/35] COLO: Separate the process of saving/loading ram and device state

2016-04-07 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 QEMUSizeBufferas as assistant, which also reduce the size of extra memory been used durin

[Qemu-devel] [PATCH COLO-Frame v16 32/35] net: Add notifier/callback for netdev init

2016-04-07 Thread zhanghailiang
We can register some callback for this notifier, this will be used by COLO to register a callback which will add each netdev a buffer filter. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v16: - Simplify the codes by using some helpers in QEMU v14: - New patch --- include/n

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

2016-04-07 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 Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: Max Reitz --- migration/colo.c | 51 ++

[Qemu-devel] [PATCH COLO-Frame v16 21/35] qmp event: Add COLO_EXIT event to notify users while exited from COLO

2016-04-07 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 v16 34/35] COLO: manage the status of buffer filters for PVM

2016-04-07 Thread zhanghailiang
Enable all buffer filters that added by COLO while go into COLO process, and disable them while exit COLO. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v16: - Stop buffer filter while doing checkpoint and resume it after checkpoint. v15: - Re-implement colo_set_filter_sta

[Qemu-devel] [PATCH COLO-Frame v16 23/35] COLO failover: Don't do failover during loading VM's state

2016-04-07 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 v16 28/35] migration/savevm: Export two helper functions for savevm process

2016-04-07 Thread zhanghailiang
We add a new helper functions qemu_savevm_live_state(), and make qemu_save_device_state() public. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v15: - Add Reviewd-by tag v14: - New patch split from previous 'COLO: Separate the process of saving/

[Qemu-devel] [PATCH COLO-Frame v16 33/35] COLO/filter: add each netdev a buffer filter

2016-04-07 Thread zhanghailiang
For COLO periodic mode, it need to buffer packets that sent by VM, and we will not release these packets until finish a checkpoint. Here, we add each netdev a buffer-filter that will be controlled by COLO. It is disabled by default, and the packets will not pass through these filters. If users don

[Qemu-devel] [PATCH COLO-Frame v16 24/35] COLO: Process shutdown command for VM in COLO state

2016-04-07 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 v16 31/35] filter-buffer: Accept zero interval

2016-04-07 Thread zhanghailiang
We may want to accept zero interval when VM FT solutions like MC or COLO use this filter to release packets on demand. Signed-off-by: zhanghailiang Reviewed-by: Yang Hongyang Cc: Jason Wang Cc: Yang Hongyang --- net/filter-buffer.c | 10 -- 1 file changed, 10 deletions(-) diff --git

[Qemu-devel] [PATCH COLO-Frame v16 18/35] COLO failover: Introduce state to record failover process

2016-04-07 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 v16 11/35] COLO: Load PVM's dirty pages into SVM's RAM cache temporarily

2016-04-07 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 v16 15/35] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2016-04-07 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 v16 27/35] migration/savevm: Add new helpers to process the different stages of loadvm

2016-04-07 Thread zhanghailiang
There are several stages during loadvm process. In different stage, migration incoming processes different section. We want to control these stages more accuracy, to optimize the COLO capability. Here we add two new helper functions: qemu_loadvm_state_begin() and qemu_load_device_state(). Besides,

[Qemu-devel] [PATCH COLO-Frame v16 26/35] savevm: Introduce two helper functions for save/find loadvm_handlers entry

2016-04-07 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 v16 30/35] COLO: Split qemu_savevm_state_begin out of checkpoint process

2016-04-07 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 v16 14/35] COLO: Flush PVM's cached RAM into SVM's memory

2016-04-07 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 v16 20/35] COLO: Implement failover work for Secondary VM

2016-04-07 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 -

[Qemu-devel] [PATCH COLO-Frame v16 25/35] COLO: Update the global runstate after going into colo state

2016-04-07 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

[Qemu-devel] [PATCH COLO-Frame v16 16/35] COLO: synchronize PVM's state to SVM periodically

2016-04-07 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 v16 10/35] COLO: Save PVM state to secondary side when do checkpoint

2016-04-07 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 v16 19/35] COLO: Implement failover work for Primary VM

2016-04-07 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 v16 13/35] COLO: Load VMState into qsb before restore it

2016-04-07 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 v16 04/35] migration: Integrate COLO checkpoint process into migration

2016-04-07 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

Re: [Qemu-devel] [PATCH v4 1/5] fix some coding style problems

2016-04-07 Thread Markus Armbruster
Cao jin writes: > This patch comes along with patch "Add param Error ** for msi_init". What do you want to say with this sentence? I think it could be dropped without loss. > Add more newlines to make the code block well separated; add more > comments for msi_init; and fix a indentation. > > S

[Qemu-devel] [PATCH COLO-Frame v16 12/35] ram/COLO: Record the dirty pages that SVM received

2016-04-07 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 --- v16: - Use the new wrapper memory_region_get_ram_addr() modified in co

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

2016-04-07 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 v16 09/35] QEMUSizedBuffer: Introduce two help functions for qsb

2016-04-07 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 v16 08/35] COLO: Add a new RunState RUN_STATE_COLO

2016-04-07 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 v16 07/35] COLO: Implement colo checkpoint protocol

2016-04-07 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 v16 02/35] migration: Introduce capability 'x-colo' to migration

2016-04-07 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 v16 06/35] COLO/migration: Create a new communication path from destination to source

2016-04-07 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 v16 17/35] COLO failover: Introduce a new command to trigger a failover

2016-04-07 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 v16 05/35] migration: Integrate COLO checkpoint process into loadvm

2016-04-07 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 v16 03/35] COLO: migrate colo related info to secondary node

2016-04-07 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 v16 for-2.7 00/35] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-04-07 Thread zhanghailiang
This is the 16th 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.7-periodic-mode There are little changes for this series except the netfilter releated part. Patch stat

Re: [Qemu-devel] [RFC PATCH v2 2/3] utils: Add cpuinfo helper to fetch /proc/cpuinfo

2016-04-07 Thread Vijay Kilari
Hi Peter, On Thu, Apr 7, 2016 at 5:15 PM, Peter Maydell wrote: > On 7 April 2016 at 11:56, Vijay Kilari wrote: >> On Thu, Apr 7, 2016 at 3:41 PM, Peter Maydell >> wrote: >>> On 7 April 2016 at 10:58, wrote: From: Vijaya Kumar K utils cannot read target cpu information to

Re: [Qemu-devel] [PATCH v2] net: stellaris_enet: check packet length against receive buffer

2016-04-07 Thread P J P
+-- On Thu, 7 Apr 2016, Peter Maydell wrote --+ | I think you could reasonably put a blank line before and after | the if() {} you've added here. Sent a revised patch v3. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

[Qemu-devel] [PATCH v3] net: stellaris_enet: check packet length against receive buffer

2016-04-07 Thread P J P
From: Prasad J Pandit When receiving packets over Stellaris ethernet controller, it uses receive buffer of size 2048 bytes. In case the controller accepts large(MTU) packets, it could lead to memory corruption. Add check to avoid it. Reported-by: Oleksandr Bazhaniuk Signed-off-by: Prasad J Pand

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-07 Thread Alex Bligh
On 8 Apr 2016, at 02:09, Eric Blake wrote: > The NBD Protocol states that NBD_REP_SERVER may set > 'length > sizeof(namelen) + namelen'; in which case the rest > of the packet is a UTF-8 description of the export. While we > don't know of any NBD servers that send this description yet, > we had

Re: [Qemu-devel] run qemu on windows

2016-04-07 Thread Stefan Weil
Am 07.04.2016 um 23:45 schrieb Safa Hamza: > hello > how to download qemu from source on windows7 64 bits , i needed from > source because im going to patch it , then i need to run it with > several architecture armv7 armv8 intelx64_86 intelx86 > any suggestion please > thanks Please have a loo

Re: [Qemu-devel] [PATCH] nbd: do not hang nbd_wr_syncv if outside a coroutine and no available data

2016-04-07 Thread Changlong Xie
On 04/07/2016 07:44 PM, Paolo Bonzini wrote: Until commit 1c778ef7 ("nbd: convert to using I/O channels for actual socket I/O", 2016-02-16), nbd_wr_sync returned -EAGAIN this scenario. nbd_reply_ready required these semantics because it has two conflicting requirements: 1) if a reply can be rece

[Qemu-devel] [PULL 0/1] ppc-for-2.6 queue 20160408

2016-04-07 Thread David Gibson
The following changes since commit ead5268f2166101f7dde70598c9f538a90afd8ee: Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-04-07-tag' into staging (2016-04-07 18:06:14 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.6-2016040

[Qemu-devel] [PULL 1/1] spapr: Fix ibm,lrdr-capacity

2016-04-07 Thread David Gibson
From: Bharata B Rao ibm,lrdr-capacity has a field to describe the maximum address in bytes and therefore, the most memory that can be allocated to this guest. We are using maxmem for this field, but instead should use the actual RAM address corresponding to the end of hotplug region. Signed-off-

Re: [Qemu-devel] [PATCH 01/11] tci: Fix build regression

2016-04-07 Thread Richard Henderson
On 04/07/2016 01:37 PM, Stefan Weil wrote: I just tested a variant with tcg_debug_assert. It creates less efficient code when debugging is disabled. Here is the code size for x86_64: with normal tcg_debug_assert: text databssdechexfilename 8293

Re: [Qemu-devel] [PATCH qemu v15 15/17] spapr_pci: Get rid of dma_loibn

2016-04-07 Thread David Gibson
On Thu, Apr 07, 2016 at 05:10:53PM +1000, Alexey Kardashevskiy wrote: > On 04/07/2016 10:50 AM, David Gibson wrote: > >s/dma_loibn/dma_liobn/ in subject line. > > > >On Mon, Apr 04, 2016 at 07:33:44PM +1000, Alexey Kardashevskiy wrote: > >>We are going to have 2 DMA windows which LIOBNs are calcula

Re: [Qemu-devel] [Qemu-ppc] [PULL 1/3] ppc: Rework POWER7 & POWER8 exception model

2016-04-07 Thread David Gibson
On Thu, Apr 07, 2016 at 12:27:34PM +0200, Cédric Le Goater wrote: > Hello Laurent, > > On 04/07/2016 11:13 AM, Laurent Vivier wrote: > > > > > > On 05/04/2016 04:17, David Gibson wrote: > >> From: Cédric Le Goater > >> > >> From: Benjamin Herrenschmidt > >> > >> This patch fixes the current AI

Re: [Qemu-devel] [Qemu-ppc] [PULL 1/3] ppc: Rework POWER7 & POWER8 exception model

2016-04-07 Thread David Gibson
On Thu, Apr 07, 2016 at 12:45:41PM +0200, Laurent Vivier wrote: > > > On 07/04/2016 12:27, Cédric Le Goater wrote: > > Hello Laurent, > > > > On 04/07/2016 11:13 AM, Laurent Vivier wrote: > >> > >> > >> On 05/04/2016 04:17, David Gibson wrote: > >>> From: Cédric Le Goater > >>> > >>> From: Benj

Re: [Qemu-devel] [PULL 48/48] iotests: Test qemu-img convert -S 0 behavior

2016-04-07 Thread Fam Zheng
On Thu, 04/07 16:40, Paolo Bonzini wrote: > > > On 29/03/2016 17:08, Kevin Wolf wrote: > > From: Max Reitz > > > > Passing -S 0 to qemu-img convert should result in all source data being > > copied to the output, even if that source data is known to be 0. The > > output image should therefore h

[Qemu-devel] [PATCH for-2.6] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-07 Thread Eric Blake
The NBD Protocol states that NBD_REP_SERVER may set 'length > sizeof(namelen) + namelen'; in which case the rest of the packet is a UTF-8 description of the export. While we don't know of any NBD servers that send this description yet, we had better consume the data so we don't choke when we start

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-07 Thread Jon Grimm
** Changed in: livecd-rootfs (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1563887 Title: qemu-system-ppc64 freezes on starting image on ppc64le Status in QE

[Qemu-devel] run qemu on windows

2016-04-07 Thread Safa Hamza
hello how to download qemu from source on windows7 64 bits , i needed from source because im going to patch it , then i need to run it with several architecture armv7 armv8 intelx64_86 intelx86 any suggestion please thanks

Re: [Qemu-devel] [PATCHv3] Improve documentation for TLS

2016-04-07 Thread Alex Bligh
Eric, > Qemu's initial implementation of TLS in the client is binary (you either > want TLS or plaintext; there's no way to connect to a server and then > decide whether to upgrade to TLS - a plaintext client will never use TLS > of an OPTIONALTLS server). In TLS mode, the client always sends > N

[Qemu-devel] [PULL for-2.6] target-xtensa fix

2016-04-07 Thread Max Filippov
Hi Peter, please pull the following fix for target-xtensa. The following changes since commit a648c137383d84bc4f95696e5293978d9541a26e: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160309-1' into staging (2016-03-10 02:51:14 +) are available in the git repository at: gi

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't kill server on client that doesn't request TLS

2016-04-07 Thread Alex Bligh
On 7 Apr 2016, at 21:29, Eric Blake wrote: > Upstream NBD is documenting that servers MAY choose to operate > in a conditional mode, where it is up to the client whether to > use TLS. For qemu's case, we want to always be in FORCEDTLS > mode, because of the risk of man-in-the-middle attacks, an

[Qemu-devel] [PATCH v2 03/13] seqlock: remove optional mutex

2016-04-07 Thread Emilio G. Cota
This option is unused; besides, it bloats the struct when not needed. Let's just let writers define their own locks elsewhere. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus.c | 2 +- include/qemu/seqlock.h | 10 +- 2 files changed, 2 insertions(+), 10

Re: [Qemu-devel] [PATCH] tb: consistently use uint32_t for tb->flags

2016-04-07 Thread Richard Henderson
On 04/07/2016 10:19 AM, Emilio G. Cota wrote: We are inconsistent with the type of tb->flags: usage varies loosely between int and uint64_t. Settle to uint32_t everywhere, which is superior to both: at least one target (aarch64) uses the most significant bit in the u32, and uint64_t is wasteful.

Re: [Qemu-devel] [PATCH] tb: consistently use uint32_t for tb->flags

2016-04-07 Thread Edgar E. Iglesias
On Thu, Apr 07, 2016 at 01:19:22PM -0400, Emilio G. Cota wrote: > We are inconsistent with the type of tb->flags: usage varies loosely > between int and uint64_t. Settle to uint32_t everywhere, which is > superior to both: at least one target (aarch64) uses the most significant > bit in the u32, an

Re: [Qemu-devel] [PATCHv4] Improve documentation for TLS

2016-04-07 Thread Alex Bligh
On 7 Apr 2016, at 21:35, Eric Blake wrote: > grammar tweak: > s/ and either /, / sigh. fixed. Remembered to add your Reviewed-by: tag too. -- Alex Bligh signature.asc Description: Message signed with OpenPGP using GPGMail

[Qemu-devel] [PATCHv5] Improve documentation for TLS

2016-04-07 Thread Alex Bligh
* Call out TLS into a separate section * Add details of the TLS protocol itself * Emphasise that actual TLS session initiation (i.e. the TLS handshake) can be initiated from either side (as required by the TLS standard I believe and as actually works in practice) * Clarify what is a requirem

[Qemu-devel] [PULL v2 00/15] Misc changes for QEMU 2.6.0-rc2

2016-04-07 Thread Paolo Bonzini
The following changes since commit 7acbff99c6c285b3070bf0e768d56f511e2bf346: Update version for v2.6.0-rc1 release (2016-04-05 21:53:18 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 44d066a2f770ee9d61fd1c2a6

Re: [Qemu-devel] [PATCH 01/11] tci: Fix build regression

2016-04-07 Thread Stefan Weil
Am 07.04.2016 um 21:16 schrieb Stefan Weil: > Am 07.04.2016 um 20:15 schrieb Richard Henderson: >> On 04/07/2016 08:53 AM, Sergey Fedorov wrote: >>> +/* Enable TCI assertions only when debugging TCG (and without NDEBUG >>> defined). >>> + * Without assertions, the interpreter runs much faster. */ >

[Qemu-devel] [PATCH for-2.7 1/1] block/gluster: add support for selecting debug logging level

2016-04-07 Thread Jeff Cody
This adds commandline support for the logging level of the gluster protocol driver, output to stdout. The option is 'debug', e.g.: -drive filename=gluster://192.168.15.180/gv2/test.qcow2,debug=9 Debug levels are 0-9, with 9 being the most verbose, and 0 representing no debugging output. The def

Re: [Qemu-devel] [PULL 09/15] nbd: Don't kill server when client requests unknown option

2016-04-07 Thread Eric Blake
On 04/07/2016 10:50 AM, Paolo Bonzini wrote: > From: Eric Blake > > nbd-server.c currently fails to handle unsupported options properly. > If during option haggling the client sends an unknown request, the > server kills the connection instead of letting the client try to > fall back to something

[Qemu-devel] [PATCH v2 00/10] tb hash improvements

2016-04-07 Thread Emilio G. Cota
See v1 for context: https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg00587.html All patches in v2 are checkpatch-clean, except 05 (checkpatch should be ignored for this one) and 06, which I took unmodified (later patches fix those warnings while doing other things, anyway). Note that pat

Re: [Qemu-devel] [PATCH] tb: consistently use uint32_t for tb->flags

2016-04-07 Thread Emilio G. Cota
On Thu, Apr 07, 2016 at 13:19:22 -0400, Emilio G. Cota wrote: > We are inconsistent with the type of tb->flags: usage varies loosely > between int and uint64_t. Settle to uint32_t everywhere, which is > superior to both: at least one target (aarch64) uses the most significant > bit in the u32, and

[Qemu-devel] [PATCH v2 07/13] qemu-thread: call cpu_relax() while spinning

2016-04-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/thread.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/qemu/thread.h b/include/qemu/thread.h index 1aa843b..599965e 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -2,6 +2,7 @@ #define __QEMU_THREA

Re: [Qemu-devel] [PULL 01/15] ps2kbd: default to scancode_set 2, as with KBD_CMD_RESET

2016-04-07 Thread Peter Maydell
On 7 April 2016 at 17:50, Paolo Bonzini wrote: > From: Hervé Poussineau > > This line has been added in commit ef74679a810fe6858f625b9d52b68cc3fc61eb3d > with > other initializations. However, scancode set 0 doesn't exist (only 1, 2, 3). > This works well as long as operating system is resetting

Re: [Qemu-devel] [PATCHv3] Improve documentation for TLS

2016-04-07 Thread Eric Blake
On 04/07/2016 12:32 PM, Alex Bligh wrote: > * Call out TLS into a separate section > > * Add details of the TLS protocol itself > > * Emphasise that actual TLS session initiation (i.e. the TLS handshake) can > be initiated from either side (as required by the TLS standard I believe > and as a

[Qemu-devel] [PATCH v2 08/13] qemu-thread: optimize spin_lock for uncontended locks

2016-04-07 Thread Emilio G. Cota
This way we can acquire the lock with xchg+test, instead of test+xchg+test. Most spinlocks should be uncontended so this should result in a ne performance gain. Before: 4ad957: eb 09 jmp4ad962 4ad959: 0f 1f 80 00 00 00 00nopl 0x0(%rax) 4ad960: f

[Qemu-devel] [PATCH v2 02/13] compiler.h: add QEMU_ALIGNED() to enforce struct alignment

2016-04-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 8f1cc7b..1978ddc 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -41,6 +41,8 @@ # define QEMU_PACKED __att

[Qemu-devel] [PATCH v2 10/13] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-07 Thread Emilio G. Cota
For some workloads such as arm bootup, tb_phys_hash is performance-critical. The is due to the high frequency of accesses to the hash table, originated by (frequent) TLB flushes that wipe out the cpu-private tb_jmp_cache's. More info: https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg05

[Qemu-devel] [PATCH v2 06/13] qemu-thread: add simple test-and-set spinlock

2016-04-07 Thread Emilio G. Cota
From: Guillaume Delbergue Signed-off-by: Guillaume Delbergue [Rewritten. - Paolo] Signed-off-by: Paolo Bonzini --- include/qemu/thread.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/include/qemu/thread.h b/include/qemu/thread.h index bdae6df..1aa843b 100

[Qemu-devel] [PATCH for-2.6] nbd: Don't kill server on client that doesn't request TLS

2016-04-07 Thread Eric Blake
Upstream NBD is documenting that servers MAY choose to operate in a conditional mode, where it is up to the client whether to use TLS. For qemu's case, we want to always be in FORCEDTLS mode, because of the risk of man-in-the-middle attacks, and since we never export more than one device; likewise

[Qemu-devel] [PATCH v2 04/13] seqlock: rename write_lock/unlock to write_begin/end

2016-04-07 Thread Emilio G. Cota
It is a more appropriate name, now that the mutex embedded in the seqlock is gone. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus.c | 28 ++-- include/qemu/seqlock.h | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --gi

Re: [Qemu-devel] [Qemu-block] [PATCH 3/7] qemu-iotests: iotests.VM: remove qtest socket on error

2016-04-07 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 05.04.2016 11:21, Sascha Silbe wrote: [...] [_remove_if_exists()] > Not sure about the leading underscore (it appears to be the only such > function in iotests.py besides __init__()), but I guess it's a test so > it doesn't really matter anyway. I considered it

[Qemu-devel] [PATCH v2 09/13] exec: add tb_hash_func5, derived from xxhash

2016-04-07 Thread Emilio G. Cota
This will be used by upcoming changes for hashing the tb hash. Add this into a separate file to include the copyright notice from xxhash. Signed-off-by: Emilio G. Cota --- include/exec/tb-hash-xx.h | 103 ++ 1 file changed, 103 insertions(+) create m

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-07 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 05.04.2016 11:21, Sascha Silbe wrote: >> On systems with fast IO, qemu-io may write more than 1 MiB before >> receiving the block-job-cancel command, causing the test case to fail. >> >> 141 is inherently racy, but we can at least reduce the likelihood of the >>

[Qemu-devel] [PULL 1/1] tci: Fix build regression

2016-04-07 Thread Stefan Weil
Commit d38ea87ac54af64ef611de434d07c12dc0399216 cleaned the include statements which resulted in a wrong order of assert.h and the definition of NDEBUG in tci.c. Normally NDEBUG modifies the definition of the assert macro, but here this definition comes too late which results in a failing build. T

Re: [Qemu-devel] [PATCH 01/11] tci: Fix build regression

2016-04-07 Thread Stefan Weil
Am 07.04.2016 um 20:15 schrieb Richard Henderson: > On 04/07/2016 08:53 AM, Sergey Fedorov wrote: >> +/* Enable TCI assertions only when debugging TCG (and without NDEBUG >> defined). >> + * Without assertions, the interpreter runs much faster. */ >> +#if defined(CONFIG_DEBUG_TCG) >> +# define tci_

[Qemu-devel] [PULL 0/1] TCI patch queue for QEMU 2.6.0-rc2

2016-04-07 Thread Stefan Weil
ository at: git://qemu.weilnetz.de/qemu.git tags/pull-tci-20160407 for you to fetch changes up to 3ccdbecf80a322a31dbf452d433321c67f82d534: tci: Fix build regression (2016-04-07 19:01:21 +0200) tci p

Re: [Qemu-devel] [PATCH v2] fw_cfg: RFQDN rules, documentation

2016-04-07 Thread Michael S. Tsirkin
On Thu, Apr 07, 2016 at 12:55:16PM -0400, Gabriel L. Somlo wrote: ... > > > question is, I think: > > > > > > Should we allow QEMU firmware developers to create special settings, > > > to be populated manually by their end-users, that the guest kernel > > > would be prevented from seeing? >

Re: [Qemu-devel] [PATCH v3 0/7] virtio: aio handler API

2016-04-07 Thread Christian Borntraeger
On 04/06/2016 12:16 PM, Paolo Bonzini wrote: > This version removes patches 1 and 9, fixes some commit messages, and > fixes some small in the formatting issues. > > Michael S. Tsirkin (2): > virtio: add aio handler > virtio-blk: use aio handler for data plane > > Paolo Bonzini (5): > virti

[Qemu-devel] [PATCH v2 12/13] qht: add test program

2016-04-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- tests/.gitignore | 1 + tests/Makefile | 6 ++- tests/test-qht.c | 109 +++ 3 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 tests/test-qht.c diff --git a/tests/.gitignore b/tests/.gi

Re: [Qemu-devel] [PATCHv2] Improve documentation for TLS

2016-04-07 Thread Eric Blake
On 04/07/2016 09:33 AM, Alex Bligh wrote: > * Call out TLS into a separate section > > * Add details of the TLS protocol itself > > * Emphasise that actual TLS session initiation (i.e. the TLS handshake) can > be initiated from either side (as required by the TLS standard I believe > and as a

Re: [Qemu-devel] [PATCHv4] Improve documentation for TLS

2016-04-07 Thread Eric Blake
On 04/07/2016 02:07 PM, Alex Bligh wrote: > * Call out TLS into a separate section > > * Add details of the TLS protocol itself > > * Emphasise that actual TLS session initiation (i.e. the TLS handshake) can > be initiated from either side (as required by the TLS standard I believe > and as a

[Qemu-devel] [PATCHv4] Improve documentation for TLS

2016-04-07 Thread Alex Bligh
* Call out TLS into a separate section * Add details of the TLS protocol itself * Emphasise that actual TLS session initiation (i.e. the TLS handshake) can be initiated from either side (as required by the TLS standard I believe and as actually works in practice) * Clarify what is a requirem

[Qemu-devel] [PATCH] tb: consistently use uint32_t for tb->flags

2016-04-07 Thread Emilio G. Cota
We are inconsistent with the type of tb->flags: usage varies loosely between int and uint64_t. Settle to uint32_t everywhere, which is superior to both: at least one target (aarch64) uses the most significant bit in the u32, and uint64_t is wasteful. Compile-tested for all targets. Suggested-by:

[Qemu-devel] [PATCH v2 05/13] include/processor.h: define cpu_relax()

2016-04-07 Thread Emilio G. Cota
Taken from the linux kernel. Signed-off-by: Emilio G. Cota --- include/qemu/processor.h | 28 1 file changed, 28 insertions(+) create mode 100644 include/qemu/processor.h diff --git a/include/qemu/processor.h b/include/qemu/processor.h new file mode 100644 index 00

Re: [Qemu-devel] [Qemu-block] [PATCH 1/7] qemu-iotests: check: don't place files with predictable names in /tmp

2016-04-07 Thread Sascha Silbe
Dear Max, Max Reitz writes: > You decide whether you want to drop the tmp=/tmp/$$ lines in the tests > in a dedicated (follow-up) patch or include it here. Let's land this one first; I'll address the other occurrences in a separate patch. I've put it on my todo list. Thanks for the reviews! S

Re: [Qemu-devel] [PATCH 01/11] tci: Fix build regression

2016-04-07 Thread Richard Henderson
On 04/07/2016 08:53 AM, Sergey Fedorov wrote: +/* Enable TCI assertions only when debugging TCG (and without NDEBUG defined). + * Without assertions, the interpreter runs much faster. */ +#if defined(CONFIG_DEBUG_TCG) +# define tci_assert(cond) assert(cond) +#else +# define tci_assert(cond) ((voi

[Qemu-devel] [PATCH v2] exec.c: Ensure right alignment also for file backed ram

2016-04-07 Thread Dominik Dingel
While in the anonymous ram case we already take care of the right alignment such an alignment gurantee does not exist for file backed ram allocation. Instead, pagesize is used for alignment. On s390 this is not enough for gmap, as we need to satisfy an alignment up to segments. Reported-by: Halil

Re: [Qemu-devel] [PATCH 0/2] target-mips: Initiate IEEE 754-2008 support for Mips

2016-04-07 Thread Maciej W. Rozycki
On Thu, 7 Apr 2016, Aleksandar Markovic wrote: > This patch series is based on the original set of patches proposed by Maciej > Rozycki: http://lists.nongnu.org/archive/html/qemu-devel/2014-12/msg00968.html Please try and spell out my name in full, thank you. Maciej

Re: [Qemu-devel] [PATCH v2] fw_cfg: RFQDN rules, documentation

2016-04-07 Thread Laszlo Ersek
On 04/07/16 18:40, Michael S. Tsirkin wrote: > On Thu, Apr 07, 2016 at 06:23:24PM +0200, Laszlo Ersek wrote: >> Should we allow QEMU firmware developers to create special settings, >> to be populated manually by their end-users, that the guest kernel >> would be prevented from seeing? > > E

[Qemu-devel] [PULL for-2.6 1/2] qga: fix fd leak with guest-exec i/o channels

2016-04-07 Thread Michael Roth
From: Yuriy Pudgorodskiy Signed-off-by: Yuriy Pudgorodskiy Signed-off-by: Denis V. Lunev CC: Michael Roth * squashed in g_io_channel_shutdown() to match cleanup paths for input/output Signed-off-by: Michael Roth --- qga/commands.c | 4 1 file changed, 4 insertions(+) diff --git a/qga

Re: [Qemu-devel] [PATCH v2 0/2] Convert pxb initfn to Error

2016-04-07 Thread Michael S. Tsirkin
On Thu, Apr 07, 2016 at 07:44:17PM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 07, 2016 at 06:39:10PM +0200, Markus Armbruster wrote: > > Marcel Apfelbaum writes: > > > > > On 03/23/2016 01:56 PM, Markus Armbruster wrote: > > >> Wei Jiangang writes: > > >> > > >>> v1 -> v2: > > >>> > > >>> -

[Qemu-devel] [PULL for-2.6 0/2] qemu-ga patch queue for 2.6

2016-04-07 Thread Michael Roth
The following changes since commit e380023898479b57d38c0569c02f7bd41090181b: Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2016-04-07 12:15:33 +0100) are available in the git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2016-04-07-tag

Re: [Qemu-devel] [PATCH v2] fw_cfg: RFQDN rules, documentation

2016-04-07 Thread Gabriel L. Somlo
On Thu, Apr 07, 2016 at 07:40:12PM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 07, 2016 at 06:23:24PM +0200, Laszlo Ersek wrote: > > On 04/07/16 17:38, Michael S. Tsirkin wrote: > > > This requires that all -fw_cfg command line users use names of the form > > > opt/RFQDN/: such names are compati

Re: [Qemu-devel] [PATCH] xen: piix reuse pci generic class init function

2016-04-07 Thread Stefano Stabellini
On Thu, 7 Apr 2016, John Snow wrote: > > On Wed, Apr 06, 2016 at 04:56:12PM -0700, Stefano Stabellini wrote: > >> On Sun, 3 Apr 2016, Michael S. Tsirkin wrote: > >>> piix3_ide_xen_class_init is identical to piix3_ide_class_init > >>> except it's buggy as it does not set exit and does not disable >

  1   2   3   >