Re: [Qemu-devel] [PATCH-trivial] arch_init.c: Free 'cache' in cache_fini() to avoid memory leak

2014-06-03 Thread ChenLiang
On 2014/6/2 20:16, Chen Gang wrote: Call g_free() after cache_fini() in migration_end(), but do not call g_free() after call cache_fini() in xbzrle_cache_resize() which will cause memory leak. cache_init() and cache_fini() are pair, so need let cache_fini() call g_free(cache) to match

Re: [Qemu-devel] [PATCH-trivial] arch_init.c: Always be sure that 'encoded_buf' and 'current_buf' are lock protected

2014-06-03 Thread ChenLiang
On 2014/6/2 20:35, Chen Gang wrote: 'encoded_buf' and 'current_buf' are lock protected during using in save_xbzrle_page() in ram_save_page(), and during freeing in migration_end(). So recommend to let them lock protected during starting, just like we have done to 'cache'.

Re: [Qemu-devel] [PATCH memory v2 7/9] memory: MemoryRegion: Add container and addr props

2014-06-03 Thread Paolo Bonzini
Il 02/06/2014 04:40, Peter Crosthwaite ha scritto: { MemoryRegion *mr = MEMORY_REGION(obj); +gchar *container_link_type = g_strdup_printf(link%s, + TYPE_MEMORY_REGION); Since TYPE_MEMORY_REGION is a literal string constant, this can

[Qemu-devel] [PATCH 4/5] gtk: update window size after showing/hiding tabs

2014-06-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 544126c..b02fcd6 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1005,12 +1005,14 @@ static void gd_menu_switch_vc(GtkMenuItem *item, void *opaque) static void

[Qemu-devel] [PATCH 2/5] gtk: cleanup backend dependencies

2014-06-03 Thread Gerd Hoffmann
Make configure detect gtk x11 backend and link libX11 then. Make gtk backend specific code properly #ifdef'ed on the GTK_WINDOWING_* backends at runtime). Our gtk ui code should build and run fine on any platform now. This also fixes the linker failute due to the new XkbGetKeyboard call added

[Qemu-devel] [PATCH 1/5] gtk: factor out keycode mapping

2014-06-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index b908936..01d48cc 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -877,22 +877,18 @@ static gboolean gd_scroll_event(GtkWidget

[Qemu-devel] [PATCH 0/5] gtk: fixes, cleanups and text consoles without vte

2014-06-03 Thread Gerd Hoffmann
Hi, Current gtk patch queue. A bunch of cleanups and fixes. Most notable change is patch #5 which winds up qemu text terminal emulation in gtk, so '-chardev vc' works even when building without vte (i.e. on windows). Gerd Hoffmann (5): gtk: factor out keycode mapping gtk: cleanup backend

[Qemu-devel] [PATCH 3/5] gtk: factor out gtk3 grab into the new gd_grab_devices function

2014-06-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 100 +++ 1 file changed, 36 insertions(+), 64 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index d201190..544126c 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1162,28 +1162,39

[Qemu-devel] [PATCH 5/5] gtk: bind to text terminal consoles too

2014-06-03 Thread Gerd Hoffmann
This way gtk has text terminal consoles even when building without vte. Most notably you'll get a monitor tab on windows now. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 109 ++- 1 file changed, 73 insertions(+), 36

Re: [Qemu-devel] [PATCH v4 1/3] e1000: allow command-line selection of card model

2014-06-03 Thread Stefan Hajnoczi
On Mon, Jun 02, 2014 at 12:17:48PM -0400, Gabriel L. Somlo wrote: I was looking over my submission, and have one remaining question: On Mon, Jun 02, 2014 at 09:33:27AM -0400, Gabriel L. Somlo wrote: Allow selection of different card models from the qemu command line, to better accomodate a

Re: [Qemu-devel] [PATCH v4 0/3] e1000: allow model/device_id selection on command line

2014-06-03 Thread Stefan Hajnoczi
On Mon, Jun 02, 2014 at 09:33:26AM -0400, Gabriel L. Somlo wrote: Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. New in v4: - s/E1000Info_st/E1000Info/ - s/E1000DeviceClass/E1000BaseClass/ - keeping removal

[Qemu-devel] Question about Qemu gnemul

2014-06-03 Thread Chaos Shu
Hi all Anybody got some infos about gnemul? I've googled the internet, just some pages about old and out of date versions about gnemul, and they are built for ARM32, and I need gnemul for AARCH64, does anybody know how to build it? Thanks Chaos

Re: [Qemu-devel] [PATCH v2] qemu-img: Document check exit codes

2014-06-03 Thread Benoît Canet
The Monday 02 Jun 2014 à 22:15:21 (+0200), Max Reitz wrote : The exit code 63 (check not supported by image format) was not even documented in the comment above the check command in the source code; add it, as it does indeed seem useful. Also, document all of check's exit codes in the

Re: [Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-06-03 Thread Paolo Bonzini
Il 30/05/2014 10:59, Tiejun Chen ha scritto: +static int create_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev) +{ +struct PCIDevice *dev; + +char rid; + +dev = pci_create(bus, PCI_DEVFN(0x1f, 0), intel-pch-isa-bridge); This is really a huge hack. You're going to have two ISA

[Qemu-devel] [PATCH 0/4] input: add virtio input devices

2014-06-03 Thread Gerd Hoffmann
Hi, This series adds virtio input support to qemu. virtio input basically sends linux evdev events over virtio. Patch #1 is just the pci id. Patch #2 adds the core code as abstract qom class. Patch #3 adds emulated devices on top of that, and patch #4 adds evdev passthrough. The

[Qemu-devel] [PATCH 1/4] pci: add virtio input pci device id

2014-06-03 Thread Gerd Hoffmann
Using 0x1012 because virtio id is 18 (0x12). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- docs/specs/pci-ids.txt | 1 + include/hw/pci/pci.h | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt index 3c65e1a..3b0a448 100644 ---

[Qemu-devel] [PATCH 4/4] virtio-input: evdev passthrough

2014-06-03 Thread Gerd Hoffmann
This allows to assign host input devices to the guest: qemu -device virto-input-host-pci,evdev=/dev/input/eventnr The guest gets exclusive access to the input device, so be careful with assigning the keyboard if you have only one connected to your machine. Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PATCH 3/4] virtio-input: emulated devices

2014-06-03 Thread Gerd Hoffmann
This patch adds the virtio-input-hid base class and virtio-{keyboard,mouse,tablet} subclasses building on the base class. They are hooked up to the qemu input core and deliver input events to the guest like all other hid devices (ps/2 kbd, usb tablet, ...). Using them is as simple as adding

Re: [Qemu-devel] [PATCH memory v2 7/9] memory: MemoryRegion: Add container and addr props

2014-06-03 Thread Peter Crosthwaite
On Tue, Jun 3, 2014 at 5:51 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 02/06/2014 04:40, Peter Crosthwaite ha scritto: { MemoryRegion *mr = MEMORY_REGION(obj); +gchar *container_link_type = g_strdup_printf(link%s, +

[Qemu-devel] [PATCH 2/4] virtio-input: core code base class

2014-06-03 Thread Gerd Hoffmann
This patch adds virtio-input support to qemu. It brings a abstract base class providing core support, other classes can build on it to actually implement input devices. virtio-input basically sends linux input layer events (evdev) over virtio. Signed-off-by: Gerd Hoffmann kra...@redhat.com ---

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Ian Campbell
On Mon, 2014-06-02 at 12:58 -0400, Konrad Rzeszutek Wilk wrote: Yes, which most likely involves preseeding the guest RAM with the files at a discoverable location. Icky. Or some form of FTP over XenBus :-) I'll file that one in the round filing cabinet next to my desk ;-) Ian

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Ian Campbell
On Mon, 2014-06-02 at 21:35 -0600, Chun Yan Liu wrote: Now I wonder how does it handle device? (A backend file or partition is also a place on host.) Stubdom uses qemu-xen-traditional, maybe there is some special handling? Will have a look. The stubdom VM has access to PV Xen devices via

Re: [Qemu-devel] [PATCH v2] qemu-img: Document check exit codes

2014-06-03 Thread Kevin Wolf
Am 02.06.2014 um 22:15 hat Max Reitz geschrieben: The exit code 63 (check not supported by image format) was not even documented in the comment above the check command in the source code; add it, as it does indeed seem useful. Also, document all of check's exit codes in the manpage.

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 1/2] xen: pass kernel initrd to qemu

2014-06-03 Thread Ian Campbell
On Mon, 2014-06-02 at 22:49 -0600, Chun Yan Liu wrote: On 6/2/2014 at 11:24 PM, in message 1401722652.30097.9.ca...@kazak.uk.xensource.com, Ian Campbell ian.campb...@citrix.com wrote: On Thu, 2014-05-29 at 11:23 +0800, Chunyan Liu wrote: [support xen HVM direct kernel boot]

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-06-03 Thread Marcin Gibuła
Can you give this patch a try? Should read the guest TSC values after stopping the VM. Yes, this patch fixes that. Thanks, -- mg

Re: [Qemu-devel] [PATCH v5 1/3] quorum: Add the rewrite-corrupted parameter to quorum.

2014-06-03 Thread Kevin Wolf
Am 30.05.2014 um 13:18 hat Benoît Canet geschrieben: On read operations when this parameter is set and some replicas are corrupted while quorum can be reached quorum will proceed to rewrite the correct version of the data to fix the corrupted replicas. This will shine with SSD where the FTL

Re: [Qemu-devel] qemu 2.0 segfaults in event notifier

2014-06-03 Thread Stefan Hajnoczi
On Mon, Jun 02, 2014 at 09:32:55PM +0200, Stefan Priebe wrote: Am 02.06.2014 15:40, schrieb Stefan Hajnoczi: On Fri, May 30, 2014 at 04:10:39PM +0200, Stefan Priebe wrote: new trace: (gdb) bt #0 0x7f69e421c43f in event_notifier_set (e=0x124) at util/event_notifier-posix.c:97 #1

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Chun Yan Liu
On 6/2/2014 at 11:14 PM, in message alpine.deb.2.02.1406021610070.4...@kaball.uk.xensource.com, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: On Fri, 30 May 2014, Konrad Rzeszutek Wilk wrote: On Thu, May 29, 2014 at 11:23:22AM +0800, Chunyan Liu wrote: Following previous

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 1/2] xen: pass kernel initrd to qemu

2014-06-03 Thread Chun Yan Liu
On 6/3/2014 at 05:06 PM, in message 1401786392.8841.44.ca...@kazak.uk.xensource.com, Ian Campbell ian.campb...@citrix.com wrote: On Mon, 2014-06-02 at 22:49 -0600, Chun Yan Liu wrote: On 6/2/2014 at 11:24 PM, in message 1401722652.30097.9.ca...@kazak.uk.xensource.com, Ian Campbell

Re: [Qemu-devel] [PATCH qom v1 2/4] hw: Fix qemu_allocate_irqs() leaks

2014-06-03 Thread Kirill Batuzov
On Mon, 2 Jun 2014, Peter Crosthwaite wrote: From: Andreas Färber afaer...@suse.de Replace qemu_allocate_irqs(foo, bar, 1)[0] with qemu_allocate_irq(foo, bar, 0). You missed one occurrence in hw/sh4/sh7750.c in function sh7750_irl. -- Kirill

[Qemu-devel] [PATCH] aio: fix qemu_bh_schedule() bh-ctx race condition

2014-06-03 Thread Stefan Hajnoczi
qemu_bh_schedule() is supposed to be thread-safe at least the first time it is called. Unfortunately this is not quite true: bh-scheduled = 1; aio_notify(bh-ctx); Since another thread may run the BH callback once it has been scheduled, there is a race condition if the callback frees the BH

Re: [Qemu-devel] [PATCH] kvm: Enable -cpu option to hide KVM

2014-06-03 Thread Paolo Bonzini
Il 02/06/2014 19:28, Alex Williamson ha scritto: The latest Nvidia driver (337.88) specifically checks for KVM as the hypervisor and reports Code 43 for the driver in a Windows guest when found. Removing or changing the KVM signature is sufficient for the driver to load and work. This patch

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Chun Yan Liu
On 6/3/2014 at 05:04 PM, in message 1401786258.8841.42.ca...@kazak.uk.xensource.com, Ian Campbell ian.campb...@citrix.com wrote: On Mon, 2014-06-02 at 21:35 -0600, Chun Yan Liu wrote: Now I wonder how does it handle device? (A backend file or partition is also a place on host.)

[Qemu-devel] [PATCH v4 12/29] target-ppc: Move POWER7/8 PIR/PURR/SPURR SPR registration to helpers

2014-06-03 Thread Alexey Kardashevskiy
This moves PIR/PURR/SPURR SPRs to helpers. Later these helpers will be called from generalized init_proc_book3s_64(). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 40 ++-- 1 file changed, 26 insertions(+), 14

[Qemu-devel] [PATCH v4 08/29] target-ppc: Add HID4 SPR for PPC970

2014-06-03 Thread Alexey Kardashevskiy
Previously LPCR was registered for the 970 class which was wrong as it does not have LPCR. Instead, HID4 is used which this patch registers. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 11 +++ 2 files changed,

[Qemu-devel] [PATCH v4 03/29] target-ppc: Refactor PPC970

2014-06-03 Thread Alexey Kardashevskiy
This splits one init_proc_970() into a set of small helpers. Later init_proc_970() will be generalized and will call different set of helpers depending on the current CPU class. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 97

[Qemu-devel] [PATCH v4 02/29] target-ppc: Merge 970FX and 970MP into a single 970 class

2014-06-03 Thread Alexey Kardashevskiy
The differences between classes were: 1. SLB size, was 32 for 970 and 64 for others, should be 64 for all; 2. check_pow() callback, HID0 format is the same so should be the same 0x01C0 which means deep nap, doze and nap bits set; 3. LPCR - 970 does not have it but 970MP had one (by mistake).

[Qemu-devel] [PATCH v4 00/29] book3s powerpc classes (970, power5, power7, power8) rework

2014-06-03 Thread Alexey Kardashevskiy
Started as POWER7/8 SPRs patchset, this became a rework of book3s/970 CPU classes initialization. The aim is to boot little endian guests in TCG mode with -cpu POWER8 (ironically, POWER8 emulation still fails, debugging it now but most of the set is still valid). Individual patches have change

[Qemu-devel] [PATCH v4 17/29] target-ppc: Switch POWER7/8 classes to use correct PMU SPRs

2014-06-03 Thread Alexey Kardashevskiy
This replaces gen_spr_7xx() call (which registers 32bit SPRs) with gen_spr_book3s_pmu() call. This removes SPR_7XX_PMC5/6 as they are for 32bit and gen_spr_book3s_pmu() already registers correct PMC5/6 SPRs. This removes explicit MMCRA registration as gen_spr_book3s_pmu() does it anyway.

[Qemu-devel] [PATCH v4 09/29] target-ppc: Introduce and reuse generalized init_proc_book3s_64()

2014-06-03 Thread Alexey Kardashevskiy
At the moment every POWER CPU family has its own init_proc_POWERX function. E500 already has common init function so we try to do the same thing. This introduces BOOK3S_CPU_TYPE enum with 2 values - 970 and POWER5+. This introduces generalized init_proc_book3s_64() which accepts a CPU type as a

[Qemu-devel] [PATCH v4 16/29] target-ppc: Make use of gen_spr_book3s_lpar() for POWER7/8

2014-06-03 Thread Alexey Kardashevskiy
This makes use of generic gen_spr_book3s_lpar() which registers LPCR SPR. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Ian Campbell
On Tue, 2014-06-03 at 03:16 -0600, Chun Yan Liu wrote: On 6/2/2014 at 11:14 PM, in message alpine.deb.2.02.1406021610070.4...@kaball.uk.xensource.com, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: On Fri, 30 May 2014, Konrad Rzeszutek Wilk wrote: On Thu, May 29, 2014 at

[Qemu-devel] [PATCH v4 24/29] KVM: target-ppc: Enable TM state migration

2014-06-03 Thread Alexey Kardashevskiy
This adds migration support for registers saved before Transactional Memory (TM) transaction started. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h | 14 ++ target-ppc/kvm.c | 38 ++ target-ppc/machine.c | 35

[Qemu-devel] [PATCH v4 01/29] target-ppc: Rename 7XX/60x/74XX/e600 PMU SPRs

2014-06-03 Thread Alexey Kardashevskiy
As defined in Linux kernel, PMC*, SIAR, MMCR0/1 have different numbers for 32 and 64 bit POWERPC. We are going to support 64bit versions too so let's rename 32bit ones to avoid confusion. This is a mechanical patch so it does not fix obvious mistake with these registers in POWER7 yet, this will

[Qemu-devel] [PATCH v4 26/29] target-ppc: Enable PPR and VRSAVE SPRs migration

2014-06-03 Thread Alexey Kardashevskiy
This hooks SPR with theit KVM set_one_reg counterparts which enables their migration. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target-ppc/translate_init.c

[Qemu-devel] [PATCH v4 23/29] target-ppc: Add POWER8's TM SPRs

2014-06-03 Thread Alexey Kardashevskiy
This adds TM (Transactional Memory) SPRs. This adds generic spr_read_prev_upper32()/spr_write_prev_upper32() to handle upper half SPRs such as TEXASRU which is upper half of TEXASR. Since this is not the only register like that and their numbers go consequently, it makes sense to generalize the

Re: [Qemu-devel] [PATCH 13/21] target-mips: add Compact Branches

2014-06-03 Thread Leon Alrae
On 02/06/14 20:16, Aurelien Jarno wrote: -case OPC_DADDI: +case OPC_DADDI: /* OPC_BNVC, OPC_BNEZALC, OPC_BNEC */ +if (ctx-insn_flags ISA_MIPS32R6) { +/* OPC_BNVC, OPC_BNEZALC, OPC_BNEC */ +gen_compute_compact_branch(ctx, op, rs, rt, imm 2); +

[Qemu-devel] [PATCH v4 29/29] spapr_hcall: Add address-translation-mode-on-interrupt resource in H_SET_MODE

2014-06-03 Thread Alexey Kardashevskiy
This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from the H_SET_MODE, for POWER8 (PowerISA 2.07) only. This defines AIL flags for LPCR special register. This changes @excp_prefix according to the mode, takes effect in TCG. This turns support of a new capability PPC2_ISA207S flag for

Re: [Qemu-devel] [PATCH v2 4/8] linux-user: arm: handle CPSR.E correctly in strex emulation

2014-06-03 Thread Paolo Bonzini
Il 02/06/2014 18:17, Peter Maydell ha scritto: Um. This feels like we're wrongly overloading this flag for more than one thing. Is the user-mode binary BE8? is definitely not a property of the CPU, so it shouldn't be a CPU state flag. (Conversely, is the iside endianness the opposite way round

[Qemu-devel] [PATCH v4 22/29] target-ppc: Add POWER8's MMCR2/MMCRS SPRs

2014-06-03 Thread Alexey Kardashevskiy
This adds POWER8 specific PMU MMCR2/MMCRS SPRs. This adds a spr_write_ureg helper for changing a hypv-privileged SPR when it is accessed via its user-privileged mirror. A spr_read_ureg() is already there. Since the new helper is only used by book3s CPUs, it is limited to TARGET_PPC64 to make gcc

[Qemu-devel] [PATCH v4 28/29] spapr_hcall: Split h_set_mode()

2014-06-03 Thread Alexey Kardashevskiy
This moves H_SET_MODE_RESOURCE_LE handler to a separate function as there are other resources coming and this is going to become ugly. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * s/becode/become/ in commit log --- hw/ppc/spapr_hcall.c | 67

Re: [Qemu-devel] [PATCH] console: fix -vga none -sdl crash

2014-06-03 Thread BALATON Zoltan
On Mon, 2 Jun 2014, Gerd Hoffmann wrote: Call get_alloc_displaystate() for proper initialization instead of allocating with g_new(). Signed-off-by: Gerd Hoffmann kra...@redhat.com Tested-by: BALATON Zoltan bala...@eik.bme.hu --- ui/console.c | 5 + 1 file changed, 1 insertion(+), 4

Re: [Qemu-devel] fpu/softfloat.c licensing

2014-06-03 Thread Peter Maydell
On 3 June 2014 04:52, Alexey Kardashevskiy a...@ozlabs.ru wrote: Is there anything I can do to help with this? Chase someone down? :) Confirming that your lawyers are happy with the approach Anthony proposed to take to fixing this would probably be useful :-) -- PMM

[Qemu-devel] [PATCH v4 20/29] target-ppc: Add POWER8's FSCR SPR

2014-06-03 Thread Alexey Kardashevskiy
This adds an FSCR (Facility Status and Control Register) SPR. This defines names for FSCR bits. This defines new exception type - POWERPC_EXCP_FU - facility unavailable (FU). This registers an interrupt vector for it at 0xF60 as PowerISA defines. This adds a TCG helper_fscr_facility_check()

Re: [Qemu-devel] [PATCH v2 4/8] linux-user: arm: handle CPSR.E correctly in strex emulation

2014-06-03 Thread Peter Maydell
On 3 June 2014 10:23, Paolo Bonzini pbonz...@redhat.com wrote: Il 02/06/2014 18:17, Peter Maydell ha scritto: Um. This feels like we're wrongly overloading this flag for more than one thing. Is the user-mode binary BE8? is definitely not a property of the CPU, so it shouldn't be a CPU state

Re: [Qemu-devel] [PATCH] powerpc: use float64 for frsqrte

2014-06-03 Thread Alexander Graf
On 06/03/2014 11:14 AM, Tristan Gingold wrote: Remove the code that reduce the result to float32 as the frsqrte instruction is defined to return a double-precision estimate of the reciprocal square root. Although reducing the fractional part is harmless (as the estimation must have at least 12

[Qemu-devel] [PATCH v4 27/29] target-ppc: Enable DABRX SPR and limit it to =POWER7

2014-06-03 Thread Alexey Kardashevskiy
This adds DABRX SPR. As DABR(X) are present in POWER CPUs till POWER7 only and POWER8 does not have them (as it implements more powerful facility instead), this limits DABR/DABRX registration by POWER7 (inclusive). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru ---

Re: [Qemu-devel] [RCF PATCH 8/8] target-arm: remove final users of pstate_write

2014-06-03 Thread Alex Bennée
Alex Bennée writes: This converts all users of pstate_write to use the common state save/restore functionality. Oops, now I'll clean that up. I need to decide if it worth merge the xpsr_ stuff anyway? There is also some commented out code in the main save_state_to_spsr() function which I

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Chun Yan Liu
On 6/3/2014 at 05:31 PM, in message 1401787863.8841.55.ca...@kazak.uk.xensource.com, Ian Campbell ian.campb...@citrix.com wrote: On Tue, 2014-06-03 at 03:16 -0600, Chun Yan Liu wrote: On 6/2/2014 at 11:14 PM, in message alpine.deb.2.02.1406021610070.4...@kaball.uk.xensource.com,

Re: [Qemu-devel] [PATCH v1 04/16] target-arm: Make far_el1 an array

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com No functional change. Prepares for future additions of the EL2 and 3 versions of this reg. Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.c| 2 +- target-arm/cpu.h

Re: [Qemu-devel] [PATCH v1 06/16] target-arm: Add FAR_EL2 and 3

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h| 2 +- target-arm/helper.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.h

Re: [Qemu-devel] [PATCH v1 07/16] target-arm: Add HCR_EL2

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h| 35 +++ target-arm/helper.c | 27 +++ 2 files changed, 62 insertions(+)

Re: [Qemu-devel] [PATCH v1 08/16] target-arm: Add SCR_EL3

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h| 15 +++ target-arm/helper.c | 20 2 files changed, 35 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v1 10/16] target-arm: Break out exception masking to a separate func

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- cpu-exec.c | 5 ++--- target-arm/cpu.h | 16 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c

[Qemu-devel] [PATCH v4 15/29] target-ppc: Make use of gen_spr_book3s_altivec() for POWER7/8

2014-06-03 Thread Alexey Kardashevskiy
This replaces VRSAVE registration and vscr_init() call with gen_spr_book3s_altivec() which is generic and does the same thing if insns_flags has PPC_ALTIVEC bit set (which POWER7/8 have set). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Here is the function for the reference: static

Re: [Qemu-devel] [PATCH v1 12/16] target-arm: A64: Correct updates to FAR and ESR on exceptions

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Not all exception types update both FAR and ESR. Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/helper-a64.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v4 13/29] target-ppc: Move POWER8 TCE Address control (TAR) to a helper

