[Qemu-devel] [PATCH 35/48] mmu-hash32: Don't look up page tables on BAT permission error

2013-03-12 Thread David Gibson
BEHAVIOUR CHANGE Currently, on any failure translating an address with BATs, we proceed to normal segment and page table translation. That's incorrect if the BAT error was due to permissions, rather than not finding a matching BAT. We've gotten away with it because a guest would not usually put t

[Qemu-devel] [PATCH 29/48] mmu-hash64: Clean up ppc_hash64_htab_lookup()

2013-03-12 Thread David Gibson
This patch makes a general cleanup of the address mangling logic in ppc_hash64_htab_lookup(). In particular it now avoids repeatedly switching on the segment size. The lack of SLB and multiple segment sizes on 32-bit means an analogous cleanup is not needed there. Signed-off-by: David Gibson --

[Qemu-devel] [PATCH 34/48] mmu-hash32: Cleanup BAT lookup

2013-03-12 Thread David Gibson
This patch makes a general cleanup of the ppc_hash32_get_bat() function, renaming it to ppc_hash32_bat_lookup(). In particular, the new function only looks for a matching BAT, with the permissions check from the old function moved to the caller. Signed-off-by: David Gibson --- target-ppc/mmu-ha

[Qemu-devel] [PATCH 37/48] mmu-hash32: Remove nx from context structure

2013-03-12 Thread David Gibson
Previous cleanups have meant the nx field of the mmu_ctx_hash32 structure is now only used within ppc_hash32_translate(), and so it can be replaced by a local variable. Signed-off-by: David Gibson --- target-ppc/mmu-hash32.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH 08/48] target-ppc: Rework get_physical_address()

2013-03-12 Thread David Gibson
Currently get_physical_address() first checks to see if translation is enabled in the MSR, then in the translation on case switches on the mmu type. Except that for BookE MMUs, translation is always on, and so it has to switch in the "translation off" case as well and do the same thing as the tran

[Qemu-devel] [PATCH 02/18] console: kill DisplayState->opaque

2013-03-12 Thread Gerd Hoffmann
It's broken by design. There can be multiple DisplayChangeListener instances, so they simply can't store state in the (single) DisplayState struct. Try 'qemu -display gtk -vnc :0', watch it crash & burn. With DisplayChangeListenerOps having a more sane interface now we can simply use the Display

[Qemu-devel] [PATCH 04/18] qxl: zap qxl0 global

2013-03-12 Thread Gerd Hoffmann
DisplayChangeListener is passed now to all DisplayChangeListenerOps callbacks, so we can use that to access the qxl state and kill the qxl0 global variable. Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --gi

[Qemu-devel] [PATCH 42/48] mmu-hash*: Correctly mask RPN from hash PTE

2013-03-12 Thread David Gibson
BEHAVIOUR CHANGE At present we take the whole of word 1 of the hash PTE as the real page number used to calculate the translated address. This is incorrect, because it leaves the flags from the low bits of PTE word 1 in place in the rpm. We mostly get away with that because the value is later ma

[Qemu-devel] [PATCH 00/18] console: data structures overhaul

