Re: [Qemu-devel] [PATCH 17/30] memory: add address_space_translate

2013-05-24 Thread Jan Kiszka
On 2013-05-21 12:57, Paolo Bonzini wrote: > Using phys_page_find to translate an AddressSpace to a MemoryRegionSection > is unwieldy. It requires to pass the page index rather than the address, > and later memory_region_section_addr has to be called. Replace > memory_region_section_addr with a fu

Re: [Qemu-devel] Win32 QEMU binaries built from MinGW fail (access violation)

2013-05-24 Thread Stefan Weil
Am 25.05.2013 03:56, schrieb Dan: > I've been trying to build QEMU source directly with MinGW. The > compile/link works but there are tons of warnings (mostly Wformat). > Once I try to run the binaries in Windows though, I quickly hit access > violations once the HD image is mounted. I've tested

Re: [Qemu-devel] [PATCH] target-i386: Disable CPUID_EXT_MONITOR when KVM is enabled

2013-05-24 Thread Paolo Bonzini
Il 25/05/2013 03:21, Bandan Das ha scritto: > There is one user-visible effect: "-cpu ...,enforce" will stop failing > because of missing KVM support for CPUID_EXT_MONITOR. But that's exactly > the point: there's no point in having CPU model definitions that would > never work as-is with neither TC

[Qemu-devel] Potential to accelerate QEMU for specific architectures

2013-05-24 Thread Lior Vernia
Hello, I am running x86 applications on an ARM device using QEMU, and found it too slow for my needs. This is to be expected, of course, this is not a complaint. However, I was wondering whether this could be helped by "overriding" the generic binary translation mechanism and focusing on lower lev

[Qemu-devel] Win32 QEMU binaries built from MinGW fail (access violation)

2013-05-24 Thread Dan
I've been trying to build QEMU source directly with MinGW. The compile/link works but there are tons of warnings (mostly Wformat). Once I try to run the binaries in Windows though, I quickly hit access violations once the HD image is mounted. I've tested on the linux-0.2.img.bz2 so that I can be

Re: [Qemu-devel] [PATCH] Remove unnecessary break statements

2013-05-24 Thread Stefan Weil
Am 24.05.2013 14:33, schrieb Richard W.M. Jones: > On Fri, May 24, 2013 at 12:19:25PM +0200, Stefan Weil wrote: >> Fix these warnings from cppcheck: >> >> hw/display/cirrus_vga.c:2603: >> hw/sd/sd.c:348: >> hw/timer/exynos4210_mct.c:1033: >> target-arm/translate.c:9886: >> target-s390x/mem_helper.c

[Qemu-devel] [PATCH V13 5/6] hmp: show ImageInfo in 'info block'

2013-05-24 Thread Wenchao Xia
Now human monitor can show image details, include internal snapshot and backing chain info for every block device. Signed-off-by: Wenchao Xia --- hmp.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/hmp.c b/hmp.c index 4fb76ec..2aa832c 100644 --- a/hmp.c +

[Qemu-devel] [PATCH V13 3/6] qmp: add recursive member in ImageInfo

2013-05-24 Thread Wenchao Xia
New member *backing-image is added to reflect the backing chain status. Signed-off-by: Wenchao Xia --- block/qapi.c | 16 +++- qapi-schema.json |5 - 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 680ec23..cbef584 10064

[Qemu-devel] [PATCH V13 4/6] qmp: add ImageInfo in BlockDeviceInfo used by query-block

2013-05-24 Thread Wenchao Xia
Now image info will be retrieved as an embbed json object inside BlockDeviceInfo, backing chain info and all related internal snapshot info can be got in the enhanced recursive structure of ImageInfo. Signed-off-by: Wenchao Xia --- block/qapi.c | 43 +-- inc

[Qemu-devel] [PATCH V13 2/6] block: add image info query function bdrv_query_image_info()

2013-05-24 Thread Wenchao Xia
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by: Wenchao Xia --- block/qapi.c | 36 +++

[Qemu-devel] [PATCH V13 6/6] hmp: add parameters device and -v for info block

2013-05-24 Thread Wenchao Xia
With these parameters, user can choose the information to be showed, to avoid message flood in the monitor. Signed-off-by: Wenchao Xia Reviewed-by: Kevin Wolf --- hmp.c | 25 - monitor.c |7 --- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH V13 1/6] block: add snapshot info query function bdrv_query_snapshot_info_list()

2013-05-24 Thread Wenchao Xia
This patch adds function bdrv_query_snapshot_info_list(), which will retrieve snapshot info of an image in qmp object format. The implementation is based on the code moved from qemu-img.c with modification to fit more for qmp based block layer API. Signed-off-by: Wenchao Xia Reviewed-by: Eric Bla

[Qemu-devel] [PATCH V13 0/6] enhancement for qmp/hmp interfaces of block info