2014-06-03 Thread Alexey Kardashevskiy
This moves TAR SPR to a helper. Later this helper will be called from generalized init_proc_book3s_64(). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v4 14/29] target-ppc: Move POWER7/8 CFAR/DSCR/CTRL/PPR/PCR SPR registration to helpers

2014-06-03 Thread Alexey Kardashevskiy
This moves SCFAR/DSCR/CTRL/PPR/PCR PRs to helpers. Later these helpers will be called from generalized init_proc_book3s_64(). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 70 ++--- 1 file changed, 40 insertions(+),

[Qemu-devel] [PATCH v4 21/29] target-ppc: Enable FSCR facility check for TAR

2014-06-03 Thread Alexey Kardashevskiy
This makes user-privileged read/write fail if TAR facility is not enabled in FSCR. Since this is the very first check for enabled in FSCR facility, this also adds gen_fscr_facility_check() for using in spr_write_tar()/ spr_read_tar(). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru ---

Re: [Qemu-devel] [PATCH v1 13/16] target-arm: A64: Emulate the HVC insn

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h | 7 ++- target-arm/helper-a64.c| 1 + target-arm/helper.c| 39 +++

[Qemu-devel] [PATCH v4 25/29] target-ppc: Add POWER8's Event Based Branch (EBB) control SPRs

