Re: [Qemu-devel] [PATCH 6/6] e1000: Implementing various counters

2015-10-19 Thread Jason Wang
On 10/18/2015 03:53 PM, Leonid Bloch wrote: > This implements the following Statistic registers (various counters) > according to Intel's specs: > > TSCTC GOTCL GOTCH GORCL GORCH MPRC BPRC RUCROC > BPTC MPTC PTC... PRC... > > Signed-off-by: Leonid Bloch > Signed-off-by: Dmitry F

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-19 Thread Thibaut Collet
On Mon, Oct 19, 2015 at 11:12 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 06:42:43PM +0200, Thibaut Collet wrote: >> > >> > Can you pls check refs/heads/for_thibaut? >> > It should have your patch as the latest commit. >> >> I do not see yet my patch on the for_thibaut branch > > Ouch.

[Qemu-devel] [PULL v2 6/7] Enable fw_cfg DMA interface for x86

2015-10-19 Thread Gerd Hoffmann
From: Marc Marí Enable the fw_cfg DMA interface for all the x86 platforms. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí Reviewed-by: Laszlo Ersek Signed-off-by: Gerd Hoffmann --- hw/i386/pc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --g

[Qemu-devel] [PULL v2 1/7] fw_cfg: insert string blobs via qemu cmdline

2015-10-19 Thread Gerd Hoffmann
From: "Gabriel L. Somlo" Allow users to provide custom fw_cfg blobs with ascii string payloads specified directly on the qemu command line. Suggested-by: Jordan Justen Suggested-by: Laszlo Ersek Signed-off-by: Gabriel Somlo Message-id: 1443544141-26568-1-git-send-email-so...@cmu.edu Reviewd-b

[Qemu-devel] [PULL v2 3/7] fw_cfg DMA interface documentation

2015-10-19 Thread Gerd Hoffmann
From: Marc Marí Add fw_cfg DMA interface specification in the documentation. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí Reviewed-by: Peter Maydell Reviewed-by: Laszlo Ersek Signed-off-by: Gerd Hoffmann --- docs/specs/fw_cfg.txt | 65 +++

[Qemu-devel] [PULL v2 7/7] fw_cfg: Define a static signature to be returned on DMA port reads

2015-10-19 Thread Gerd Hoffmann
From: Kevin O'Connor Return a static signature ("QEMU CFG") if the guest does a read to the DMA address io register. Signed-off-by: Kevin O'Connor Reviewed-by: Laszlo Ersek Reviewed-by: Stefan Hajnoczi Signed-off-by: Gerd Hoffmann --- docs/specs/fw_cfg.txt | 3 +++ hw/nvram/fw_cfg.c |

[Qemu-devel] [PULL v2 2/7] fw_cfg: document fw_cfg_modify_iXX() update functions

2015-10-19 Thread Gerd Hoffmann
From: "Gabriel L. Somlo" Document the behavior of fw_cfg_modify_iXX() for leak-less updating of integer-type blobs. Currently only fw_cfg_modify_i16() is coded, but 32- and 64-bit versions may be added later if necessary.. Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Signed-off-by:

[Qemu-devel] [PULL v2 0/7] fw_cfg: add dma interface, add strings via cmdline.

2015-10-19 Thread Gerd Hoffmann
Hi, Updated fw_cfg pull, with both old gcc build failure and make check error fixed. please pull, Gerd The following changes since commit 526d5809a0714edc7f19196f14ec2e607dbd9753: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-10-19 10:52:39 +0100) a

[Qemu-devel] [PATCH v4 11/12] qed: Implement .bdrv_drain

2015-10-19 Thread Fam Zheng
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the image header after a grace period once metadata update has finished. In compliance to the bdrv_drain semantics we should make sure it remains deleted once .bdrv_drain is called. Call the qed_need_check_timer_cb manually to update

Re: [Qemu-devel] [PATCH 2/6] e1000: Trivial implementation of various MAC registers

2015-10-19 Thread Jason Wang
On 10/18/2015 03:53 PM, Leonid Bloch wrote: > These registers appear in Intel's specs, but were not implemented. > These registers are now implemented trivially, i.e. they are initiated > with zero values, and if they are RW, they can be written or read by the > driver, or read only if they are R

[Qemu-devel] [PATCH v4 03/12] dataplane: Mark host notifiers' client type as "external"

2015-10-19 Thread Fam Zheng
They will be excluded by type in the nested event loops in block layer, so that unwanted events won't be processed there. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 5 ++--- hw/scsi/virtio-scsi-dataplane.c | 18 -- 2 files changed, 10 insertions(+), 13 deleti

Re: [Qemu-devel] [Qemu-block] [RFC] transactions: add transaction-wide property

2015-10-19 Thread Fam Zheng
On Mon, 10/19 09:27, Markus Armbruster wrote: > John Snow writes: > > > On 10/16/2015 08:23 AM, Stefan Hajnoczi wrote: > >> On Mon, Oct 12, 2015 at 12:50:20PM -0400, John Snow wrote: > >>> Ping -- any consensus on how we should implement the "do-or-die" > >>> argument for transactions that start