2013-05-24 Thread Wenchao Xia
This serial let qmp interface show delaied info, including internal snapshot /backing chain on all block device at runtime, which helps management stack and human user, by retrieving exactly the same info of what qemu saws. Example: -> { "execute": "query-block" } <- { "return":[

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: try pkg-config ncurses first

2013-05-24 Thread Michael Tokarev
25.05.2013 00:07, Ed Maste wrote: > When probing for ncurses, try pkg-config first rather than after > explicit -lncurses and -lcurses. This fixes static linking in the case > that ncurses has additional dependencies, such as -ltinfo (as on FreeBSD). This is not a FreeBSD-specific thing, this is

Re: [Qemu-devel] [PATCH 15/30] memory: add address_space_valid

2013-05-24 Thread David Gibson
On Fri, May 24, 2013 at 11:52:17AM +0100, Peter Maydell wrote: > On 24 May 2013 09:02, Paolo Bonzini wrote: > > Il 23/05/2013 20:04, Peter Maydell ha scritto: > >> Shouldn't we be calling the MemoryRegionOps > >> accepts() callback here? What about access alignment constraints > >> and access size

[Qemu-devel] [PATCH V3 4/4] block: dump snapshot and image info to specified output

2013-05-24 Thread Wenchao Xia
bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now, some internal buffers are still used for format control, which have no chance to be truncated. As a result, these two functions have no more issue of truncation, and they can be used by both qemu and qemu-img with correct

[Qemu-devel] [PATCH V3 2/4] block: move snapshot code in block.c to block/snapshot.c

2013-05-24 Thread Wenchao Xia
All snapshot related code, except bdrv_snapshot_dump() and bdrv_is_snapshot(), is moved to block/snapshot.c. bdrv_snapshot_dump() will be moved to another file later. bdrv_is_snapshot() is not related with internal snapshot. It also fixes small code style errors reported by check script. Signed-of

[Qemu-devel] [PATCH V3 3/4] block: move qmp and info dump related code to block/qapi.c

2013-05-24 Thread Wenchao Xia
This patch is a pure code move patch, except following modification: 1 get_human_readable_size() is changed to static function. 2 dump_human_image_info() is renamed to bdrv_image_info_dump(). 3 in qmp_query_block() and qmp_query_blockstats, use bdrv_next(bs) instead of direct traverse of global arr

[Qemu-devel] [PATCH V3 1/4] block: drop bs_snapshots global variable

2013-05-24 Thread Wenchao Xia
From: Stefan Hajnoczi The bs_snapshots global variable points to the BlockDriverState which will be used to save vmstate. This is really a savevm.c concept but was moved into block.c:bdrv_snapshots() when it became clear that hotplug could result in a dangling pointer. While auditing the block

[Qemu-devel] [PATCH V3 0/4] qapi and snapshot code clean up in block layer

2013-05-24 Thread Wenchao Xia
These patches are the common part of my hmp/qmp block query series and Pavel's qmp snapshot command converion series. It mainly does following things: 1 move snapshot related code to block/snapshot.c, qmp and info dumping code to block/qapi.c. 2 better info dumping function to get rid of buffer, av

Re: [Qemu-devel] [PATCH] target-i386: Disable CPUID_EXT_MONITOR when KVM is enabled

2013-05-24 Thread Bandan Das
Forwarding message by Eduardo. I had misspelled nongnu.org in my first attempt! The spaces/tab comment by Eduardo has been fixed. Eduardo Habkost writes: > > By default, CPUID_EXT_MONITOR is enabled for some cpu models > such as Opteron_G3. Disable it if kvm_enabled() is true since > monitor/

[Qemu-devel] [PATCH] target-i386: Disable CPUID_EXT_MONITOR when KVM is enabled

2013-05-24 Thread Bandan Das
By default, CPUID_EXT_MONITOR is enabled for some cpu models such as Opteron_G3. Disable it if kvm_enabled() is true since monitor/mwait aren't supported by KVM yet. Signed-off-by: Bandan Das --- There is no user visible side-effect to this behavior, the aim is to clean up the default flags

Re: [Qemu-devel] [PATCH] Remove OSS support for OpenBSD

2013-05-24 Thread Laszlo Ersek
On 05/25/13 01:01, Brad Smith wrote: > Remove the OSS support for OpenBSD. The OSS API has not been usable > for quite some time. > > Signed-off-by: Brad Smith > > > diff --git a/audio/ossaudio.c b/audio/ossaudio.c > index 00be9c9..007c641 100644 > --- a/audio/ossaudio.c > +++ b/audio/ossaudio.

Re: [Qemu-devel] [PATCH] Remove OSS support for OpenBSD

2013-05-24 Thread Brad Smith
On Sat, May 25, 2013 at 12:51:23AM +0200, Laszlo Ersek wrote: > On 05/08/13 13:39, Brad Smith wrote: > > Remove the OSS support for OpenBSD. The OSS API has not been usable > > for quite some time. > > > > Signed-off-by: Brad Smith > > > > diff --git a/audio/ossaudio.c b/audio/ossaudio.c > > ind

[Qemu-devel] [PATCH] Remove OSS support for OpenBSD

2013-05-24 Thread Brad Smith
Remove the OSS support for OpenBSD. The OSS API has not been usable for quite some time. Signed-off-by: Brad Smith diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 00be9c9..007c641 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -25,11 +25,7 @@ #include #include #include -#i

Re: [Qemu-devel] [PATCH] Remove OSS support for OpenBSD

2013-05-24 Thread Laszlo Ersek
On 05/08/13 13:39, Brad Smith wrote: > Remove the OSS support for OpenBSD. The OSS API has not been usable > for quite some time. > > Signed-off-by: Brad Smith > > diff --git a/audio/ossaudio.c b/audio/ossaudio.c > index 00be9c9..007c641 100644 > --- a/audio/ossaudio.c > +++ b/audio/ossaudio.c >

[Qemu-devel] [PATCH] kvm: exclude ioeventfd from counting kvm_io_range limit

2013-05-24 Thread Amos Kong
We can easily reach the 1000 limit by start VM with a couple hundred I/O devices (multifunction=on). The hardcode limit already been adjusted 3 times (6 ~ 200 ~ 300 ~ 1000). In userspace, we already have maximum file descriptor to limit ioeventfd count. But kvm_io_bus devices also are used for pit

Re: [Qemu-devel] [Qemu-stable] qmp commands get rejected

2013-05-24 Thread mdroth
On Sat, May 25, 2013 at 12:12:22AM +0200, Stefan Priebe wrote: > Am 25.05.2013 00:09, schrieb mdroth: > >I would try to create a small example script. > > I use qmp-shell and other little scripts very often. > > >Am this be due to the fact that I don't wait for the welcome ban

Re: [Qemu-devel] [PATCH] Remove OSS support for OpenBSD

2013-05-24 Thread Brad Smith
On Wed, May 08, 2013 at 07:39:25AM -0400, Brad Smith wrote: > Remove the OSS support for OpenBSD. The OSS API has not been usable > for quite some time. > > Signed-off-by: Brad Smith ping. > diff --git a/audio/ossaudio.c b/audio/ossaudio.c > index 00be9c9..007c641 100644 > --- a/audio/ossaudio.

Re: [Qemu-devel] [Qemu-stable] qmp commands get rejected

2013-05-24 Thread Stefan Priebe
Am 25.05.2013 00:09, schrieb mdroth: I would try to create a small example script. I use qmp-shell and other little scripts very often. Am this be due to the fact that I don't wait for the welcome banner right now? If you're not reading from the socket, then you'll get the banner back when

Re: [Qemu-devel] [Qemu-stable] qmp commands get rejected

2013-05-24 Thread mdroth
On Fri, May 24, 2013 at 11:37:46PM +0200, Stefan Priebe wrote: > >Am 24.05.2013 17:21, schrieb Luiz Capitulino: > >>On Fri, 24 May 2013 16:36:26 +0200 > >>Stefan Priebe - Profihost AG wrote: > >> > >>>Am 24.05.2013 um 16:02 schrieb Luiz Capitulino : > >>> > On Fri, 24 May 2013 15:57:59 +0200 >

Re: [Qemu-devel] [PATCH 00/22] Memory/IOMMU patches, part 2: unassigned access detection

2013-05-24 Thread Richard Henderson
On 2013-05-24 10:05, Paolo Bonzini wrote: Paolo Bonzini (22): exec: eliminate io_mem_ram exec: drop useless #if cputlb: simplify tlb_set_page exec: make io_mem_unassigned private exec: do not use error_mem_read memory: dispatch unassigned accesses based on .valid.accepts memo

Re: [Qemu-devel] qmp commands get rejected

2013-05-24 Thread Stefan Priebe
Am 24.05.2013 23:37, schrieb Stefan Priebe: Am 24.05.2013 17:21, schrieb Luiz Capitulino: On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG wrote: Am 24.05.2013 um 16:02 schrieb Luiz Capitulino : On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG wrote: Am 24.0

Re: [Qemu-devel] qmp commands get rejected

2013-05-24 Thread Stefan Priebe
Mit freundlichen Grüßen Stefan Priebe Bachelor of Science in Computer Science (BSCS) Vorstand (CTO) --- Profihost AG Am Mittelfelde 29 30519 Hannover Deutschland Tel.: +49 (511) 5151 8181 | Fax.: +49 (511) 5151 8282 URL: http://www.profihost.com | E-Mail: i...

[Qemu-devel] [Bug 1180970] Re: qemu: fatal: Trying to execute code outside RAM or ROM; worked in 1.4.0, fails in 1.4.92

2013-05-24 Thread Laszlo Ersek
Proposed patch: http://thread.gmane.org/gmane.comp.emulators.qemu/213023 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1180970 Title: qemu: fatal: Trying to execute code outside RAM or ROM; worked

[Qemu-devel] [Bug 1180970] Re: qemu: fatal: Trying to execute code outside RAM or ROM; worked in 1.4.0, fails in 1.4.92

2013-05-24 Thread Laszlo Ersek
** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1180970 Title: qemu: fatal: Trying to execute code outside RAM or ROM; worked in 1.4.0, fails i

Re: [Qemu-devel] FPU x86 instructions error

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 23:39, Clemens Kolbitsch ha scritto: > Hi guys, > > we recently had an issue with running a program using FPU instructions > to obtain the current EIP (basically a weird way of "call 0; pop eax") > that was not working on QEMU (with TCG). > > Looking at the problem, we found this pa

[Qemu-devel] FPU x86 instructions error

2013-05-24 Thread Clemens Kolbitsch
Hi guys, we recently had an issue with running a program using FPU instructions to obtain the current EIP (basically a weird way of "call 0; pop eax") that was not working on QEMU (with TCG). Looking at the problem, we found this patch to be useful/fixing the issue: https://launchpadlibrarian.ne

Re: [Qemu-devel] [libvirt] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line

2013-05-24 Thread Eric Blake
On 05/22/2013 08:29 AM, Anthony Liguori wrote: > Peter Maydell writes: > >> On 22 May 2013 14:15, Anthony Liguori wrote: >>> Paolo Bonzini writes: You don't need to know what targets were supported in the version that you compiled from. Only one target is supported in this execu

Re: [Qemu-devel] qmp commands get rejected

2013-05-24 Thread Stefan Priebe
Am 24.05.2013 17:21, schrieb Luiz Capitulino: On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG wrote: Am 24.05.2013 um 16:02 schrieb Luiz Capitulino : On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG wrote: Am 24.05.2013 um 15:23 schrieb Luiz Capitulino : O

[Qemu-devel] [PATCH] i386/translate: ignore 0x67 (PREFIX_ADR) on TARGET_X86_64 && CODE64()

2013-05-24 Thread Laszlo Ersek
The code reorganization in commit 4a6fd938 broke handling of PREFIX_ADR. Restore the previous behavior: If TARGET_X86_64 *and* CODE64(): (a) PREFIX_ADR set: no effect, "aflag" should stay at the original "s->code32" value, (b) PREFIX_ADR clear: "aflag" should be set to constant 2. Other

[Qemu-devel] [PATCH 1/2] tcg-arm: Implement tcg_register_jit

2013-05-24 Thread Richard Henderson
Allows unwinding past the code_gen_buffer. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 91 ++-- 1 file changed, 82 insertions(+), 9 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 3d43412..4a691b1 100644

[Qemu-devel] [PATCH 2/2] tcg: Fix high_pc fields in .debug_info

2013-05-24 Thread Richard Henderson
I don't think the debugger actually looks at this for anything, using the correct .debug_frame contents, but might as well get it all correct. Signed-off-by: Richard Henderson --- tcg/tcg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 1d8099

Re: [Qemu-devel] [Bug 1180970] *** affects all x86_64 soft emulation

2013-05-24 Thread Laszlo Ersek
On 05/24/13 19:25, Duane Voth wrote: > qemu: fatal: Trying to execute code outside RAM or ROM; worked in > 1.4.0, fails in 1.4.92 > > Want to bring a little attention to this bug - the break is in > target-i386/translate.c which affects all x86_64 soft emulation in a > fairly subtle way (ie. users

[Qemu-devel] [Bug 1094786] Re: static build with curses fails if requires -ltinfo

2013-05-24 Thread Ed Maste
I ran into the same issue on FreeBSD, and just posted my patch to the qemu-devel list. It's the same solution stefanha describes above. (On FreeBSD we have an additional issue; we don't ship the .pc file with the ncurses port right now. I just hacked one together to include -ltinfo in Libs.priva

[Qemu-devel] [Bug 1094786] Re: static build with curses fails if requires -ltinfo

2013-05-24 Thread Ed Maste
** Also affects: freebsd-ports-mirror Importance: Undecided Status: New ** No longer affects: freebsd-ports-mirror -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1094786 Title: static bui

Re: [Qemu-devel] qmp commands get rejected

2013-05-24 Thread Stefan Priebe
Hi, i can easily reproduce this with the following script: http://pastebin.com/raw.php?i=JYZyJ8Hn Example output (sometimes it fails for qmp_capabilities and sometimes for qom-set): [cloud1-1202: ~]# perl sock.pl {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp

[Qemu-devel] [PATCH] configure: try pkg-config ncurses first

2013-05-24 Thread Ed Maste
When probing for ncurses, try pkg-config first rather than after explicit -lncurses and -lcurses. This fixes static linking in the case that ncurses has additional dependencies, such as -ltinfo (as on FreeBSD). Signed-off-by: Ed Maste --- configure | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information

2013-05-24 Thread Luiz Capitulino
On Fri, 24 May 2013 12:05:12 -0600 Eric Blake wrote: > On 05/24/2013 10:12 AM, Michael S. Tsirkin wrote: > > > > Event message contains the net client name, management might only want > > to query the single net client. > > The client can do the filtering itself. > >>> > >

Re: [Qemu-devel] tcg: Windows guests don't boot

2013-05-24 Thread Laszlo Ersek
On 05/24/13 21:05, Luiz Capitulino wrote: > Hi, > > Today I accidentally started qemu w/o -enable-kvm to run a Windows guest and > noticed it didn't boot: sometimes it hangs on a blue screen and sometimes it > keeps rebooting in a loop. > > I tried with Windows 2008 and Windows 8, and went back t

[Qemu-devel] tcg: Windows guests don't boot

2013-05-24 Thread Luiz Capitulino
Hi, Today I accidentally started qemu w/o -enable-kvm to run a Windows guest and noticed it didn't boot: sometimes it hangs on a blue screen and sometimes it keeps rebooting in a loop. I tried with Windows 2008 and Windows 8, and went back to qemu v1.2.0 to see if it's a bisectable regression, bu

Re: [Qemu-devel] [RFC PATCH v3 11/11] QMP/qmp.py: set locale for exceptions to display non-ascii messages correctly

2013-05-24 Thread Tomoki Sekiyama
On 5/23/13 8:30 , "Stefan Hajnoczi" wrote: >On Tue, May 21, 2013 at 11:34:16AM -0400, Tomoki Sekiyama wrote: >> qemu-ga in Windows may return error message with multibyte characters >> when the guest OS language is set to other than English. To display such >> messages correctly, this encodes the

Re: [Qemu-devel] [RFC PATCH v3 03/11] Add a script to extract VSS SDK headers on POSIX system

2013-05-24 Thread Laszlo Ersek
On 05/24/13 17:59, Eric Blake wrote: > On 05/24/2013 07:38 AM, Laszlo Ersek wrote: > >>> +++ b/scripts/extract-vsssdk-headers >>> @@ -0,0 +1,25 @@ >>> +#! /bin/bash >>> + > >>> +MAGIC=$'\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1' >> >> Can't help mentioning the following portable (alas, octal) equivalent :

[Qemu-devel] [PATCH 08/15] memory: Rename readable flag to romd_mode

2013-05-24 Thread Paolo Bonzini
From: Jan Kiszka "Readable" is a very unfortunate name for this flag because even a rom_device region will always be readable from the guest POV. What differs is the mapping, just like the comments had to explain already. Also, readable could currently be understood as being a generic region flag

[Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62

2013-05-24 Thread Paolo Bonzini
With the next patch, the memory API will complain if the TARGET_PHYS_ADDR_SPACE_BITS gets dangerously close to an overflow. s390x can handle up to 64 bit of physical address space from its page tables, but we never use that much. Just decrease the value. Cc: Alexander Graf Signed-off-by: Paolo

Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information

2013-05-24 Thread Eric Blake
On 05/24/2013 10:12 AM, Michael S. Tsirkin wrote: > > Event message contains the net client name, management might only want > to query the single net client. The client can do the filtering itself. >>> >> I'm not sure I buy the responsiveness argument. Sure, the fastest I/O

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-24 Thread Richard Henderson
On 05/24/2013 10:28 AM, Peter Maydell wrote: > It does what a frame pointer usually does, ie permits the debugger > (and other tools) to unwind the stack. > And is there perchance a reason we've been dropping the frame pointer from new abis, like x86_64? On the side unwind information does the j

[Qemu-devel] [PATCH 16/22] memory: accept mismatching sizes in memory_region_access_valid

2013-05-24 Thread Paolo Bonzini
The memory API is able to use smaller/wider accesses than requested, match that in memory_region_access_valid. Of course, the accepts callback is still free to reject those accesses. Signed-off-by: Paolo Bonzini --- memory.c | 29 - 1 file changed, 20 insertions(+),

[Qemu-devel] [Bug 1100843] Re: Live Migration Causes Performance Issues

2013-05-24 Thread C Cormier
@Paolo yes, when i was doing that testing i was able to consistently reproduce those results in #23, but it was a red herring, as of now i cannot reproduce the results in #23 consistently (i suspect it may have had something to do with the order i was executing tests but didn’t chase it any furthe

[Qemu-devel] [PATCH 03/15] exec: make qemu_get_ram_ptr private

2013-05-24 Thread Paolo Bonzini
It is a private interface between exec.c and memory.c. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- include/exec/cpu-common.h | 2 -- include/exec/memory-internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/

[Qemu-devel] [PATCH 17/22] memory: add big endian support to access_with_adjusted_size

2013-05-24 Thread Paolo Bonzini
This will be used to split 8-byte access down to two four-byte accesses. Signed-off-by: Paolo Bonzini --- memory.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/memory.c b/memory.c index c72f56d..9085969 100644 --- a/memory.c +++ b/memory.c @@ -362,8 +362,12 @@ static

[Qemu-devel] [PATCH 01/22] exec: eliminate io_mem_ram

2013-05-24 Thread Paolo Bonzini
It is never used, the IOTLB always goes through io_mem_notdirty. In fact in softmmu_template.h, if it were, QEMU would crash just below the tests, as soon as io_mem_read/write dispatches to error_mem_read/write. Signed-off-by: Paolo Bonzini --- exec.c | 18 ++---

[Qemu-devel] [PATCH 20/22] exec: just use io_mem_read/io_mem_write for 8-byte I/O accesses

2013-05-24 Thread Paolo Bonzini
The memory API is able to split it in two 4-byte accesses. Signed-off-by: Paolo Bonzini --- exec.c | 8 +--- include/exec/softmmu_template.h | 24 +--- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/exec.c b/exec.c index 42f7636.

[Qemu-devel] [PATCH 11/15] memory: fix address space initialization/destruction

2013-05-24 Thread Paolo Bonzini
From: Avi Kivity A couple of fields were left uninitialized. This was not observed earlier because all address spaces were statically allocated. Also free allocation for those fields. Reviewed-by: Peter Maydell Signed-off-by: Avi Kivity Signed-off-by: Paolo Bonzini --- memory.c | 3 +++ 1

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-24 Thread Peter Maydell
On 24 May 2013 18:17, Richard Henderson wrote: > On 05/24/2013 10:08 AM, Peter Maydell wrote: >> Where's the waste? The procedure calling standard mandates that we >> set FP up, so it's not like we can use it as a general purpose >> register anywhere. > > Well, the calling standard is another docu

[Qemu-devel] [Bug 1180970] *** affects all x86_64 soft emulation

2013-05-24 Thread Duane Voth
qemu: fatal: Trying to execute code outside RAM or ROM; worked in 1.4.0, fails in 1.4.92 Want to bring a little attention to this bug - the break is in target-i386/translate.c which affects all x86_64 soft emulation in a fairly subtle way (ie. users will report a wide variety of problems none of w

[Qemu-devel] [Bug 1100843] Re: Live Migration Causes Performance Issues

2013-05-24 Thread Paolo Bonzini
Oops, I missed Chris's comment #28. Thanks. >From comment #23, the 1.4 machine type seems to be "fast", while 1.3 is slow. This doesn't make much sense, given the differences between the two machine types: enable_compat_apic_id_mode(); .driver = "usb-tablet",\ .prop

[Qemu-devel] [PATCH 1/2] vfio: Convert type1 iommu to use rbtree

2013-05-24 Thread Alex Williamson
We need to keep track of all the DMA mappings of an iommu container so that it can be automatically unmapped when the user releases the file descriptor. We currently do this using a simple list, where we merge entries with contiguous iovas and virtual addresses. Using a tree for this is a bit mor

[Qemu-devel] [PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-24 Thread Alex Williamson
We currently send all mappings to the iommu in PAGE_SIZE chunks, which prevents the iommu from enabling support for larger page sizes. We still need to pin pages, which means we step through them in PAGE_SIZE chunks, but we can batch up contiguous physical memory chunks to allow the iommu the oppor

[Qemu-devel] [PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-24 Thread Alex Williamson
This series let's the vfio type1 iommu backend take advantage of iommu large page support. See patch 2/2 for the details. This has been tested on both amd_iommu and intel_iommu, but only my AMD system has large page support. I'd appreciate any testing and feedback on other systems, particularly

[Qemu-devel] [PATCH 10/22] exec: expect mr->ops to be initialized for ROM

2013-05-24 Thread Paolo Bonzini
There is no need anymore to use the special phys_section_rom section. Signed-off-by: Paolo Bonzini --- exec.c | 9 - 1 file changed, 9 deletions(-) diff --git a/exec.c b/exec.c index 613bbd7..411a224 100644 --- a/exec.c +++ b/exec.c @@ -2332,9 +2332,6 @@ void stl_phys_notdirty(hwaddr ad

[Qemu-devel] [PATCH 15/22] memory: add address_space_access_valid

2013-05-24 Thread Paolo Bonzini
The old-style IOMMU lets you check whether an access is valid in a given DMAContext. There is no equivalent for AddressSpace in the memory API, but we can implement it easily. Signed-off-by: Paolo Bonzini --- dma-helpers.c | 5 + exec.c| 21 + in

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-24 Thread Richard Henderson
On 05/24/2013 10:08 AM, Peter Maydell wrote: > Where's the waste? The procedure calling standard mandates that we > set FP up, so it's not like we can use it as a general purpose > register anywhere. Well, the calling standard is another document that's not available yet, so obviously I don't know

[Qemu-devel] [Bug 1100843] Re: Live Migration Causes Performance Issues

2013-05-24 Thread Paolo Bonzini
Can you please check if you have EPT enabled? This could be https://bugzilla.kernel.org/show_bug.cgi?id=58771 ** Bug watch added: Linux Kernel Bug Tracker #58771 http://bugzilla.kernel.org/show_bug.cgi?id=58771 -- You received this bug notification because you are a member of qemu- devel-ml,

[Qemu-devel] [PATCH 22/22] memory: add return value to address_space_rw/read/write

2013-05-24 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- exec.c| 34 +++--- include/exec/memory.h | 12 +--- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/exec.c b/exec.c index 28dcee9..07bc4f9 100644 --- a/exec.c +++ b/exec.c @@ -1899,7 +1899,7 @@ s

[Qemu-devel] [PATCH 19/22] memory: correctly handle endian-swapped 64-bit accesses

2013-05-24 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- exec.c | 12 +--- memory.c | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 17a3292..42f7636 100644 --- a/exec.c +++ b/exec.c @@ -2260,9 +2260,6 @@ static inline uint64_t ldq_phys_internal(hwaddr addr,

[Qemu-devel] [PATCH 14/22] exec: implement .valid.accepts for subpages

2013-05-24 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- exec.c | 20 1 file changed, 20 insertions(+) diff --git a/exec.c b/exec.c index 519a82d..8107530 100644 --- a/exec.c +++ b/exec.c @@ -1555,9 +1555,29 @@ static void subpage_write(void *opaque, hwaddr addr, io_mem_write(section->mr, addr

[Qemu-devel] [PATCH 09/22] memory: assign MemoryRegionOps to all regions

2013-05-24 Thread Paolo Bonzini
This allows to remove the checks on section->readonly. Write accesses to ROM will not be considered "direct" even in exec.c, and will go through mr->ops just like TCG does. Signed-off-by: Paolo Bonzini --- memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/memory.c b

[Qemu-devel] [PATCH 12/22] exec: introduce memory_access_size

2013-05-24 Thread Paolo Bonzini
This will be used by address_space_access_valid too. Signed-off-by: Paolo Bonzini --- exec.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/exec.c b/exec.c index 7f6b5dd..519a82d 100644 --- a/exec.c +++ b/exec.c @@ -1865,6 +1865,17 @@ static inl

[Qemu-devel] [PATCH 06/22] memory: dispatch unassigned accesses based on .valid.accepts

2013-05-24 Thread Paolo Bonzini
This provides the basics for detecting accesses to unassigned memory as soon as they happen, and also for a simple implementation of address_space_access_valid. Signed-off-by: Paolo Bonzini --- exec.c | 36 memory.c | 28 ++-- 2 file

[Qemu-devel] [PATCH 18/22] memory: split accesses even when the old MMIO callbacks are used

2013-05-24 Thread Paolo Bonzini
This is useful for 64-bit memory accesses. Signed-off-by: Paolo Bonzini --- memory.c | 63 ++- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/memory.c b/memory.c index 9085969..728a6c5 100644 --- a/memory.c +++ b/memory

[Qemu-devel] [PATCH 11/22] exec: introduce memory_access_is_direct

2013-05-24 Thread Paolo Bonzini
After the previous patches, this is a common test for all read/write functions. address_space_rw to ROMs is now treated as "unassigned" instead of being ignored. This matches what TCG-generated code does. Signed-off-by: Paolo Bonzini --- exec.c | 39 ++- 1 f

[Qemu-devel] [PATCH 04/22] exec: make io_mem_unassigned private

2013-05-24 Thread Paolo Bonzini
There is no reason to avoid a recompile before accessing unassigned memory. In the end it will be treated as MMIO anyway. Signed-off-by: Paolo Bonzini --- exec.c | 4 ++-- include/exec/cpu-common.h | 1 - include/exec/softmmu_template.h | 10 ++ 3 files

Re: [Qemu-devel] [PATCH 2/4] tcg/aarch64: implement new TCG target for aarch64

2013-05-24 Thread Peter Maydell
On 24 May 2013 18:02, Richard Henderson wrote: > On 05/24/2013 01:53 AM, Claudio Fontana wrote: >> We use FP to point to the callee_saved registers, and to move to/from them >> in the tcg_out_store_pair and tcg_out_load_pair functions. > > I hadn't noticed you'd hard-coded FP into the load/store_p

[Qemu-devel] [PATCH 08/22] memory: move unassigned_mem_ops to memory.c

2013-05-24 Thread Paolo Bonzini
reservation_ops is already doing the same thing. Signed-off-by: Paolo Bonzini --- exec.c | 12 include/exec/memory-internal.h | 2 ++ memory.c | 44 ++ 3 files changed, 16 insertions(+), 42 deleti

[Qemu-devel] [PATCH 09/15] memory: do not duplicate memory_region_destructor_none

2013-05-24 Thread Paolo Bonzini
Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- memory.c | 5 - 1 file changed, 5 deletions(-) diff --git a/memory.c b/memory.c index 013464b..5431463 100644 --- a/memory.c +++ b/memory.c @@ -768,10 +768,6 @@ static void memory_region_destructor_ram_from_ptr(MemoryRegion *mr)

[Qemu-devel] [PATCH 21/22] memory: propagate errors on I/O dispatch

2013-05-24 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- exec.c | 21 - include/exec/exec-all.h | 6 +++--- include/exec/softmmu_template.h | 4 +++- memory.c| 35 ++- 4 files changed, 36 insertions(+), 30 dele

[Qemu-devel] [PATCH 05/22] exec: do not use error_mem_read

2013-05-24 Thread Paolo Bonzini
We will soon reach this case when doing (unaligned) accesses that partly span past the end of memory. We do not want to crash in that case. unassigned_mem_ops and rom_mem_ops are now the same. Signed-off-by: Paolo Bonzini --- exec.c | 16 ++-- 1 file changed, 2 insertions(+), 14 de

[Qemu-devel] [PATCH 10/15] memory: make memory_global_sync_dirty_bitmap take an AddressSpace

2013-05-24 Thread Paolo Bonzini
Since this is a MemoryListener operation, it only makes sense on an AddressSpace granularity. Suggested-by: Peter Maydell Signed-off-by: Paolo Bonzini --- arch_init.c | 2 +- include/exec/memory.h | 7 +++ memory.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletion

[Qemu-devel] [PATCH 03/22] cputlb: simplify tlb_set_page

2013-05-24 Thread Paolo Bonzini
The same "if" condition is repeated twice. Signed-off-by: Paolo Bonzini --- cputlb.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cputlb.c b/cputlb.c index aba7e44..b56bc01 100644 --- a/cputlb.c +++ b/cputlb.c @@ -262,17 +262,14 @@ void tlb_set_page(CPUArchSt

[Qemu-devel] [PATCH 13/22] memory: export memory_region_access_valid to exec.c

2013-05-24 Thread Paolo Bonzini
We'll use it to implement address_space_access_valid. Signed-off-by: Paolo Bonzini --- include/exec/memory-internal.h | 3 +++ memory.c | 8 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal

[Qemu-devel] [PATCH 00/22] Memory/IOMMU patches, part 2: unassigned access detection

2013-05-24 Thread Paolo Bonzini
This is part 2 of the memory/IOMMU patches. These reorganize the handling of unassigned accesses so that they are propagated as errors during I/O dispatch. In the end, a return value is added to address_space_rw/read/write. This is particularly useful when an IOMMU is available, because it lets

[Qemu-devel] [PATCH 14/15] memory: populate FlatView for new address spaces

2013-05-24 Thread Paolo Bonzini
Even a new address space might have a non-empty FlatView. In order to initialize it properly, address_space_init should (a) call memory_region_transaction_commit after the address space is inserted into the list; (b) force memory_region_transaction_commit to do something. This bug was latent so f

[Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-05-24 Thread Paolo Bonzini
Using phys_page_find to translate an AddressSpace to a MemoryRegionSection is unwieldy. It requires to pass the page index rather than the address, and later memory_region_section_addr has to be called. Replace memory_region_section_addr with a function that does all of it: call phys_page_find, c

[Qemu-devel] [PATCH 07/15] memory: Replace open-coded memory_region_is_romd

2013-05-24 Thread Paolo Bonzini
From: Jan Kiszka Improves readability. Reviewed-by: Peter Maydell Signed-off-by: Jan Kiszka --- translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translate-all.c b/translate-all.c index da93608..0d84b0d 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1

[Qemu-devel] [PATCH 02/22] exec: drop useless #if

2013-05-24 Thread Paolo Bonzini
This code is only compiled for softmmu targets. Signed-off-by: Paolo Bonzini --- exec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/exec.c b/exec.c index b720be5..7728ea3 100644 --- a/exec.c +++ b/exec.c @@ -1430,10 +1430,8 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_add

[Qemu-devel] [PATCH 13/15] memory: limit sections in the radix tree to the actual address space size

2013-05-24 Thread Paolo Bonzini
From: Avi Kivity The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS. If a larger memory region is registered, it will overflow. Fix by limiting any section in the radix tree to the supported size. This problem was not observed earlier since artificial regions (containers and

[Qemu-devel] [PATCH 15/15] memory: clean up phys_page_find

2013-05-24 Thread Paolo Bonzini
Remove the goto. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- exec.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 3fdca46..3a9ddcb 100644 --- a/exec.c +++ b/exec.c @@ -187,19 +187,15 @@ MemoryRegionSection *phys_page_find(Addre

[Qemu-devel] [PATCH 05/15] memory: assert that PhysPageEntry's ptr does not overflow

2013-05-24 Thread Paolo Bonzini
While sized to 15 bits in PhysPageEntry, the ptr field is ORed into the iotlb entries together with a page-aligned pointer. The ptr field must not overflow into this page-aligned value, assert that it is smaller than the page size. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- ex

[Qemu-devel] [PATCH 02/15] exec: eliminate qemu_put_ram_ptr

2013-05-24 Thread Paolo Bonzini
Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- exec.c| 8 hw/pci/pci.c | 2 -- hw/scsi/megasas.c | 1 - include/exec/cpu-common.h | 1 - trace-events | 3 --- 5 files changed, 15 deletions(-) diff --git a/exec.c b/exec.

  1   2   3   >