2014-06-03 Thread Alexey Kardashevskiy
POWER8 supports Event-Based Branch Facility (EBB). It is controlled via set of SPRs access to which should generate an Facility Unavailable interrupt if the facilities are not enabled in FSCR for problem state. This adds EBB SPRs. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru ---

Re: [Qemu-devel] [PATCH v1 15/16] target-arm: Add IRQ and FIQ routing to EL2 and 3

2014-06-03 Thread Alex Bennée
Edgar E. Iglesias writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h| 10 ++ target-arm/helper.c | 16 2 files changed, 26 insertions(+) diff --git a/target-arm/cpu.h

Re: [Qemu-devel] Nested KVM is weird?

2014-06-03 Thread Muli Ben-Yehuda
On Sun, Jun 01, 2014 at 11:30:02PM +0700, Jun Koi wrote: (1) do you think this VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL is the reason why ESXi falls back to binary translation? It might be, its been a while since I got ESXi to use VMX on KVM. Take a look at the VMware log file for the L2, it

[Qemu-devel] [PATCH v4 04/29] target-ppc: Copy and split gen_spr_7xx() for 970

2014-06-03 Thread Alexey Kardashevskiy
This stops using 7xx common SPRs init function and adds separate set of helpers for 970. This does not copy ICTC SPR as neither 970 manual nor PowerISA mention it. This defines 970/book3s PMU SPRs constants as they differs from the ones used for 7XX. This creates 2 helpers for PMU SPRs, one for