[Qemu-devel] [PATCH v4 10/12] block: Introduce BlockDriver.bdrv_drain callback

2015-10-19 Thread Fam Zheng
Drivers can have internal request sources that generate IO, like the need_check_timer in QED. Since we want quiesced periods that contain nested event loops in block layer, we need to have a way to disable such event sources. Block drivers must implement the "bdrv_drain" callback if it has any int

[Qemu-devel] [PATCH v4 01/12] aio: Add "is_external" flag for event handlers

2015-10-19 Thread Fam Zheng
All callers pass in false, and the real external ones will switch to true in coming patches. Signed-off-by: Fam Zheng --- aio-posix.c | 6 - aio-win32.c | 5 async.c | 3 ++- block/curl.c| 14 +---

[Qemu-devel] [PATCH v4 02/12] nbd: Mark fd handlers client type as "external"

2015-10-19 Thread Fam Zheng
So we could distinguish it from internal used fds, thus avoid handling unwanted events in nested aio polls. Signed-off-by: Fam Zheng --- nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbd.c b/nbd.c index fbc66be..dab1ebb 100644 --- a/nbd.c +++ b/nbd.c @@ -1446,7 +1

[Qemu-devel] [PATCH v4 12/12] tests: Add test case for aio_disable_external

2015-10-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/test-aio.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/test-aio.c b/tests/test-aio.c index 03cd45d..1623803 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c @@ -374,6 +374,29 @@ static void test_flush_event_notifier(vo

[Qemu-devel] [PATCH v4 05/12] block: Introduce "drained begin/end" API

2015-10-19 Thread Fam Zheng
The semantics is that after bdrv_drained_begin(bs), bs will not get new external requests until the matching bdrv_drained_end(bs). Signed-off-by: Fam Zheng --- block/io.c| 17 + include/block/block.h | 19 +++ include/block/block_int.h | 2 ++

[Qemu-devel] [PATCH v4 06/12] block: Add "drained begin/end" for transactional external snapshot

2015-10-19 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Signed-off-by: Fam Zheng --- blockdev.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 8141b6b..fc63c3d 100644 --

[Qemu-devel] [PATCH v4 09/12] block: Add "drained begin/end" for internal snapshot

2015-10-19 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. state->bs is assigned right after bdrv_drained_begin. Because it was used as the flag for deletion or not in abort, now we need a separate flag - InternalSnapshotState.created.

[Qemu-devel] [PATCH v4 04/12] aio: introduce aio_{disable, enable}_external

2015-10-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- aio-posix.c | 3 ++- aio-win32.c | 3 ++- include/block/aio.h | 37 + 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f0f9122..0467f23 100644 --- a/aio-posix.c +++ b/

[Qemu-devel] [PATCH v4 07/12] block: Add "drained begin/end" for transactional backup

2015-10-19 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Move the assignment to state->bs up right after bdrv_drained_begin, so that we can use it in the clean callback. The abort callback will still check bs->job and state->job, so it

[Qemu-devel] [PATCH v4 08/12] block: Add "drained begin/end" for transactional blockdev-backup

2015-10-19 Thread Fam Zheng
Similar to the previous patch, make sure that external events are not dispatched during transaction operations. Signed-off-by: Fam Zheng --- blockdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index e3e68e6..6ab98e3 100644 --- a/blockdev.c ++

[Qemu-devel] [PATCH v4 00/12] block: Protect nested event loop with bdrv_drained_begin and bdrv_drained_end

2015-10-19 Thread Fam Zheng
v4: Rebase on to master so fix the "bdrv_move_feature_fields" issue. v3: Call bdrv_drain unconditionally in bdrv_drained_begin. Document the internal I/O implications between bdrv_drain_begin and end. The nested aio_poll()'s in block layer has a bug that new r/w requests from ioeventfds and n

Re: [Qemu-devel] [PATCH] vmxnet3: Do not fill stats if device is inactive

2015-10-19 Thread Jason Wang
On 10/15/2015 06:54 PM, Dana Rubin wrote: > From: Shmulik Ladkani > > Guest OS may issue VMXNET3_CMD_GET_STATS even before device was > activated (for example in linux, after insmod but prior net-dev open). > > Accessing shared descriptors prior device activation is illegal as the > VMXNET3State

Re: [Qemu-devel] [PATCH v2 0/5] Network traffic dumping via netfilter

2015-10-19 Thread Jason Wang
On 10/13/2015 06:39 PM, Thomas Huth wrote: > The "-net dump" option only works with the "-net" option. So far, it > is not possible to dump network traffic with the "-netdev" option yet. > This patch series now fixes this ugliness by enabling dumping for the > netdev devices via the new netfilter

Re: [Qemu-devel] [PATCH] eepro100: prevent an infinite loop over same command block

2015-10-19 Thread max
I will try to test the PoC on real e100. But this work may need some more time. 发自我的 iPhone > 在 2015年10月20日,上午11:04,Jason Wang 写道: > > > >> On 10/17/2015 07:35 PM, Peter Maydell wrote: >>> On 16 October 2015 at 22:37, Stefan Weil wrote: >>> Maybe real hardware will run an endless loop? >>>

Re: [Qemu-devel] Connecting netdev to emulated nics.

2015-10-19 Thread Jason Wang
On 10/16/2015 08:24 PM, sai pavan wrote: > Hi Jason, > > On Fri, Oct 16, 2015 at 1:07 PM, Jason Wang wrote: >> > >> > >> > On 10/16/2015 01:15 PM, sai pavan wrote: >>> >> +Peter >>> >> >>> >> Hi Jason, >>> >> >>> >> On Thu, Oct 15, 2015 at 2:44 PM, Jason Wang wrote: >>> >>> On 10/15/2

Re: [Qemu-devel] [PATCH] vmxnet3: Do not fill stats if device is inactive

2015-10-19 Thread Jason Wang
On 10/18/2015 03:16 PM, Dmitry Fleytman wrote: > ACK Hi Dmitry: Thanks a lot for the reviewing. As I want to add your "Acked-by" in the patch, could you pls add a formal one in the future? (Which can make my life a little bit easier). >> On 15 Oct 2015, at 13:54 PM, Dana Rubin >> wrote: >>

Re: [Qemu-devel] [PATCH] eepro100: prevent an infinite loop over same command block

2015-10-19 Thread Jason Wang
On 10/17/2015 07:35 PM, Peter Maydell wrote: > On 16 October 2015 at 22:37, Stefan Weil wrote: >> Maybe real hardware will run an endless loop? >> Or the "endless" loop is terminated because the driver >> changes the link while the loop is running? >> >> The goal of eepro100.c should be emulatio

Re: [Qemu-devel] [PATCH] eepro100: prevent an infinite loop over same command block

2015-10-19 Thread Jason Wang
On 10/17/2015 01:19 AM, P J P wrote: > +-- On Fri, 16 Oct 2015, Paolo Bonzini wrote --+ > | > +if (s->tx.link == s->cu_offset) > | > +break; > | > | Please update the patch to conform to QEMU's coding standards; braces > | are required even around single-statement blocks. > >

Re: [Qemu-devel] Connecting netdev to emulated nics.

2015-10-19 Thread Jason Wang
On 10/16/2015 11:18 PM, Peter Crosthwaite wrote: > On Fri, Oct 16, 2015 at 5:24 AM, sai pavan wrote: >> Hi Jason, >> >> On Fri, Oct 16, 2015 at 1:07 PM, Jason Wang wrote: >>> >>> On 10/16/2015 01:15 PM, sai pavan wrote: +Peter Hi Jason, On Thu, Oct 15, 2015 at 2:44 PM,

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:42 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: On 10/19/

[Qemu-devel] [PATCH 2/2] net: free the string returned by object_get_canonical_path_component

2015-10-19 Thread Yang Hongyang
The value returned from object_get_canonical_path_component must be freed. Signed-off-by: Yang Hongyang Cc: Jason Wang Cc: Paolo Bonzini --- net/net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/net.c b/net/net.c index 0c4a012..459bf19 100644 --- a/net/net.c ++

[Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat()

2015-10-19 Thread Yang Hongyang
We want "buf, sizeof(buf)" here. sizeof(buffer) is the size of a pointer, which is wrong. Thanks to Paolo for pointing it out. Signed-off-by: Yang Hongyang Cc: Jason Wang Cc: Paolo Bonzini --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c

[Qemu-devel] [PULL v4 00/14] qemu-ga patch queue

2015-10-19 Thread Michael Roth
Hi Peter, Please note that 'glib-compat: add 2.38/2.40/2.46 asserts' is also in Marc-André's recent ivshmem PULL. The 2 versions of the patches are identical, but let me know if you'd prefer a re-send/re-base later. The following changes since commit 26c7be842637ee65a79cd77f96a99c23ddcd90ad: M

[Qemu-devel] [PULL v4 10/14] qga: guest exec functionality

2015-10-19 Thread Michael Roth
From: Yuri Pudgorodskiy Guest-exec rewritten in platform-independent style with glib spawn. Child process is spawn asynchronously and exit status can later be picked up by guest-exec-status command. stdin/stdout/stderr of the child now is redirected to /dev/null Later we will add ability to spe

[Qemu-devel] [PULL v4 01/14] build: qemu-ga: add 'qemu-ga' build target for w32

2015-10-19 Thread Michael Roth
Currently POSIX builds rely on 'qemu-ga' target to do qga-only distributable build. On w32, as with most standalone binary targets, we rely on 'qemu-ga.exe' target. Unlike with POSIX, qemu-ga for w32 has a number of related targets such as VSS DLL and MSI package. We can do the full distributable

[Qemu-devel] [PULL v4 04/14] qga: do not override configuration verbosity

2015-10-19 Thread Michael Roth
From: Marc-André Lureau Move the default verbosity settings before loading the configuration file, or it will overwrite it. Found thanks to writing qga tests :) Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- qga/main.c | 4 ++-- 1 file changed, 2 i

[Qemu-devel] [PULL v4 07/14] qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks

2015-10-19 Thread Michael Roth
Some guests don't expose memory blocks via sysfs at all. This shouldn't be a failure, instead just return an empty list. For other access failures we still report an error. Signed-off-by: Michael Roth --- qga/commands-posix.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PULL v4 06/14] glib-compat: add 2.38/2.40/2.46 asserts

