[Qemu-devel] [PATCH V2 3/6] qom/cpu: move apic vmstate register into x86_cpu_apic_realize

2014-12-12 Thread Gu Zheng
move apic vmstate register into x86_cpu_apic_realize, and use cc->get_arch_id as the instance id to avoid using the auto-id which will break the migration if we add device not in order. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/intc/apic_common.c |3 +-- include/hw/

[Qemu-devel] [PATCH V2 1/6] cpu: introduce CpuTopoInfo structure for argument simplification

2014-12-12 Thread Gu Zheng
From: Chen Fan Reviewed-by: Eduardo Habkost Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- target-i386/topology.h | 33 + 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/target-i386/topology.h b/target-i386/top

[Qemu-devel] [PATCH V2 0/6] cpu: add device_add foo-x86_64-cpu support

2014-12-12 Thread Gu Zheng
This series is based on the previous patchset from Chen Fan: https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html We try to make cpu hotplug with device_add, and make "-device foo-x86_64-cpu" available,also we can set apic-id property with command line, if without setting apic-id

[Qemu-devel] [PATCH V2 2/6] qom/cpu: move register_vmstate to common CPUClass.realizefn

2014-12-12 Thread Gu Zheng
Move cpu vmstate register from cpu_exec_init into cpu_common_realizefn, and use cc->get_arch_id as the instance id that suggested by Igor to fix the migration issue. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- exec.c| 32 +++- include/qom/cpu.

[Qemu-devel] [PATCH V2 5/6] acpi:cpu hotplug: set pcmachine as icc bus' hotplug handler

2014-12-12 Thread Gu Zheng
As the pre-check in the qdev_device_add(): if (qdev_hotplug && bus && !qbus_is_hotpluggable(bus)) { qerror_report(QERR_BUS_NO_HOTPLUG, bus->name); return NULL; } if device has parent bus, the bus must have valid hotplug_handler, otherwise can not hot plug. Currently cpu hotp

[Qemu-devel] [PATCH V2 4/6] monitor: use cc->get_arch_id as the cpu index

2014-12-12 Thread Gu Zheng
Use cc->get_arch_id as the cpu index to avoid the cpu index duplicated issue in the QMP/HMP command output. Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- cpus.c|4 +++- monitor.c |4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 0c

[Qemu-devel] [PATCH V2 6/6] cpu: add device_add foo-x86_64-cpu support

2014-12-12 Thread Gu Zheng
From: Chen Fan Add support to device_add foo-x86_64-cpu, and additional checks of apic id are added into x86_cpuid_set_apic_id() to avoid duplicate. Besides, in order to support "device/device_add foo-x86_64-cpu" which without specified apic id, we assign cpuid_apic_id with a default broadcast va

Re: [Qemu-devel] [PATCH RFC v6 04/20] virtio: add feature checking helpers

2014-12-12 Thread Cornelia Huck
On Thu, 11 Dec 2014 19:05:26 +0200 "Michael S. Tsirkin" wrote: > On Thu, Dec 11, 2014 at 03:46:23PM +0100, Thomas Huth wrote: > > On Thu, 11 Dec 2014 14:25:06 +0100 > > Cornelia Huck wrote: > > > > > Add a helper function for checking whether a bit is set in the guest > > > features for a vdev

[Qemu-devel] [PATCH 01/12] x86: add x86_cpu_unrealizefn() for cpu apic remove

2014-12-12 Thread Gu Zheng
From: Chen Fan Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clean the apic related allocation and vmstates at here. Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- Changelog since RFC: -replaced apic_no with apic

[Qemu-devel] [PATCH 06/12] pc: add cpu hot unplug request callback support

2014-12-12 Thread Gu Zheng
From: Zhu Guihua Add cpu hot unplug request callback support, and a pre-check about the active cpus is added to avoid removing the last cpu. Signed-off-by: Zhu Guihua Signed-off-by: Gu Zheng --- hw/i386/pc.c | 36 ++-- 1 files changed, 34 insertions(+), 2 del

[Qemu-devel] [PATCH 00/12] cpu: add i386 cpu hot remove support

2014-12-12 Thread Gu Zheng
This series is based on chen fan's previous i386 cpu hot remove patchset: https://lists.nongnu.org/archive/html/qemu-devel/2013-12/msg04266.html Via implementing ACPI standard methods _EJ0 in ACPI table, after Guest OS remove one vCPU online, the fireware will store removed bitmap to QEMU, then QE

[Qemu-devel] [PATCH 02/12] i386/cpu: add instance finalize callback

2014-12-12 Thread Gu Zheng
Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- include/qom/cpu.h |1 + target-i386/cpu.c |8 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 936afcd..f663199 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h

[Qemu-devel] [PATCH 03/12] acpi/cpu: add cpu hot unplug request callback function

2014-12-12 Thread Gu Zheng
Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/cpu_hotplug.c | 38 +- include/hw/acpi/cpu_hotplug.h |4 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/c

[Qemu-devel] [PATCH 07/12] acpi/cpu: add cpu hot unplug callback function