[Qemu-devel] [PATCH v2 0/9] usb: usb host adapter hotplug

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com add support for usb host adapter hotplug, as the same as other pci devices. changes since v1: * rework usb_bus_release function suggested by Gerd. * add more completely resource cleanup for every usb host adapter. * fix memory leak. Gonglei (9): usb:

[Qemu-devel] [PATCH v2 5/9] usb-ehci: add vmstate properity for EHCIState

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com since hotunplug the ehci host adapter, we should delete vm_change_state_handler also, so the VMChangeStateEntry should be saved in EHCIState. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-ehci.c | 2 +- hw/usb/hcd-ehci.h | 1 + 2 files

[Qemu-devel] [PATCH v2 6/9] usb-ehci: expose ehci_queues_rip_all

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com As for usb-ehci-pci.c can call the function to free ehci queue. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-ehci.c | 2 +- hw/usb/hcd-ehci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-ehci.c

[Qemu-devel] [PATCH v2 1/9] usb: add usb_bus_release function

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com add global variables releasing logic when the usb buses were removed or hot-unpluged. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/bus.c | 7 +++ include/hw/usb.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/usb/bus.c

Re: [Qemu-devel] [PULL 00/10] usb patch queu

2014-06-03 Thread Peter Maydell
On 2 June 2014 15:41, Gerd Hoffmann kra...@redhat.com wrote: Hi, Featuring new test cases for uhci+ehci. Also misc fixes, mostly related to xhci emulation and usb3 support. please pull, Gerd The following changes since commit 9bb931802e6ab5ab6947e3cb9cea934fc0724274: Revert

