Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread Jan Kiszka
On 2012-08-22 07:57, David Gibson wrote: > On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: >> >> On 22.08.2012, at 06:59, David Gibson wrote: >> >>> cpu_physical_memory_write_rom(), despite the name, can also be used to >>> write images into RAM - and will often be used that way if

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread Alexander Graf
On 22.08.2012, at 08:10, David Gibson wrote: > On Wed, Aug 22, 2012 at 08:02:11AM +0200, Alexander Graf wrote: >> >> On 22.08.2012, at 07:57, David Gibson wrote: >> >>> On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: On 22.08.2012, at 06:59, David Gibson wrote:

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-21 Thread Wen Congyang
At 08/15/2012 04:53 AM, Marcelo Tosatti Wrote: > On Tue, Aug 14, 2012 at 02:35:34PM -0500, Anthony Liguori wrote: >> Marcelo Tosatti writes: >> >>> On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anthony Liguori wrote: Marcelo Tosatti writes: > On Tue, Aug 14, 2012 at 05:55:54PM +0300, Ya

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread Alexander Graf
On 22.08.2012, at 08:10, David Gibson wrote: > On Wed, Aug 22, 2012 at 08:02:11AM +0200, Alexander Graf wrote: >> >> On 22.08.2012, at 07:57, David Gibson wrote: >> >>> On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: On 22.08.2012, at 06:59, David Gibson wrote:

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread David Gibson
On Wed, Aug 22, 2012 at 08:02:11AM +0200, Alexander Graf wrote: > > On 22.08.2012, at 07:57, David Gibson wrote: > > > On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: > >> > >> On 22.08.2012, at 06:59, David Gibson wrote: > >> > >>> cpu_physical_memory_write_rom(), despite the n

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread Alexander Graf
On 22.08.2012, at 07:57, David Gibson wrote: > On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: >> >> On 22.08.2012, at 06:59, David Gibson wrote: >> >>> cpu_physical_memory_write_rom(), despite the name, can also be used to >>> write images into RAM - and will often be used that

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread David Gibson
On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: > > On 22.08.2012, at 06:59, David Gibson wrote: > > > cpu_physical_memory_write_rom(), despite the name, can also be used to > > write images into RAM - and will often be used that way if the machine > > uses load_image_targphys() i

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread Alexander Graf
On 22.08.2012, at 06:59, David Gibson wrote: > cpu_physical_memory_write_rom(), despite the name, can also be used to > write images into RAM - and will often be used that way if the machine > uses load_image_targphys() into RAM addresses. > > However, cpu_physical_memory_write_rom(), unlike cpu

[Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread David Gibson
cpu_physical_memory_write_rom(), despite the name, can also be used to write images into RAM - and will often be used that way if the machine uses load_image_targphys() into RAM addresses. However, cpu_physical_memory_write_rom(), unlike cpu_physical_memory_rw() does invalidate any cached TBs whic

[Qemu-devel] ivshmem assertion failure with EventNotifier

2012-08-21 Thread Cam Macdonell
Hi Paolo, I've noticed an assertion error when sending interrupts via ivshmem. I bisected to this patch. commit 563027cc0c94aa4846c18f9d665a4c90f8c42ba8 Author: Paolo Bonzini Date: Thu Jul 5 17:16:25 2012 +0200 ivshmem: use EventNotifier and memory API All of ivshmem's usage of event

[Qemu-devel] [PATCH] eventfd: making it thread safe

2012-08-21 Thread David Gibson
From: Alexey Kardashevskiy QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called when select() is not waiting. However IO handlers list can be changed in the thread ot

[Qemu-devel] [PATCH] usb: Fix host-side endian bugs in hcd-ehci

2012-08-21 Thread David Gibson
The EHCI device model is horribly broken for big-endian hosts. It uses a union of 'mmio' a byte array which is as-is as the device's MMIO space with the various internal registers. The IO routines assume that mmio is laid out in little-endian order, but everything else in the code accesses the re

[Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-21 Thread Liu Ping Fan
From: Liu Ping Fan Currently, link property's target is only managed by object_set_link_property(). This will raise such issue that when the property is finalized, its target has no opportunity to release. Fix this issue by introduce object_finalize_link_property() Signed-off-by: Liu Ping Fan

Re: [Qemu-devel] [PATCH] Fix copy&paste typos in documentation comments

2012-08-21 Thread Wei-Ren Chen
On Tue, Aug 21, 2012 at 11:31:26PM +0200, BALATON Zoltan wrote: > > Signed-off-by: BALATON Zoltan > --- > memory.h | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/memory.h b/memory.h > index bd1bbae..aba5721 100644 > --- a/memory.h > +++ b/memory.h > @@

Re: [Qemu-devel] Dump guest page table inside QEMU makes system hang

2012-08-21 Thread Wei-Ren Chen
> > The system will hang while booting. However, if I comment > > cpu_physical_memory_read in function dump_guest_pgtable, there > > is no problem. What I am missing here? Thanks. > > cpu_physical_memory_read() can cause faults or other side effects like > MMIO. Using cpu_get_phys_page_debug() m

[Qemu-devel] [PATCH] Fix copy&paste typos in documentation comments

2012-08-21 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- memory.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/memory.h b/memory.h index bd1bbae..aba5721 100644 --- a/memory.h +++ b/memory.h @@ -252,9 +252,9 @@ void memory_region_init_ram(MemoryRegion *mr,

[Qemu-devel] [PATCH] vmware_vga: Cleanup and allow simple drivers to work without the fifo

2012-08-21 Thread BALATON Zoltan
Detailed changes: Removing info available elsewhere from vmsvga_state. Fix mixup between depth and bits per pixel. Return a value for FB_SIZE even before enabled (according to the documentation, drivers should read this value before enabling the device). Postpone stopping the dirty log to the poi

[Qemu-devel] [PATCH] Correct computation of bytes per pixel from bits per pixel

2012-08-21 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- console.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console.c b/console.c index 4525cc7..f698b77 100644 --- a/console.c +++ b/console.c @@ -1612,7 +1612,7 @@ PixelFormat qemu_different_endianness_pixelformat(int bpp) memset

Re: [Qemu-devel] tracing guest memory access

2012-08-21 Thread Wei-Ren Chen
> I need to trace all data loads/stores of a guest OS running under qemu (for > now, both guest and host are x86-64, and virtual addresses should be > sufficient). Looking into qemu-devel archive I see that this subject is > brought > up not very frequently, but regularly. I know, there is a gener

Re: [Qemu-devel] [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-21 Thread Rusty Russell
On Wed, 15 Aug 2012 09:48:44 +0200, Christian Borntraeger wrote: > >> Have you written an appendix for the virtio specification for > >> virtio-ccw? I think it would be good to include in this series for the > >> purposes of review. > > > > Might be nice, but don't get fancy about it. Text wil

[Qemu-devel] [RFC-v3 4/5] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. v3: - Add vhost-scsi.h include

[Qemu-devel] [RFC-v3 5/5] virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-08-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints. This ensures that virtio-scsi LLD only attempts to scan tar

[Qemu-devel] [RFC-v3 2/5] vhost: Pass device path to vhost_dev_init()

2012-08-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The path to /dev/vhost-net is currently hardcoded in vhost_dev_init(). This needs to be changed so that /dev/vhost-scsi can be used. Pass in the device path instead of hardcoding it. Signed-off-by: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [RFC-v3 3/5] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi requests inside the kernel

[Qemu-devel] [RFC-v3 1/5] monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param

2012-08-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch renames+moves the net_handle_fd_param() caller used to obtain a file descriptor from either qemu_parse_fd() (the normal case) or from monitor_get_fd() (migration case) into a generically prefixed monitor_handle_fd_param() to be used by vhost-scsi code. Also up

[Qemu-devel] [RFC-v3 0/5] vhost-scsi: Add support for host virtualized target

2012-08-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, This is the third RFC for vhost-scsi patches against mainline QEMU v1.1 to support the upstream tcm_vhost host virtualized target driver now available in v3.6-rc kernel code. This series is based upon last week's commit 346fe0c4c0b, and is aiming for a future

[Qemu-devel] [Bug 1036363] Re: Major network performance problems on AMD hardware

2012-08-21 Thread Ziemowit Pierzycki
** Also affects: qemu-kvm Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1036363 Title: Major network performance problems on AMD hardware Status in QEMU

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-21 Thread Anthony Liguori
Paolo Bonzini writes: > Il 20/08/2012 19:58, Anthony Liguori ha scritto: >> Michael Tokarev writes: >> >>> On 08.08.2012 17:09, Michael Tokarev wrote: >>> [] Something similar should be applied to 1.1-stable. FWIW, some changes are not needed there. >>> >>> Cherry-pick to stable-1.1

Re: [Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests current hostname

2012-08-21 Thread Eric Blake
On 08/21/2012 05:57 AM, Guido Günther wrote: > This allows to retrieve the guest's hostname via gethostname(2). > > This can be useful to identify a VM e.g. one without network. > > Signed-off-by: Guido Günther > --- > We have an API in libvirt for that (virDomainGetHostname). > Cheers > -- Gui

Re: [Qemu-devel] Ping 1.2 PATCH "eventfd: making it thread safe" (was Re: [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c)

2012-08-21 Thread Anthony Liguori
Paolo Bonzini writes: > Il 21/08/2012 18:39, ronnie sahlberg ha scritto: >> In >> net_socket_update_fd_handler() >> >> shouldnt you call qemu_notify_event() if any of the handlers have >> changed from NULL to non-NULL ? >> or else it might take a while before the change takes effect. > > Why hav

[Qemu-devel] [PATCH 08/23] ehci: fix reset

2012-08-21 Thread Michael Roth
From: Gerd Hoffmann Check for the reset bit first when processing USBCMD register writes. Also break out of the switch, there is no need to check the other bits. Signed-off-by: Gerd Hoffmann (cherry picked from commit 7046530c36fa3a3f87692bdb54556f5d891a9c03) Signed-off-by: Michael Roth ---

[Qemu-devel] [stable-1.1] Patch Round-up for stable 1.1.2

2012-08-21 Thread Michael Roth
This is the current list of candidates for QEMU 1.1.2, which we're planning to release on Friday. Please review and respond with any additional patches you think should be included. These are also available at: git://github.com/mdroth/qemu.git stable-1.1-staging There's a few that Michael Tokar

Re: [Qemu-devel] [RFC 7/8] include core qdev code into *-user, too

2012-08-21 Thread Eduardo Habkost
On Tue, Aug 21, 2012 at 05:59:22PM +0100, Peter Maydell wrote: > On 21 August 2012 16:43, Eduardo Habkost wrote: > > The code depends on some functions from qemu-option.o, so add > > qemu-option.o to qom-obj-y to make sure it's included. > > > > Signed-off-by: Eduardo Habkost > > --- > > Makefil

[Qemu-devel] Ping 1.2 PATCH "eventfd: making it thread safe" (was Re: [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c)

2012-08-21 Thread Paolo Bonzini
Il 21/08/2012 18:39, ronnie sahlberg ha scritto: > In > net_socket_update_fd_handler() > > shouldnt you call qemu_notify_event() if any of the handlers have > changed from NULL to non-NULL ? > or else it might take a while before the change takes effect. Why haven't we applied yet the patch to do

[Qemu-devel] [PATCH 10/23] uhci: fix uhci_async_cancel_all

2012-08-21 Thread Michael Roth
From: Gerd Hoffmann We update the QTAILQ in the loop, thus we must use the SAFE version to make sure we don't touch the queue struct after freeing it. https://bugzilla.novell.com/show_bug.cgi?id=766310 Signed-off-by: Gerd Hoffmann (cherry picked from commit 77fa9aee38758a078870e25f0dcf642066b4

[Qemu-devel] [PATCH 17/23] slirp: Enforce host-side user of smb share

2012-08-21 Thread Michael Roth
From: Jan Kiszka Windows 7 (and possibly other versions) cannot connect to the samba share if the exported host directory is not world-readable. This can be resolved by forcing the username used for access checks to the one under which QEMU and smbd are running. Signed-off-by: Jan Kiszka (cherr

Re: [Qemu-devel] [RFC 6/8] qdev: use full qdev.h include path on qdev*.c

2012-08-21 Thread Eduardo Habkost
On Tue, Aug 21, 2012 at 05:29:41PM +0100, Peter Maydell wrote: > On 21 August 2012 16:43, Eduardo Habkost wrote: > > Signed-off-by: Eduardo Habkost > > This could use a commit message saying why rather than merely > what the patch does. Sorry. The reason is to allow the files to be moved inside

[Qemu-devel] [PATCH 12/23] usb-redir: Correctly handle the usb_redir_babble usbredir status

2012-08-21 Thread Michael Roth
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann (cherry picked from commit adae502c0ae4572ef08f71cb5b5ed5a8e90299fe) Signed-off-by: Michael Roth --- hw/usb/redirect.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c

Re: [Qemu-devel] [RFC 5/8] split qdev into a core and code used only by qemu-system-*

2012-08-21 Thread Blue Swirl
On Tue, Aug 21, 2012 at 3:42 PM, Eduardo Habkost wrote: > This also makes it visible what are the parts of qdev that we may want > to split more cleanly (as they are using #ifdefs, now). Nice. > > There are basically two parts that are specific to qemu-system-*, but > are still inside qdev.c (bu

[Qemu-devel] [PATCH 19/23] slirp: Improve error reporting of inaccessible smb directories

2012-08-21 Thread Michael Roth
From: Jan Kiszka Instead of guessing, print the error code returned by access. Signed-off-by: Jan Kiszka (cherry picked from commit 22a61f365df83d5d7884cceb1c462295977cb2db) Signed-off-by: Michael Roth --- net/slirp.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH 13/23] usb-ehci: Fix an assert whenever isoc transfers are used

2012-08-21 Thread Michael Roth
From: Hans de Goede hcd-ehci.c is missing an usb_packet_init() call for the ipacket UsbPacket it uses for isoc transfers, triggering an assert (taking the entire vm down) in usb_packet_setup as soon as any isoc transfers are done by a high speed USB device. Signed-off-by: Hans de Goede Signed-o

[Qemu-devel] [PATCH 20/23] apic: Resolve potential endless loop around apic_update_irq

2012-08-21 Thread Michael Roth
From: Jan Kiszka Commit d96e173769 refactored the reinjection of pending PIC interrupts. However, it missed the potential loop of apic_update_irq -> apic_deliver_pic_intr -> apic_local_deliver -> apic_set_irq -> apic_update_irq that /could/ occur if LINT0 is injected as APIC_DM_FIXED and that vec

[Qemu-devel] [PATCH 21/23] apic: Reevaluate pending interrupts on LVT_LINT0 changes

2012-08-21 Thread Michael Roth
From: Jan Kiszka When the guest modifies the LVT_LINT0 register, we need to check if some pending PIC interrupt can now be delivered. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity (cherry picked from commit a94820ddc36f8c452b37f9dcb323f55ffdbc75f9) Signed-off-by: Michael Roth --- hw/a

[Qemu-devel] [PATCH 07/23] virtio-blk: fix use-after-free while handling scsi commands

2012-08-21 Thread Michael Roth
From: Avi Kivity The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free. Reproducible by running a guest with aio=native on a block device. Reported-by: Stefan Priebe Signed-off-by: Avi Kivity Signed-off-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH] ivshmem: add 64bit option

2012-08-21 Thread Cam Macdonell
Thanks Gerd, might need another rebase. I have had some users request larger memory regions. Quoting Gerd Hoffmann : > This patch adds a "use64" property which will make the ivshmem driver > register a 64bit memory bar when set, so you have something to play with > when testing 64bit pci bits.

Re: [Qemu-devel] [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-21 Thread Blue Swirl
On Tue, Aug 21, 2012 at 8:23 AM, Cong Meng wrote: > This patch adds some queue limit parameters into block drive. And inits them > for sg block drive. Some interfaces are also added for accessing them. > > Signed-off-by: Cong Meng > --- > block/raw-posix.c | 58 > +

Re: [Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests current hostname

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 01:57:54PM +0200, Guido Günther wrote: > This allows to retrieve the guest's hostname via gethostname(2). > > This can be useful to identify a VM e.g. one without network. > > Signed-off-by: Guido Günther > --- > We have an API in libvirt for that (virDomainGetHostname).

[Qemu-devel] [PATCH 03/23] ppc: Fix bug in handling of PAPR hypercall exits

2012-08-21 Thread Michael Roth
From: David Gibson Currently for powerpc, kvm_arch_handle_exit() always returns 1, meaning that its caller - kvm_cpu_exec() - will always exit immediately afterwards to the loop in qemu_kvm_cpu_thread_fn(). There's no need to do this. Once we've handled the hypercall there's no reason we can't

Re: [Qemu-devel] For 1.2: Re: [PATCH 3/8] migration: move total_time from ram stats to migration info

2012-08-21 Thread Luiz Capitulino
On Tue, 21 Aug 2012 17:00:20 +0200 Juan Quintela wrote: > Luiz Capitulino wrote: > > On Sat, 18 Aug 2012 07:02:50 -0600 > > Eric Blake wrote: > > > > I can cherry-pick this into the qmp branch. > > > > Juan, I can also fix myself the problem I pointed out above if that > > works for you. > > I

Re: [Qemu-devel] [RFC 3/8] qapi-types.h doesn't really need to include qemu-common.h

2012-08-21 Thread Luiz Capitulino
On Tue, 21 Aug 2012 12:42:57 -0300 Eduardo Habkost wrote: > From: Igor Mammedov > > needed to prevent build breakage when CPU becomes a child of DeviceState > > Signed-off-by: Igor Mammedov > --- > scripts/qapi-types.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [RFC 4/8] cleanup error.h, included qapi-types.h aready has stdbool.h

2012-08-21 Thread Eduardo Habkost
On Tue, Aug 21, 2012 at 05:45:26PM +0100, Peter Maydell wrote: > On 21 August 2012 16:42, Eduardo Habkost wrote: > > From: Igor Mammedov > > > > Signed-off-by: Igor Mammedov > > I thought we'd agreed to drop this patch? > http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg03644.html Sure.

[Qemu-devel] [PATCH 04/23] s390: Fix error handling and condition code of service call

2012-08-21 Thread Michael Roth
From: Christian Borntraeger Invalid sccb addresses will cause specification or addressing exception. Lets add those checks. Furthermore, the good case (cc=0) was incorrect for KVM, we did not set the CC at all. We now use return codes < 0 as program checks and return codes > 0 as condition code v

Re: [Qemu-devel] Dump guest page table inside QEMU makes system hang

2012-08-21 Thread Blue Swirl
On Tue, Aug 21, 2012 at 7:21 AM, 陳韋任 (Wei-Ren Chen) wrote: > Hi all, > > I want to dump guest page table when guest writes to cr3, > the code snipt below, > > --- > uint32_t pgd[1024][1024]; // guest page table > static void dump_guest_pgtable(target_ulong cr3) > { > int i, j; > uint32_t

[Qemu-devel] [PATCH 18/23] slirp: Ensure smbd and shared directory exist when enable smb

2012-08-21 Thread Michael Roth
From: Dunrong Huang Users may pass the following parameters to qemu: $ qemu-kvm -net nic -net user,smb= ... $ qemu-kvm -net nic -net user,smb ... $ qemu-kvm -net nic -net user,smb=bad_directory ... In these cases, qemu started successfully while samba server failed to start. Users wi

Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed

2012-08-21 Thread Blue Swirl
On Tue, Aug 21, 2012 at 6:10 AM, Natanael Copa wrote: > On Mon, 20 Aug 2012 19:53:22 + > Blue Swirl wrote: > >> >> - Do not remove the explicit add of -lm unless Haiku. This was due >> >>to >> >> http://www.mail-archive.com/qemu-devel@nongnu.org/msg102965.html I >> >> am not sure if this

[Qemu-devel] [PATCH 09/23] ehci: don't flush cache on doorbell rings.

2012-08-21 Thread Michael Roth
From: Gerd Hoffmann Commit 4be23939ab0d7019c7e59a37485b416fbbf0f073 makes ehci instantly zap any unlinked queue heads when the guest rings the doorbell. While hacking up uas support this turned out to be a problem. The linux kernel can unlink and instantly relink the very same queue head, there

[Qemu-devel] [PATCH 11/23] usb: restore USBDevice->attached on vmload

2012-08-21 Thread Michael Roth
From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann (cherry picked from commit 495d544798151206bafca65ec588c0388637eb40) Signed-off-by: Michael Roth --- hw/usb/bus.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 2068640..77b2b99 100644 ---

[Qemu-devel] [PATCH 14/23] qlist: add qlist_size()

2012-08-21 Thread Michael Roth
Signed-off-by: Michael Roth Reviewed-by: Eric Blake Signed-off-by: Michael Roth Signed-off-by: Anthony Liguori (cherry picked from commit a86a4c2f7b7f0b72816ea1c219d8140699b6665b) Signed-off-by: Michael Roth --- qlist.c | 13 + qlist.h |1 + 2 files changed, 14 insertions(+

[Qemu-devel] [PATCH 22/23] apic: Defer interrupt updates to VCPU thread

2012-08-21 Thread Michael Roth
From: Jan Kiszka KVM performs TPR raising asynchronously to QEMU, specifically outside QEMU's global lock. When an interrupt is injected into the APIC and TPR is checked to decide if this can be delivered, a stale TPR value may be used, causing spurious interrupts in the end. Fix this by deferri

[Qemu-devel] [PATCH 01/23] qtest: fix infinite loop when QEMU aborts abruptly

2012-08-21 Thread Michael Roth
From: Anthony Liguori >From Markus: Makes "make check" hang: QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test TEST: tests/crash-test... (pid=972) qemu-system-x86_64: Device needs media, but drive is empty [Nothing hap

[Qemu-devel] [PATCH 05/23] kvmvapic: Disable if there is insufficient memory

2012-08-21 Thread Michael Roth
From: Jan Kiszka We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster Signed-off-by: Jan Kiszka S

[Qemu-devel] [PATCH for-1.2 v2] target-mips: Enable access to required RDHWR hardware registers

2012-08-21 Thread Meador Inge
While running in the usermode emulator all of the required* MIPS32r2 RDHWR hardware registers should be accessible (the Linux kernel enables access to these same registers). Note that these registers are still enabled when the MIPS ISA is not release 2. This is OK since the Linux kernel emulates

[Qemu-devel] [PATCH 06/23] qdev: fix use-after-free in the error path of qdev_init_nofail

2012-08-21 Thread Michael Roth
From: Anthony Liguori >From Markus: Before: $ qemu-system-x86_64 -display none -drive if=ide qemu-system-x86_64: Device needs media, but drive is empty qemu-system-x86_64: Initialization of device ide-hd failed [Exit 1 ] After: $ qemu-system-x86_64 -display none -drive if=

[Qemu-devel] [PATCH 15/23] json-parser: don't replicate tokens at each level of recursion

2012-08-21 Thread Michael Roth
Currently, when parsing a stream of tokens we make a copy of the token list at the beginning of each level of recursion so that we do not modify the original list in cases where we need to fall back to an earlier state. In the worst case, we will only read 1 or 2 tokens off the list before recursi

[Qemu-devel] [PATCH 23/23] update VERSION for 1.1.2

2012-08-21 Thread Michael Roth
Signed-off-by: Michael Roth --- VERSION |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 524cb55..45a1b3f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.1 +1.1.2 -- 1.7.9.5

[Qemu-devel] [PATCH 02/23] configure: Don't override user's --cpu on MacOS and Solaris

2012-08-21 Thread Michael Roth
From: Peter Maydell Both MacOS and Solaris have special case handling for the CPU type, because the check_define probes will return i386 even if the hardware is 64 bit and x86_64 would be preferable. Move these checks earlier in the configure probing so that we can do them only if the user didn't

[Qemu-devel] [PATCH 16/23] check-qjson: add test for large JSON objects

2012-08-21 Thread Michael Roth
Signed-off-by: Michael Roth Signed-off-by: Anthony Liguori (cherry picked from commit 7109edfeb69c1d3c2164175837784dfcd210fed0) Signed-off-by: Michael Roth --- tests/check-qjson.c | 53 +++ 1 file changed, 53 insertions(+) diff --git a/tests/c

Re: [Qemu-devel] [RFC 7/8] include core qdev code into *-user, too

2012-08-21 Thread Peter Maydell
On 21 August 2012 16:43, Eduardo Habkost wrote: > The code depends on some functions from qemu-option.o, so add > qemu-option.o to qom-obj-y to make sure it's included. > > Signed-off-by: Eduardo Habkost > --- > Makefile.objs | 1 + > hw/Makefile.objs

[Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests current hostname

2012-08-21 Thread Guido Günther
This allows to retrieve the guest's hostname via gethostname(2). This can be useful to identify a VM e.g. one without network. Signed-off-by: Guido Günther --- We have an API in libvirt for that (virDomainGetHostname). Cheers -- Guido qapi-schema-guest.json | 12 qga/commands-p

Re: [Qemu-devel] [RFC 4/8] cleanup error.h, included qapi-types.h aready has stdbool.h

2012-08-21 Thread Peter Maydell
On 21 August 2012 16:42, Eduardo Habkost wrote: > From: Igor Mammedov > > Signed-off-by: Igor Mammedov I thought we'd agreed to drop this patch? http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg03644.html -- PMM

Re: [Qemu-devel] [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c

2012-08-21 Thread ronnie sahlberg
In net_socket_update_fd_handler() shouldnt you call qemu_notify_event() if any of the handlers have changed from NULL to non-NULL ? or else it might take a while before the change takes effect. regards ronnie sahlberg On Wed, Aug 22, 2012 at 1:52 AM, Stefan Hajnoczi wrote: > The net/socket.c n

[Qemu-devel] [PATCH for-1.2] libcacard: Fix segfault when no backend specified

2012-08-21 Thread Michael Roth
When a user does not specify a backend, a segfault can be triggered due to a strcmp() being called on a NULL char*: $ gdb --args qemu -usb -device usb-ccid \ -device ccid-card-emulated,id=smartcard0 \ ... (gdb) s emulated_initfn (base=0x56cb2e70) at /home/m

Re: [Qemu-devel] [PATCH for-1.2 v3] qemu-ga: report success-response field in guest-info

2012-08-21 Thread Michael Roth
On Tue, Aug 21, 2012 at 02:39:35PM +0200, Michal Privoznik wrote: > This is a useful hint for users (or libvirt) whether a command returns > anything success and hence wait for reply or not. I'm not necessarilly against this patch, but I think we should clarify it's purpose. Commands that don't r

[Qemu-devel] [RFC 0/8] include qdev core in *-user, make CPU child of DeviceState

2012-08-21 Thread Eduardo Habkost
So, here's a third suggestion to the CPU/DeviceState problem. Basically I split the qdev code into a core (that can be easily compiled into *-user), and a part specific to qemu-system-*. There are two remaining parts that forced me to use #ifdefs in the "core" .c files: - vmstate handling on qde

Re: [Qemu-devel] [RFC 6/8] qdev: use full qdev.h include path on qdev*.c

2012-08-21 Thread Peter Maydell
On 21 August 2012 16:43, Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkost This could use a commit message saying why rather than merely what the patch does. -- PMM

[Qemu-devel] [RFC 4/8] cleanup error.h, included qapi-types.h aready has stdbool.h

2012-08-21 Thread Eduardo Habkost
From: Igor Mammedov Signed-off-by: Igor Mammedov --- error.h | 1 - 1 file changed, 1 deletion(-) diff --git a/error.h b/error.h index 96fc203..643a372 100644 --- a/error.h +++ b/error.h @@ -14,7 +14,6 @@ #include "compiler.h" #include "qapi-types.h" -#include /** * A class represent

[Qemu-devel] [RFC 5/8] split qdev into a core and code used only by qemu-system-*

2012-08-21 Thread Eduardo Habkost
This also makes it visible what are the parts of qdev that we may want to split more cleanly (as they are using #ifdefs, now). There are basically two parts that are specific to qemu-system-*, but are still inside qdev.c (but inside a "#ifndef CONFIG_USER_ONLY"). - vmstate handling - reset functi

Re: [Qemu-devel] [RFC 1/8] move qemu_irq typedef out of cpu-common.h

2012-08-21 Thread Peter Maydell
On 21 August 2012 16:42, Eduardo Habkost wrote: > diff --git a/qemu-common.h b/qemu-common.h > index e5c2bcd..6677a30 100644 > --- a/qemu-common.h > +++ b/qemu-common.h > @@ -273,7 +273,6 @@ typedef struct PCIEPort PCIEPort; > typedef struct PCIESlot PCIESlot; > typedef struct MSIMessage MSIMess

[Qemu-devel] [RFC 6/8] qdev: use full qdev.h include path on qdev*.c

2012-08-21 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/qdev-properties.c | 2 +- hw/qdev.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 917d986..2e82cb9 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -1,5 +1,5

[Qemu-devel] [RFC 1/8] move qemu_irq typedef out of cpu-common.h

2012-08-21 Thread Eduardo Habkost
From: Igor Mammedov it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov --- hw/arm-misc.h | 1 + hw/bt.h | 2 ++ hw/devices.h | 2 ++ hw/irq.h | 2 ++ hw/omap.h | 1 + hw/soc_dma.h | 1 + hw/xen.h | 1 + qemu-co

Re: [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers

2012-08-21 Thread Meador Inge
On 08/21/2012 10:52 AM, Aurelien Jarno wrote: > Le 21/08/2012 17:41, Meador Inge a écrit : >> On 08/21/2012 05:14 AM, Andreas Färber wrote: >>> So what about the non-MIPS32r2 case? IIUC then the SYNCI_Step register >>> would no longer be accessible, which your commit message does not >>> mention.

[Qemu-devel] [RFC 7/8] include core qdev code into *-user, too

2012-08-21 Thread Eduardo Habkost
The code depends on some functions from qemu-option.o, so add qemu-option.o to qom-obj-y to make sure it's included. Signed-off-by: Eduardo Habkost --- Makefile.objs | 1 + hw/Makefile.objs| 2 +- qom/Makefile.objs

[Qemu-devel] [RFC 2/8] qdev: split up header so it can be used in cpu.h

2012-08-21 Thread Eduardo Habkost
From: Anthony Liguori Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for no

[Qemu-devel] [RFC 3/8] qapi-types.h doesn't really need to include qemu-common.h

2012-08-21 Thread Eduardo Habkost
From: Igor Mammedov needed to prevent build breakage when CPU becomes a child of DeviceState Signed-off-by: Igor Mammedov --- scripts/qapi-types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index cf601ae..f34addb 100644 --

Re: [Qemu-devel] [PATCH 0/5] support guest agent general command

2012-08-21 Thread Eric Blake
On 08/21/2012 09:26 AM, Michal Privoznik wrote: >> Question to the qemu folks - can we enhance 'guest-info' to tell us >> commands required to give output on success, vs. commands that are >> expected to never answer (except on possible error), so that libvirt can >> then make smarter decisions ab

Re: [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers

2012-08-21 Thread Aurelien Jarno
Le 21/08/2012 17:41, Meador Inge a écrit : > On 08/21/2012 05:14 AM, Andreas Färber wrote: > >> Am 21.08.2012 01:41, schrieb Meador Inge: >>> While running in the usermode emulator all of the MIPS32r2 *required* >>> RDHWR hardware registers should be accessible (the Linux kernel enables >>> access

[Qemu-devel] [PATCH v2 0/3] net: asynchronous send/receive for net/socket.c

2012-08-21 Thread Stefan Hajnoczi
The net subsystem supports non-blocking sockets and asynchronous send/receive. Unfortunately, net/socket.c doesn't fully take advantage of that yet. This patch series makes send asynchronous and drops code that will spin when the non-blocking socket would block. Also take advantage of qemu_set_fd

[Qemu-devel] [PATCH v2 3/3] net: EAGAIN handling for net/socket.c TCP

2012-08-21 Thread Stefan Hajnoczi
Replace spinning send_all() with a proper non-blocking send. When the socket write buffer limit is reached, we should stop trying to send and wait for the socket to become writable again. Non-blocking TCP sockets can return in two different ways when the write buffer limit is reached: 1. ret = -

[Qemu-devel] [PATCH v2 2/3] net: EAGAIN handling for net/socket.c UDP

2012-08-21 Thread Stefan Hajnoczi
Implement asynchronous send for UDP (or other SOCK_DGRAM) sockets. If send fails with EAGAIN we wait for the socket to become writable again. Signed-off-by: Stefan Hajnoczi --- net/socket.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/net/socket.c b/net/

[Qemu-devel] [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c

2012-08-21 Thread Stefan Hajnoczi
The net/socket.c net client is not truly asynchronous. This patch borrows the qemu_set_fd_handler2() code from net/tap.c as the basis for proper asynchronous send/receive. Only read packets from the socket when the peer is able to receive. This avoids needless queuing. Later patches implement as

[Qemu-devel] [RFC 8/8] make CPU a child of DeviceState

2012-08-21 Thread Eduardo Habkost
From: Igor Mammedov [ehabkost: change CPU type declaration to hae TYPE_DEVICE as parent] Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- include/qemu/cpu.h | 6 +++--- qom/cpu.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/qemu/cpu.h

Re: [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers

2012-08-21 Thread Meador Inge
On 08/21/2012 05:14 AM, Andreas Färber wrote: > Am 21.08.2012 01:41, schrieb Meador Inge: >> While running in the usermode emulator all of the MIPS32r2 *required* >> RDHWR hardware registers should be accessible (the Linux kernel enables >> access to these same registers). >> >> Signed-off-by: Mea

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-21 Thread Troy Benjegerdes
Do you have any way to determine what CPU groups the different VMs are running on? If you end up in an overcommit situation where half the 'virtual' cpus are on one AMD socket, and the other half are on a different AMD socket, then you'll be thrashing the hypertransport link. At Cray we were very

Re: [Qemu-devel] [PATCH 0/5] support guest agent general command

2012-08-21 Thread Michal Privoznik
On 08.08.2012 16:36, Eric Blake wrote: > [adding qemu-devel, for a qemu-ga question] > > On 08/07/2012 06:04 PM, MATSUDA, Daiki wrote: >> Hi, All. >> >> I rewrote the patches as Eric suggested. >> >> >> >> virsh # help qemu-agent-command >> NAME >> qemu-agent-command - Qemu Guest Agent Comma

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-21 Thread Richard Davies
Avi Kivity wrote: > Richard Davies wrote: > > We're running host kernel 3.5.1 and qemu-kvm 1.1.1. > > > > I hadn't though about it, but I agree this is related to cpu overcommit. The > > slow boots are intermittent (and infrequent) with cpu overcommit whereas I > > don't think it occurs without cpu

Re: [Qemu-devel] For 1.2: Re: [PATCH 3/8] migration: move total_time from ram stats to migration info

2012-08-21 Thread Juan Quintela
Luiz Capitulino wrote: > On Sat, 18 Aug 2012 07:02:50 -0600 > Eric Blake wrote: > > I can cherry-pick this into the qmp branch. > > Juan, I can also fix myself the problem I pointed out above if that > works for you. I very much preffer that. But what to do with the other ones? They are really

Re: [Qemu-devel] [PATCH for-1.2 v3] qemu-ga: report success-response field in guest-info

2012-08-21 Thread Michal Privoznik
On 21.08.2012 14:39, Michal Privoznik wrote: > This is a useful hint for users (or libvirt) whether a command returns > anything success and hence wait for reply or not. Signed-off-by: Michal Privoznik > --- > diff to v2: > -fixed typo and field description > > diff to v1: > -changed condition

Re: [Qemu-devel] For 1.2: Re: [PATCH 3/8] migration: move total_time from ram stats to migration info

2012-08-21 Thread Luiz Capitulino
On Sat, 18 Aug 2012 07:02:50 -0600 Eric Blake wrote: > On 08/18/2012 05:17 AM, Juan Quintela wrote: > > Signed-off-by: Juan Quintela > > --- > > hmp.c| 4 ++-- > > migration.c | 6 +++--- > > qapi-schema.json | 14 +++--- > > qmp-commands.hx | 6 +++--- > > 4 files

Re: [Qemu-devel] [PATCH v3 4/5] spice: add 'migrated' flag to spice info

2012-08-21 Thread Luiz Capitulino
On Tue, 21 Aug 2012 11:51:58 +0300 Yonit Halperin wrote: > The flag is 'true' when spice migration has completed on the src side. > It is needed for a case where libvirt dies before migration completes > and it misses the event QEVENT_SPICE_MIGRATE_COMPLETED. > When libvirt is restored and querie

Re: [Qemu-devel] [PATCH v3 3/5] spice migration: add QEVENT_SPICE_MIGRATE_COMPLETED

2012-08-21 Thread Luiz Capitulino
On Tue, 21 Aug 2012 11:51:57 +0300 Yonit Halperin wrote: > When migrating, libvirt queries the migration status, and upon migration > completions, it closes the migration src. On the other hand, when > migration is completed, spice transfers data from the src to destination > via the client. This

  1   2   3   >