2014-12-12 Thread Gu Zheng
From: Zhu Guihua Signed-off-by: Zhu Guihua Signed-off-by: Gu Zheng --- cpus.c|7 +++ hw/acpi/cpu_hotplug.c |8 include/hw/acpi/cpu_hotplug.h |3 +++ include/qom/cpu.h |9 + 4 files changed, 27 insertions(+), 0 del

[Qemu-devel] [PATCH 04/12] acpi/piix4: add cpu hot unplug request callback support

2014-12-12 Thread Gu Zheng
From: Zhu Guihua Signed-off-by: Zhu Guihua Signed-off-by: Gu Zheng --- hw/acpi/piix4.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 4407388..9b75780 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -364,6 +364,8 @@ stati

[Qemu-devel] [PATCH 10/12] pc: add cpu hot unplug callback support

2014-12-12 Thread Gu Zheng
Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/i386/pc.c | 26 -- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ace7dc2..a8e34db 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1721,6 +1721,24 @@ out: e

[Qemu-devel] [PATCH 11/12] cpu hotplug: implement function cpu_status_write() for vcpu ejection

2014-12-12 Thread Gu Zheng
From: Chen Fan When OS ejected a vcpu (like: echo 1 > /sys/bus/acpi/devices/LNXCPUXX/eject), it would call acpi EJ0 method, the firmware need to write the new cpumap, QEMU would know which vcpu need to be ejected. Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua ---

[Qemu-devel] [PATCH 05/12] acpi/ich9: add cpu hot unplug request callback support

2014-12-12 Thread Gu Zheng
From: Zhu Guihua Signed-off-by: Zhu Guihua Signed-off-by: Gu Zheng --- hw/acpi/ich9.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index c48d176..b795f8f 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -304,8 +304,13 @@ vo

Re: [Qemu-devel] [PATCH 02/10] sdl2: rename sdl2_state to sdl2_console, move to header file

2014-12-12 Thread Gerd Hoffmann
> > diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h > > new file mode 100644 > > index 000..7f91a75 > > --- /dev/null > > +++ b/include/ui/sdl2.h > > @@ -0,0 +1,11 @@ > > +struct sdl2_console { > > +DisplayChangeListener dcl; > Is there a reason why you did not use include guards? Fixe

[Qemu-devel] [PATCH 08/12] acpi/piix4: add cpu hot unplug callback support

2014-12-12 Thread Gu Zheng
Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/piix4.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 9b75780..2a923fc 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -375,8 +375,14 @@ static void pii

[Qemu-devel] [PATCH 09/12] acpi/ich9: add cpu hot unplug support

2014-12-12 Thread Gu Zheng
Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index b795f8f..a892e5d 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -316,8 +316,12 @@ void ich9_pm_device_un

[Qemu-devel] [PATCH 12/12] cpus: reclaim allocated vCPU objects

2014-12-12 Thread Gu Zheng
After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. In order to deal well with the kvm vcpus (which can not be removed without any protection), we do not close KVM vcpu fd, just record and mark

[Qemu-devel] [PATCH 0/1] virtio: feature bit fixup

2014-12-12 Thread Cornelia Huck
When reviewing my feature bit changes for 1.0, Thomas noticed that I accidentally fixed a bug :) There are two further places with the same problem that Thomas noticed as well. I wonder why we didn't see problems before... Cornelia Huck (1): virtio: fix feature bit checks hw/scsi/virtio-scsi.

[Qemu-devel] [PATCH 1/1] virtio: fix feature bit checks

2014-12-12 Thread Cornelia Huck
Several places check against the feature bit number instead of against the feature bit. Fix them. Reported-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/scsi/virtio-scsi.c | 2 +- hw/virtio/dataplane/vring.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw

Re: [Qemu-devel] [PATCH 1/1] virtio: fix feature bit checks

2014-12-12 Thread Michael S. Tsirkin
On Fri, Dec 12, 2014 at 10:01:46AM +0100, Cornelia Huck wrote: > Several places check against the feature bit number instead of against > the feature bit. Fix them. > > Reported-by: Thomas Huth > Signed-off-by: Cornelia Huck Cc: stable? > --- > hw/scsi/virtio-scsi.c | 2 +- > hw/virtio/

Re: [Qemu-devel] [PATCH 1/1] virtio: fix feature bit checks

2014-12-12 Thread Cornelia Huck
On Fri, 12 Dec 2014 11:08:21 +0200 "Michael S. Tsirkin" wrote: > On Fri, Dec 12, 2014 at 10:01:46AM +0100, Cornelia Huck wrote: > > Several places check against the feature bit number instead of against > > the feature bit. Fix them. > > > > Reported-by: Thomas Huth > > Signed-off-by: Cornelia

[Qemu-devel] [PATCH 2/4] disas/mips: remove unused mips_msa_control_names_numeric[32]

2014-12-12 Thread Leon Alrae
Signed-off-by: Leon Alrae --- disas/mips.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index 2614c52..b94d5d9 100644 --- a/disas/mips.c +++ b/disas/mips.c @@ -3801,13 +3801,6 @@ static const char * const mips_hwr_names_mips3264r2[32] = "$24", "$25",