Re: [Qemu-devel] [PATCH] aio: fix qemu_bh_schedule() bh-ctx race condition

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 11:21, Stefan Hajnoczi ha scritto: qemu_bh_schedule() is supposed to be thread-safe at least the first time it is called. Unfortunately this is not quite true: bh-scheduled = 1; aio_notify(bh-ctx); Since another thread may run the BH callback once it has been scheduled,

Re: [Qemu-devel] [PATCH v2 4/8] linux-user: arm: handle CPSR.E correctly in strex emulation

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 11:54, Peter Maydell ha scritto: In user emulation, things are more complicated for BE32, because we're sort of emulating the word-invariant bigendian using byte-invariant big-endian (this is safe because there's no way for a userspace program to get at anything that would let

[Qemu-devel] [PATCH v4 05/29] target-ppc: Add POWER prefix to MMCRA PMU registers

2014-06-03 Thread Alexey Kardashevskiy
Since we started adding POWER prefix to 64bit PMU SPRs, let's finish the transition and fix MMCRA and define a hypv version of it. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/cpu.h| 3 ++- target-ppc/translate_init.c | 2 +- 2 files changed, 3 insertions(+), 2

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 07:16, Marcelo Tosatti ha scritto: On Mon, Jun 02, 2014 at 10:31:44PM +0200, Marcin Gibuła wrote: +cpu_physical_memory_read(kvmclock_struct_pa, time, sizeof(time)); + +delta = migration_tsc - time.tsc_timestamp; Hi, when I was testing live storage migration with libvirt