2015-10-19 Thread Michael Roth
From: Marc-André Lureau Those are mostly useful for writing tests. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana Signed-off-by: Michael Roth --- include/glib-compat.h | 61 +++ 1 file changed, 61 insertions(+) diff --git a/incl

Re: [Qemu-devel] [PATCH] qapi: Adding websocket information inside VncInfo structure.

2015-10-19 Thread Julio Faracco
Thanks Erik and Gerd for you feedback... I will rebase the changes consider the opinions... I agree about VncInfo2... because some structures are ready to use, including websocket. Without adding new fields or other changes. Julio Cesar Faracco 2015-10-19 6:17 GMT-02:00 Gerd Hoffmann : > Hi,

[Qemu-devel] [PULL v4 03/14] qga: add QGA_CONF environment variable

2015-10-19 Thread Michael Roth
From: Marc-André Lureau Having a environment variable allows to override default configuration path, useful for testing. Note that this can't easily be an argument, since loading config is done before parsing the arguments. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-

[Qemu-devel] [PULL v4 02/14] qga: Use g_new() & friends where that makes obvious sense

2015-10-19 Thread Michael Roth
From: Markus Armbruster g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with siz

[Qemu-devel] [PULL v4 05/14] qtest: add a few fd-level qmp helpers

2015-10-19 Thread Michael Roth
From: Marc-André Lureau Add a few functions to interact with qmp via a simple fd. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- tests/libqtest.c | 45 + tests/libqtest.h | 7 +++ 2 files changed, 48