[Qemu-devel] [PATCH 0/4] target-mips: fix warnings reported by clang

2014-12-12 Thread Leon Alrae
Hi, A few patches fixing warnings reported by clang: target-mips/translate.c:1968:15: warning: no case matching constant switch condition '16' disas/mips.c:3804:27: warning: unused variable 'mips_msa_control_names_numeric' [-Wunused-const-variable] disas/mips.c:3515:27: warning: unused variable '

[Qemu-devel] [PATCH 1/4] target-mips: convert single case switch into if statement

2014-12-12 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index f65ed84..1205909 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -1882,10 +1882,8 @@ static in

[Qemu-devel] [PATCH 3/4] disas/mips: remove unused mips16_to_32_reg_map[]

2014-12-12 Thread Leon Alrae
The array was "used" in a block of code which has never been enabled. Therefore removing the array as well as 700 lines of never used code. Signed-off-by: Leon Alrae --- disas/mips.c | 721 --- 1 file changed, 721 deletions(-) diff --git a

[Qemu-devel] [PATCH 4/4] target-mips: remove excp_names[] from linux-user as it is unused

2014-12-12 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index c4b3658..7d26705 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -388,7 +388,6 @@ hwaddr cpu_mips_translate_addr

[Qemu-devel] [PATCH v2] spapr-pci: Enable huge BARs

2014-12-12 Thread Alexey Kardashevskiy
At the moment sPAPR only supports 512MB window for MMIO BARs. However modern devices might want bigger 64bit BARs. This extends MMIO window from 512MB to 62GB (aligned to SPAPR_PCI_WINDOW_SPACING) and advertises it in 2 records in the PHB's "ranges" property. 32bit has all the space from SPAPR_PCI

[Qemu-devel] [Bug 1396052] Re: migration failed when running BurnInTest in guest