Re: [Qemu-devel] [PATCH v2 4/6] target-arm: add emulation of PSCI calls for system emulation

2014-06-03 Thread Peter Maydell
On 23 May 2014 03:30, Rob Herring robherri...@gmail.com wrote: From: Rob Herring rob.herr...@linaro.org Add support for handling PSCI calls in system emulation. Both version 0.1 and 0.2 of the PSCI spec are supported. Platforms can enable support by setting psci-method QOM property on the

[Qemu-devel] [PATCH v2 8/9] usb-xhci: add exit function

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com clean up xhci resource when xhci pci device exit. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-xhci.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c

[Qemu-devel] [PATCH v2 9/9] usb: tag usb host controller as hotpluggable

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com usb host controller should be able to support hotplug/unplug, as the same as the other pci devices, which not enable multifunction capability. BTW, the qemu have not the capability to support hotplug mulitfuncition pci devices at present. Signed-off-by:

Re: [Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-06-03 Thread Stefano Stabellini
On Tue, 3 Jun 2014, Paolo Bonzini wrote: Il 30/05/2014 10:59, Tiejun Chen ha scritto: +static int create_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev) +{ +struct PCIDevice *dev; + +char rid; + +dev = pci_create(bus, PCI_DEVFN(0x1f, 0), intel-pch-isa-bridge);

Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot

2014-06-03 Thread Stefano Stabellini
On Tue, 3 Jun 2014, Ian Campbell wrote: On Tue, 2014-06-03 at 03:16 -0600, Chun Yan Liu wrote: On 6/2/2014 at 11:14 PM, in message alpine.deb.2.02.1406021610070.4...@kaball.uk.xensource.com, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: On Fri, 30 May 2014, Konrad

[Qemu-devel] [PATCH v2 3/9] usb-ohci: add exit function

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com clean up ohci resource when ohci pci device exit Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-ohci.c | 21 + 1 file changed, 21 insertions(+) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index dc1adbf..b513a13

Re: [Qemu-devel] [PATCH 3/3] nbd: Shutdown socket before closing.

2014-06-03 Thread Paolo Bonzini
Il 31/05/2014 23:39, Hani Benhabiles ha scritto: This forces finishing data sending to client before closing the socket like in exports listing or replying with NBD_REP_ERR_UNSUP cases. Signed-off-by: Hani Benhabiles h...@linux.com --- blockdev-nbd.c | 1 + qemu-nbd.c | 1 + 2 files

[Qemu-devel] [PATCH v4 18/29] target-ppc: Refactor class init for POWER7/8

2014-06-03 Thread Alexey Kardashevskiy
This extends init_proc_book3s_64 to support POWER7 and POWER8. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v4: * added g_assert_not_reached() to default path to catch errors earlier --- target-ppc/translate_init.c | 100 +++- 1 file

Re: [Qemu-devel] [PATCH 2/3] nbd: Add exports listing support.

2014-06-03 Thread Paolo Bonzini
Il 31/05/2014 23:39, Hani Benhabiles ha scritto: This is added by handling the NBD_OPT_LIST and NBD_OPT_ABORT options. NBD_REP_ERR_UNSUP is also sent for unknown NBD option values. Signed-off-by: Hani Benhabiles h...@linux.com --- include/block/nbd.h | 5 ++ nbd.c | 197

Re: [Qemu-devel] fpu/softfloat.c licensing

2014-06-03 Thread Alexey Kardashevskiy
On 06/03/2014 07:45 PM, Peter Maydell wrote: On 3 June 2014 04:52, Alexey Kardashevskiy a...@ozlabs.ru wrote: Is there anything I can do to help with this? Chase someone down? :) Confirming that your lawyers are happy with the approach Anthony proposed to take to fixing this would probably