2013-03-12 Thread Gerd Hoffmann
Hi, This patch series sorts the qemu console data structures. Current state is that DisplayState is used pretty much everywhere. Which is bad. With this patch series applied it looks like this instead: DisplaySurface Central framebuffer data structure. ui frontents (gtk, sdl,

[Qemu-devel] [PATCH 20/48] mmu-hash*: Remove eaddr field from mmu_ctx_hash{32, 64}

2013-03-12 Thread David Gibson
The eaddr field of mmu_ctx_hash{32,64} is effectively just used to pass the effective address from get_segment{32,64}() to find_pte{32,64}(). Just pass it as a normal parameter instead. Signed-off-by: David Gibson --- target-ppc/mmu-hash32.c | 12 +--- target-ppc/mmu-hash64.c | 12 +

[Qemu-devel] [PATCH 25/48] mmu-hash*: Don't keep looking for PTEs after we find a match

2013-03-12 Thread David Gibson
BEHAVIOUR CHANGE The ppc hash mmu hashes each virtual address to a primary and secondary possible hash bucket (aka PTE group or PTEG) each with 8 PTEs. Then we need a linear search through the PTEs to find the correct one for the virtual address we're translating. It is a programming error for t

[Qemu-devel] [PATCH 18/18] console: remove ds_get_* helper functions

2013-03-12 Thread Gerd Hoffmann
Switch the few remaining ds_get_* uses in console.c over to the new surface_* accessors. While doing so tripped over a few leftovers from commit a93a4a226a2afba147ba5df688b85d844f537c68 (code using depth == 0 as indicator for textmode rendering). Fixed them up. Finally dropped ds_get_* helper he

[Qemu-devel] [PATCH 07/18] console: rework DisplaySurface handling [vga emu side]

2013-03-12 Thread Gerd Hoffmann
Decouple DisplaySurface allocation & deallocation from DisplayState. Replace dpy_gfx_resize + dpy_gfx_setdata with a dpy_gfx_replace_surface function. This handles the graphic hardware emulation. Signed-off-by: Gerd Hoffmann --- hw/arm/nseries.c |7 - hw/arm/palm.c|7 ---

[Qemu-devel] [PATCH 12/18] sdl: stop using DisplayState

2013-03-12 Thread Gerd Hoffmann
Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann --- ui/sdl.c | 92 ++ 1 file changed, 51 insertions(+), 41 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 85eefdf..58f16bc

[Qemu-devel] [PATCH 33/48] mmu-hash32: Clean up BAT matching logic

2013-03-12 Thread David Gibson
The code to search for a matching BAT for a virtual address is somewhat longwinded and awkward. In particular, it relies on seperate size and validity information being returned from the hash32_bat_size() function (and 601 specific variant). We simplify this by having hash32_bat_size() return ins

[Qemu-devel] [PATCH 10/18] gtk: stop using DisplayState

2013-03-12 Thread Gerd Hoffmann
Rework DisplayStateListener callbacks to not use the DisplayState any more. Factor out the window size handling to a separate function, so the zoom callbacks can call that directly instead of abusing the gd_switch DisplayStateListener callback for that. Signed-off-by: Gerd Hoffmann --- ui/gtk.c

[Qemu-devel] [PATCH 11/18] vnc: stop using DisplayState

2013-03-12 Thread Gerd Hoffmann
Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann --- ui/vnc-enc-tight.c |7 +++-- ui/vnc-jobs.c |1 - ui/vnc.c | 77 +--- ui/vnc.h |3 +- 4 files changed

[Qemu-devel] [PATCH 36/48] mmu-hash*: Don't update PTE flags when permission is denied

2013-03-12 Thread David Gibson
BEHAVIOUR CHANGE Currently if ppc_hash{32,64}_translate() finds a PTE matching the given virtual address, it will always update the PTE's R & C (Referenced and Changed) bits. This happens even if the PTE's permissions mean we are about to deny the translation. This is clearly a bug, although we

[Qemu-devel] [PATCH 05/18] qxl: better vga init in enter_vga_mode

2013-03-12 Thread Gerd Hoffmann
Ask the vga core to update the display. Will trigger dpy_gfx_resize if needed. More complete than just calling dpy_gfx_resize. Signed-off-by: Gerd Hoffmann --- hw/qxl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/qxl.c b/hw/qxl.c index 54a8d91..5d830f0 100644 ---

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2013 at 10:18:12AM +0100, Kevin Wolf wrote: > Am 10.03.2013 um 10:57 hat Dietmar Maurer geschrieben: > > > The difference between this approach and Dietmar's series is that the > > > backup > > > archive format is implemented outside QEMU and runs as a separate program. > > > > >

[Qemu-devel] [PATCH 38/48] mmu-hash*: Clean up permission checking

2013-03-12 Thread David Gibson
Currently checking of PTE permission bits is split messily amongst ppc_hash{32,64}_pp_check(), ppc_hash{32,64}_check_prot() and their callers. This patch cleans this up to have the new function ppc_hash{32,64}_pte_prot() compute the page permissions from the SLBE (for 64-bit) or segment register (3

[Qemu-devel] [PATCH 41/48] mmu-hash*: Clean up real address calculation

2013-03-12 Thread David Gibson
More recent 64-bit hash MMUs support multiple page sizes, and PTEs for large pages only include the offset of the whole large page. But the qemu tlb only handles pages of the base size (4k) so we need to break up the large pages into 4k pieces for the qemu tlb. To do that we have a somewhat awkwa

[Qemu-devel] [PATCH 48/48] target-ppc: Use QOM method dispatch for MMU fault handling

2013-03-12 Thread David Gibson
After previous cleanups, the many scattered checks of env->mmu_model in the ppc MMU implementation have, at least for "classic" hash MMUs been reduced (almost) to a single switch at the top of cpu_ppc_handle_mmu_fault(). An explicit switch is still a pretty ugly way of handling this though. Now t

[Qemu-devel] [PATCH 45/48] mmu-hash64: Implement Virtual Page Class Key Protection

2013-03-12 Thread David Gibson
Version 2.06 of the Power architecture describes an additional page protection mechanism. Each virtual page has a "class" (0-31) recorded in the PTE. The AMR register contains bits which can prohibit reads and/or writes on a class by class basis. Interestingly, the AMR is userspace readable and

[Qemu-devel] [PATCH 06/18] sdl: drop dead code

2013-03-12 Thread Gerd Hoffmann
DisplayAllocator removal (commit 187cd1d9f30d13f0d0ef682e4d91cfa3e4cbd472) made this a nop. Signed-off-by: Gerd Hoffmann --- ui/sdl.c |5 - 1 file changed, 5 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 5baffa0..fc4dc1b 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -458,11 +458,6 @@ st

[Qemu-devel] [PATCH 17/18] console: zap color_table

2013-03-12 Thread Gerd Hoffmann
qemu_create_surface hands out 32bpp surfaces. So we can just use color_table_rgb directly. Signed-off-by: Gerd Hoffmann --- ui/console.c | 83 +- 1 file changed, 6 insertions(+), 77 deletions(-) diff --git a/ui/console.c b/ui/console.c i

[Qemu-devel] [PATCH 18/48] mmu-hash*: Reduce use of access_type

2013-03-12 Thread David Gibson
In ppc env->access_type is updated by e.g. integer load/stores with ACCESS_INT floating point load/stores with ACCESS_FLOAT and so forth. In hash mmu fault paths it can also b set to ACCESS_CODE for instruction fetch accesses. But the only place which uses anything more of the access_type than wh

[Qemu-devel] [PATCH 15/48] target-ppc: mmu_ctx_t should not be a global type

2013-03-12 Thread David Gibson
mmu_ctx_t is currently defined in cpu.h. However it is used for temporary information relating to mmu translation, and is only used in mmu_helper.c and (now) mmu-hash{32,64}.c. Furthermore it contains information which should be specific to particular MMU types. Therefore, move its definition to

[Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Peter Lieven
Hi, a second patch to optimize live migration. I have generated some artifical load testing for zero pages. Ordinary dup or non dup pages are not affected. savings for zero pages (test case): non SSE2:30s -> 26s SSE2:27s -> 21s optionally I would suggest optimizing buffer_is_zero

Re: [Qemu-devel] virtio-s390: document GPR4/GPR2 cookie values

2013-03-12 Thread Rusty Russell
Cornelia Huck writes: > On Thu, 7 Mar 2013 20:02:21 +0200 > "Michael S. Tsirkin" wrote: > >> virtio-s390 on kvm can use a cookie value passed to guest > > s/virtio-s390/virtio-ccw/ (to avoid confusion with s390-virtio, which > was never specced) > >> to optimize channel/VQ lookups. >> Document th

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Paolo Bonzini
Il 12/03/2013 11:51, Peter Lieven ha scritto: > Hi, > > a second patch to optimize live migration. I have generated some > artifical load > testing for zero pages. Ordinary dup or non dup pages are not affected. > > savings for zero pages (test case): > non SSE2:30s -> 26s > SSE2:27

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Dietmar Maurer
> It's a slippery slope to put VMA into QEMU. What will you say when patches > for > OVF or some other format turn up? I agree, we should concentrate to have the basic framework. Time will show what archive format people prefer.

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Peter Lieven
Am 12.03.2013 um 12:11 schrieb Paolo Bonzini : > Il 12/03/2013 11:51, Peter Lieven ha scritto: >> Hi, >> >> a second patch to optimize live migration. I have generated some >> artifical load >> testing for zero pages. Ordinary dup or non dup pages are not affected. >> >> savings for zero pages

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Kevin Wolf
Am 12.03.2013 um 11:50 hat Stefan Hajnoczi geschrieben: > On Tue, Mar 12, 2013 at 10:18:12AM +0100, Kevin Wolf wrote: > > Maybe we could consider having the backup tool inside the qemu.git tree > > and thus provide a common format that management applications can choose > > to use, but still have i

[Qemu-devel] [PATCH 30/48] mmu-hash*: Fold pte_check*() logic into caller

2013-03-12 Thread David Gibson
With previous cleanups made, the 32-bit and 64-bit pte_check*() functions are pretty trivial and only have one call site. This patch therefore clarifies the overall code flow by folding those functions into their call site. Signed-off-by: David Gibson --- target-ppc/mmu-hash32.c | 48

[Qemu-devel] [PATCH 03/18] spice: zap sdpy global

2013-03-12 Thread Gerd Hoffmann
DisplayChangeListener is passed now to all DisplayChangeListenerOps callbacks, so we can use that to access the spice display state and kill the sdpy global variable. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 30 -- 1 file changed, 16 insertions(+), 14 d

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Dietmar Maurer
> OVF isn't an image format. I would really like to produce OVA archives, with a > OVF description passed by the management tool and images in one of our native > formats. If this isn't streamable though (as I expect), tbat would be more for > storing an archive of qcow2s instead of VMAs. OVF does

[Qemu-devel] [PATCH 40/48] mmu-hash*: Clean up PTE flags update

2013-03-12 Thread David Gibson
Currently the ppc_hash{32,64}_pte_update_flags() helper functions update a PTE's referenced and changed bits as necessary to reflect the access. It is somewhat long winded, though. This patch open codes them in their (single) callers, in a simpler way. Signed-off-by: David Gibson --- target-pp

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Dietmar Maurer
> OVF isn't an image format. I would really like to produce OVA archives, with a > OVF description passed by the management tool Another interesting part is how you translate a libvirt configuration into ovf description, and back - without losing any information?

[Qemu-devel] [PATCH 26/48] mmu-hash*: Separate PTEG searching from permissions checking

2013-03-12 Thread David Gibson
find_pte{32,64{() do several things. First they search through a PTEG ooking for a PTE matching our virtual address. Then they do permissions checking and other processing on that PTE. This patch separates the search by VA out from the rest. The search is combined with the pte{32,64}_match() fu

[Qemu-devel] [PATCH 47/48] target-ppc: Move ppc tlb_fill implementation into mmu_helper.c

2013-03-12 Thread David Gibson
For softmmu builds the interface from the generic code to the target specific MMU implementation is through the tlb_fill() function. For ppc this is currently in mem_helper.c, whereas it would make more sense in mmu_helper.c. This patch moves it, which also allows cpu_ppc_handle_mmu_fault() to be

[Qemu-devel] [PATCH 44/48] mmu-hash*: Merge translate and fault handling functions

2013-03-12 Thread David Gibson
ppc_hash{32,64}_handle_mmu_fault() is now the only caller of ppc_hash{32,64{_translate(), so this patch combines them together. This means that instead of one returning a variety of non-obvious error codes which then get translated into the various mmu exception conditions, we can just generate th

[Qemu-devel] [PATCH 46/48] target-ppc: Split user only code out of mmu_helper.c

2013-03-12 Thread David Gibson
mmu_helper.c is, for obvious reasons, almost entirely concerned with softmmu builds of qemu. However, it does contain one stub function which is used when CONFIG_USER_ONLY=y - the user only versoin of cpu_ppc_handle_mmu_fault, which always triggers an exception. The entire rest of the file is sur

[Qemu-devel] [PATCH 39/48] mmu-hash64: Factor SLB N bit into permissions bits

2013-03-12 Thread David Gibson
BEHAVIOUR CHANGE Currently, for 64-bit hash mmu, the execute protection bit placed into the qemu tlb is based only on the N (No execute) bit from the PTE. However, No Execute can also be set at the segment level. We do check this on execute faults, but this still means we could incorrectly allow

[Qemu-devel] [PATCH 21/48] mmu-hash*: Combine ppc_hash{32, 64}_get_physical_address and get_segment{32, 64}()

2013-03-12 Thread David Gibson
After previous work, ppc_hash{32,64}_get_physical_address() are almost trivial wrappers around get_segment{32,64}() which does nearly all the work of translating an address according to the hash mmu model. Therefore combine the two functions into one, under the better name of ppc_hash{32,64}_trans

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Paolo Bonzini
Il 12/03/2013 12:20, Peter Lieven ha scritto: >> * zero pages remain zero, and thus are only processed once > > you are right this will be the case. > >> >> * non-zero pages are modified often, and thus are processed multiple times. >> >> Your patch adds overhead in the case where a page is non-z

[Qemu-devel] [PATCH 08/18] console: rework DisplaySurface handling [dcl/ui side]

2013-03-12 Thread Gerd Hoffmann
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListener callbacks with a dpy_gfx_switch callback which notifies the ui code when the framebuffer backing storage changes. Signed-off-by: Gerd Hoffmann --- hw/qxl.c |9 + include/ui/console.h |7 +

[Qemu-devel] [PATCH 09/18] console: add surface_*() getters

2013-03-12 Thread Gerd Hoffmann
Add convinence wrappers to query DisplaySurface properties. Simliar to ds_get_*, but operating in the DisplaySurface not the DisplayState. With this patch in place ui frontents can stop using DisplayState in the rendering code paths, they can simply operate using the DisplaySurface passed in via d

[Qemu-devel] [PATCH 27/48] mmu-hash*: Make find_pte{32, 64} do more of the job of finding ptes

2013-03-12 Thread David Gibson
find_pte{32,64}() are not particularly well named. They only "find" a PTE within a given PTE group, and they also do permissions checking and other things. This patch makes it somewhat close to matching the name, by folding the search of both primary and secondary hash bucket into it, along with

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Peter Lieven
Am 12.03.2013 um 12:46 schrieb Paolo Bonzini : > Il 12/03/2013 12:20, Peter Lieven ha scritto: >>> * zero pages remain zero, and thus are only processed once >> >> you are right this will be the case. >> >>> >>> * non-zero pages are modified often, and thus are processed multiple times. >>> >

[Qemu-devel] [PATCH 13/18] spice: stop using DisplayState

2013-03-12 Thread Gerd Hoffmann
Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann --- hw/qxl-render.c|2 +- hw/qxl.c |3 ++- include/ui/spice-display.h |2 +- ui/spice-display.c | 31 --- 4 fil

[Qemu-devel] [PATCH 15/18] console: zap displaystate from dcl callbacks

2013-03-12 Thread Gerd Hoffmann
Now that nobody depends on DisplayState in DisplayChangeListener callbacks any more we can remove the parameter from all callbacks. Signed-off-by: Gerd Hoffmann --- hw/qxl.c |5 + include/ui/console.h | 12 ++-- ui/cocoa.m |5 + ui/console.c

[Qemu-devel] [PATCH 43/48] mmu-hash*: Don't use full ppc_hash{32, 64}_translate() path for get_phys_page_debug()

2013-03-12 Thread David Gibson
Currently the hash mmu versionsof get_phys_page_debug() use the same ppc64_hash64_translate() function to do the translation logic as the normal mm fault handler code. That sounds like a good idea, but has some complications. The debug path doesn't need, or even want some parts of the full transla

[Qemu-devel] [PATCH 14/18] cocoa: stop using DisplayState

2013-03-12 Thread Gerd Hoffmann
Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 35 ++- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 73843f4..9a56fb8 100644 --- a/ui/cocoa

[Qemu-devel] [PATCH 01/18] console: fix displaychangelisteners interface

2013-03-12 Thread Gerd Hoffmann
Split callbacks into separate Ops struct. Pass DisplayChangeListener pointer as first argument to all callbacks. Uninline a bunch of display functions and move them from console.h to console.c Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 18 ++-- include/ui/console.h |

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Paolo Bonzini
Il 12/03/2013 12:51, Peter Lieven ha scritto: >> > buffer_is_zero is used in somewhat special cases (block >> > streaming/copy-on-read) where throughput doesn't really matter, unlike >> > is_dup_page/find_zero_bit which are used in migration. But you can use >> > similar code for is_dup_page and b

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Peter Lieven
Am 12.03.2013 um 13:02 schrieb Paolo Bonzini : > Il 12/03/2013 12:51, Peter Lieven ha scritto: buffer_is_zero is used in somewhat special cases (block streaming/copy-on-read) where throughput doesn't really matter, unlike is_dup_page/find_zero_bit which are used in migration. But

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2013 at 12:22 PM, Kevin Wolf wrote: > Am 12.03.2013 um 11:50 hat Stefan Hajnoczi geschrieben: >> On Tue, Mar 12, 2013 at 10:18:12AM +0100, Kevin Wolf wrote: >> > Maybe we could consider having the backup tool inside the qemu.git tree >> > and thus provide a common format that manag

Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype

2013-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2013 at 12:15 PM, Dietmar Maurer wrote: >> It's a slippery slope to put VMA into QEMU. What will you say when patches >> for >> OVF or some other format turn up? > > I agree, we should concentrate to have the basic framework. Time will show > what archive > format people prefer.

Re: [Qemu-devel] what versions of MacOSX do we want to support in qemu?

2013-03-12 Thread Paolo Bonzini
Il 11/03/2013 23:15, Andreas Färber ha scritto: >> > Hi; I'm currently looking at fixing the warnings that qemu generates in >> > MacOSX syslog regarding CPSGetCurrentProcess and >> > CPSEnableForegroundOperation >> > being deprecated. The new API for doing this is TransformProcessType(), >> > whi

[Qemu-devel] [PATCH 2/4] ui/cocoa.m: Avoid deprecated CPS* functions

2013-03-12 Thread Peter Maydell
The functions CPSGetCurrentProcess and CPSEnableForegroundOperation are deprecated in newer versions of MacOSX and cause warning messages to be logged to the system log. Instead, use the new preferred method of promoting our console process up to a graphical app with menubar and Dock icon, which is

[Qemu-devel] [PATCH 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8

2013-03-12 Thread Peter Maydell
These patches fix various compiler and runtime warnings QEMU provokes on MacOSX 10.8. The first two fix a leak and some deprecated functions which cause warnings in the system log when QEMU runs. The second two avoid some functions which cause compile time warnings about use of functions deprecated

[Qemu-devel] [PATCH 4/4] ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory

2013-03-12 Thread Peter Maydell
In MacOSX 10.6 and above the NSOpenPanel beginSheetForDirectory method is deprecated. Use the preferred replacements instead. We retain the original code for use on earlier MacOSX versions because the replacement methods don't exist before 10.6. Signed-off-by: Peter Maydell --- ui/cocoa.m | 16 +

Re: [Qemu-devel] Some questions for PATCH: ACPI memory hotplug, TKS

2013-03-12 Thread Vasilis Liaskovitis
Hi, On Mon, Mar 11, 2013 at 09:16:34AM +, Chijianchun wrote: > http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02693.html > > > > one this patch, you say it does not support for windows, Does it support > now? > no,it still does not work for windows. It is most likely some seabi

[Qemu-devel] [PATCH 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method

2013-03-12 Thread Peter Maydell
Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6) in favour of using the URL method and extracting the path from the resulting NSUrl object. Signed-off-by: Peter Maydell --- ui/cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m ind

[Qemu-devel] [PATCH 1/4] ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable

2013-03-12 Thread Peter Maydell
On MacOSX 10.8 QEMU provokes system log messages: 11/03/2013 17:03:29.998 qemu-system-arm[42586]: objc[42586]: Object 0x7ffbf9c2f3b0 of class NSScreen autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug 11/03/2013 17:03:29.999 qemu-system-arm[42586]: objc

[Qemu-devel] Hard Interrupt code in Qemu !

2013-03-12 Thread Muhammad Nouman
Hi ! i am trying to emulate mips on Qemu but at some point the kernel is getting a hard interrupt from Qemu which the kernel is not able to understand and makes it a spurious interrupt.Can any one tell me that which part of the Qemu code will tell me the source or any information about that hard in

[Qemu-devel] [PATCH 1/2] virtio-ccw: remove qdev_unparent in unplug routing

2013-03-12 Thread Cornelia Huck
From: Christian Borntraeger This patch fixes unplugging a virtio-ccw device. We no longer need to do that in virtio-ccw since common code does now proper handling. Signed-off-by: Christian Borntraeger Signed-off-by: Jens Freimann Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c |1

[Qemu-devel] [PATCH 2/2] virtio-ccw: Wire up virtio-rng.

2013-03-12 Thread Cornelia Huck
Make virtio-rng devices available for s390-ccw-virtio machines. Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 60 + hw/s390x/virtio-ccw.h |2 ++ 2 files changed, 62 insertions(+) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virti

[Qemu-devel] [PULL 0/2] virtio-ccw patches 2012-03-12

2013-03-12 Thread Cornelia Huck
Hi, here is my current virtio-ccw patch queue. Please pull. The following changes since commit fe3cc14fd83e0c8f376d849ccd0fc3433388442d: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-03-11 08:30:34 -0500) are available in the git repository at: git://github.co

Re: [Qemu-devel] [PATCH v4] virtio: make virtio device's structures public.

2013-03-12 Thread Peter Maydell
On 12 March 2013 08:37, wrote: > From: KONRAD Frederic > > These structures must be made public to avoid two memory allocations for > refactored virtio devices. > > Signed-off-by: KONRAD Frederic > Reviewed-by: Andreas Färber Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v6 1/8] virtio-blk: don't use pointer for configuration.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > The configuration field must not be a pointer as it will be used for > virtio-blk > properties. So *blk is replaced by blk in VirtIOBlock structure. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] Hard Interrupt code in Qemu !

2013-03-12 Thread Edgar E. Iglesias
On Tue, Mar 12, 2013 at 05:53:51PM +0500, Muhammad Nouman wrote: > Hi ! i am trying to emulate mips on Qemu but at some point the kernel is > getting a hard interrupt from Qemu which the kernel is not able to understand > and makes it a spurious interrupt.Can any one tell me that which part of the

[Qemu-devel] KVM call minutes 2013-03-12

2013-03-12 Thread Juan Quintela
Hi today we got a very small call, talking about GSOC projects. Please go to the wiki page if you have any project that you want to mentor. Stephan explains GSOC. Overview of mentoring for Google Summer of Code 2013: * Post project ideas here: http://wiki.qemu.org/Google_Summer_of_Code_2013

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > /* The ID for virtio_block */ > @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { > #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \ > DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) > > +#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE > +#define DEFINE_DATA_PLAN

[Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-12 Thread Fabien Chouteau
With this patch QEMU handles qAttached request from gdb. When QEMU replies 1, GDB sends a "detach" command at the end of a debugging session otherwise GDB sends "kill". The default value for qAttached is 1 on system emulation and 0 on user emulation. We introduce a new command line option. It's a

[Qemu-devel] [PATCH 2/2] Revert "gdbstub: Do not kill target in system emulation mode"

2013-03-12 Thread Fabien Chouteau
The requirements described in this patch are implemented by "Add GDB qAttached support". This reverts commit 00e94dbc7fd0110b0555d59592b004333adfb4b8. Signed-off-by: Fabien Chouteau --- gdbstub.c |2 -- 1 file changed, 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index de95849..ee5712

[Qemu-devel] [PATCH 0/2] Add GDB qAttached support

2013-03-12 Thread Fabien Chouteau
Fabien Chouteau (2): Add GDB qAttached support Revert "gdbstub: Do not kill target in system emulation mode" gdbstub.c | 40 +--- include/exec/gdbstub.h |2 ++ qemu-options.hx| 17 + vl.c |3

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread KONRAD Frédéric
On 12/03/2013 15:28, Peter Maydell wrote: On 12 March 2013 09:22, wrote: /* The ID for virtio_block */ @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \ DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) +#ifdef CONFIG_VIRTIO_BLK_D

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-12 Thread Jan Kiszka
On 2013-03-12 15:31, Fabien Chouteau wrote: > With this patch QEMU handles qAttached request from gdb. When QEMU > replies 1, GDB sends a "detach" command at the end of a debugging > session otherwise GDB sends "kill". > > The default value for qAttached is 1 on system emulation and 0 on user > em

[Qemu-devel] [PATCH 04/13] block: Add options QDict to bdrv_open_common()

2013-03-12 Thread Kevin Wolf
The options are passed down to the block drivers, which are supposed to remove all options they have processed. Anything that is left over in the end is an unknown option and results in an error. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 32 ++

[Qemu-devel] [PATCH 01/13] block: Add options QDict to .bdrv_open()

2013-03-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 4 ++-- block/bochs.c | 2 +- block/cloop.c | 2 +- block/cow.c | 2 +- block/dmg.c | 2 +- block/parallels.c | 2 +- block/

[Qemu-devel] [PATCH 08/13] qcow2: flush refcount cache correctly in alloc_refcount_block()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi update_refcount() affects the refcount cache, it does not write to disk. Therefore bdrv_flush(bs->file) does nothing. We need to flush the refcount cache in order to write out the refcount updates! While we're here also add error returns when qcow2_cache_flush() fails. Si

[Qemu-devel] [PATCH 06/13] block: Support driver specific options in drive_init()

2013-03-12 Thread Kevin Wolf
Any non-default -drive options are now passed down to the block drivers. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- blockdev.c | 69 +- 1 file changed, 59 insertions(+), 10 deletions(-) diff --

[Qemu-devel] [PATCH 05/13] qemu-option: Add qemu_opts_absorb_qdict()

2013-03-12 Thread Kevin Wolf
This adds a function that adds all entries of a QDict to a QemuOpts if the keys are known, and leaves only the rest in the QDict. This way a single QDict of -drive options can be processed in multiple places (generic block layer, block driver, backing file block driver, etc.), where each part pick

[Qemu-devel] [PATCH 02/13] block: Add options QDict to bdrv_open() prototype

2013-03-12 Thread Kevin Wolf
It doesn't do anything yet except storing the options QDict in the BlockDriverState. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 47 +++ block/blkverify.c | 2 +- block/qcow2

[Qemu-devel] [PATCH 11/13] qcow2: flush in qcow2_update_snapshot_refcount()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi Users of qcow2_update_snapshot_refcount() do not flush consistently. qcow2_snapshot_create() flushes but qcow2_snapshot_goto() and qcow2_snapshot_delete() do not. Solve this by moving the bdrv_flush() into qcow2_update_snapshot_refcount(). Signed-off-by: Stefan Hajnoczi S

[Qemu-devel] [PATCH 13/13] qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi We already flush when the function completes. There is no need to flush after every compressed cluster. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 4 1 file changed, 4 deletions(-) diff --git a/block/qcow2-refcount.c b/bl

[Qemu-devel] [PATCH 07/13] qcow2: Allow lazy refcounts to be enabled on the command line

2013-03-12 Thread Kevin Wolf
qcow2 images now accept a boolean lazy_refcounts options. Use it like this: -drive file=test.qcow2,lazy_refcounts=on If the option is specified on the command line, it overrides the default specified by the qcow2 header flags that were set when creating the image. Signed-off-by: Kevin Wolf Re

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread Peter Maydell
On 12 March 2013 14:37, KONRAD Frédéric wrote: > On 12/03/2013 15:28, Peter Maydell wrote: >> >> On 12 March 2013 09:22, wrote: >>> >>> /* The ID for virtio_block */ >>> @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { >>> #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \ >>> D

Re: [Qemu-devel] [RFC PATCH] pci: Differentiate PCI Express bus

2013-03-12 Thread Michael S. Tsirkin
On Mon, Mar 11, 2013 at 03:18:49PM -0600, Alex Williamson wrote: > When creating capabilities devices need to know what kind of bus > they're on. If we're on an express bus without a parent_dev, then > we're on the root complex and need to use integrated endpoints > rather than standard endpoints.

Re: [Qemu-devel] [PATCH v6 3/8] virtio-blk-pci: switch to new API.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Here the virtio-blk-pci is modified for the new API. The device > virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk > during the init. The properties are not changed. > > Signed-off-by: KONRAD Frederic Reviewed-by

Re: [Qemu-devel] [PATCH v6 4/8] virtio-blk-s390: switch to the new API.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Here the virtio-blk-s390 is modified for the new API. The device > virtio-blk-s390 extends virtio-s390-device as before. It creates and > connects a virtio-blk during the init. The properties are not modified. > > Signed-off-by: KONRAD F

[Qemu-devel] [PATCH 03/13] Add qdict_clone_shallow()

2013-03-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- include/qapi/qmp/qdict.h | 2 ++ qobject/qdict.c | 22 ++ 2 files changed, 24 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 6d9a4be..685b2e3 1

Re: [Qemu-devel] [PATCH v6 5/8] virtio-blk-ccw switch to new API.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Here the virtio-ccw-s390 is modified for the new API. The device > virtio-ccw-s390 extends virtio-ccw-device as before. It creates and > connects a virtio-ccw during the init. The properties are not modified. > > Signed-off-by: KONRAD Fr

Re: [Qemu-devel] [PATCH v6 6/8] virtio-blk: cleanup: init and exit functions.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > As all virtio-blk-* are switched to the new API, we can remove the separate > init/exit for the old API. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v6 7/8] virtio-blk: cleanup: QOM cast

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Use QOM casts inside virtio-blk. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v6 8/8] virtio-blk: cleanup: remove qdev field.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > The qdev field is no longer needed, just drop it. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH 2/2] qga: add windows implementation for guest-set-time

2013-03-12 Thread Eric Blake
On 03/12/2013 03:08 AM, Lei Li wrote: > Signed-off-by: Lei Li > --- > qga/commands-win32.c | 34 ++ > 1 file changed, 34 insertions(+) > > +void qmp_guest_set_time(int64_t time_ns, Error **errp) > +{ > +SYSTEMTIME ts; > +FILETIME tf; > +LONGLONG time;

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread KONRAD Frédéric
On 12/03/2013 15:42, Peter Maydell wrote: On 12 March 2013 14:37, KONRAD Frédéric wrote: On 12/03/2013 15:28, Peter Maydell wrote: On 12 March 2013 09:22, wrote: /* The ID for virtio_block */ @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { #define DEFINE_VIRTIO_BLK_FEATURES(_state,

<    1   2   3   >