Re: [Qemu-devel] [PATCH 0/1] A couple of problems with BlockDriverState's children list

2015-07-22 Thread Markus Armbruster
Alberto Garcia writes: > I've been debugging a couple of problems related to the recently > merged bdrv_reopen() overhaul code. > > 1. bs->children is not updated correctly > > The problem is described in this e-mail: > >https://lists.gnu.org/archive/h

Re: [Qemu-devel] [PATCH v7 29/42] Postcopy end in migration_thread

2015-07-22 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:42], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The end of migration in postcopy is a bit different since some of > the things normally done at the end of migration have already been > done on the transition to postcopy. > > The end of mi

[Qemu-devel] [RFC PATCH 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-07-22 Thread Fam Zheng
So that external events are not processed in nested event loops. Signed-off-by: Fam Zheng --- block/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 5f5e575..c98fa92 100644 --- a/block/io.c +++ b/block/io.c @@ -2611,5 +2611,6 @@ void bdrv_f

[Qemu-devel] [RFC PATCH 08/11] dataplane: Mark host notifiers' client type as "dataplane"

2015-07-22 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 4 ++-- hw/scsi/virtio-scsi-dataplane.c | 16 include/block/aio.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c

[Qemu-devel] [RFC PATCH 04/11] aio-win32: Implement aio_poll_clients

2015-07-22 Thread Fam Zheng
This is the counterpart of for windows. Signed-off-by: Fam Zheng --- aio-win32.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index f5ecf57..c925085 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -149,7 +149,7 @@

[Qemu-devel] [RFC PATCH 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-22 Thread Fam Zheng
Most existing nested aio_poll()'s in block layer are inconsiderate of dispatching potential new r/w requests from ioeventfds and nbd exports, which might result in responsiveness issues (e.g. bdrv_drain_all will not return when new requests keep coming), or even wrong semantics (e.g. qmp_transactio

[Qemu-devel] [RFC PATCH 02/11] aio: Save type to AioHandler

2015-07-22 Thread Fam Zheng
So it can be used by aio_poll later. Signed-off-by: Fam Zheng --- aio-posix.c | 2 ++ aio-win32.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/aio-posix.c b/aio-posix.c index 56f2bce..d25fcfc 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -25,6 +25,7 @@ struct AioHandler IOHandler

[Qemu-devel] [RFC PATCH 01/11] aio: Introduce "type" in aio_set_fd_handler and aio_set_event_notifier

2015-07-22 Thread Fam Zheng
The parameter is added but not used. The callers are converted with following coccinelle semantic patch: @@ expression E1, E2, E3, E4, E5; @@ ( -aio_set_event_notifier(E1, E2, E3) +aio_set_event_notifier(E1, E2, AIO_CLIENT_UNSPECIFIED, E3) | -aio_set_fd_handler(E1,

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.4.0-rc2 is now available

2015-07-22 Thread Vasiliy Tolstov
2015-07-23 1:33 GMT+03:00 Michael Roth : > On behalf of the QEMU Team, I'd like to announce the availability of the > third release candidate for the QEMU 2.4 release. This release is meant > for testing purposes and should not be used in a production environment. > > http://wiki.qemu.org/download

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Jason Wang
On 07/22/2015 06:55 PM, Yang Hongyang wrote: > This patch add a net filter between network backend and NIC devices. > All packets will pass by this filter. > TODO: > multiqueue support. > plugin support. > > +--+ +-+ > +--+ |filter|

Re: [Qemu-devel] [PATCH v7 28/42] Postcopy: Postcopy startup in migration thread

2015-07-22 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:41], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Rework the migration thread to setup and start postcopy. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Amit

Re: [Qemu-devel] [PATCH v7 28/42] Postcopy: Postcopy startup in migration thread

2015-07-22 Thread Amit Shah
On (Mon) 13 Jul 2015 [18:56:55], Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > > +/* > > > + * send rest of state - note things that are doing postcopy > > > + * will notice we're in POSTCOPY_ACTIVE and not actually > > > + * wrap their state up h

Re: [Qemu-devel] [PATCH for-2.4] vl: Fix compiler warning for builds without VLC

2015-07-22 Thread Paolo Bonzini
On 23/07/2015 03:43, Wen Congyang wrote: > On 07/23/2015 01:53 AM, Stefan Weil wrote: >> > This regression was caused by commit 70b94331. > vnc, not vlc in the title. > > Reviewed-by: Wen Congyang > Thanks, queued for 2.4. Paolo

Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread Paolo Bonzini
On 23/07/2015 06:22, Amit Shah wrote: > On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote: >> > On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gong...@huawei.com wrote: >>> > > From: Gonglei >>> > > >>> > > If vnc's password is configured, it will leak memory >>> > > which cipher variab

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections

2015-07-22 Thread Paolo Bonzini
On 23/07/2015 04:56, Wen Congyang wrote: >> > Otherwise, grace periods are detected too early! > We always use qemu_thread_create() in qemu. So I think we can do it like this: > wrapped_fn() > { > rcu_register_thread(); > call thread_fn() here > rcu_unregister_thread(); > } > > So we

Re: [Qemu-devel] [PATCH v7 27/42] postcopy: ram_enable_notify to switch on userfault

2015-07-22 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:40], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Mark the area of RAM as 'userfault' > Start up a fault-thread to handle any userfaults we might receive > from it (to be filled in later) > > Signed-off-by: Dr. David Alan Gilbert > Reviewe

Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread Amit Shah
On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote: > On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > If vnc's password is configured, it will leak memory > > which cipher variable pointed on every vnc connection. > > > > Cc: Daniel P. Be

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections

2015-07-22 Thread Wen Congyang
On 07/22/2015 10:18 PM, Paolo Bonzini wrote: > Otherwise, grace periods are detected too early! We always use qemu_thread_create() in qemu. So I think we can do it like this: wrapped_fn() { rcu_register_thread(); call thread_fn() here rcu_unregister_thread(); } So we will never forget

[Qemu-devel] [PATCH RFC 6/6] vhost-user: document migration log

2015-07-22 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 40 1 file changed, 40 insertions(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 0062baa..c2d2e2a 100644 --- a/docs/specs/vhost-user.txt +++ b/docs/specs/vhost-u

Re: [Qemu-devel] [PATCH for-2.4] vl: Fix compiler warning for builds without VLC

2015-07-22 Thread Wen Congyang
On 07/23/2015 01:53 AM, Stefan Weil wrote: > This regression was caused by commit 70b94331. vnc, not vlc in the title. Reviewed-by: Wen Congyang > > CCvl.o > vl.c: In function ‘select_display’: > vl.c:2064:12: error: unused variable ‘err’ [-Werror=unused-variable] > Error *err = NUL

[Qemu-devel] [PATCH RFC 5/6] vhost-user: send log shm fd along with log_base

2015-07-22 Thread Marc-André Lureau
Send the shm for the dirty pages logging if the backend support VHOST_USER_PROTOCOL_F_LOG_SHMFD. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 49

[Qemu-devel] [PATCH RFC 4/6] vhost: alloc shareable log

2015-07-22 Thread Marc-André Lureau
If the backend is of type VHOST_BACKEND_TYPE_USER, allocate shareable memory. Note: vhost_log_get() can use a global "vhost_log" that can be shared by several vhost devices. We may want instead a common shareable log and a common non-shareable one. Signed-off-by: Marc-André Lureau --- hw/virtio

[Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-22 Thread Marc-André Lureau
Implement memfd_create() fallback if not available in system libc. memfd_create() is still not included in glibc today, atlhough it's been available since Linux 3.17 in Oct 2014. memfd has numerous advantages over traditional shm/mmap for ipc memory sharing with fd handler, which we are going to m

[Qemu-devel] [PATCH RFC 1/6] configure: probe for memfd

2015-07-22 Thread Marc-André Lureau
Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index cc0338d..9a401d4 100755 --- a/configure +++ b/configure @@ -3390,6 +3390,22 @@ if compile_prog "" ""

[Qemu-devel] [PATCH RFC 3/6] osdep: add memfd helpers

2015-07-22 Thread Marc-André Lureau
Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal a memfd, and implements an open/unlink/mmap fallback for system that do not support memfd. Signed-off-by: Marc-André Lureau --- include/qemu/osdep.h | 5 + util/oslib-posix.c | 62 +++

[Qemu-devel] [PATCH RFC 0/6] vhost-user: add migration log support

2015-07-22 Thread Marc-André Lureau
Hi, The following series implement shareable log for vhost-user to support memory tracking during live migration. On qemu-side, the solution is fairly straightfoward since vhost already supports the dirty log, only vhost-user couldn't access the log memory until then. The series is based on top o

Re: [Qemu-devel] [PATCH] scsi: fix buffer overflow in scsi_req_parse_cdb (CVE-2015-5158)

2015-07-22 Thread Fam Zheng
On Wed, 07/22 16:18, Paolo Bonzini wrote: > This is a guest-triggerable buffer overflow present in QEMU 2.2.0 > and newer. scsi_cdb_length returns -1 as an error value, but the > caller does not check it. > > Luckily, the massive overflow means that QEMU will just SIGSEGV, > making the impact muc

[Qemu-devel] just another question

2015-07-22 Thread ty narmz
if any of you guys know how to make processors, you should totally start making them and make tutorials on how to make processors and make them understand qemuand have qemu installed on them so we can emulate macintosh computers my thoughts on it were to make wireless computer chips. wireless

Re: [Qemu-devel] [PATCH RFC v2 28/47] qapi-commands: Convert to QAPISchemaVisitor

2015-07-22 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Output unchanged except for white-space. Indeed, and the diffstat shows it was only one blank line: qga-qmp-marshal.c |1 + 1 file changed, 1 insertion(+) MUCH friendlier to review :) > > Signed-off-by: Markus Armbruster > --- > scripts

Re: [Qemu-devel] [PATCH RFC v2 29/47] qapi: Replace dirty is_c_ptr() by method c_null()

2015-07-22 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > is_c_ptr() looks whether the end of the C text for the type looks like > a pointer. Works, but is fragile. > > We now have a better tool: use QAPISchemaType method c_null(). The > initializers for non-pointers become prettier: 0, false or the >

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-22 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Fixes flat unions to visit the base's base members (the previous > commit merely added them to the struct). Same test case. > > Patch's effect on visit_type_UserDefFlatUnion(): > > static void visit_type_UserDefFlatUnion_fields(Visitor *m,

Re: [Qemu-devel] Self-modifying test case for mttcg

2015-07-22 Thread Alexander Spyridakis
Hello Andrew, First, thanks for the comments. On 22 July 2015 at 14:38, Andrew Jones wrote: > I took a quick look at this and see issues with the test code. First, > you're spinning on a stack variable with this, > > /* Wait for our turn */ > while(next_cpu != cpu); > > next_cpu needs to

Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-07-22 Thread Eric Blake
On 07/22/2015 03:21 PM, Eric Blake wrote: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Fixes flat unions to get the base's base members. Test case is from >> commit 2fc0043, in qapi-schema-test.json: >> > > Okay, I see a cause for part of my confusion. > >> > ...and wrote the definit

[Qemu-devel] [ANNOUNCE] QEMU 2.4.0-rc2 is now available

2015-07-22 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the third release candidate for the QEMU 2.4 release. This release is meant for testing purposes and should not be used in a production environment. http://wiki.qemu.org/download/qemu-2.4.0-rc2.tar.bz2 You can help impr

Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-07-22 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Fixes flat unions to get the base's base members. Test case is from > commit 2fc0043, in qapi-schema-test.json: > Okay, I see a cause for part of my confusion. > > +class QAPISchemaGenTypeVisitor(QAPISchemaVisitor): > +def visit_end(self

Re: [Qemu-devel] qemu-system-aarch64 error while booting kernel

2015-07-22 Thread Peter Maydell
On 22 July 2015 at 04:48, Naman Govil wrote: > Hi, > > > I am trying to boot off a kernel image on aarch64. I have the compiled image > which I am running by using the command > > $qemu-system-aarch64 -machine type=virt -m 2048M-nographic -kernel > ~/coreboot/build/coreboot.rom This command line

Re: [Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-22 Thread Michael Brown
On 21/07/15 23:58, Laszlo Ersek wrote: Instead of propagating that fix into QEMU, let's focus on ipxe upstream to solve the problem. How's this for focus: (1) [PATCH] efi_snp: improve compliance with the EFI_SIMPLE_NETWORK_PROTOCOL spec http://thread.gmane.org/gmane.network.i

[Qemu-devel] qemi-system-aarch64 error while booting kernel

2015-07-22 Thread Naman Govil
*Hi,* *I am trying to boot off a kernel image on *aarch64. I have the compiled image which I am running by using the command *$qemu-system-aarch64 -machine type=virt -m 2048M-nographic -kernel ~/coreboot/build/coreboot.rom* *For debugging purposes, I tried to get qemu monitor working

[Qemu-devel] qemu-system-aarch64 error while booting kernel

2015-07-22 Thread Naman Govil
Hi, I am trying to boot off a kernel image on aarch64. I have the compiled image which I am running by using the command $qemu-system-aarch64 -machine type=virt -m 2048M-nographic -kernel ~/coreboot/build/coreboot.rom For debugging purposes, I tried to get qemu monitor working first. I was able

[Qemu-devel] [Bug 1476800] [NEW] Instant runtime error (Host: Windows 8.1 VM: WinXP ISO)

2015-07-22 Thread Leo Nesfield
Public bug reported: I have Qemu Manager on my Windows 8.1 laptop and have a WXP iso and a blank disk image (from here http://www.mediafire.com/download/rtec86bwwmee00s/Blank_Disk.zip ) and as soon as I try to open it I get a Runtime Error ( http://i.gyazo.com/bfebf7e1e7a670f8e52cc95c5923a67e.png

Re: [Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-22 Thread Laszlo Ersek
On 07/22/15 22:06, Michael Brown wrote: > On 21/07/15 23:58, Laszlo Ersek wrote: >>> Instead of propagating that fix >>> into QEMU, let's focus on ipxe upstream to solve the problem. >> >> How's this for focus: >> >> (1) [PATCH] efi_snp: improve compliance with the >> EFI_SIMPLE_NETWOR

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 18:43, Peter Maydell wrote: > The real question here I guess is whether people like the > direction I'm trying to go with this. If so, we can further > reduce the number of qemu-common.h includes without too much > difficulty with further patches. I like it, and it nicely complemen

Re: [Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-22 Thread Laszlo Ersek
On 07/22/15 13:42, Stefan Hajnoczi wrote: > On Wed, Jul 22, 2015 at 11:05 AM, Laszlo Ersek wrote: >> On 07/22/15 11:05, Stefan Hajnoczi wrote: >>> On Wed, Jul 22, 2015 at 12:58:59AM +0200, Laszlo Ersek wrote: On 07/21/15 18:10, Stefan Hajnoczi wrote: > On Tue, Jul 21, 2015 at 3:28 PM, Pao

Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-07-22 Thread Eric Blake
On 07/22/2015 11:34 AM, Eric Blake wrote: > > -typedef struct int32List { > +typedef struct boolList boolList; > + > +struct boolList { > > I can understand the minor change in #ifdef name, and even the > separation between typedef and struct declaration (even though the old > approach of doing

Re: [Qemu-devel] -cpu host, enforce fail on amd processor (CPUID.80000001H:EDX)

2015-07-22 Thread Eduardo Habkost
On Wed, Jul 08, 2015 at 11:05:30AM +0200, Alexandre DERUMIER wrote: > Hi, > I'm currently testing -cpu host,enforce, > and it's failing to start on amd processors (tested with opteron 61XX,opteron > 63xx,FX-6300 and FX-9590) > > Is it expected ? It is not, and it should never happen (as the bit

[Qemu-devel] [PULL 1/1] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-22 Thread Eduardo Habkost
This fixes the following crash, introduced by commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6: $ gdb --args qemu-system-x86_64 -machine pc,mem-merge=off -object memory-backend-ram,id=ram-node0,size=1024 [...] Program received signal SIGABRT, Aborted. (gdb) bt #0 0x7253b8c7 in r

[Qemu-devel] [PULL 0/1] NUMA queue, 2015-07-22

2015-07-22 Thread Eduardo Habkost
The following changes since commit b69b30532e0a80e25449244c01b0cbed000c99a3: Update version for v2.4.0-rc2 release (2015-07-22 18:17:19 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/numa-pull-request for you to fetch changes up to 6b2699672d5b56f8c29

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-22 Thread Max Reitz
On 22.07.2015 19:40, Jeff Cody wrote: On Wed, Jul 22, 2015 at 07:29:47PM +0200, Max Reitz wrote: On 22.07.2015 19:26, Jeff Cody wrote: On Wed, Jul 22, 2015 at 07:02:02PM +0200, Max Reitz wrote: On 21.07.2015 18:13, Jeff Cody wrote: When we allocate the pagetable based on max_table_entries, we

Re: [Qemu-devel] error building latest QEMU

2015-07-22 Thread Stefan Weil
Am 22.07.2015 um 18:01 schrieb Claudio Fontana: Hello, with the following configuration: ./configure --enable-fdt --disable-sdl --disable-vnc --enable-debug --disable-gtk --enable-kvm --target-list=aarch64-softmmu I get: vl.c:2064:12: error: unused variable `err' [-Werror=unused-variable]

[Qemu-devel] [PATCH for-2.4] vl: Fix compiler warning for builds without VLC

2015-07-22 Thread Stefan Weil
This regression was caused by commit 70b94331. CCvl.o vl.c: In function ‘select_display’: vl.c:2064:12: error: unused variable ‘err’ [-Werror=unused-variable] Error *err = NULL; ^ Signed-off-by: Stefan Weil --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [Qemu-devel] [PATCH 3/4] vhost-user: add protocol feature negotiation

2015-07-22 Thread Marc-André Lureau
Hi On Fri, Jul 17, 2015 at 4:09 PM, Michael S. Tsirkin wrote: > > +#define VHOST_USER_F_PROTOCOL_FEATURES 30 > +#define VHOST_USER_PROTOCOL_FEATURE_MASK 0x0ULL Since this flag is among the VHOST_GET_FEATURES, shouldn't it be part of linux-headers/linux/vhost.h ? (next to VHOST_F_LOG_ALL and VHOS

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-22 Thread Jeff Cody
On Wed, Jul 22, 2015 at 07:29:47PM +0200, Max Reitz wrote: > On 22.07.2015 19:26, Jeff Cody wrote: > >On Wed, Jul 22, 2015 at 07:02:02PM +0200, Max Reitz wrote: > >>On 21.07.2015 18:13, Jeff Cody wrote: > >>>When we allocate the pagetable based on max_table_entries, we multiply > >>>the max table e

Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-07-22 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Fixes flat unions to get the base's base members. Test case is from > commit 2fc0043, in qapi-schema-test.json: > > > Flat union visitors remain broken. They'll be fixed next. Sadly, the generated files had a huge diffstat, making it very har

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-22 Thread Max Reitz
On 22.07.2015 19:26, Jeff Cody wrote: On Wed, Jul 22, 2015 at 07:02:02PM +0200, Max Reitz wrote: On 21.07.2015 18:13, Jeff Cody wrote: When we allocate the pagetable based on max_table_entries, we multiply the max table entry value by 4 to accomodate a table of 32-bit integers. However, max_tab

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-22 Thread Stefano Stabellini
On Wed, 22 Jul 2015, Stefano Stabellini wrote: > On Wed, 22 Jul 2015, Jan Beulich wrote: > > >>> On 22.07.15 at 16:50, wrote: > > > On Wed, 22 Jul 2015, Jan Beulich wrote: > > >> >> --- a/xen-hvm.c > > >> >> +++ b/xen-hvm.c > > >> >> @@ -981,19 +981,30 @@ static void handle_ioreq(XenIOState *sta >

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-22 Thread Jeff Cody
On Wed, Jul 22, 2015 at 07:02:02PM +0200, Max Reitz wrote: > On 21.07.2015 18:13, Jeff Cody wrote: > >When we allocate the pagetable based on max_table_entries, we multiply > >the max table entry value by 4 to accomodate a table of 32-bit integers. > >However, max_table_entries is a uint32_t, and t

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-22 Thread Stefano Stabellini
On Wed, 22 Jul 2015, Jan Beulich wrote: > >>> On 22.07.15 at 16:50, wrote: > > On Wed, 22 Jul 2015, Jan Beulich wrote: > >> >> --- a/xen-hvm.c > >> >> +++ b/xen-hvm.c > >> >> @@ -981,19 +981,30 @@ static void handle_ioreq(XenIOState *sta > >> >> > >> >> static int handle_buffered_iopage(XenIOSt

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Kevin O'Connor
On Wed, Jul 22, 2015 at 10:31:12AM +0200, Marc Marí wrote: > On Wed, 22 Jul 2015 00:24:34 -0400 > "Kevin O'Connor" wrote: > > On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: > > > From: Gerd Hoffmann > > > > > > First draft of a fw_cfg dma interface. Designed as add-on to the > > > e

Re: [Qemu-devel] [PULL for-2.4] qxl: build fix for 2.4

2015-07-22 Thread Peter Maydell
On 22 July 2015 at 16:01, Marc-André Lureau wrote: > Hi > > This commit fixes the build with 0.12.6 or newer spice server. > Gerd being on holiday, I am sending a pull request. > > Please apply, > > The following changes since commit a52b2cbf218d52f9e357961acb271a98a2bdff71: > > qxl: Fix new fun

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-22 Thread Max Reitz
On 21.07.2015 18:13, Jeff Cody wrote: When we allocate the pagetable based on max_table_entries, we multiply the max table entry value by 4 to accomodate a table of 32-bit integers. However, max_table_entries is a uint32_t, and the VPC driver accepts ranges for that entry over 0x4000. So dur

Re: [Qemu-devel] User space vs kernel space instructions distribution.

2015-07-22 Thread Peter Maydell
On 22 July 2015 at 17:45, Christopher Covington wrote: > On 07/14/2015 04:45 AM, Peter Maydell wrote: >> If your measurement instrumentation is intrusive and is significantly >> slowing down QEMU then you'll naturally find that the guest spends >> more time in timer interrupt handling, because the

Re: [Qemu-devel] net: Next steps to deprecate -net

2015-07-22 Thread Thomas Huth
On 22/07/15 18:20, Michael S. Tsirkin wrote: > On Wed, Jul 22, 2015 at 03:40:55PM +0200, Markus Armbruster wrote: ... >> Deprecating -net except for -net nic sounds like a fine step forward to >> me. > > -net dump is also useful, we'll need some solution for that if we > want to deprecate vlans.

[Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h

2015-07-22 Thread Peter Maydell
qemu-common.h includes some fixups for things the Win32 headers don't define or define weirdly. These really belong in os-win32.h, so move them there. Signed-off-by: Peter Maydell --- include/qemu-common.h | 17 - include/sysemu/os-win32.h | 18 ++ 2 files cha

[Qemu-devel] [PATCH 08/12] qemu-common.h: Move muldiv64() to host-utils.h

2015-07-22 Thread Peter Maydell
Move the muldiv64() function from qemu-common.h to host-utils.h. This puts it together with all the other arithmetic functions where we provide a version with __int128_t and a fallback without, and allows headers which need muldiv64() to avoid including qemu-common.h. We don't include host-utils f

Re: [Qemu-devel] User space vs kernel space instructions distribution.

2015-07-22 Thread Christopher Covington
On 07/14/2015 04:45 AM, Peter Maydell wrote: > On 14 July 2015 at 09:32, Shlomo Pongratz wrote: >> Hi, >> >> I'm running aarm64 QEMU and I'm counting the number of instructions which >> "belong" to user space vs kernel space. My measurements shows that 99 >> percent of instructions are in kernel s

[Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-22 Thread Peter Maydell
This series makes a start at cleaning up some of our headers to avoid the common problem of header files including qemu-common.h (which then in turn can lead to awkward circular includes). One common cause of this is that we don't have any header which will include the basic things most header fil

[Qemu-devel] [PATCH 02/12] osdep.h: Remove qemu_printf

2015-07-22 Thread Peter Maydell
qemu_printf is an ancient remnant which has been a simple #define to printf for over a decade, and is used in only a few places. Expand it out in those places and remove the #define. Signed-off-by: Peter Maydell --- include/qemu/osdep.h | 2 -- monitor.c| 4 ++-- user-exec.c

[Qemu-devel] [PATCH 07/12] osdep.h: Add header comment

2015-07-22 Thread Peter Maydell
Add a header comment to osdep.h, explaining what the header is for and some rules to avoid circular-include difficulties. Signed-off-by: Peter Maydell --- include/qemu/osdep.h | 24 1 file changed, 24 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.

[Qemu-devel] [PATCH 03/12] osdep.h: Move some compiler-specific things to compiler.h

2015-07-22 Thread Peter Maydell
osdep.h has a few things which are really compiler specific; move them to compiler.h, and include compiler.h from osdep.h. Signed-off-by: Peter Maydell --- include/qemu/compiler.h | 47 +++ include/qemu/osdep.h| 48 +

[Qemu-devel] [PATCH 09/12] apic_internal.h: Include cpu.h directly

2015-07-22 Thread Peter Maydell
apic_internal.h relies on cpu.h having been included (for the X86CPU type); include it directly rather than relying on it being pulled in via one of the other includes like timer.h. Signed-off-by: Peter Maydell --- include/hw/i386/apic_internal.h | 1 + 1 file changed, 1 insertion(+) diff --git

[Qemu-devel] [PATCH 01/12] qapi/qmp-event.c: Don't manually include os-win32.h/os-posix.h

2015-07-22 Thread Peter Maydell
qmp-event.c already includes qemu-common.h, so manually including os-win32.h/os-posix.h is unnecessary (and potentially fragile, since it's duplicating the #ifdef logic that chooses which of the two we need). Remove the unnecessary include logic. Signed-off-by: Peter Maydell --- qapi/qmp-event.c

[Qemu-devel] [PATCH 11/12] event_notifier.h: Don't include qemu-common.h

2015-07-22 Thread Peter Maydell
Don't include qemu-common.h or windows.h in event_notifier.h; instead include osdep.h and typedefs.h, which is all we need. Signed-off-by: Peter Maydell --- include/qemu/event_notifier.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/qemu/event_notifier.h b/in

[Qemu-devel] [PATCH 12/12] throttle.h: Don't include qemu-common.h

2015-07-22 Thread Peter Maydell
Replace an include of qemu-common.h with osdep.h and qemu/typedefs.h. Signed-off-by: Peter Maydell --- include/qemu/throttle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 995b2d5..88dec1d 100644 --- a/include/qem

[Qemu-devel] [PATCH 06/12] osdep.h: Move some OS header includes and fixups from qemu-common.h

2015-07-22 Thread Peter Maydell
qemu-common.h has some system header includes and fixups for things that might be missing. This is really an OS dependency and belongs in osdep.h, so move it across. Signed-off-by: Peter Maydell --- include/qemu-common.h | 55 +-- include/qemu/osde

[Qemu-devel] [PATCH 04/12] compiler.h: Use glue() in QEMU_BUILD_BUG_ON define

2015-07-22 Thread Peter Maydell
Rather than rolling custom concatenate-strings macros for the QEMU_BUILD_BUG_ON macro to use, use the glue() macro we already have (since it's now available to us in this header). Signed-off-by: Peter Maydell --- include/qemu/compiler.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) d

[Qemu-devel] [PATCH 10/12] timer.h: Don't include qemu-common.h

2015-07-22 Thread Peter Maydell
Include the specific headers we need, rather than qemu-common.h. Signed-off-by: Peter Maydell --- include/qemu/timer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9939246..6205024 100644 --- a/include/qemu/timer.h +++ b/

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 18:15, Michael S. Tsirkin wrote: > > No, the feature is not desirable in the future. There is no reason > > really not to use virtio-scsi passthrough instead, since virtio-scsi has > > been out for about 3 years now and is stable. > > Given the amount of work we are spending handli

Re: [Qemu-devel] [PATCH v2] PAM: make PAM emulation closer to documentation

2015-07-22 Thread Kevin O'Connor
On Mon, Jul 20, 2015 at 01:53:13PM +0300, Efimov Vasily wrote: > This patch improves PAM emulation. > > PAM defines 4 memory access redirection modes. In mode 1 reads are directed to > RAM and writes are directed to PCI. In mode 2 it is contrary. In mode 0 all > access is directed to PCI. In mode

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 06:11:16PM +0200, Cornelia Huck wrote: > On Wed, 22 Jul 2015 17:53:47 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Jul 22, 2015 at 12:55:22PM +0200, Cornelia Huck wrote: > > > On Wed, 22 Jul 2015 13:44:14 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Wed,

[Qemu-devel] Information

2015-07-22 Thread ty narmz
If you do decide to give tutorials and emulate power pc components to a point where you can just install macintosh via qemu just need documentation on starting scrips like memory options kernel flags how to setup a virtualmachine for use mkdir ~/qemu_vms/ Download/copy Raspbian Wheezy to ~/qemu

Re: [Qemu-devel] [PATCH] scsi: fix buffer overflow in scsi_req_parse_cdb (CVE-2015-5158)

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 16:27, Daniel P. Berrange wrote: > On Wed, Jul 22, 2015 at 04:18:00PM +0200, Paolo Bonzini wrote: > > This is a guest-triggerable buffer overflow present in QEMU 2.2.0 > > and newer. scsi_cdb_length returns -1 as an error value, but the > > caller does not check it. > > > > Luckil

Re: [Qemu-devel] net: Next steps to deprecate -net

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 03:40:55PM +0200, Markus Armbruster wrote: > Copying Andreas just in case. > > Thomas Huth writes: > > > On 07/17/2015 09:25 AM, Peter Maydell wrote: > >> On 17 July 2015 at 07:53, Thomas Huth wrote: > >>> Ok, assuming that my "Network traffic dumping for -netdev devices

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 01:40:25PM +0200, Paolo Bonzini wrote: > > > On 22/07/2015 12:19, Michael S. Tsirkin wrote: > > > > SCSI passthrough was no longer supported in virtio 1.0, so this patch > > > > fail the get_features() when both 1.0 and scsi is set. And also only > > > > advertise VIRTIO_B

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Cornelia Huck
On Wed, 22 Jul 2015 17:53:47 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jul 22, 2015 at 12:55:22PM +0200, Cornelia Huck wrote: > > On Wed, 22 Jul 2015 13:44:14 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jul 22, 2015 at 12:38:40PM +0200, Cornelia Huck wrote: > > > > On Wed, 22 Jul

Re: [Qemu-devel] [PATCH v2] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-22 Thread Claudio Fontana
On 22.07.2015 16:03, Peter Maydell wrote: > On 22 July 2015 at 13:56, Claudio Fontana wrote: >> >> I can if you want check if this patch actually fixes the problem without the >> KVM workaround. >> Is this the version I am supposed to test, or should I wait for the next >> respin? > > Fixed ver

[Qemu-devel] [Bug 1353149] Re: qemu 2.1.0 fails to start if number of cores is greater than 1.

2015-07-22 Thread Andrey Korolyov
** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1353149 Title: qemu 2.1.0 fails to start if number of cores is greater than 1. Status in QEMU:

[Qemu-devel] error building latest QEMU

2015-07-22 Thread Claudio Fontana
Hello, with the following configuration: ./configure --enable-fdt --disable-sdl --disable-vnc --enable-debug --disable-gtk --enable-kvm --target-list=aarch64-softmmu I get: vl.c:2064:12: error: unused variable `err' [-Werror=unused-variable] Error *err = NULL; ^ make: *** [vl.

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-22 Thread Jan Beulich
>>> On 22.07.15 at 16:50, wrote: > On Wed, 22 Jul 2015, Jan Beulich wrote: >> >> --- a/xen-hvm.c >> >> +++ b/xen-hvm.c >> >> @@ -981,19 +981,30 @@ static void handle_ioreq(XenIOState *sta >> >> >> >> static int handle_buffered_iopage(XenIOState *state) >> >> { >> >> +buffered_iopage_t *buf

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Yang Hongyang
On 07/22/2015 07:06 PM, Daniel P. Berrange wrote: On Wed, Jul 22, 2015 at 06:55:36PM +0800, Yang Hongyang wrote: This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO: multiqueue support. plugin support. +

Re: [Qemu-devel] [PATCH V2 1/5] virtio: get_features() can fail

2015-07-22 Thread Markus Armbruster
Paolo Bonzini writes: > On 15/07/2015 11:01, Cornelia Huck wrote: >> > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c >> > index 3926f7e..febda76 100644 >> > --- a/hw/virtio/virtio-bus.c >> > +++ b/hw/virtio/virtio-bus.c >> > @@ -54,7 +54,8 @@ void virtio_bus_device_plugged(VirtIODe

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Yang Hongyang
On 07/22/2015 09:05 PM, Thomas Huth wrote: On 22/07/15 12:55, Yang Hongyang wrote: This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO: multiqueue support. plugin support. +--+ +-+ +--

[Qemu-devel] [PULL for-2.4] qxl: Fix new function name for spice-server library

2015-07-22 Thread Marc-André Lureau
From: Frediano Ziglio The new spice-server function to limit the number of monitors (0.12.6) changed while development from spice_qxl_set_monitors_config_limit to spice_qxl_max_monitors (accepted upstream). By mistake I post patch with former name. This patch fix the function name. Signed-off-by

[Qemu-devel] [PULL for-2.4] qxl: build fix for 2.4

2015-07-22 Thread Marc-André Lureau
Hi This commit fixes the build with 0.12.6 or newer spice server. Gerd being on holiday, I am sending a pull request. Please apply, The following changes since commit a52b2cbf218d52f9e357961acb271a98a2bdff71: qxl: Fix new function name for spice-server library (2015-07-22 16:38:42 +0200) ar

Re: [Qemu-devel] [RFC 03/10] fdc: respect default drive type

2015-07-22 Thread Markus Armbruster
John Snow writes: > On 07/04/2015 02:47 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 07/03/2015 09:34 AM, Markus Armbruster wrote: John Snow writes: > Respect the default drive type as proffered via the CLI. > > This patch overloads the "drive out" paramete

Re: [Qemu-devel] Self-modifying test case for mttcg

2015-07-22 Thread Andrew Jones
On Wed, Jul 22, 2015 at 02:38:11PM +0200, Andrew Jones wrote: > On Tue, Jul 21, 2015 at 12:58:56PM +0200, Alexander Spyridakis wrote: > > Hello all, > > > > You can find a new self-modifying test case in the following branch: > > > git clone https://git.virtualopensystems.com/dev/tcg_baremetal_tes

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Yang Hongyang
Hi Stefan, On 07/22/2015 09:26 PM, Stefan Hajnoczi wrote: On Wed, Jul 22, 2015 at 11:55 AM, Yang Hongyang wrote: This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO: multiqueue support. plugin support. What do you mean by plugin

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 01:53:14PM +0200, Paolo Bonzini wrote: > > > On 22/07/2015 13:46, Daniel P. Berrange wrote: > > IIUC, the SCSI passthrough feature for virtio-blk is enabled by > > setting the 'scsi=on' property on the virtio-blk device, which is > > exposed by libvirt with XML: > > > >

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 12:55:22PM +0200, Cornelia Huck wrote: > On Wed, 22 Jul 2015 13:44:14 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Jul 22, 2015 at 12:38:40PM +0200, Cornelia Huck wrote: > > > On Wed, 22 Jul 2015 13:32:17 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Wed,

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-22 Thread Stefano Stabellini
On Wed, 22 Jul 2015, Jan Beulich wrote: > >> The number of slots per page being 511 (i.e. not a power of two) means > >> that the (32-bit) read and write indexes going beyond 2^32 will likely > >> disturb operation. The hypervisor side gets I/O req server creation > >> extended so we can indicate t

Re: [Qemu-devel] [Spice-devel] [libvirt] [PATCH] qxl: Fix new function name for spice-server library

2015-07-22 Thread Marc-André Lureau
Hi On Mon, Jul 20, 2015 at 11:46 AM, Martin Kletzander wrote: > On Mon, Jul 20, 2015 at 09:43:23AM +0100, Frediano Ziglio wrote: >> >> The new spice-server function to limit the number of monitors (0.12.6) >> changed while development from spice_qxl_set_monitors_config_limit to >> spice_qxl_max_m

  1   2   3   >