Re: [Qemu-devel] AArch64 QEMU System emulation: issue with TTBR0

2014-06-03 Thread Rob Herring
On Mon, Jun 2, 2014 at 11:16 AM, Claudio Fontana hw.clau...@gmail.com wrote: Hello Peter, I am porting OSv to AArch64, and I have some working code running on the Foundation Models, where I run qemu natively with --enable-kvm, which does not seem to work when run instead on top of the

Re: [Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 13:29, Stefano Stabellini ha scritto: It's really not your fault, there's not much you can do given the hardware architecture. But I don't think this code can be accepted upstream, sorry. Yeah, the code is not nice and it is not Tiejun's fault. Is there any way at all he could

Re: [Qemu-devel] fpu/softfloat.c licensing

2014-06-03 Thread Peter Maydell
On 3 June 2014 12:38, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 06/03/2014 07:45 PM, Peter Maydell wrote: On 3 June 2014 04:52, Alexey Kardashevskiy a...@ozlabs.ru wrote: Is there anything I can do to help with this? Chase someone down? :) Confirming that your lawyers are happy with the

Re: [Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-06-03 Thread George Dunlap
On 06/03/2014 12:29 PM, Stefano Stabellini wrote: On Tue, 3 Jun 2014, Paolo Bonzini wrote: Il 30/05/2014 10:59, Tiejun Chen ha scritto: +static int create_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev) +{ +struct PCIDevice *dev; + +char rid; + +dev = pci_create(bus,

[Qemu-devel] [PATCH v2 2/9] usb-ohci: Fix memory leak for ohci timer

2014-06-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-ohci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index cd87074..dc1adbf 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@

[Qemu-devel] [PATCH v4 10/29] target-ppc: Remove check_pow_970FX

2014-06-03 Thread Alexey Kardashevskiy
After merging 970s into one class, check_pow_970() is used for all of them. Since POWER5+ is no different in the matter of supported power modes, let's use the same check_pow() callback for POWER5+ too, Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- target-ppc/translate_init.c | 10

[Qemu-devel] [PATCH v4 19/29] target-ppc: Add POWER7's TIR SPR

2014-06-03 Thread Alexey Kardashevskiy
This adds TIR (Thread Identification Register) SPR first defined in PowerISA 2.05. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v4: * disabled reading it from user space --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 5 + 2 files changed, 6

  1   2   3   >