[Qemu-devel] [PULL v4 08/14] tests: add a local test for guest agent

2015-10-19 Thread Michael Roth
From: Marc-André Lureau Add some local guest agent tests, as it is better than nothing, only when CONFIG_POSIX (using unix sockets). With the QGA_TEST_SIDE_EFFECTING environment variable, it will include tests with side effects, such as freezing/thawing the FS or changing the time. (a better te

[Qemu-devel] [PULL v4 14/14] qga: fix uninitialized value warning for win32

2015-10-19 Thread Michael Roth
Signed-off-by: Michael Roth --- qga/channel-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/channel-win32.c b/qga/channel-win32.c index 215b15a..0452b9f 100644 --- a/qga/channel-win32.c +++ b/qga/channel-win32.c @@ -269,7 +269,7 @@ static GIOStatus ga_channel_write

[Qemu-devel] [PULL v4 11/14] qga: handle possible SIGPIPE in guest-file-write

2015-10-19 Thread Michael Roth
From: "Denis V. Lunev" qemu-ga should not exit on guest-file-write to pipe without read end but proper error code should be returned. The behavior of the spawned process should be default thus SIGPIPE processing should be reset to default after fork() but before exec(). Signed-off-by: Denis V. L

[Qemu-devel] [PULL v4 13/14] qga: guest-exec simple stdin/stdout/stderr redirection

2015-10-19 Thread Michael Roth
From: Yuri Pudgorodskiy Implemented with base64-encoded strings in qga json protocol. Glib portable GIOChannel is used for data I/O. Optinal stdin parameter of guest-exec command is now used as stdin content for spawned subprocess. If capture-output bool flag is specified, guest-exec redirects

[Qemu-devel] [PULL v4 12/14] qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()

2015-10-19 Thread Michael Roth
From: Yuri Pudgorodskiy glib may return G_IO_STATUS_AGAIN which is actually not an error. Also fixed a bug when on incomplete write buf pointer was not adjusted. Signed-off-by: Yuri Pudgorodskiy Signed-off-by: Denis V. Lunev Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- qga/chan

[Qemu-devel] [PULL v4 09/14] qga: drop guest_file_init helper and replace it with static initializers

2015-10-19 Thread Michael Roth
From: "Denis V. Lunev" This just makes code shorter and better. Signed-off-by: Denis V. Lunev Signed-off-by: Yuri Pudgorodskiy Reviewed-by: Michael Roth Signed-off-by: Denis V. Lunev Signed-off-by: Michael Roth --- qga/commands-posix.c | 10 +++--- qga/commands-win32.c | 10 +++---

Re: [Qemu-devel] [PATCH 07/17] qcow2: add a 'keyid' parameter to qcow2 options

2015-10-19 Thread Eric Blake
On 10/19/2015 09:09 AM, Daniel P. Berrange wrote: > Add a 'keyid' parameter that refers to the ID of a > QCryptoSecret instance that provides the encryption key. > > $QEMU \ > -object secret,id=sec0,filename=/home/berrange/encrypted.pw \ > -drive file=/home/berrange/encrypted.qcow2,keyid=s

Re: [Qemu-devel] [PATCH 03/17] rbd: add support for getting password from QCryptoSecret object

2015-10-19 Thread Josh Durgin
On 10/19/2015 08:09 AM, Daniel P. Berrange wrote: Currently RBD passwords must be provided on the command line via $QEMU -drive file=rbd:pool/image:id=myname:\ key=QVFDVm41aE82SHpGQWhBQXEwTkN2OGp0SmNJY0UrSE9CbE1RMUE=:\ auth_supported=cephx This is insecure because the key is visibl

Re: [Qemu-devel] [PATCH v2 05/16] osdep: add qemu_fork() wrapper for safely handling signals

2015-10-19 Thread Eric Blake
On 10/12/2015 05:14 AM, Daniel P. Berrange wrote: > When using regular fork() the child process of course inherits > all the parents' signal handlers. If the child then proceeds > to close() any open file descriptors, it may break some of those > registered signal handlers. The child generally does

Re: [Qemu-devel] [PATCH v2 04/16] ui: convert VNC startup code to use SocketAddress

2015-10-19 Thread Eric Blake
On 10/12/2015 05:14 AM, Daniel P. Berrange wrote: > The VNC code is currently using QemuOpts to configure the > sockets connections / listeners it needs. Convert it to > use SocketAddress to bring it in line with modern QAPI > based code elsewhere in QEMU. > > Signed-off-by: Daniel P. Berrange >

Re: [Qemu-devel] [PATCH v2 03/16] sockets: allow port to be NULL when listening on IP address

2015-10-19 Thread Eric Blake
On 10/12/2015 05:14 AM, Daniel P. Berrange wrote: > If the port in the SocketAddress struct is NULL, it can allow > the kernel to automatically select a free port. This is useful > in particular in unit tests to avoid a race trying to find a > free port to run a test case on. > > Signed-off-by: Da

Re: [Qemu-devel] [PATCH v2 02/16] sockets: move qapi_copy_SocketAddress into qemu-sockets.c

2015-10-19 Thread Eric Blake
On 10/12/2015 05:14 AM, Daniel P. Berrange wrote: > The qapi_copy_SocketAddress method is going to be useful > in more places than just qemu-char.c, so move it into > the qemu-sockets.c file to allow its reuse. > > Signed-off-by: Daniel P. Berrange > --- > include/qemu/sockets.h | 4 > qem

Re: [Qemu-devel] [PATCH v2 01/16] sockets: add helpers for creating SocketAddress from a socket

2015-10-19 Thread Eric Blake
On 10/12/2015 05:14 AM, Daniel P. Berrange wrote: > Add two helper methods that, given a socket file descriptor, > can return a populated SocketAddress struct containing either > the local or remote address information. > > Signed-off-by: Daniel P. Berrange > --- > include/qemu/sockets.h | 30 +

Re: [Qemu-devel] [PATCH 0/7] userfault21 update

2015-10-19 Thread Andrea Arcangeli
Hello Patrick, On Mon, Oct 12, 2015 at 11:04:11AM -0400, Patrick Donnelly wrote: > Hello Andrea, > > On Mon, Jun 15, 2015 at 1:22 PM, Andrea Arcangeli wrote: > > This is an incremental update to the userfaultfd code in -mm. > > Sorry I'm late to this party. I'm curious how a ptrace monitor migh

Re: [Qemu-devel] [PATCH v2] qemu-options: add documentation for using UDP unicast network backend.

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 03:13:44PM +0300, Victor Kaplansky wrote: > For the long time QEMU has support for UDP unicast network > backend added by commit 0e0e7facc775e9, but manual was missing > description and usage examples. > > Changes from v1: > > Address comments by Michael S. Tsirkin: >

Re: [Qemu-devel] [PATCH] QEMU patch for libvmi to introspect QEMU/kvm virtual machines. Usually this patch is distributed with libvmi, but, it might be more useful to have it in the QEMU source perman

2015-10-19 Thread Eric Blake
On 10/15/2015 05:44 PM, vale...@aimale.com wrote: > From: Valerio Aimale Long subject line, and no message body. Remember, you want the subject line to be a one-line short summary of 'what', then the commit body message for 'why', as in: qmp: add command for libvmi memory introspection In the

Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Dan Williams
On Mon, Oct 19, 2015 at 2:19 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote: >> On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: >> > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: >> > I mean don't use ASL to comment C. It

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Tue, Oct 20, 2015 at 01:54:12AM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 06:25 PM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: > >>On Mon, 19 Oct 2015 09:56:12 +0300 > >>"Michael S. Tsirkin" wrote: > >> > >>>On Sun, Oct 11, 2015 at 11:52

Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote: > On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: > > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > > I mean don't use ASL to comment C. It's not more readable. > > Describe why the code is the way it is.

Re: [Qemu-devel] [PATCH v5 6/6] iotests: Test changed Quorum filename

2015-10-19 Thread Eric Blake
On 10/19/2015 12:49 PM, Max Reitz wrote: > After drive-mirror replacing a Quorum child, the filename of the Quorum > BDS should reflect the change. This patch replaces the existing test for > whether the operation did actually exchange the BDS (which simply tested > whether the new BDS existed) by

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 06:42:43PM +0200, Thibaut Collet wrote: > > > > Can you pls check refs/heads/for_thibaut? > > It should have your patch as the latest commit. > > I do not see yet my patch on the for_thibaut branch Ouch. I meant refs/tags/for_thibaut. Sorry about that.

Re: [Qemu-devel] [PATCH v5 5/6] block: Drop BlockDriverState.filename

2015-10-19 Thread Eric Blake
On 10/19/2015 12:49 PM, Max Reitz wrote: > That field is now only used during initialization of BlockDriverStates > (opening images) and for error or warning messages. Performance is not > that much of an issue here, so we can drop the field and replace its use > by a call to bdrv_filename(). By do

Re: [Qemu-devel] [PATCH v5 4/6] qemu-img: Use bdrv_filename() for map

2015-10-19 Thread Eric Blake
On 10/19/2015 12:49 PM, Max Reitz wrote: > Replaces bs->filename by the result of bdrv_filename() in the > qemu-img map subcommand. Since that value is queried relatively often, > however, it should be cached. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 14 +- > 1 file changed,

Re: [Qemu-devel] [PATCH v5 3/6] block: Add bdrv_filename()

2015-10-19 Thread Eric Blake
On 10/19/2015 12:49 PM, Max Reitz wrote: > Split the part which actually refreshes the BlockDriverState.filename > field off of bdrv_refresh_filename() into a more generic function > bdrv_filename(), which first calls bdrv_refresh_filename() and then > stores a qemu-usable filename in the given buf

Re: [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-19 Thread Laszlo Ersek
On 10/16/15 21:09, Laszlo Ersek wrote: > On 10/16/15 13:34, Fabio Fantoni wrote: >> Il 16/10/2015 12:47, Stefano Stabellini ha scritto: >>> On Fri, 16 Oct 2015, Fabio Fantoni wrote: Il 16/10/2015 12:13, Anthony PERARD ha scritto: > On Fri, Oct 16, 2015 at 10:32:44AM +0200, Fabio Fantoni wr

Re: [Qemu-devel] [PATCH v5 2/6] block: Avoid BlockDriverState.filename

2015-10-19 Thread Eric Blake
On 10/19/2015 12:49 PM, Max Reitz wrote: > In places which directly pass a filename to the OS, we should not use > the filename field at all but exact_filename instead (although the > former currently equals the latter if that is set). > > In raw_open_common(), we do not need to access BDS.filenam

Re: [Qemu-devel] [PATCH v5 1/6] block: Change bdrv_get_encrypted_filename()

2015-10-19 Thread Eric Blake
On 10/19/2015 12:49 PM, Max Reitz wrote: > Instead of returning a pointer to the filename, g_strdup() it. This will > become necessary once we do not have BlockDriverState.filename anymore. > > Signed-off-by: Max Reitz > --- > block.c | 17 ++--- > include/block/block.h

Re: [Qemu-devel] [PATCH 2/3] block/gluster: rename [server, volname, image] -> [host, volume, path]

2015-10-19 Thread Eric Blake
On 10/19/2015 06:13 AM, Prasanna Kumar Kalever wrote: > for example in 'servers' tuple values we use 'server' variable for key 'host' > in the code, it will be quite messy to have colliding names for variables, > so to maintain better readability and makes it consistent with other existing > code a

Re: [Qemu-devel] [PATCH 1/3] block/gluster: add support for multiple gluster servers

2015-10-19 Thread Eric Blake
On 10/19/2015 06:13 AM, Prasanna Kumar Kalever wrote: > This patch adds a way to specify multiple volfile servers to the gluster > block backend of QEMU with tcp|rdma transport types and their port numbers. When sending a multi-patch series, it is best to also include a 0/3 cover letter. Git can

Re: [Qemu-devel] [PATCH v5 1/2] hw/ptimer: Set delta to the original limit on reload in ptimer_set_limit()

2015-10-19 Thread Dmitry Osipenko
19.10.2015 20:06, Peter Maydell пишет: On 14 October 2015 at 00:30, Dmitry Osipenko wrote: ptimer_get_count() returns incorrect value for the disabled timer after reloading the counter with a small value, because corrected limit value is used instead of the original. For instance: 1) ptim

Re: [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-19 Thread Laszlo Ersek
On 10/19/15 20:29, Fabio Fantoni wrote: > 2015-10-19 18:57 GMT+02:00 Stefano Stabellini > >: > > On Mon, 19 Oct 2015, John Snow wrote: > > On 10/19/2015 07:44 AM, Stefano Stabellini wrote: > > > On Mon, 19 Oct 2015, Gerd Hoffmann wrote: > >

Re: [Qemu-devel] [PATCH] xen_platform: switch to realize

2015-10-19 Thread Paolo Bonzini
On 19/10/2015 19:13, Stefano Stabellini wrote: > Use realize to initialize the xen_platform device > > Signed-off-by: Stefano Stabellini > > diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c > index 8682c42..5bb701f 100644 > --- a/hw/i386/xen/xen_platform.c > +++ b/hw/i386/x

Re: [Qemu-devel] [PATCH] xen-platform: Replace assert() with appropriate error reporting

2015-10-19 Thread Paolo Bonzini
On 19/10/2015 20:39, Eduardo Habkost wrote: > Commit dbb7405d8caad0814ceddd568cb49f163a847561 made it possible to > trigger an assert using "-device xen-platform". Replace it with > appropriate error reporting. > > Before: > > $ qemu-system-x86_64 -device xen-platform > qemu-system-x86_64:

Re: [Qemu-devel] [RFC] target-arm: Add and use symbolic names for register banks

2015-10-19 Thread Peter Crosthwaite
On Mon, Oct 19, 2015 at 11:09 AM, Soren Brinkmann wrote: > Add ARM_BANK_ #defines to index banked registers. > > Suggested-by: Peter Maydell > Signed-off-by: Soren Brinkmann > --- > This change was suggested by Peter in the submission of "target-arm: Add > support for SPSR_(ABT|UND|IRQ|FIQ)", wh

[Qemu-devel] [PATCH v5 2/6] block: Avoid BlockDriverState.filename

2015-10-19 Thread Max Reitz
In places which directly pass a filename to the OS, we should not use the filename field at all but exact_filename instead (although the former currently equals the latter if that is set). In raw_open_common(), we do not need to access BDS.filename because we already have a local variable pointing

Re: [Qemu-devel] [PATCH 1/2] vl: trivial: minor tweaks to a max-cpu error msg

2015-10-19 Thread Eduardo Habkost
On Sun, Oct 18, 2015 at 07:35:27PM +0200, Andrew Jones wrote: > Signed-off-by: Andrew Jones Reviewed-by: Eduardo Habkost Acked-by: Eduardo Habkost If this can go through my tree, please let me know. > --- > vl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/vl

[Qemu-devel] [PATCH v5 5/6] block: Drop BlockDriverState.filename

2015-10-19 Thread Max Reitz
That field is now only used during initialization of BlockDriverStates (opening images) and for error or warning messages. Performance is not that much of an issue here, so we can drop the field and replace its use by a call to bdrv_filename(). By doing so we can ensure the result always to be rece

[Qemu-devel] [PATCH v5 6/6] iotests: Test changed Quorum filename

2015-10-19 Thread Max Reitz
After drive-mirror replacing a Quorum child, the filename of the Quorum BDS should reflect the change. This patch replaces the existing test for whether the operation did actually exchange the BDS (which simply tested whether the new BDS existed) by a test which examines the children list contained

[Qemu-devel] [PATCH v5 4/6] qemu-img: Use bdrv_filename() for map

2015-10-19 Thread Max Reitz
Replaces bs->filename by the result of bdrv_filename() in the qemu-img map subcommand. Since that value is queried relatively often, however, it should be cached. Signed-off-by: Max Reitz --- qemu-img.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qemu-img.c

[Qemu-devel] [PATCH v5 0/6] block: Drop BDS.filename

2015-10-19 Thread Max Reitz
*** This series is based on v7 of my *** *** "blockdev: BlockBackend and media" series *** The BDS filename field is generally only used when opening disk images or emitting error or warning messages, the only exception to this rule is the map command of qemu-img. However, using exact_filename th

[Qemu-devel] [PATCH v5 1/6] block: Change bdrv_get_encrypted_filename()

2015-10-19 Thread Max Reitz
Instead of returning a pointer to the filename, g_strdup() it. This will become necessary once we do not have BlockDriverState.filename anymore. Signed-off-by: Max Reitz --- block.c | 17 ++--- include/block/block.h | 2 +- monitor.c | 5 - 3 files cha

[Qemu-devel] [PATCH v5 3/6] block: Add bdrv_filename()

2015-10-19 Thread Max Reitz
Split the part which actually refreshes the BlockDriverState.filename field off of bdrv_refresh_filename() into a more generic function bdrv_filename(), which first calls bdrv_refresh_filename() and then stores a qemu-usable filename in the given buffer instead of BlockDriverState.filename. Since

[Qemu-devel] [PATCH] xen-platform: Replace assert() with appropriate error reporting

2015-10-19 Thread Eduardo Habkost
Commit dbb7405d8caad0814ceddd568cb49f163a847561 made it possible to trigger an assert using "-device xen-platform". Replace it with appropriate error reporting. Before: $ qemu-system-x86_64 -device xen-platform qemu-system-x86_64: hw/i386/xen/xen_platform.c:391: xen_platform_initfn: Assertio

Re: [Qemu-devel] [PULL 2/2] xen-platform: Ensure xen is enabled when initializing

2015-10-19 Thread Eduardo Habkost
On Mon, Oct 19, 2015 at 12:48:11PM +0200, Paolo Bonzini wrote: > > > On 19/10/2015 12:23, Stefano Stabellini wrote: > > The xen-platform code crashes on reset if the xen backend is not > > initialized, because it calls xc_hvm_set_mem_type(). Ensure xen-platform > > won't be created without initia

Re: [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-19 Thread Fabio Fantoni
2015-10-19 18:57 GMT+02:00 Stefano Stabellini < stefano.stabell...@eu.citrix.com>: > On Mon, 19 Oct 2015, John Snow wrote: > > On 10/19/2015 07:44 AM, Stefano Stabellini wrote: > > > On Mon, 19 Oct 2015, Gerd Hoffmann wrote: > > >> Hi, > > >> > > I'm trying to follow this discussion as best

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:25 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: On Mon, 19 Oct 2015 09:56:12 +0300 "Michael S. Tsirkin" wrote: On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: [...] diff --git a/include/hw/mem/nvdimm.h b/incl

[Qemu-devel] [RFC] target-arm: Add and use symbolic names for register banks

2015-10-19 Thread Soren Brinkmann
Add ARM_BANK_ #defines to index banked registers. Suggested-by: Peter Maydell Signed-off-by: Soren Brinkmann --- This change was suggested by Peter in the submission of "target-arm: Add support for SPSR_(ABT|UND|IRQ|FIQ)", which this patch depends on. I applied this to the banked_(spsr|r13|r14)

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:42 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: On 10/19/

Re: [Qemu-devel] [PATCH v2 6/9] target-i386: Handle I/O breakpoints

2015-10-19 Thread Eduardo Habkost
On Mon, Oct 19, 2015 at 07:46:51AM -1000, Richard Henderson wrote: > On 10/19/2015 07:30 AM, Eduardo Habkost wrote: > >>>+/* Notice when we should enable calls to bpt_io. */ > >>>+return (hw_breakpoint_enabled(env->dr[7], index) > >>>+? HF_IOBPT_MASK : 0); > >checkp

Re: [Qemu-devel] [PATCH 00/17] Framework for securely passing secrets to QEMU

2015-10-19 Thread Daniel P. Berrange
On Mon, Oct 19, 2015 at 06:13:24PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > > > It is obvious there there is a wide variety of functionality > > in QEMU that needs access to "secrets". This need will only > > grow over time. We need to stop h

Re: [Qemu-devel] [PATCH v2 6/9] target-i386: Handle I/O breakpoints

2015-10-19 Thread Richard Henderson
On 10/19/2015 07:30 AM, Eduardo Habkost wrote: >+/* Notice when we should enable calls to bpt_io. */ >+return (hw_breakpoint_enabled(env->dr[7], index) >+? HF_IOBPT_MASK : 0); checkpatch.pl error: ERROR: return is not a function, parentheses are not required

[Qemu-devel] [PATCH v3 8/9] target-i386: Ensure always-1 bits on DR6 can't be cleared

2015-10-19 Thread Eduardo Habkost
Bits 4-11 and 16-31 on DR6 are documented as always 1, so ensure they can't be cleared by software. Reviewed-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/bpt_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/bpt_helper.c b/target-i3

[Qemu-devel] [PATCH v3 7/9] target-i386: Check CR4[DE] for processing DR4/DR5

2015-10-19 Thread Eduardo Habkost
From: Richard Henderson Introduce helper_get_dr so that we don't have to put CR4[DE] into the scarce HFLAGS resource. At the same time, rename helper_movl_drN_T0 to helper_set_dr and set the helper flags. Signed-off-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/bpt_hel

Re: [Qemu-devel] [PATCH v3 3/9] target-i386: Ensure bit 10 on DR7 is never cleared

2015-10-19 Thread Richard Henderson
On 10/19/2015 07:40 AM, Eduardo Habkost wrote: Bit 10 of DR7 is documented as always set to 1, so ensure that's always the case. Signed-off-by: Eduardo Habkost --- Changes series v2 -> series v3: * Set bit on new_dr7, so that it can still pass the xor test for the enable bits optimization

[Qemu-devel] [PATCH v3 5/9] target-i386: Optimize setting dr[0-3]

2015-10-19 Thread Eduardo Habkost
From: Richard Henderson If the debug register is not enabled, we need do nothing besides update the register. Signed-off-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/bpt_helper.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/target-i38

[Qemu-devel] [PATCH v3 6/9] target-i386: Handle I/O breakpoints

2015-10-19 Thread Eduardo Habkost
Signed-off-by: Richard Henderson Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rebase on top of new version of "Re-introduce optimal breakpoint removal" Changes v2 -> v3: * Rebase on top of new version of "Ensure bit 10 on DR7 is never cleared" * Removed unnecessary parentheses from

  1   2   3   4   >