2014-12-12 Thread z08687
actually, I have met this issue in earlier qemu version, and it expose frankly. The BDRVQcowState *s was memset to zero in qcow2_invalidate_cache(). So there is a dead-loop in qcow2_grow_l1_table while (min_size > new_l1_size) { new_l1_size = (new_l1_size * 3 + 1) / 2;

[Qemu-devel] [PATCH 0/2] sdl2: Work around SDL2 SDL_ShowWindow() bug

2014-12-12 Thread Max Reitz
For the bug (it at least seems to me like one), see: https://bugzilla.libsdl.org/show_bug.cgi?id=2818 To reproduce it in qemu, try pressing ctrl-alt-2 five times (or whichever your key combination for showing/hiding the monitor window is). Normally, the window should be shown, hidden, shown, hidd

[Qemu-devel] [PATCH 1/2] sdl2: Use correct sdl2_console for window events

2014-12-12 Thread Max Reitz
SDL_PollEvent() polls events for all windows; therefore, sdl2_poll_events() will poll the events for all windows and not only for the one identified by the given sdl2_console. This should be considered in handle_windowevent(): The window affected by the event is not necessarily the one identified

[Qemu-devel] [PATCH 2/2] sdl2: Work around SDL2 SDL_ShowWindow() bug

2014-12-12 Thread Max Reitz
Apparently it is possible for X to send an event to a hidden SDL2 window, leading to SDL2 believing it is now shown. SDL2 will pass the SDL_WINDOWEVENT_SHOWN message to the application without actually showing the window; the problem is that the next SDL_ShowWindow() will be a no-op because SDL2 as

[Qemu-devel] [PATCH 1/2] QEMUSizedBuffer: only free qsb that qemu_bufopen allocated

2014-12-12 Thread Yang Hongyang
Only free qsb that qemu_bufopen allocated, and also allow qemu_bufopen accept qsb as input for write operation. It will make the API more logical: 1.If you create the QEMUSizedBuffer yourself, you need to free it by using qsb_free() but not depends on other API like qemu_fclose. 2.allow qemu_bu

[Qemu-devel] [PATCH 2/2] Tests: QEMUSizedBuffer/QEMUBuffer

2014-12-12 Thread Yang Hongyang
Modify some of tests/test-vmstate.c due to qemu_bufopen() change. If you create a QEMUSizedBuffer yourself, you have to explicitly free it. Signed-off-by: Yang Hongyang Cc: Dr. David Alan Gilbert Cc: Eric Blake Cc: Juan Quintela --- tests/test-vmstate.c | 20 1 file chang

Re: [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits

2014-12-12 Thread Thomas Huth
On Thu, 11 Dec 2014 14:25:07 +0100 Cornelia Huck wrote: > With virtio-1, we support more than 32 feature bits. Let's extend both > host and guest features to 64, which should suffice for a while. > > vhost and migration have been ignored for now. > > Signed-off-by: Cornelia Huck > --- > hw/9p

Re: [Qemu-devel] [PATCH RFC v6 04/20] virtio: add feature checking helpers

2014-12-12 Thread Cornelia Huck
On Thu, 11 Dec 2014 15:46:23 +0100 Thomas Huth wrote: > > +static inline bool __virtio_has_feature(uint32_t features, unsigned int > > fbit) > > +{ > > +assert(fbit < 32); > > +return !!(features & (1 << fbit)); > > +} > > + > > +static inline bool virtio_has_feature(VirtIODevice *vdev,

Re: [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits

2014-12-12 Thread Cornelia Huck
On Fri, 12 Dec 2014 11:06:40 +0100 Thomas Huth wrote: > On Thu, 11 Dec 2014 14:25:07 +0100 > Cornelia Huck wrote: > > > With virtio-1, we support more than 32 feature bits. Let's extend both > > host and guest features to 64, which should suffice for a while. > > > > vhost and migration have b

[Qemu-devel] [Bug 1401798] [NEW] Qemu 2.2.0 savevm crash.

2014-12-12 Thread changlimin
Public bug reported: qemu 2.1.2 is good. (gdb) bt #0 0x74aae445 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x74ab1bab in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x55997951 in qcow2_cache_find_entry_to_replace (c=0x56389780) at block/qcow2-cache.c:

[Qemu-devel] [PATCH v1 1/1] target-tricore: fix offset masking in BOL format + typo

2014-12-12 Thread Alex Züpke
Fixes offset masking for BOL opcodes and a typo (LONF -> LONG) Signed-off-by: Alex Zuepke -- diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 65abf45..c132223 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -3203,7 +3203,7 @@ static void deco

Re: [Qemu-devel] [PATCH 03/10] sdl2: move keyboard input code to new sdl2-input.c

2014-12-12 Thread Gerd Hoffmann
Hi, > > +static uint8_t modifiers_state[SDL_NUM_SCANCODES]; > > + > > +void sdl2_reset_keys(struct sdl2_console *scon) > > +{ > > +QemuConsole *con = scon ? scon->dcl.con : NULL; > > +int i; > > + > > +for (i = 0; i < 256; i++) { > > Should this be SDL_NUM_SCANCODES? Yes, fixed. t

Re: [Qemu-devel] [PATCH 06/10] sdl2: overhaul window size handling

2014-12-12 Thread Gerd Hoffmann
Hi, > > @@ -439,12 +424,14 @@ static void handle_keydown(SDL_Event *ev) > > 160); > > height = (surface_height(scon->surface) * width) / > > surface_width(scon->surface); > > - > > +fprintf(stderr, "%s: scale t

Re: [Qemu-devel] [PATCH 10/10] sdl2: move sdl2_2d_refresh to sdl2-2d.c

2014-12-12 Thread Gerd Hoffmann
On Do, 2014-12-11 at 16:19 +0100, Max Reitz wrote: > On 2014-12-11 at 11:49, Gerd Hoffmann wrote: > > Now that common event handling code is split off, we can move > > over sdl_refresh to sdl2-2d.c, and rename it to sdl2_2d_refresh. > > > > Signed-off-by: Gerd Hoffmann > > --- > > include/ui/sdl

Re: [Qemu-devel] [PATCH v9 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-12-12 Thread Stefan Hajnoczi
On Wed, Dec 10, 2014 at 01:43:47PM +0100, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Mon, Dec 01, 2014 at 03:30:08PM -0500, John Snow wrote: > >> diff --git a/block.c b/block.c > >> index e5c6ccf..3f27519 100644 > >> --- a/block.c > >> +++ b/block.c > >> @@ -5420,6 +5420,25 @@ in

Re: [Qemu-devel] [PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1

2014-12-12 Thread Thomas Huth
On Thu, 11 Dec 2014 14:25:14 +0100 Cornelia Huck wrote: > For virtio-1 devices, the driver must not attempt to set feature bits > after it set FEATURES_OK in the device status. Simply reject it in > that case. > > Signed-off-by: Cornelia Huck > --- > hw/virtio/virtio.c | 16 +

Re: [Qemu-devel] [PATCH v9 07/10] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2014-12-12 Thread Stefan Hajnoczi
On Wed, Dec 10, 2014 at 09:34:00AM +0800, Fam Zheng wrote: > On Tue, 12/09 17:44, Stefan Hajnoczi wrote: > > On Mon, Dec 01, 2014 at 03:30:13PM -0500, John Snow wrote: > > > From: Fam Zheng > > > > > > For "dirty-bitmap" sync mode, the block job will iterate through the > > > given dirty bitmap t

Re: [Qemu-devel] [RfC PATCH 2/3] sdl2: add support for display rendering using opengl.

2014-12-12 Thread Gerd Hoffmann
Hi, > > +static void sdl2_gl_render_surface(struct sdl2_console *scon) > > +{ > > +int gw, gh, ww, wh, stripe; > > +float sw, sh; > > +GLuint tex; > > + > > +gw = surface_width(scon->surface); > > +gh = surface_height(scon->surface); > > +SDL_GetWindowSize(scon->real_wind

Re: [Qemu-devel] [PATCH v4 05/26] qcow2: Use unsigned addend for update_refcount()

2014-12-12 Thread Stefan Hajnoczi
On Thu, Dec 11, 2014 at 12:03:37PM +0100, Max Reitz wrote: > On 2014-12-11 at 11:58, Stefan Hajnoczi wrote: > >On Wed, Dec 03, 2014 at 02:37:25PM +0100, Max Reitz wrote: > >>@@ -530,8 +530,16 @@ found: > >> } > >> /* XXX: cache several refcount block clusters ? */ > >>+/* In order to decrease ref

[Qemu-devel] [PATCH v3 0/5] More migration file cleanup

2014-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a small set of patches that shuffle migration code around, but doesn't change the behaviour: 1) Move a lot of the migration source into a separate 'migration' directory Note this moves a lot of files around, git format-patch -M -B spots the rena

[Qemu-devel] [PATCH v3 5/5] MAINTAINERS: Update for migrated migration code

2014-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" My previous patches migrated the migration code into migration/ but didn't update MAINTAINERS. Note that does mean that the owner for block-migration.c changes, but I'll ask block people what they want to do. Signed-off-by: Dr. David Alan Gilbert --- MAINTAINERS

[Qemu-devel] [PATCH v3 4/5] Split the QEMU buffered file code out

2014-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The splitting of qemu-file and addition of the buffered file landed at the same time; so now split the buffered file code out. Signed-off-by: Dr. David Alan Gilbert --- migration/Makefile.objs | 2 +- migration/qemu-file-buf.c | 486 ++

[Qemu-devel] [PATCH v3 1/5] Start migrating migration code into a migration directory

2014-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The migration code now occupies a fair chunk of the top level .c files, it seems time to give it it's own directory. I've not touched: arch_init.c - that's mostly RAM migration but has a few random other bits savevm.c- because it's built

[Qemu-devel] [PATCH v3 2/5] Remove migration- pre/post fixes off files in migration/ dir

2014-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The general feeling is that having migration/migration-blah is overkill. Signed-off-by: Dr. David Alan Gilbert --- migration/Makefile.objs | 8 migration/{block-migration.c => block.c} | 0 migration/{migration-exec.c => exec.c} | 0 m

Re: [Qemu-devel] [PATCH 0/2] sdl2: Work around SDL2 SDL_ShowWindow() bug

2014-12-12 Thread Gerd Hoffmann
On Fr, 2014-12-12 at 10:52 +0100, Max Reitz wrote: > For the bug (it at least seems to me like one), see: > https://bugzilla.libsdl.org/show_bug.cgi?id=2818 > > To reproduce it in qemu, try pressing ctrl-alt-2 five times (or > whichever your key combination for showing/hiding the monitor window >

[Qemu-devel] [PATCH v3 3/5] Split struct QEMUFile out

2014-12-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now we've got multiple QEMUFile source files, some of them need access to things that were defined in qemu-file.c, so create a -internal header for them. Signed-off-by: Dr. David Alan Gilbert --- migration/qemu-file-internal.h | 53 +++

Re: [Qemu-devel] [PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1

2014-12-12 Thread Cornelia Huck
On Fri, 12 Dec 2014 11:55:38 +0100 Thomas Huth wrote: > On Thu, 11 Dec 2014 14:25:14 +0100 > Cornelia Huck wrote: > > > For virtio-1 devices, the driver must not attempt to set feature bits > > after it set FEATURES_OK in the device status. Simply reject it in > > that case. > > > > Signed-off

[Qemu-devel] [PATCH v1 1/1] target-tricore: add missing 64-bit MOV in RLC format

2014-12-12 Thread Alex Züpke
Add the missing 64-bit "MOV Ex, simm16" variant in RLC format. Signed-off-by: Alex Zuepke -- diff --git a/target-tricore/tricore-opcodes.h b/target-tricore/tricore-opcodes.h index 7aa6aed..a76a7e4 100644 --- a/target-tricore/tricore-opcodes.h +++ b/target-tricore/tricore-opcodes.h @@ -487,6 +487

Re: [Qemu-devel] [PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1

2014-12-12 Thread Thomas Huth
On Fri, 12 Dec 2014 12:18:25 +0100 Cornelia Huck wrote: > On Fri, 12 Dec 2014 11:55:38 +0100 > Thomas Huth wrote: > > > On Thu, 11 Dec 2014 14:25:14 +0100 > > Cornelia Huck wrote: > > > > > For virtio-1 devices, the driver must not attempt to set feature bits > > > after it set FEATURES_OK in

Re: [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"

2014-12-12 Thread Gerd Hoffmann
Hi, > I see the file in the source tree, but that does not address my concern. > The Malta board does not include any x86 firmware and so requiring one is > IMHO the wrong way to go. The setup should specify the onboard NIC has no > ROM and should not require an image for it. Having to di

Re: [Qemu-devel] [PATCH] target-mips: Correct 32-bit address space wrapping

2014-12-12 Thread Leon Alrae
On 05/12/2014 18:55, Maciej W. Rozycki wrote: > On Thu, 4 Dec 2014, Leon Alrae wrote: > >>> Index: qemu-git-trunk/target-mips/translate.c >>> === >>> --- qemu-git-trunk.orig/target-mips/translate.c 2014-11-12 >>> 07:41:26.5975420

Re: [Qemu-devel] [PATCH v1 1/1] target-tricore: fix offset masking in BOL format + typo

2014-12-12 Thread Bastian Koppelmann
On 12/12/2014 10:25 AM, Alex Züpke wrote: Fixes offset masking for BOL opcodes and a typo (LONF -> LONG) Signed-off-by: Alex Zuepke Hi Alex, good catch. I wonder how that slipped through my testsuit. However you mail seems to be malformed. The patch went somehow into your signature. Don't

[Qemu-devel] QMP migration race condition / doc problem

2014-12-12 Thread Alex Bligh
I'm initiating a migration via QMP and seeing something unusual with qemu 2.0 (logs are from the QMP initiator and are doctored a little for readability): 08:49:37.047387 Sending JSON QMP: {"execute":"migrate","arguments":{"uri":"tcp:10.157.128.51:2249"},"id":"0010"} 08:49:37.049530 G

Re: [Qemu-devel] [PATCH 3/4] disas/mips: remove unused mips16_to_32_reg_map[]

2014-12-12 Thread Peter Maydell
On 12 December 2014 at 09:30, Leon Alrae wrote: > The array was "used" in a block of code which has never been enabled. > Therefore > removing the array as well as 700 lines of never used code. That's quite a lot to remove -- are you sure we're never going to want to disassemble mips16 insns in

Re: [Qemu-devel] [PATCH 4/4] target-mips: remove excp_names[] from linux-user as it is unused

2014-12-12 Thread Peter Maydell
On 12 December 2014 at 09:30, Leon Alrae wrote: > Signed-off-by: Leon Alrae > --- > target-mips/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH 1/4] target-mips: convert single case switch into if statement

2014-12-12 Thread Peter Maydell
On 12 December 2014 at 09:30, Leon Alrae wrote: > Signed-off-by: Leon Alrae > --- > target-mips/translate.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH 2/4] disas/mips: remove unused mips_msa_control_names_numeric[32]

2014-12-12 Thread Peter Maydell
On 12 December 2014 at 09:30, Leon Alrae wrote: > Signed-off-by: Leon Alrae > --- > disas/mips.c | 7 --- > 1 file changed, 7 deletions(-) Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v1 1/1] target-tricore: add missing 64-bit MOV in RLC format

2014-12-12 Thread Bastian Koppelmann
On 12/12/2014 11:25 AM, Alex Züpke wrote: Add the missing 64-bit "MOV Ex, simm16" variant in RLC format. Signed-off-by: Alex Zuepke Again malformed as in your other patch. Other than that, it looks good. Cheers, Bastian

[Qemu-devel] [PATCH v3 3/4] serial: update LSR on enabling/disabling FIFOs

2014-12-12 Thread Paolo Bonzini
When the transmit FIFO is emptied or enabled, the transmitter hold register is empty. When it is disabled, it is also emptied and in addition the previous contents of the transmitter hold register are discarded. In either case, the THRE bit in LSR must be set and THRI raised. When the receive FI

[Qemu-devel] [PATCH v3 0/4] serial fixes, including 2.2->2.1 migration

2014-12-12 Thread Paolo Bonzini
v3 manages to separate the migration fix from subsequent semantic changes, to make the backport as safe as possible. Paolo Bonzini (4): serial: reset thri_pending on IER writes with THRI=0 serial: clean up THRE/TEMT handling serial: update LSR on enabling/disabling FIFOs serial: only resam

[Qemu-devel] [PATCH v3 1/4] serial: reset thri_pending on IER writes with THRI=0

2014-12-12 Thread Paolo Bonzini
This is responsible for failure of migration from 2.2 to 2.1, because thr_ipending is always one in practice. serial.c is setting thr_ipending unconditionally. However, thr_ipending is not used at all if THRI=0, and it will be overwritten again the next time THRE or THRI changes. For that reason

[Qemu-devel] [PATCH v3 4/4] serial: only resample THR interrupt on rising edge of IER.THRI

2014-12-12 Thread Paolo Bonzini
There is disagreement on whether LSR.THRE should be resampled when IER.THRI goes from 1 to 1. Bochs only does it if IER.THRI goes from 0 to 1; PCE does it even if IER.THRI is unchanged. But the Windows driver seems to always go from 1 to 0 and back to 1, so do things in agreement with Bochs, beca

[Qemu-devel] [PATCH v3 2/4] serial: clean up THRE/TEMT handling

2014-12-12 Thread Paolo Bonzini
- assert THRE cleared and FIFO not empty (if enabled) before sending a character. Also assert TEMT cleared, since it is the combination of THRE && transmitter shift register empty. - raise THRI immediately after setting THRE - check THRE to see if another character has to be sent, which makes th

Re: [Qemu-devel] [PATCH v3 2/7] fw_cfg: introduce the "data_memwidth" property

2014-12-12 Thread Peter Maydell
On 9 December 2014 at 01:13, Laszlo Ersek wrote: > The "data_memwidth" property is capable of changing the maximum valid > access size to the MMIO data register, and (corresponding to the previous > patch) resizes the memory region similarly, at device realization time. > > (Because "data_iomem" i

Re: [Qemu-devel] [PATCH v3 4/7] arm: add fw_cfg to "virt" board

2014-12-12 Thread Peter Maydell
On 9 December 2014 at 01:13, Laszlo Ersek wrote: > fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, > ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt" > board. > > Because MMIO access is slow on ARM KVM, we enable the guest, with > fw_cfg_init_data_memw

Re: [Qemu-devel] [dpdk-dev] [PATCH v4 00/10] VM Power Management

2014-12-12 Thread Carew, Alan
Hi Paolo, > 2014-12-09 18:35, Paolo Bonzini: > > Did you make any progress in Qemu/KVM community? > > We need to be sync'ed up with them to be sure we share the same > goal. > > I want also to avoid using a solution which doesn't fit with > > their plan. > > Remember that

Re: [Qemu-devel] [PATCH v3 0/5] Geometry and blocksize detection for backing devices.

2014-12-12 Thread Ekaterina Tumanova
On 12/05/2014 08:56 PM, Ekaterina Tumanova wrote: This 3rd revision of the patch set. Proper geometry and blocksize information is vital for support of DASD/ECKD drives in Linux guests. Otherwise things will fail in certain cases. The existing geometry and blocksize qemu defaults have no sense

Re: [Qemu-devel] [PATCH v3 5/7] hw/loader: split out load_image_gzipped_buffer()

2014-12-12 Thread Peter Maydell
On 9 December 2014 at 01:13, Laszlo Ersek wrote: > In the next patch we'd like to reuse the image decompression facility > without installing the output as a ROM at a specific guest-phys address. > > In addition, expose LOAD_IMAGE_MAX_GUNZIP_BYTES, because that's a > straightforward "max_sz" argum

Re: [Qemu-devel] [PATCH v2 0/2] vmdk: Fix error for JSON descriptor file names

2014-12-12 Thread Stefan Hajnoczi
On Wed, Dec 03, 2014 at 02:57:21PM +0100, Max Reitz wrote: > This series improves the error message emitted when a vmdk file has a > JSON file name and the vmdk driver tries to read the extent files (which > will not work), and adds an appropriate test case. > > > v2: > - Patch 1: Only error out

Re: [Qemu-devel] [PATCH] block/rbd: fix memory leak

2014-12-12 Thread Stefan Hajnoczi
On Thu, Dec 04, 2014 at 02:34:11PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Variable local_err going out of scope > leaks the storage it points to. > > Cc: Markus Armbruster > Signed-off-by: Gonglei > --- > block/rbd.c | 8 > 1 file changed, 4 insertions(+), 4 deleti

Re: [Qemu-devel] [PATCH v3 7/7] hw/arm/virt: enable passing of EFI-stubbed kernel to guest UEFI firmware

2014-12-12 Thread Peter Maydell
On 9 December 2014 at 01:13, Laszlo Ersek wrote: > The virt board already ensures mutual exclusion between -bios and -pflash > unit#0; we only need to set "bootinfo.firmware_loaded", introduced in the > previous patch, if either of those options was used to load the guest > firmware. > > Signed-of

Re: [Qemu-devel] [PATCH v3 6/7] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-12 Thread Peter Maydell
On 9 December 2014 at 01:13, Laszlo Ersek wrote: > Introduce the new boolean field "arm_boot_info.firmware_loaded". When this > field is set, it means that the portion of guest DRAM that the VCPU > normally starts to execute, or the pflash chip that the VCPU normally > starts to execute, has been

Re: [Qemu-devel] [PATCH 1/4] block: vhdx - remove redundant comments

2014-12-12 Thread Stefan Hajnoczi
On Mon, Dec 08, 2014 at 01:07:42AM -0500, Jeff Cody wrote: > Minor cleanup. > > Signed-off-by: Jeff Cody > --- > block/vhdx.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/block/vhdx.c b/block/vhdx.c > index 12bfe75..f1e1e2e 100644 > --- a/block/vhdx.c > +++ b

Re: [Qemu-devel] [RfC PATCH 2/3] sdl2: add support for display rendering using opengl.

2014-12-12 Thread Max Reitz
On 2014-12-12 at 12:04, Gerd Hoffmann wrote: Hi, +static void sdl2_gl_render_surface(struct sdl2_console *scon) +{ +int gw, gh, ww, wh, stripe; +float sw, sh; +GLuint tex; + +gw = surface_width(scon->surface); +gh = surface_height(scon->surface); +SDL_GetWindowSize(sc

Re: [Qemu-devel] [PATCH v3 2/7] fw_cfg: introduce the "data_memwidth" property

2014-12-12 Thread Laszlo Ersek
On 12/12/14 13:49, Peter Maydell wrote: > On 9 December 2014 at 01:13, Laszlo Ersek wrote: >> The "data_memwidth" property is capable of changing the maximum valid >> access size to the MMIO data register, and (corresponding to the previous >> patch) resizes the memory region similarly, at device

Re: [Qemu-devel] [PATCH v3 4/7] arm: add fw_cfg to "virt" board

2014-12-12 Thread Laszlo Ersek
On 12/12/14 13:55, Peter Maydell wrote: > On 9 December 2014 at 01:13, Laszlo Ersek wrote: >> fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, >> ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt" >> board. >> >> Because MMIO access is slow on ARM KVM, we

Re: [Qemu-devel] [PATCH v3 2/7] fw_cfg: introduce the "data_memwidth" property

2014-12-12 Thread Peter Maydell
On 12 December 2014 at 13:39, Laszlo Ersek wrote: > I considered "locking down" the new interface, and preventing callers > from passing in any IO ports when they want a wider MMIO data register. > I didn't do that because someone might want a wider ioport mapping at > some point (although no curr

Re: [Qemu-devel] [PATCH v3 5/7] hw/loader: split out load_image_gzipped_buffer()

2014-12-12 Thread Laszlo Ersek
On 12/12/14 14:11, Peter Maydell wrote: > On 9 December 2014 at 01:13, Laszlo Ersek wrote: >> In the next patch we'd like to reuse the image decompression facility >> without installing the output as a ROM at a specific guest-phys address. >> >> In addition, expose LOAD_IMAGE_MAX_GUNZIP_BYTES, bec

Re: [Qemu-devel] [PATCH v3 6/7] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-12 Thread Laszlo Ersek
On 12/12/14 14:20, Peter Maydell wrote: > On 9 December 2014 at 01:13, Laszlo Ersek wrote: >> Introduce the new boolean field "arm_boot_info.firmware_loaded". When this >> field is set, it means that the portion of guest DRAM that the VCPU >> normally starts to execute, or the pflash chip that the

Re: [Qemu-devel] [PATCH v3 6/7] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-12 Thread Peter Maydell
On 12 December 2014 at 13:52, Laszlo Ersek wrote: > On 12/12/14 14:20, Peter Maydell wrote: >> If we have a real bootloader in the UEFI firmware, why do we need >> to do decompression for it? We only do this in the builtin bootloader >> because QEMU is acting as the bootloader and has to support t

Re: [Qemu-devel] [PATCH v3 6/7] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-12 Thread Laszlo Ersek
On 12/12/14 14:57, Peter Maydell wrote: > On 12 December 2014 at 13:52, Laszlo Ersek wrote: >> On 12/12/14 14:20, Peter Maydell wrote: >>> If we have a real bootloader in the UEFI firmware, why do we need >>> to do decompression for it? We only do this in the builtin bootloader >>> because QEMU is

[Qemu-devel] [PATCH 2/4] target-tricore: typo in BOL format

2014-12-12 Thread Alex Zuepke
Signed-off-by: Alex Zuepke --- target-tricore/translate.c |4 ++-- target-tricore/tricore-opcodes.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 65abf45..c132223 100644 --- a/target-tricore/transl

[Qemu-devel] [PATCH 3/4] target-tricore: add missing 64-bit MOV in RLC format

2014-12-12 Thread Alex Zuepke
Signed-off-by: Alex Zuepke --- target-tricore/translate.c | 12 target-tricore/tricore-opcodes.h |1 + 2 files changed, 13 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index c132223..e3eeedb 100644 --- a/target-tricore/translate.c ++

[Qemu-devel] [PATCH 1/4] target-tricore: fix offset masking in BOL format

2014-12-12 Thread Alex Zuepke
Signed-off-by: Alex Zuepke --- target-tricore/tricore-opcodes.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/tricore-opcodes.h b/target-tricore/tricore-opcodes.h index 0a9122c..70ac5ff 100644 --- a/target-tricore/tricore-opcodes.h +++ b/target-tricore/tric

[Qemu-devel] [PATCH v2 0/4] target-tricore: fixes to opcode encoding and register dump

2014-12-12 Thread Alex Zuepke
Hi Bastian, my previous patches again, I hope they are well-formed now: 1. fix the offset masking in BOL format 2. fix a typo in BOL format 3. add the missing 64-bit "MOV Ex, simm16" variant in RLC format 4. pretty-print register dump Best regards Alex Alex Zuepke (4): target-tricore: fix off

Re: [Qemu-devel] QMP migration race condition / doc problem

2014-12-12 Thread Alex Bligh
On 12 Dec 2014, at 12:11, Alex Bligh wrote: > Now, from the docs, the 'migrate' QMP command is meant to return an empty > object all the time (as far as I can tell). From the time difference, it > appears it's doing something. > > 'query-migrate' is specified to return an empty object only "bef

[Qemu-devel] [PATCH 4/4] target-tricore: pretty-print register dump and show more status registers

2014-12-12 Thread Alex Zuepke
Signed-off-by: Alex Zuepke --- target-tricore/translate.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index e3eeedb..d1b845b 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c

[Qemu-devel] [PATCH] Add 'setup' phase to docs for query-migrate QMP command

2014-12-12 Thread Alex Bligh
The QMP command 'query-migrate' returns the state 'setup' during the setup phase. This patch documents it. Signed-off-by: Alex Bligh --- qmp-commands.hx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 3348782..e9cff2c 100644

  1   2   3   >