Re: [Qemu-devel] [RFC qemu PATCH] only writing out the last byte of MAC makes it have effect

2013-03-21 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Thu, Mar 21, 2013 at 02:44:50PM +0800, Amos Kong wrote: >> The lengcy guests don't have mac programming command, we don't know when >> it's safe to use MAC. This patch changed qemu to makes MAC change effect >> when the last byte of MAC is written to config space.

Re: [Qemu-devel] [PATCH 12/12] target-i386: implement CPU hot-add

2013-03-21 Thread Eric Blake
On 03/21/2013 08:28 AM, Igor Mammedov wrote: > ... via do_cpu_hot_add() hook called by cpu_set QMP command, > for x86 target. > > * add extra check that APIC ID is in allowed range > +if (x86_cpu_is_cpu_exist(qdev_get_machine(), &apic_id)) { > +error_setg(errp, "Unable to add CPU with

Re: [Qemu-devel] [PATCH 11/12] qmp: add cpu_set qmp command

2013-03-21 Thread Eric Blake
On 03/21/2013 08:28 AM, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > +++ b/qapi-schema.json > @@ -1385,6 +1385,15 @@ > { 'command': 'cpu', 'data': {'index': 'int'} } > > ## > +# @cpu_set > +# I already mentioned naming this cpu-set on your cover letter. Additionally: > +# Set

Re: [Qemu-devel] [PATCH v15 4/6] pvpanic: add document of pvpanic

2013-03-21 Thread Eric Blake
On 03/21/2013 02:35 AM, Hu Tao wrote: > Signed-off-by: Hu Tao > --- > docs/specs/pvpanic.txt | 25 + > 1 file changed, 25 insertions(+) > create mode 100644 docs/specs/pvpanic.txt Grammar nits: > > diff --git a/docs/specs/pvpanic.txt b/docs/specs/pvpanic.txt > new file

Re: [Qemu-devel] TCG broken in system mode (was TCG assertion with qemu-system-mipsel)

2013-03-21 Thread Yeongkyoon Lee
On 03/22/2013 07:11 AM, Aurélien Jarno wrote: On Thu, Mar 21, 2013 at 04:04:44PM +0900, Yeongkyoon Lee wrote: On 03/18/2013 07:27 AM, Aurélien Jarno wrote: On Wed, Mar 06, 2013 at 07:10:17AM +0100, Aurélien Jarno wrote: On Wed, Mar 06, 2013 at 11:05:15AM +0900, Yeongkyoon Lee wrote: On 03/05/

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip

2013-03-21 Thread li guang
在 2013-03-21四的 10:41 +,Peter Maydell写道: > On 21 March 2013 00:36, li guang wrote: > > 在 2013-03-20三的 10:50 +,Peter Maydell写道: > >> The devices should just implement appropriate signals/connections > >> if they have a means of talking to a power controller, and the > >> board model should w

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Jason Gunthorpe
On Thu, Mar 21, 2013 at 07:42:37PM +0200, Michael S. Tsirkin wrote: > It doesn't actually, and our app would sometimes write to these pages. > It simply does not care which version does the remote get in this case > since we track writes and resend later. Heh, somehow I thought you might say that

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Jason Gunthorpe
On Thu, Mar 21, 2013 at 08:16:33PM +0200, Michael S. Tsirkin wrote: > This is the one I find redundant. Since the write will be done by > the adaptor under direct control by the application, why does it > make sense to declare this beforehand? If you don't want to allow > local write access to me

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Jason Gunthorpe
On Thu, Mar 21, 2013 at 09:15:41PM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 21, 2013 at 12:41:35PM -0600, Jason Gunthorpe wrote: > > On Thu, Mar 21, 2013 at 08:16:33PM +0200, Michael S. Tsirkin wrote: > > > > > This is the one I find redundant. Since the write will be done by > > > the adapt

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Jason Gunthorpe
On Thu, Mar 21, 2013 at 11:39:47AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 21, 2013 at 02:13:38AM -0700, Roland Dreier wrote: > > On Thu, Mar 21, 2013 at 1:51 AM, Michael S. Tsirkin wrote: > > >> In that case, no, I don't see any reason for LOCAL_WRITE, since the > > >> only RDMA operations

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Jason Gunthorpe
On Thu, Mar 21, 2013 at 07:15:25PM +0200, Michael S. Tsirkin wrote: > No because application does this: > init page > > ... > > after a lot of time > > .. > > register > send > unregister > > so it can not be read only. mprotect(READONLY) register send unregister mprotect(WRITABLE) ? With

Re: [Qemu-devel] [PATCH 0/5] target-ppc: fix add-with-carry in narrow mode

2013-03-21 Thread Alexander Graf
On 21.03.2013, at 21:01, Richard Henderson wrote: > The first patch fixes the problem reported by agraf here: > > http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg03747.html > > The subsequent patches use the macro added in the first patch > to remove a bunch of conditional compilation.

Re: [Qemu-devel] [RFC ppc-next PATCH 6/6] kvm/openpic: in-kernel mpic support

2013-03-21 Thread Alexander Graf
On 21.03.2013, at 22:59, Scott Wood wrote: > On 03/21/2013 04:29:02 PM, Alexander Graf wrote: >> Am 21.03.2013 um 21:50 schrieb Scott Wood : >> > On 03/21/2013 03:41:19 AM, Alexander Graf wrote: >> >> Can't all the stuff above here just simply go into the qdev init function? >> > >> > Not if you

Re: [Qemu-devel] [SeaBIOS] [PATCH v15 2/2] patch dsdt to use passed-in pvpanic ioport

2013-03-21 Thread Kevin O'Connor
On Thu, Mar 21, 2013 at 05:08:34PM +0800, Hu Tao wrote: > Signed-off-by: Hu Tao I don't think it is a good idea to dynamically modify the DSDT. We've been using the SSDT for that. In any case, I think this would be a good candidate for merging after the ACPI stuff is moved into QEMU. -Kevin

Re: [Qemu-devel] [Qemu-ppc] [RFC ppc-next PATCH 3/6] memory: add memory_region_to_address()

2013-03-21 Thread Scott Wood
On 03/21/2013 06:51:57 AM, Alexander Graf wrote: On 21.03.2013, at 12:49, Alexander Graf wrote: > > On 21.03.2013, at 12:44, Peter Maydell wrote: > >> On 21 March 2013 11:38, Alexander Graf wrote: >>> >>> On 21.03.2013, at 12:32, Peter Maydell wrote: >>> On 21 March 2013 11:29, Alexander

Re: [Qemu-devel] TCG broken in system mode (was TCG assertion with qemu-system-mipsel)

2013-03-21 Thread Aurélien Jarno
On Thu, Mar 21, 2013 at 04:04:44PM +0900, Yeongkyoon Lee wrote: > On 03/18/2013 07:27 AM, Aurélien Jarno wrote: > >On Wed, Mar 06, 2013 at 07:10:17AM +0100, Aurélien Jarno wrote: > >>On Wed, Mar 06, 2013 at 11:05:15AM +0900, Yeongkyoon Lee wrote: > >>>On 03/05/2013 11:18 PM, Aurélien Jarno wrote: >

Re: [Qemu-devel] [PATCH v4 7/9] Extend test-visitor-serialization with ASN.1 visitor(s)

2013-03-21 Thread Stefan Berger
On 03/21/2013 05:59 PM, Eric Blake wrote: On 03/21/2013 12:29 PM, Stefan Berger wrote: +++ b/tests/test-visitor-serialization.c @@ -14,6 +14,7 @@ #include #include #include +#include Is this addition needed? I don't see any math functions added. Indeed. Removed. Stefan

Re: [Qemu-devel] [PATCH v4 9/9] ASN.1 specific test cases

2013-03-21 Thread Eric Blake
On 03/21/2013 12:29 PM, Stefan Berger wrote: > BER visitor tests give us some assurance that the BER visitor > code works, and also end up by extention helping out on our s/extention/extension/ > code coverage of the filesystem tests. > After the output visitor invocation the resuling buffer is

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-21 Thread Alon Levy
> > Alon Levy writes: > > > > >> Alon Levy writes: > > >> > > >> > Note that the handler is called chr_is_guest_connected and not > > >> > chr_is_fe_connected, consistent with other members of > > >> > CharDriverState. > > >> > > >> Sorry, I don't get it. > > >> > > >> There isn't a notion of

Re: [Qemu-devel] [RFC ppc-next PATCH 6/6] kvm/openpic: in-kernel mpic support

2013-03-21 Thread Scott Wood
On 03/21/2013 04:29:02 PM, Alexander Graf wrote: Am 21.03.2013 um 21:50 schrieb Scott Wood : > On 03/21/2013 03:41:19 AM, Alexander Graf wrote: >> Can't all the stuff above here just simply go into the qdev init function? > > Not if you want platform code to be able to fall back to a QEMU

Re: [Qemu-devel] [PATCH v4 7/9] Extend test-visitor-serialization with ASN.1 visitor(s)

2013-03-21 Thread Eric Blake
On 03/21/2013 12:29 PM, Stefan Berger wrote: > Add BER visitor hooks to test-visitor-serialization > > Cc: Michael Tsirkin > Cc: Stefan Berger > Signed-off-by: Joel Schopp > --- > +++ b/tests/test-visitor-serialization.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-21 Thread Alon Levy
> Alon Levy writes: > > >> Alon Levy writes: > >> > >> > Note that the handler is called chr_is_guest_connected and not > >> > chr_is_fe_connected, consistent with other members of > >> > CharDriverState. > >> > >> Sorry, I don't get it. > >> > >> There isn't a notion of "connected" for the f

Re: [Qemu-devel] [RFC ppc-next PATCH 6/6] kvm/openpic: in-kernel mpic support

2013-03-21 Thread Alexander Graf
Am 21.03.2013 um 21:50 schrieb Scott Wood : > On 03/21/2013 03:41:19 AM, Alexander Graf wrote: >> On 14.02.2013, at 07:32, Scott Wood wrote: >> > +DeviceState *kvm_openpic_create(BusState *bus, int model) >> > +{ >> > +KVMState *s = kvm_state; >> > +DeviceState *dev; >> > +struct kvm

Re: [Qemu-devel] [RFC ppc-next PATCH 6/6] kvm/openpic: in-kernel mpic support

2013-03-21 Thread Scott Wood
On 03/21/2013 03:41:19 AM, Alexander Graf wrote: On 14.02.2013, at 07:32, Scott Wood wrote: > +DeviceState *kvm_openpic_create(BusState *bus, int model) > +{ > +KVMState *s = kvm_state; > +DeviceState *dev; > +struct kvm_create_device cd = {0}; > +int ret; > + > +if (!kvm_ch

Re: [Qemu-devel] [PATCH 4/4] qjson: to_json() case QTYPE_QSTRING is buggy, rewrite

2013-03-21 Thread Laszlo Ersek
On 03/14/13 18:49, Markus Armbruster wrote: > Known bugs in to_json(): > My rewrite fixes them as follows: I'll try to review this sometime later. Patch review doesn't scale *at all*. I've spent hours on the first 3 patches. You should just be given pull req rights. I'd need 36 hour days. /me th

Re: [Qemu-devel] [PATCH] block: Add support for Secure Shell (ssh) block device.

2013-03-21 Thread Richard W.M. Jones
On Thu, Mar 21, 2013 at 08:35:29PM +0100, Stefan Hajnoczi wrote: > On Thu, Mar 21, 2013 at 2:38 PM, Richard W.M. Jones wrote: > > From: "Richard W.M. Jones" > > > > qemu-system-x86_64 -drive file=ssh://hostname/some/image > > > > QEMU will ssh into 'hostname' and open '/some/image' which is mad

Re: [Qemu-devel] [PATCH 3/4] check-qjson: Test noncharacters other than U+FFFE, U+FFFF in strings

2013-03-21 Thread Laszlo Ersek
On 03/14/13 18:49, Markus Armbruster wrote: > These are all broken, too. What are "these"? And how are they broken? And how does the patch fix them? > > A few test cases use noncharacters U+ and U+10. Risks testing > noncharacters some more instead of what they're supposed to test. Use

[Qemu-devel] [PATCH 4/5] target-ppc: Use NARROW_MODE macro for addresses

2013-03-21 Thread Richard Henderson
Removing conditional compilation in the process. Signed-off-by: Richard Henderson --- target-ppc/translate.c | 51 ++ 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index e2d657d..2bb

Re: [Qemu-devel] [PATCH 2/4] check-qjson: Fix up a few bogus comments

2013-03-21 Thread Laszlo Ersek
I don't understand what's going on here. On 03/14/13 18:49, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > tests/check-qjson.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/tests/check-qjson.c b/tests/check-qjson.c > index ec85a0c..852124a 10

[Qemu-devel] [PATCH 5/5] target-ppc: Use NARROW_MODE macro for tlbie

2013-03-21 Thread Richard Henderson
Removing conditional compilation in the process. Signed-off-by: Richard Henderson --- target-ppc/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 2bb28b8..af936cd 100644 --- a/target-ppc/translate.c +++ b

[Qemu-devel] [PATCH 1/5] target-ppc: Fix add and subf carry generation in narrow mode

2013-03-21 Thread Richard Henderson
The set of computations used in b5a73f8d8a57e940f9bbeb399a9e47897522ee9a are only valid if the current word size == target_long size. This failed to take ppc64 in 32-bit (narrow) mode into account. Add a NARROW_MODE macro to avoid conditional compilation. Signed-off-by: Richard Henderson --- t

[Qemu-devel] [PATCH 3/5] target-ppc: Use NARROW_MODE macro for comparisons

2013-03-21 Thread Richard Henderson
Removing conditional compilation in the process. Signed-off-by: Richard Henderson --- target-ppc/translate.c | 41 - 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 92b4f6c..e2d657d 1006

[Qemu-devel] [PATCH 2/5] target-ppc: Use NARROW_MODE macro for branches

2013-03-21 Thread Richard Henderson
Removing conditional compilation in the process. Signed-off-by: Richard Henderson --- target-ppc/translate.c | 62 +++--- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index ed6415c..92b

[Qemu-devel] [PATCH 0/5] target-ppc: fix add-with-carry in narrow mode

2013-03-21 Thread Richard Henderson
The first patch fixes the problem reported by agraf here: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg03747.html The subsequent patches use the macro added in the first patch to remove a bunch of conditional compilation. With this (or even just the first patch), I can boot Alex's t

[Qemu-devel] Large guest boot hangs the host.

2013-03-21 Thread Chegu Vinod
Hello, I have been noticing host hangs when trying to boot large guests (>=40Vcpus) with the current upstream qemu. Host is running 3.8.2 kernel. qemu is the latest one from qemu.git. Example qemu command line listed below... this used to work with a slightly older qemu (about 1.5 weeks ago

Re: [Qemu-devel] [PATCHv3 8/9] migration: do not search dirty pages in bulk stage

2013-03-21 Thread Peter Lieven
Am 21.03.2013 um 20:27 schrieb Eric Blake : > On 03/21/2013 09:57 AM, Peter Lieven wrote: >> avoid searching for dirty pages just increment the >> page offset. all pages are dirty anyway. >> >> Signed-off-by: Peter Lieven >> --- >> arch_init.c | 10 -- >> 1 file changed, 8 insertions(+

Re: [Qemu-devel] [PATCH] qemu-ga: use key-value store to avoid recycling fd handles after restart

2013-03-21 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 21 Mar 2013 11:13:13 -0500 > mdroth wrote: > >> > Looks like you guys have no *practical* problems to solve. Congrats! >> > Take a vacation! Please report back no later than 275 years from now, >> > to make sure this 64 bit fd counter overflow problem gets tak

Re: [Qemu-devel] [PATCHv3 7/9] migration: do not sent zero pages in bulk stage

2013-03-21 Thread Peter Lieven
Am 21.03.2013 um 20:26 schrieb Eric Blake : > On 03/21/2013 09:57 AM, Peter Lieven wrote: >> during bulk stage of ram migration if a page is a >> zero page do not send it at all. >> the memory at the destination reads as zero anyway. >> >> even if there is an madvise with QEMU_MADV_DONTNEED >> a

Re: [Qemu-devel] [PATCH v4 8/8] coalesce adjacent iovecs

2013-03-21 Thread Eric Blake
On 03/21/2013 12:34 PM, Orit Wasserman wrote: > This way we send one big buffer instead of many small ones > > Signed-off-by: Orit Wasserman > --- > savevm.c | 19 +++ > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/savevm.c b/savevm.c > index b024354..9e8dde

Re: [Qemu-devel] [PATCH v4 6/8] Add qemu_put_buffer_async

2013-03-21 Thread Eric Blake
On 03/21/2013 12:34 PM, Orit Wasserman wrote: > This allow us to add a buffer to the iovec to send without copying it s/allow/allows/ > into the static buffer, the buffer will be send later when qemu_fflush is > called. s/send/sent/ > > Signed-off-by: Orit Wasserman > --- > include/migratio

Re: [Qemu-devel] [PATCH] block: Add support for Secure Shell (ssh) block device.

2013-03-21 Thread Stefan Hajnoczi
On Thu, Mar 21, 2013 at 2:38 PM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > qemu-system-x86_64 -drive file=ssh://hostname/some/image > > QEMU will ssh into 'hostname' and open '/some/image' which is made > available as a standard block device. > > You can specify a username (ssh

Re: [Qemu-devel] [PATCH 1/4] unicode: New mod_utf8_codepoint()

2013-03-21 Thread Laszlo Ersek
I've (re-)read the UTF-8 article in wikipedia now... comments below On 03/14/13 18:49, Markus Armbruster wrote: > diff --git a/util/unicode.c b/util/unicode.c > new file mode 100644 > index 000..954bcf7 > +/** > + * mod_utf8_codepoint: > + * @s: string encoded in modified UTF-8 > + * @n: max

Re: [Qemu-devel] [PATCH v4 2/8] Add socket_writev_buffer function

2013-03-21 Thread Eric Blake
On 03/21/2013 12:34 PM, Orit Wasserman wrote: > Signed-off-by: Orit Wasserman > --- > savevm.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/savevm.c b/savevm.c > index 35c8d1e..6608b6e 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -39,6 +39,7 @@ > #include "qmp-comm

Re: [Qemu-devel] [PATCHv3 9/9] migration: use XBZRLE only after bulk stage

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > at the beginning of migration all pages are marked dirty and > in the first round a bulk migration of all pages is performed. > > currently all these pages are copied to the page cache regardless > if there are frequently updated or not. this doesn't m

Re: [Qemu-devel] [PATCH] block: Add support for Secure Shell (ssh) block device.

2013-03-21 Thread Stefan Hajnoczi
On Thu, Mar 21, 2013 at 4:39 PM, Richard W.M. Jones wrote: > On Thu, Mar 21, 2013 at 04:26:23PM +0100, Stefan Hajnoczi wrote: >> On Thu, Mar 21, 2013 at 01:38:58PM +, Richard W.M. Jones wrote: >> > From: "Richard W.M. Jones" >> > >> > qemu-system-x86_64 -drive file=ssh://hostname/some/image

Re: [Qemu-devel] [PATCHv3 8/9] migration: do not search dirty pages in bulk stage

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > avoid searching for dirty pages just increment the > page offset. all pages are dirty anyway. > > Signed-off-by: Peter Lieven > --- > arch_init.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Prior review still stands. -- Er

Re: [Qemu-devel] [PATCHv3 6/9] migration: add an indicator for bulk state of ram migration

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > the first round of ram transfer is special since all pages > are dirty and thus all memory pages are transferred to > the target. this patch adds a boolean variable to track > this stage. > > Signed-off-by: Peter Lieven > --- > arch_init.c |3 +++

Re: [Qemu-devel] [PATCHv3 7/9] migration: do not sent zero pages in bulk stage

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > during bulk stage of ram migration if a page is a > zero page do not send it at all. > the memory at the destination reads as zero anyway. > > even if there is an madvise with QEMU_MADV_DONTNEED > at the target upon receipt of a zero page I have observ

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-21 Thread Anthony Liguori
Alon Levy writes: >> Alon Levy writes: >> >> > Note that the handler is called chr_is_guest_connected and not >> > chr_is_fe_connected, consistent with other members of >> > CharDriverState. >> >> Sorry, I don't get it. >> >> There isn't a notion of "connected" for the front-ends in the char

Re: [Qemu-devel] [PATCHv3 5/9] migration: search for zero instead of dup pages

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > virtually all dup pages are zero pages. remove > the special is_dup_page() function and use the > optimized buffer_find_nonzero_offset() function > instead. > > here buffer_find_nonzero_offset() is used directly > to avoid the unnecssary additional che

Re: [Qemu-devel] [PATCHv3 4/9] bitops: use vector algorithm to optimize find_next_bit()

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > this patch adds the usage of buffer_find_nonzero_offset() > to skip large areas of zeroes. > > compared to loop unrolling presented in an earlier > patch this adds another 50% performance benefit for > skipping large areas of zeroes. loop unrolling alo

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 12:41:35PM -0600, Jason Gunthorpe wrote: > On Thu, Mar 21, 2013 at 08:16:33PM +0200, Michael S. Tsirkin wrote: > > > This is the one I find redundant. Since the write will be done by > > the adaptor under direct control by the application, why does it > > make sense to decl

[Qemu-devel] [PATCH v4 7/9] Extend test-visitor-serialization with ASN.1 visitor(s)

2013-03-21 Thread Stefan Berger
Add BER visitor hooks to test-visitor-serialization Cc: Michael Tsirkin Cc: Stefan Berger Signed-off-by: Joel Schopp --- tests/Makefile | 2 +- tests/test-visitor-serialization.c | 73 ++ 2 files changed, 74 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCHv3 2/9] cutils: add a function to find non-zero content in a buffer

2013-03-21 Thread Peter Lieven
Am 21.03.2013 um 19:12 schrieb Eric Blake : > On 03/21/2013 09:57 AM, Peter Lieven wrote: >> this adds buffer_find_nonzero_offset() which is a SSE2/Altives > > s/Altives/Altivec/ > >> optimized function that searches for non-zero content in a >> buffer. >> >> due to the optimizations used in t

Re: [Qemu-devel] [PATCH v2] Add option to mlock qemu and guest memory

2013-03-21 Thread Satoru Moriya
Hi Jan, Thank you for reviewing. On 03/21/2013 05:08 AM, Jan Kiszka wrote: > On 2013-02-14 21:21, Satoru Moriya wrote: >> @@ -31,6 +31,7 @@ void os_set_proc_name(const char *s); void >> os_setup_signal_handling(void); void os_daemonize(void); void >> os_setup_post(void); >> +void os_mlock(vo

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-21 Thread Alon Levy
> Alon Levy writes: > > > Note that the handler is called chr_is_guest_connected and not > > chr_is_fe_connected, consistent with other members of > > CharDriverState. > > Sorry, I don't get it. > > There isn't a notion of "connected" for the front-ends in the char > layer. The closest thing i

Re: [Qemu-devel] [PATCH] ifname=xxx for -netdev bridge

2013-03-21 Thread Eric Blake
On 03/21/2013 12:05 PM, Alexandre Kandalintsev wrote: > Hi! > > > Here is the patch that allows us to specify the name of tap interface > when -netdev bridge is used. It's like -netdev tap,ifname=xxx, but for > bridges. > > +++ b/qapi-schema.json > @@ -2676,6 +2676,7 @@ > { 'type': 'NetdevBrid

[Qemu-devel] [PATCH v4 6/9] ASN.1 input visitor

2013-03-21 Thread Stefan Berger
Implement an input visitor for ASN.1 BER and CER encoding. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/qapi/ber-input-visitor.h | 30 + qapi/Makefile.objs |2 +- qapi/ber-input-visitor.c | 1141

[Qemu-devel] [PATCH v4 5/9] ASN.1 output visitor

2013-03-21 Thread Stefan Berger
Implement an output visitor for ASN.1 BER and CER encoding. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- configure | 2 +- include/qapi/ber-output-visitor.h | 28 ++ include/qapi/ber.h| 107 ++ include/qemu-commo

[Qemu-devel] [PATCH v4 9/9] ASN.1 specific test cases

2013-03-21 Thread Stefan Berger
BER visitor tests give us some assurance that the BER visitor code works, and also end up by extention helping out on our code coverage of the filesystem tests. After the output visitor invocation the resuling buffer is compared against a known byte stream -- this will lock the implementation into

[Qemu-devel] [PATCH v4 3/9] QEMUSizedBuffer

2013-03-21 Thread Stefan Berger
Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers that can be written to or read from. Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/migration/qemu-file.h | 13 ++ include/qemu-common.h | 12 ++ util/qemu-fil

Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful

2013-03-21 Thread Peter Maydell
On 21 March 2013 17:57, Petar Jovanovic wrote: > From: Petar Jovanovic > > do_semop() is called from two places, and one of these fails to convert > return error to target errno when semop fails. This patch changes the > function to always return target errno in case of an unsuccessful call. > >

Re: [Qemu-devel] [PATCH] qemu-ga: use key-value store to avoid recycling fd handles after restart

2013-03-21 Thread mdroth
On Thu, Mar 21, 2013 at 02:24:56PM -0400, Luiz Capitulino wrote: > On Thu, 21 Mar 2013 11:13:13 -0500 > mdroth wrote: > > > > Looks like you guys have no *practical* problems to solve. Congrats! > > > Take a vacation! Please report back no later than 275 years from now, > > > to make sure this

Re: [Qemu-devel] [PATCH v3 8/9] Use qemu_put_buffer_no_copy for guest memory pages

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 08:08:58PM +0200, Orit Wasserman wrote: > On 03/21/2013 07:37 PM, Juan Quintela wrote: > > Orit Wasserman wrote: > >> This will remove an unneeded copy of guest memory pages. > >> For the page header and device state we still copy the data to the > >> static buffer the othe

[Qemu-devel] [PATCH v4 8/8] coalesce adjacent iovecs

2013-03-21 Thread Orit Wasserman
This way we send one big buffer instead of many small ones Signed-off-by: Orit Wasserman --- savevm.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/savevm.c b/savevm.c index b024354..9e8ddee 100644 --- a/savevm.c +++ b/savevm.c @@ -622,6 +622,18 @@ int

[Qemu-devel] [PATCH v4 6/8] Add qemu_put_buffer_async

2013-03-21 Thread Orit Wasserman
This allow us to add a buffer to the iovec to send without copying it into the static buffer, the buffer will be send later when qemu_fflush is called. Signed-off-by: Orit Wasserman --- include/migration/qemu-file.h | 5 + savevm.c | 36 +++-

[Qemu-devel] [PATCH v4 4/8] Store the data to send also in iovec

2013-03-21 Thread Orit Wasserman
All data is still copied into the static buffer. Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- savevm.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index bd60169..fb20f13 100644 --- a/savevm.c +++ b/savevm.c @@ -114,6 +11

[Qemu-devel] [PATCH v4 5/8] Use writev ops if available

2013-03-21 Thread Orit Wasserman
Update qemu_fflush and stdio_close to use writev ops if they are available Use the buffers stored in the iovec. Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- savevm.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/savevm.c b/sa

[Qemu-devel] [PATCH v4 3/8] Update bytes_xfer in qemu_put_byte

2013-03-21 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- savevm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/savevm.c b/savevm.c index 6608b6e..bd60169 100644 --- a/savevm.c +++ b/savevm.c @@ -648,6 +648,8 @@ void qemu_put_byte(QEMUFile *f, int v) f->buf[f->buf_index++] = v

[Qemu-devel] [PATCH v4 7/8] Use qemu_put_buffer_async for guest memory pages

2013-03-21 Thread Orit Wasserman
This will remove an unneeded copy of guest memory pages. For the page header and device state we still copy the data to the static buffer the other option is to allocate the memory on demand which is more expensive. Signed-off-by: Orit Wasserman --- arch_init.c | 2 +- 1 file changed, 1 insertio

[Qemu-devel] [PATCH v4 2/8] Add socket_writev_buffer function

2013-03-21 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- savevm.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/savevm.c b/savevm.c index 35c8d1e..6608b6e 100644 --- a/savevm.c +++ b/savevm.c @@ -39,6 +39,7 @@ #include "qmp-commands.h" #include "trace.h" #include "qemu/bitops.h" +#include "qem

[Qemu-devel] [PATCH v4 1/8] Add QemuFileWritevBuffer QemuFileOps

2013-03-21 Thread Orit Wasserman
This will allow us to write an iovec Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- include/migration/qemu-file.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h index df81261..8d3da9b 100644 --- a/include/mi

[Qemu-devel] [PATCH v4 0/8] Migration: Remove copying of guest ram pages

2013-03-21 Thread Orit Wasserman
In migration all data is copied to a static buffer in QEMUFile, this hurts our network bandwidth and CPU usage especially with large guests. We switched to iovec for storing different buffers to send (even a byte field is considered as a buffer) and use writev to send the iovec. writev was chosen (

Re: [Qemu-devel] [PATCH v3 9/9] coalesce adjacent iovecs

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 07:22:01PM +0100, Juan Quintela wrote: > "Michael S. Tsirkin" wrote: > > >> > >> > >> > >> > >> > >> > >> > >> We can optimize at some pount to write a bigger/different header and > >> sent a bunch of pages together, but just now we don't have that code. > >> > >>

[Qemu-devel] [PATCH v4 8/9] Update MAINTAINERS

2013-03-21 Thread Stefan Berger
Since I'm throwing all this code out there I'm also signing up to maintain it. Send me your bug reports. Cc: Michael Tsirkin Cc: Stefan Berger Signed-off-by: Joel Schopp --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0ca7e1d..3e32ecb

[Qemu-devel] [PATCH v4 1/9] Move some contents of savevm.c to qemu-file.c

2013-03-21 Thread Stefan Berger
This patch reorganizes qemu file operations to be in their own source file instead of being lumped in savevm.c. Besides being more logical for maintenance it also makes it easier for future users of the file functions to add tests. Cc: pbonz...@redhat.com Cc: Michael Tsirkin Signed-off-by: Stefa

[Qemu-devel] [PATCH v4 4/9] QAPI: add type_sized_buffer

2013-03-21 Thread Stefan Berger
Add a sized buffer interface to qapi for serializing and deserializing of u8[], u16[], u32[] and u64[] with proper handling of endianess. Cc: Michael Roth Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/qapi/visitor-impl.h | 3 +++ include/qapi/visitor.

[Qemu-devel] [PATCH v4 2/9] 3 new file wrappers

2013-03-21 Thread Stefan Berger
Add 3 very short file wrapper functions to make code that follows more readable. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/migration/qemu-file.h | 3 +++ util/qemu-file.c | 30 ++ 2 files changed, 33 insert

[Qemu-devel] [PATCH v4 0/9] Subject: Implement and test ASN.1 BER visitors

2013-03-21 Thread Stefan Berger
This patch series implements ASN.1 BER visitors for encoding and decoding of data into byte streams. Stefan Berger (9): Move some contents of savevm.c to qemu-file.c 3 new file wrappers QEMUSizedBuffer QAPI: add type_sized_buffer ASN.1 output visitor ASN.1 input visitor Extend test-v

Re: [Qemu-devel] [PATCH v3 8/9] Use qemu_put_buffer_no_copy for guest memory pages

2013-03-21 Thread Orit Wasserman
On 03/21/2013 07:37 PM, Juan Quintela wrote: > Orit Wasserman wrote: >> This will remove an unneeded copy of guest memory pages. >> For the page header and device state we still copy the data to the >> static buffer the other option is to allocate the memory on demand >> which is more expensive. >

Re: [Qemu-devel] [PATCH 22/23] gtk: show a window for each graphical QemuConsole

2013-03-21 Thread Anthony Liguori
Gerd Hoffmann writes: > Hi, > > If so, we're going to need to model what the hardware actually > does, which is that there's a single connection on the back > of the box for a monitor, and it's guest software controllable > which of the two display devices is routed to the conne

Re: [Qemu-devel] [PATCH] qemu-ga: use key-value store to avoid recycling fd handles after restart

2013-03-21 Thread Luiz Capitulino
On Thu, 21 Mar 2013 11:13:13 -0500 mdroth wrote: > > Looks like you guys have no *practical* problems to solve. Congrats! > > Take a vacation! Please report back no later than 275 years from now, > > to make sure this 64 bit fd counter overflow problem gets taken care of > > in time. ;-P > >

Re: [Qemu-devel] [PATCH v3 9/9] coalesce adjacent iovecs

2013-03-21 Thread Juan Quintela
"Michael S. Tsirkin" wrote: >> >> >> >> >> >> >> >> We can optimize at some pount to write a bigger/different header and >> sent a bunch of pages together, but just now we don't have that code. >> >> Later, Juan. > > Sending the page can do vmsplice, can't it? > Multipage is likely a good

Re: [Qemu-devel] [PATCH 1/2] char: add qemu_chr_be_is_fe_connected

2013-03-21 Thread Anthony Liguori
Alon Levy writes: > Note that the handler is called chr_is_guest_connected and not > chr_is_fe_connected, consistent with other members of CharDriverState. Sorry, I don't get it. There isn't a notion of "connected" for the front-ends in the char layer. The closest thing is whether add_handlers

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 11:11:15AM -0600, Jason Gunthorpe wrote: > On Thu, Mar 21, 2013 at 11:39:47AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 21, 2013 at 02:13:38AM -0700, Roland Dreier wrote: > > > On Thu, Mar 21, 2013 at 1:51 AM, Michael S. Tsirkin > > > wrote: > > > >> In that case, n

Re: [Qemu-devel] [PATCHv3 3/9] buffer_is_zero: use vector optimizations if possible

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > performance gain on SSE2 is approx. 20-25%. altivec > is not tested. performance for unsigned long arithmetic > is unchanged. > > Signed-off-by: Peter Lieven > --- > util/cutils.c |5 + > 1 file changed, 5 insertions(+) > > diff --git a/util

Re: [Qemu-devel] [PATCHv3 2/9] cutils: add a function to find non-zero content in a buffer

2013-03-21 Thread Eric Blake
On 03/21/2013 09:57 AM, Peter Lieven wrote: > this adds buffer_find_nonzero_offset() which is a SSE2/Altives s/Altives/Altivec/ > optimized function that searches for non-zero content in a > buffer. > > due to the optimizations used in the function there are restrictions > on buffer address and

[Qemu-devel] [PATCH] ifname=xxx for -netdev bridge

2013-03-21 Thread Alexandre Kandalintsev
Hi! Here is the patch that allows us to specify the name of tap interface when -netdev bridge is used. It's like -netdev tap,ifname=xxx, but for bridges. ** Motivation ** We've got zillions of VMs and would like to see meaningful names of tap interfaces. This is really useful for for, e.g., sy

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 11:57:32AM -0600, Jason Gunthorpe wrote: > On Thu, Mar 21, 2013 at 07:42:37PM +0200, Michael S. Tsirkin wrote: > > > It doesn't actually, and our app would sometimes write to these pages. > > It simply does not care which version does the remote get in this case > > since w

[Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful

2013-03-21 Thread Petar Jovanovic
From: Petar Jovanovic do_semop() is called from two places, and one of these fails to convert return error to target errno when semop fails. This patch changes the function to always return target errno in case of an unsuccessful call. Signed-off-by: Petar Jovanovic --- linux-user/syscall.c |

Re: [Qemu-devel] [PATCH] rdma: don't make pages writeable if not requiested

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 11:21:50AM -0600, Jason Gunthorpe wrote: > On Thu, Mar 21, 2013 at 07:15:25PM +0200, Michael S. Tsirkin wrote: > > > No because application does this: > > init page > > > > ... > > > > after a lot of time > > > > .. > > > > register > > send > > unregister > > > > so i

Re: [Qemu-devel] [PATCH v3 9/9] coalesce adjacent iovecs

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 06:44:14PM +0100, Juan Quintela wrote: > "Michael S. Tsirkin" wrote: > > On Thu, Mar 21, 2013 at 06:27:42PM +0200, Orit Wasserman wrote: > >> On 03/21/2013 06:16 PM, Michael S. Tsirkin wrote: > >> > On Thu, Mar 21, 2013 at 06:05:40PM +0200, Orit Wasserman wrote: > >> >> Thi

Re: [Qemu-devel] [PATCH v3 9/9] coalesce adjacent iovecs

2013-03-21 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > On Thu, Mar 21, 2013 at 06:27:42PM +0200, Orit Wasserman wrote: >> On 03/21/2013 06:16 PM, Michael S. Tsirkin wrote: >> > On Thu, Mar 21, 2013 at 06:05:40PM +0200, Orit Wasserman wrote: >> >> This way we send one big buffer instead of many small ones >> >> >> >> Signe

Re: [Qemu-devel] [PATCH v3 0/9] Migration: Remove copying of guest ram pages

2013-03-21 Thread Juan Quintela
Orit Wasserman wrote: > In migration all data is copied to a static buffer in QEMUFile, > this hurts our network bandwidth and CPU usage especially with large guests. > We switched to iovec for storing different buffers to send (even a byte field > is > considered as a buffer) and use writev to s

Re: [Qemu-devel] [PATCH v3 9/9] coalesce adjacent iovecs

2013-03-21 Thread Juan Quintela
Orit Wasserman wrote: > This way we send one big buffer instead of many small ones > > Signed-off-by: Orit Wasserman > --- > savevm.c | 21 + > 1 file changed, 17 insertions(+), 4 deletions(-) > > diff --git a/savevm.c b/savevm.c > index 50e8fb2..13a533b 100644 > --- a/savevm

Re: [Qemu-devel] [PATCH v3 3/9] Update bytes_xfer in qemu_put_byte

2013-03-21 Thread Orit Wasserman
On 03/21/2013 07:38 PM, Eric Blake wrote: > On 03/21/2013 10:05 AM, Orit Wasserman wrote: >> Signed-off-by: Orit Wasserman >> --- >> savevm.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/savevm.c b/savevm.c >> index baa45ae..686c8c8 100644 >> --- a/savevm.c >> +++ b/savevm.c >> @

Re: [Qemu-devel] [PATCH v3 3/9] Update bytes_xfer in qemu_put_byte

2013-03-21 Thread Eric Blake
On 03/21/2013 10:05 AM, Orit Wasserman wrote: > Signed-off-by: Orit Wasserman > --- > savevm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/savevm.c b/savevm.c > index baa45ae..686c8c8 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -647,6 +647,8 @@ void qemu_put_byte(QEMUFile *f, in

Re: [Qemu-devel] [PATCH v3 7/9] Add qemu_put_buffer_no_copy

2013-03-21 Thread Orit Wasserman
On 03/21/2013 07:34 PM, Juan Quintela wrote: > Orit Wasserman wrote: >> This allow us to add a buffer to the iovec to send without copying it >> into the static buffer. >> >> Signed-off-by: Orit Wasserman >> --- >> include/migration/qemu-file.h | 5 + >> savevm.c | 37 +

Re: [Qemu-devel] [PATCH v3 8/9] Use qemu_put_buffer_no_copy for guest memory pages

2013-03-21 Thread Juan Quintela
Orit Wasserman wrote: > This will remove an unneeded copy of guest memory pages. > For the page header and device state we still copy the data to the > static buffer the other option is to allocate the memory on demand > which is more expensive. > > Signed-off-by: Orit Wasserman > --- > arch_ini

Re: [Qemu-devel] [PATCH v3 9/9] coalesce adjacent iovecs

2013-03-21 Thread Orit Wasserman
On 03/21/2013 06:29 PM, Michael S. Tsirkin wrote: > On Thu, Mar 21, 2013 at 06:27:42PM +0200, Orit Wasserman wrote: >> On 03/21/2013 06:16 PM, Michael S. Tsirkin wrote: >>> On Thu, Mar 21, 2013 at 06:05:40PM +0200, Orit Wasserman wrote: This way we send one big buffer instead of many small one

  1   2   3   4   >