[Qemu-devel] [RFC v4 1/6] hw/intc/arm_gicv3_its: Implement ITS base class

2016-07-06 Thread Eric Auger
From: Pavel Fedin This is the basic skeleton for both KVM and software-emulated ITS. Since we already prepare status structure, we also introduce complete VMState description. But, because we currently have no migratable implementations, we also set unmigratable flag. Signed-off-by: Pavel Fedin

Re: [Qemu-devel] [PATCH] qom/object: fix comment typo

2016-07-06 Thread Changlong Xie
On 07/06/2016 03:21 PM, Andreas Färber wrote: Am 06.07.2016 um 07:52 schrieb Changlong Xie: Would any maintainer pick this one? Please in the future use just "qom:" in the subject. How to find out? Ok git log --oneline -- include/qom/object.h Useful git command, i'll add it to my bash al

[Qemu-devel] [RFC v4 4/6] target-arm/kvm: Pass requester ID to MSI routing functions

2016-07-06 Thread Eric Auger
From: Pavel Fedin Introduce global kvm_arm_msi_use_devid flag and pass device IDs in kvm_arch_fixup_msi_route(). Device IDs are required by the ITS. Signed-off-by: Pavel Fedin Signed-off-by: Eric Auger --- v3 -> v4: - OR route->flags with KVM_MSI_VALID_DEVID --- target-arm/kvm.c | 6 +++

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Michael Rolnik
in the range [0x - 0x0100) some registers are owned by the CPU and some by board devices. CPU registers will be accessed by helper_fullrd & helper_fullwr whereas device registers e.g. USB, will be handled by USB provided it's possible to add rd/wr handlers for specific io addresses. On Wed, Ju

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Michael Rolnik
actually registers in the range [0x0020 - 0x0060) have dual access through ST/LD and OUT/IN registers in the range [0x - 0x0020) have dual access through ST/LD and CPU registers in the range [0x0060 - 0x0100) can be accessed by LD/ST only. we can create memory device, however it will cover the

[Qemu-devel] [RFC v4 6/6] arm/virt: Add ITS to the virt board

2016-07-06 Thread Eric Auger
From: Pavel Fedin If supported by the configuration, ITS will be added automatically. This patch also renames v2m_phandle to msi_phandle because it's now used by both MSI implementations. Signed-off-by: Pavel Fedin Signed-off-by: Eric Auger Reviewed-by: Peter Maydell -- v3 -> v4: - added P

Re: [Qemu-devel] [PATCH] xen-usb: Fix 32bit build

2016-07-06 Thread Stefano Stabellini
On Thu, 23 Jun 2016, Juergen Gross wrote: > On 23/06/16 13:08, Anthony PERARD wrote: > > Signed-off-by: Anthony PERARD > > Reviewed-by: Juergen Gross Added to my queue > > --- > > hw/usb/xen-usb.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/hw/usb/xen-us

[Qemu-devel] [PATCH v2 1/2] main-loop: check return value before using

2016-07-06 Thread Cao jin
pointer 'qemu_aio_context' should be checked first before it is used. qemu_bh_new() will use it. Signed-off-by: Cao jin --- main-loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-loop.c b/main-loop.c index 89a6994..6a7f8d3 100644 --- a/main-loop.c +++ b/main-loop.c

Re: [Qemu-devel] [PATCH] main-loop: check return value before using

2016-07-06 Thread Cao jin
On 07/06/2016 02:46 PM, Fam Zheng wrote: On Wed, 07/06 11:03, Cao jin wrote: pointer 'qemu_aio_context' should be checked first before it is used. qemu_bh_new() will use it. Also add extra newlines to make code well separated and easier to read. This "also" is not good, please only do one th

[Qemu-devel] [PULL 6/9] spice: avoid .set_mm_time on >= 0.12.6

2016-07-06 Thread Gerd Hoffmann
From: John Snow Spice deprecated this callback in 0.12.6. It's not a problem yet, but it will cause Clang to fail in a -Werror build due to the deprecated tag. Signed-off-by: John Snow Message-id: 1467240095-12507-2-git-send-email-js...@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/q

[Qemu-devel] [PATCH v2 2/2] main-loop: more newlines make code well separated

2016-07-06 Thread Cao jin
Make code easier to read. Signed-off-by: Cao jin --- main-loop.c | 5 + 1 file changed, 5 insertions(+) diff --git a/main-loop.c b/main-loop.c index 6a7f8d3..0d943f1 100644 --- a/main-loop.c +++ b/main-loop.c @@ -158,14 +158,19 @@ int qemu_init_main_loop(Error **errp) error_propaga

[Qemu-devel] [PULL 2/9] qxl: handle no updates in interface_update_area_complete

2016-07-06 Thread Gerd Hoffmann
Simply return early in case there are no updated rects. Signed-off-by: Gerd Hoffmann Message-id: 1465395101-13580-1-git-send-email-kra...@redhat.com --- hw/display/qxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index ab96f24..47cc6

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Peter Maydell
On 6 July 2016 at 10:49, Michael Rolnik wrote: > in the range [0x - 0x0100) > some registers are owned by the CPU and some by board devices. > CPU registers will be accessed by helper_fullrd & helper_fullwr whereas > device registers e.g. USB, will be handled by USB provided it's possible to >

[Qemu-devel] [PULL 8/9] spice: use the right head for multi-monitor

2016-07-06 Thread Gerd Hoffmann
From: Marc-André Lureau Look up the associated head monitor config. Signed-off-by: Marc-André Lureau Message-id: 1465911849-30423-3-git-send-email-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-

[Qemu-devel] [PULL 1/9] qxl: use uint64_t for vram size

2016-07-06 Thread Gerd Hoffmann
This allows for the 64bit vram bar to become larger than 2G (try -device qxl-vga,vram64_size_mb=8192). https://bugzilla.redhat.com/show_bug.cgi?id=1340439 Signed-off-by: Gerd Hoffmann Message-id: 1465389648-5179-1-git-send-email-kra...@redhat.com --- hw/display/qxl.c | 8 hw/display/qx

[Qemu-devel] [PULL 0/9] spice and qxl bugfixes

2016-07-06 Thread Gerd Hoffmann
ble in the git repository at: git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20160706-1 for you to fetch changes up to 9d8256ebc0ef88fb1f35d0405893962d20cc10ad: virgl: pass whole GL scanout dimensions (2016-07-06 10:3

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Michael Rolnik
helper_fullwr will call memory_write if it does not go to [0x - 0x0100) range otherwise it will call cpu_outb because this range has a dual access through ST and OUT instructions On Wed, Jul 6, 2016 at 12:52 PM, Peter Maydell wrote: > On 6 July 2016 at 10:36, Michael Rolnik wrote: > > Peter

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Michael Rolnik
thanks On Wed, Jul 6, 2016 at 1:10 PM, Peter Maydell wrote: > On 6 July 2016 at 11:04, Michael Rolnik wrote: > > how to create io space device and how to map it? > > Conceptually it's no different to handling memory mapped > devices. get_system_io() returns the memory region for the IO > space,

[Qemu-devel] [PULL 7/9] virgl: count the calls to gl_block

2016-07-06 Thread Gerd Hoffmann
From: Marc-André Lureau In virgl_cmd_resource_flush(), when several consoles are updated, it needs to keep blocking until all spice gl draws are done. This fixes an assert() in spice when using multiple monitors with virgl. Signed-off-by: Marc-André Lureau Message-id: 1465911849-30423-2-git-sen

[Qemu-devel] [PULL 4/9] qxl: store memory region and offset instead of pointer for guest slots

2016-07-06 Thread Gerd Hoffmann
Store MemoryRegion and offset instead of a pointer for each qxl memory slot, so we can easily figure in which memory region an qxl object stored. Signed-off-by: Gerd Hoffmann Message-id: 1466597244-5938-2-git-send-email-kra...@redhat.com --- hw/display/qxl.c | 15 +++ hw/display/qxl.

[Qemu-devel] [PATCH v2 0/2] main-loop: check return value before using

2016-07-06 Thread Cao jin
v2 changelog: 1. split stylistic patch into a separated one (Fam) Cao jin (2): main-loop: check return value before using main-loop: more newlines make code well separated main-loop.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.1.0

[Qemu-devel] [PULL 3/9] qxl: factor out qxl_get_check_slot_offset

2016-07-06 Thread Gerd Hoffmann
New helper function which translates a qxl physical address into memory slot and offset. Also applies sanity checks. Factored out from qxl_phys2virt. No functional change. Signed-off-by: Gerd Hoffmann Message-id: 1466597244-5938-1-git-send-email-kra...@redhat.com --- hw/display/qxl.c | 59 +++

[Qemu-devel] [PULL 9/9] virgl: pass whole GL scanout dimensions

2016-07-06 Thread Gerd Hoffmann
From: Marc-André Lureau Spice client needs the whole GL texture dimension to be able to show a scanout with a monitor offset (different than +0+0). Furthermore, this fixes a crash when calling surface_{width,height}() after dpy_gfx_replace_surface(con, NULL) was called in virgl_cmd_set_scanout()

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Peter Maydell
On 6 July 2016 at 10:55, Michael Rolnik wrote: > helper_fullwr will call memory_write if it does not go to [0x - 0x0100) > range otherwise it will call cpu_outb because this range has a dual access > through ST and OUT instructions OK, if you have real "OUT" instructions too then that's proba

Re: [Qemu-devel] [PATCH v2] translate-all: Bugfix for user-mode self-modifying code in 2 page long TB

2016-07-06 Thread Sergey Fedorov
On 06/07/16 10:54, Stanislav Shmarov wrote: > In user-mode emulation Translation Block can consist of 2 guest pages. > In that case QEMU also mprotects 2 host pages that are dedicated for > guest memory, containing instructions. QEMU detects self-modifying code > with SEGFAULT signal processing. >

[Qemu-devel] [PULL 5/9] qxl: fix surface migration

2016-07-06 Thread Gerd Hoffmann
Create a helper function qxl_dirty_one_surface() to mark a single qxl surface as dirty. Use the new qxl_get_check_slot_offset function and lookup the memory region from the slot instead of assuming the surface is stored in vram. Use the new helper function in qxl_dirty_surfaces, for both primary

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Michael Rolnik
how to create io space device and how to map it? thanks, Michael On Wed, Jul 6, 2016 at 1:03 PM, Peter Maydell wrote: > On 6 July 2016 at 10:55, Michael Rolnik wrote: > > helper_fullwr will call memory_write if it does not go to [0x - > 0x0100) > > range otherwise it will call cpu_outb bec

Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores

2016-07-06 Thread Peter Maydell
On 6 July 2016 at 11:04, Michael Rolnik wrote: > how to create io space device and how to map it? Conceptually it's no different to handling memory mapped devices. get_system_io() returns the memory region for the IO space, and you add devices to it with memory_region_add_subregion(). thanks --

Re: [Qemu-devel] [PATCH v2] balloon: Fix failure of updating guest memory status

2016-07-06 Thread Michael S. Tsirkin
On Wed, Jul 06, 2016 at 09:23:46AM +, Li, Liang Z wrote: > > On Wed, Jul 06, 2016 at 10:36:33AM +0800, Liang Li wrote: > > > After live migration, 'guest-stats' can't get the expected memory > > > status in the guest. This issue is caused by commit 4eae2a657d. > > > The value of 's->stats_vq_el

Re: [Qemu-devel] [PULL 0/1] QOM devices patch queue 2016-07-06

2016-07-06 Thread Peter Maydell
On 6 July 2016 at 08:28, Andreas Färber wrote: > Hello Peter, > > This is my QOM (devices) patch queue. Please pull. > > Thanks, > Andreas > > Cc: Peter Maydell > > The following changes since commit 791b7d2340cfafcac9af7864343cf23504d57804: > > Merge remote-tracking branch 'remotes/mst/tags/fo

Re: [Qemu-devel] [RFC PATCH v1 1/5] cpu, target-ppc: Move cpu_vmstate_[un]register calls to cpu_common_[un]realize

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 14:29:17 +0530 Bharata B Rao wrote: > Move vmstate_register() call to cpu_common_realize(). > Introduce cpu_common_unrealize() and move vmstate_unregister() to it. > > Change those archs that implement their own CPU unrealize routine to > mandatorily call CPUClass::unrealize(

Re: [Qemu-devel] [PATCH v2 1/2] main-loop: check return value before using

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 12:08, Cao jin wrote: > pointer 'qemu_aio_context' should be checked first before it is used. > qemu_bh_new() will use it. > > Signed-off-by: Cao jin > --- > main-loop.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/main-loop.c b/main-loop.c > index 89

Re: [Qemu-devel] [SeaBIOS] [PATCH v3] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL

2016-07-06 Thread Laszlo Ersek
On 07/06/16 08:42, Laszlo Ersek wrote: > On 07/06/16 08:28, Haozhong Zhang wrote: >> Hi Ashok, >> >> On 07/06/16 02:18, Paolo Bonzini wrote: I forgot to restore MSR_IA32_FEATURE_CONTROL in the resume path, and MSR_IA32_FEATURE_CONTROL is zero after S3 resume. >>> >>> This is a bug. Sorry

Re: [Qemu-devel] [RFC PATCH v1 2/5] cpu: Introduce CPUState::migration_id

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 14:29:18 +0530 Bharata B Rao wrote: > Add CPUState::migration_id and use that as instance_id in > vmstate_register() call. > > Introduce use-migration-id property that allows target machines to > optionally switch to using migration_id instead of cpu_index. > This will help a

Re: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 14:29:21 +0530 Bharata B Rao wrote: > Turn on use-migration-id property. Starting from pseries-2.7, prefer > the use of migration_id (cpu_dt_id) over cpu_index for cpu vmstate > registration and in XICS code. > > This allows migration to work when CPU cores are not necessaril

Re: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 14:29:21 +0530 Bharata B Rao wrote: > Turn on use-migration-id property. Starting from pseries-2.7, prefer > the use of migration_id (cpu_dt_id) over cpu_index for cpu vmstate > registration and in XICS code. > > This allows migration to work when CPU cores are not necessaril

Re: [Qemu-devel] [PULL 00/15] QAPI patches for 2016-07-06

2016-07-06 Thread Peter Maydell
On 6 July 2016 at 10:13, Markus Armbruster wrote: > The following changes since commit 791b7d2340cfafcac9af7864343cf23504d57804: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2016-07-05 16:48:24 +0100) > > are available in the git repository at: > > git://re

Re: [Qemu-devel] [PATCH v1 1/2] crypto: use glib as fallback for hash algorithm

2016-07-06 Thread Alberto Garcia
On Tue 05 Jul 2016 12:49:59 PM CEST, "Daniel P. Berrange" wrote: > GLib >= 2.16 provides GChecksum API which is good enough > for md5, sha1, sha256 and sha512. Use this as a final > fallback if neither nettle or gcrypt are available. This > lets us remove the stub hash impl, and so callers can >

Re: [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 14:29:19 +0530 Bharata B Rao wrote: > cpu_index is used as migration_id by default. For machine type > versions that set use-migration-id property, cpu_dt_it is returned. > > Signed-off-by: Bharata B Rao > --- > target-ppc/translate_init.c | 12 > 1 file change

Re: [Qemu-devel] [PATCH v2] translate-all: Bugfix for user-mode self-modifying code in 2 page long TB

2016-07-06 Thread Стас Шмаров
May be this can be done faster. After invalidation of current TB, we know next executed TB will be 1 instruction long and will write to same address, and will cause segfault. In sigfault handler write protection to this page will be disabled. So, we can retranslate TB, and remove protection before

Re: [Qemu-devel] [PATCH v4 10/11] qemu-img: Set the ID of the block job in img_commit()

2016-07-06 Thread Alberto Garcia
On Tue 05 Jul 2016 05:56:09 PM CEST, Max Reitz wrote: >> @@ -132,12 +132,6 @@ void *block_job_create(const char *job_id, const >> BlockJobDriver *driver, >> >> if (job_id == NULL) { >> job_id = bdrv_get_device_name(bs); >> -/* Assign a default ID if the BDS does not have a

Re: [Qemu-devel] [PATCH v2] i2c: Fix SMBus read transactions to avoid double events

2016-07-06 Thread Corey Minyard
On 07/06/2016 01:57 AM, Frederic Konrad wrote: On 06/28/2016 09:30 PM, miny...@acm.org wrote: From: Corey Minyard Change 2293c27faddf (i2c: implement broadcast write) added broadcast capability to the I2C bus, but it broke SMBus read transactions. An SMBus read transaction does two i2c_start_t

[Qemu-devel] [PATCH v3 0/7] ppc: compute cpu_dt_id in the machine code

2016-07-06 Thread Greg Kurz
This series is a sequel to the discussion on a patch from Ben's powernv patchset: http://patchwork.ozlabs.org/patch/597153/ Indeed, since the DT is a machine abstraction, it should definitely sit under hw/ppc and not in the target code: - all machine types are forced to share the same num

[Qemu-devel] [PATCH v3 1/7] ppc: different creation paths for cpus in system and user mode

2016-07-06 Thread Greg Kurz
The machine code currently uses the same cpu_ppc_init() function to create cpus as the user mode. This function also triggers the cpu realization. It is okay for user mode but with system mode we may want to do other things between initialization and realization, like generating cpu ids for the DT

[Qemu-devel] [PATCH v3 3/7] ppc: parse cpu features once

2016-07-06 Thread Greg Kurz
Considering that features are converted to global properties and global properties are automatically applied to every new instance of created CPU (at object_new() time), there is no point in parsing cpu_model string every time a CPU created. So move parsing outside CPU creation loop and do it only

[Qemu-devel] [PATCH v3 2/7] ppc: move smp_threads sanity checks to spapr

2016-07-06 Thread Greg Kurz
Only POWER5 and newer PowerPC cpus from IBM have SMT capabilities. Since they are only supported by pseries, let's move the checks to ppc_spapr_init(). Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 12 target-ppc/translate_init.c | 14 -- 2 files changed

[Qemu-devel] [PATCH v3 6/7] ppc: drop vcpu_idt_id bits from the target code

2016-07-06 Thread Greg Kurz
Now that all machine types provide vcpu_dt_id, we can safely drop these bits from the target code. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c | 16 1 file changed, 16 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 775df

Re: [Qemu-devel] [SeaBIOS] [PATCH v3] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 13:04, Laszlo Ersek wrote: > Actually, I think there is a bug in KVM at the moment. I ran the > following test: > > - modified OVMF to set the MSR to value 0x5 on just the BSP > - booted an i440fx and a Q35 (SMM-enabled) OVMF guest > - checked "rdmsr -a 0x3a" in both > - ran "pm-su

[Qemu-devel] [PATCH v3 4/7] ppc: open code cpu creation for machine types

2016-07-06 Thread Greg Kurz
If we want to generate cpu_dt_id in the machine code, this must occur before the cpu gets realized. We must open code the cpu creation to be able to do this. This patch just does that. Signed-off-by: Greg Kurz --- v3: don't parse cpu features as it is done in a previous patch --- hw/ppc/ppc.c |

[Qemu-devel] [PATCH v3 5/7] ppc: each machine type to provide vcpu_dt_id

2016-07-06 Thread Greg Kurz
This patch switches machine types to provide device-tree cpu ids. We have three cases to handle: - pseries < 2.7 call ppc_cpu_init() and should compute the DT id as it is currently done in the target code. - pseries 2.7 don't call ppc_cpu_init() and compute the DT as the sum of the core DT i

[Qemu-devel] [PATCH v3 7/7] spapr: consolidate the logic of core cpu_dt_id

2016-07-06 Thread Greg Kurz
POWER5 and newer cpus from IBM have a specific numbering scheme for DT ids. This is currently open coded in several places. This patch consolidates the logic in helpers. Suggested-by: Bharata B Rao Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 11 --- hw/ppc/spapr_cp

Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/32] blockdev: Move bochs probe into separate file

2016-07-06 Thread Max Reitz
On 05.07.2016 23:12, John Snow wrote: > > > On 07/05/2016 05:00 PM, Max Reitz wrote: >> On 05.07.2016 22:50, John Snow wrote: >>> >>> >>> On 07/05/2016 11:49 AM, Daniel P. Berrange wrote: On Tue, Jul 05, 2016 at 11:24:04AM -0400, Colin Lord wrote: > This puts the bochs probe function int

Re: [Qemu-devel] 答复: Re: [PATCH 2/2 V4] hmp: show all of snapshot info on every block dev in output of 'info snapshots'

2016-07-06 Thread Max Reitz
On 06.07.2016 07:42, Lin Ma wrote: > > Max Reitz 2016/7/6 星期三 上午 1:26 >>> >>On 04.07.2016 11:31, Lin Ma wrote: >>> Currently, the output of 'info snapshots' shows fully available > snapshots. >>> It's opaque, hides some snapshot information to users. It's not > convenient >>> if users want

[Qemu-devel] [PATCH] qapi: change QmpInputVisitor to QSLIST

2016-07-06 Thread Paolo Bonzini
This saves a lot of memory compared to a statically-sized array. Signed-off-by: Paolo Bonzini --- qapi/qmp-input-visitor.c | 53 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c in

[Qemu-devel] [PATCH] qapi: change QmpOutputVisitor to QSLIST

2016-07-06 Thread Paolo Bonzini
This saves a little memory compared to the doubly-linked QTAILQ. Signed-off-by: Paolo Bonzini --- qapi/qmp-output-visitor.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/qapi/qmp-output-visitor.c b/qapi/qmp-output-visitor.c index 4d3cf78..676df1f

Re: [Qemu-devel] [PATCH 2/2] qcow2: Avoid making the L1 table too big

2016-07-06 Thread Max Reitz
On 06.07.2016 10:40, Kevin Wolf wrote: > Am 15.06.2016 um 17:36 hat Max Reitz geschrieben: >> We refuse to open images whose L1 table we deem "too big". Consequently, >> we should not produce such images ourselves. >> >> Cc: qemu-sta...@nongnu.org >> Signed-off-by: Max Reitz >> --- >> block/qcow2

Re: [Qemu-devel] [PATCH v2] balloon: Fix failure of updating guest memory status

2016-07-06 Thread Li, Liang Z
> > > > After live migration, 'guest-stats' can't get the expected memory > > > > status in the guest. This issue is caused by commit 4eae2a657d. > > > > The value of 's->stats_vq_elem' will be NULL after live migration, > > > > and the check in the function 'balloon_stats_poll_cb()' will > > > > p

Re: [Qemu-devel] [PATCH v2] translate-all: Bugfix for user-mode self-modifying code in 2 page long TB

2016-07-06 Thread Sergey Fedorov
On 06/07/16 15:01, Стас Шмаров wrote: > May be this can be done faster. > After invalidation of current TB, we know next executed TB will be 1 > instruction long and will write to same address, and will cause > segfault. In sigfault handler write protection to this page will be > disabled. > So, we

Re: [Qemu-devel] [PATCH 2/2] qcow2: Avoid making the L1 table too big

2016-07-06 Thread Kevin Wolf
Am 06.07.2016 um 14:47 hat Max Reitz geschrieben: > On 06.07.2016 10:40, Kevin Wolf wrote: > > Am 15.06.2016 um 17:36 hat Max Reitz geschrieben: > >> We refuse to open images whose L1 table we deem "too big". Consequently, > >> we should not produce such images ourselves. > >> > >> Cc: qemu-sta...@

Re: [Qemu-devel] [SeaBIOS] [PATCH v3] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL

2016-07-06 Thread Haozhong Zhang
On 07/06/16 13:04, Laszlo Ersek wrote: > On 07/06/16 08:42, Laszlo Ersek wrote: > > On 07/06/16 08:28, Haozhong Zhang wrote: > >> Hi Ashok, > >> > >> On 07/06/16 02:18, Paolo Bonzini wrote: > I forgot to restore MSR_IA32_FEATURE_CONTROL in the resume path, and > MSR_IA32_FEATURE_CONTROL i

Re: [Qemu-devel] [PULL 0/9] spice and qxl bugfixes

2016-07-06 Thread Peter Maydell
ch 'remotes/mst/tags/for_upstream' into staging > (2016-07-05 16:48:24 +0100) > > are available in the git repository at: > > > git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20160706-1 > > for you to fetch changes up to 9d8256ebc0ef88fb1f35d0405893962d

Re: [Qemu-devel] [PATCH v3 02/32] blockdev: Add dynamic generation of module_block.h

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > From: Marc Mari > > To simplify the addition of new block modules, add a script that generates > module_block.h automatically from the modules' source code. > > This script assumes that the QEMU coding style rules are followed. But the script itself does

Re: [Qemu-devel] [PATCH v2] translate-all: Bugfix for user-mode self-modifying code in 2 page long TB

2016-07-06 Thread Stanislav Shmarov
Yes, exactly. There is no point for returning to main loop immediately when current TB is found on host page and is retranslated. We can continue invalidation of TBs, and finally remove host page write protection. So there will be no second SEGFAULT. And when generating TB for next instructions,

Re: [Qemu-devel] [PATCH v2] translate-all: Bugfix for user-mode self-modifying code in 2 page long TB

2016-07-06 Thread Sergey Fedorov
On 06/07/16 16:22, Stanislav Shmarov wrote: > > Yes, exactly. > > There is no point for returning to main loop immediately when current > TB is found on host page and is retranslated. We can continue > invalidation of TBs, and finally remove host page write protection. So > there will be no second

Re: [Qemu-devel] [PATCH 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-06 Thread Balbir Singh
On Wed, 2016-07-06 at 16:05 +1000, Sam Bobroff wrote: > Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to > determine if a PowerPC KVM guest should use HTM (Hardware Transactional > Memory). >  > This will be used by QEMU to populate the pa-features bits in the > guest's devic

Re: [Qemu-devel] [RFC PATCH 1/1] OpenBIOS: Switch over to official OpenBIOS git repo

2016-07-06 Thread Jeff Cody
On Wed, Jul 06, 2016 at 08:26:57AM +0100, Mark Cave-Ayland wrote: > On 28/06/16 21:43, Mark Cave-Ayland wrote: > > > On 28/06/16 14:44, Stefan Hajnoczi wrote: > > > >> On Tue, Jun 28, 2016 at 7:11 AM, Jeff Cody wrote: > >>> On Mon, Jun 27, 2016 at 07:48:23AM +0100, Mark Cave-Ayland wrote: >

Re: [Qemu-devel] [PATCH v2] balloon: Fix failure of updating guest memory status

2016-07-06 Thread Michael S. Tsirkin
On Wed, Jul 06, 2016 at 12:49:06PM +, Li, Liang Z wrote: > > > > > After live migration, 'guest-stats' can't get the expected memory > > > > > status in the guest. This issue is caused by commit 4eae2a657d. > > > > > The value of 's->stats_vq_elem' will be NULL after live migration, > > > > > a

Re: [Qemu-devel] [PATCH 08/24] vhost-user: return a read error

2016-07-06 Thread Marc-André Lureau
Hi On Tue, Jul 5, 2016 at 1:12 PM, Michael S. Tsirkin wrote: > On Tue, Jul 05, 2016 at 11:18:38AM +0200, Marc-André Lureau wrote: >> Hi >> >> On Tue, Jul 5, 2016 at 12:35 AM, Michael S. Tsirkin wrote: >> > On Mon, Jul 04, 2016 at 11:56:56PM +0200, Marc-André Lureau wrote: >> >> Hi >> >> >> >> On

Re: [Qemu-devel] [PATCH RFC] fixup! tests: New make target check-source

2016-07-06 Thread Markus Armbruster
Sascha Silbe writes: > Dear Markus, > > Markus Armbruster writes: > >> Markus Armbruster writes: >> >>> Hmm, this demonstrates some of our headers may only be included when >>> certain CONFIG_* are defined. > [...] >>> Regardless, we need to find the problemtatic headers. Perhaps you can >>> f

Re: [Qemu-devel] [PATCH 05/24] vhost: change some assert() for error_report() or silent fail

2016-07-06 Thread Marc-André Lureau
On Mon, Jul 4, 2016 at 5:43 PM, Michael S. Tsirkin wrote: > I think it's ok to add a new message if it actually brings some > benefit, but I'm not sure why it makes sense to do it just in case. The main benefit today would be to have a single code path to handle disconnection, not dozens. The exp

Re: [Qemu-devel] [PATCH 08/24] vhost-user: return a read error

2016-07-06 Thread Marc-André Lureau
On Wed, Jul 6, 2016 at 3:40 PM, Marc-André Lureau wrote: > Hi > > On Tue, Jul 5, 2016 at 1:12 PM, Michael S. Tsirkin wrote: >> On Tue, Jul 05, 2016 at 11:18:38AM +0200, Marc-André Lureau wrote: >>> Hi >>> >>> On Tue, Jul 5, 2016 at 12:35 AM, Michael S. Tsirkin wrote: >>> > On Mon, Jul 04, 2016 a

[Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2016-07-06 Thread Chris J Arges
Hello Paul, or anyone else affected, Accepted qemu into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/2.0.0+dfsg- 2ubuntu1.25 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://

Re: [Qemu-devel] [PATCH v3 03/32] blockdev: Add dynamic module loading for block drivers

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > From: Marc Mari > > Extend the current module interface to allow for block drivers to be loaded > dynamically on request. > > The only block drivers that can be converted into modules are the drivers > that don't perform any init operation except for regi

[Qemu-devel] [PATCH] linux-user: Forget about synchronous signal once it is delivered

2016-07-06 Thread Peter Maydell
Commit 655ed67c2a248cf which switched synchronous signals to benig recorded in ts->sync_signal rather than in a queue with every other signal had a bug: we failed to clear the flag indicating that a synchronous signal was pending when we delivered it. This meant that we would take the signal again

Re: [Qemu-devel] [RFC PATCH v1 2/5] cpu: Introduce CPUState::migration_id

2016-07-06 Thread Bharata B Rao
On Wed, Jul 06, 2016 at 01:34:59PM +0200, Igor Mammedov wrote: > On Wed, 6 Jul 2016 14:29:18 +0530 > Bharata B Rao wrote: > > > Add CPUState::migration_id and use that as instance_id in > > vmstate_register() call. > > > > Introduce use-migration-id property that allows target machines to > > o

Re: [Qemu-devel] [PATCH v3 04/32] blockdev: Move bochs probe into separate file

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > This puts the bochs probe function into its own separate file as part of > the process of modularizing block drivers. Having the probe functions > separate from the rest of the driver allows us to probe without having > to potentially unnecessarily load the

Re: [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs

2016-07-06 Thread Bharata B Rao
On Wed, Jul 06, 2016 at 02:01:14PM +0200, Igor Mammedov wrote: > On Wed, 6 Jul 2016 14:29:19 +0530 > Bharata B Rao wrote: > > > cpu_index is used as migration_id by default. For machine type > > versions that set use-migration-id property, cpu_dt_it is returned. > > > > Signed-off-by: Bharata B

Re: [Qemu-devel] [RFC PATCH v1 1/5] cpu, target-ppc: Move cpu_vmstate_[un]register calls to cpu_common_[un]realize

2016-07-06 Thread Bharata B Rao
On Wed, Jul 06, 2016 at 12:57:49PM +0200, Igor Mammedov wrote: > On Wed, 6 Jul 2016 14:29:17 +0530 > Bharata B Rao wrote: > > > Move vmstate_register() call to cpu_common_realize(). > > Introduce cpu_common_unrealize() and move vmstate_unregister() to it. > > > > Change those archs that impleme

Re: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards

2016-07-06 Thread Bharata B Rao
On Wed, Jul 06, 2016 at 01:45:54PM +0200, Igor Mammedov wrote: > On Wed, 6 Jul 2016 14:29:21 +0530 > Bharata B Rao wrote: > > > Turn on use-migration-id property. Starting from pseries-2.7, prefer > > the use of migration_id (cpu_dt_id) over cpu_index for cpu vmstate > > registration and in XICS

Re: [Qemu-devel] [PATCH v2 5/6] qemu-iotests: Test setting WCE with qdev

2016-07-06 Thread Kevin Wolf
Am 02.07.2016 um 18:15 hat Max Reitz geschrieben: > On 30.06.2016 16:13, Kevin Wolf wrote: > > +if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then > > +_notrun "Test uses IDE devices" > > Why not just use virtio? Hm, and I guess use virtio-blk rather than virtio-blk-pci so that it works on all plat

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-06 Thread Markus Armbruster
Paolo Bonzini writes: > Now that json-streamer tries not to leak tokens on incomplete parse, > the tokens can be freed twice if QEMU destroys the json-streamer > object during the parser->emit call. To fix this, create the new > empty GQueue earlier, so that it is already in place when the old >

Re: [Qemu-devel] [PATCH v3 05/32] blockdev: Move cloop probe to its own file

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > Isolates cloop probing function as part of the modularization process. > > Signed-off-by: Colin Lord > --- > block/Makefile.objs | 2 +- > block/cloop.c | 16 +--- > block/probe/cloop.c | 17 + > include/block/prob

Re: [Qemu-devel] [PATCH 4/9] mirror: efficiently zero out target

2016-07-06 Thread Denis V. Lunev
On 06/15/2016 03:34 PM, Eric Blake wrote: On 06/15/2016 02:46 AM, Denis V. Lunev wrote: On 06/15/2016 06:00 AM, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: With a bdrv_co_write_zeroes method on a target BDS zeroes will not be placed into the wire. Thus the target could be v

Re: [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs

2016-07-06 Thread Greg Kurz
On Wed, 6 Jul 2016 19:51:01 +0530 Bharata B Rao wrote: > On Wed, Jul 06, 2016 at 02:01:14PM +0200, Igor Mammedov wrote: > > On Wed, 6 Jul 2016 14:29:19 +0530 > > Bharata B Rao wrote: > > > > > cpu_index is used as migration_id by default. For machine type > > > versions that set use-migratio

Re: [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs

2016-07-06 Thread Greg Kurz
On Wed, 6 Jul 2016 14:29:19 +0530 Bharata B Rao wrote: > cpu_index is used as migration_id by default. For machine type versions > that set use-migration-id property, cpu_dt_it is returned. > It looks wrong to hijack cpu_dt_id to fix migration. For pseries-2.7, you need to pass the sum of the

Re: [Qemu-devel] [PATCH v3 06/32] blockdev: Move luks probe to its own file

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > Isolates the luks probe function as part of the modularization process. > > Signed-off-by: Colin Lord > --- > block/Makefile.objs | 2 +- > block/crypto.c| 21 + > block/probe/luks.c| 23 +++ > includ

Re: [Qemu-devel] [PATCH v3 07/32] blockdev: Move dmg probe to its own file

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > Isolate dmg probe as part of the modularization process. > > Signed-off-by: Colin Lord > --- > block/Makefile.objs | 2 +- > block/dmg.c | 16 +--- > block/probe/dmg.c | 17 + > include/block/probe.h | 1 + >

[Qemu-devel] [PATCH v3 5/6] qemu-iotests: Test setting WCE with qdev

2016-07-06 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/157 | 88 ++ tests/qemu-iotests/157.out | 22 tests/qemu-iotests/group | 1 + 3 files changed, 111 insertions(+) create mode 100755 tests/qemu-iotests/157 create mode 100644 tests/qe

[Qemu-devel] [PATCH v3 1/6] block/qdev: Allow node name for drive properties

2016-07-06 Thread Kevin Wolf
If a node name instead of a BlockBackend name is specified as the driver for a guest device, an anonymous BlockBackend is created now. usb-storage uses a hack where it forwards its BlockBackend as a property to another device that it internally creates. This hack must be updated so that it doesn't

[Qemu-devel] [Bug 1599539] [NEW] 2.6.0: vvfat driver generates bad FAT entries

2016-07-06 Thread felix
Public bug reported: The vvfat driver sometimes generates entries about which file system checking utilities generate complaints. For example, dosfsck will complain that the volume label entry has non- zero size. ScanDisk from Windows 9x complains about invalid dot (".") and dot-dot ("..") entrie

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 16:30, Markus Armbruster wrote: > Paolo Bonzini writes: > >> Now that json-streamer tries not to leak tokens on incomplete parse, >> the tokens can be freed twice if QEMU destroys the json-streamer >> object during the parser->emit call. To fix this, create the new >> empty GQueu

[Qemu-devel] [PATCH v3 4/6] block/qdev: Allow configuring rerror/werror with qdev properties

2016-07-06 Thread Kevin Wolf
The rerror/werror policies are implemented in the devices, so that's where they should be configured. In comparison to the old options in -drive, the qdev properties are only added to those devices that actually support them. If the option isn't given (or "auto" is specified), the setting of the B

[Qemu-devel] [PATCH v3 0/6] block: Move BB options from blockdev-add to qdev

2016-07-06 Thread Kevin Wolf
This series adds some device level options (write-cache, werror, rerror) to qdev that used to be specified with -drive and made their way into blockdev-add. They are at the same time removed from blockdev-add, which is going to be changed in a later patch series so that it only creates block nodes

Re: [Qemu-devel] [RFC PATCH v1 1/5] cpu, target-ppc: Move cpu_vmstate_[un]register calls to cpu_common_[un]realize

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 19:46:13 +0530 Bharata B Rao wrote: > On Wed, Jul 06, 2016 at 12:57:49PM +0200, Igor Mammedov wrote: > > On Wed, 6 Jul 2016 14:29:17 +0530 > > Bharata B Rao wrote: > > > > > Move vmstate_register() call to cpu_common_realize(). > > > Introduce cpu_common_unrealize() and move

[Qemu-devel] [PATCH v3 3/6] commit: Fix use of error handling policy

2016-07-06 Thread Kevin Wolf
Commit implemented the 'enospc' policy as 'ignore' if the error was not ENOSPC. The QAPI documentation promises that it's treated as 'stop'. Using the common block job error handling function fixes this and also adds the missing QMP event. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- bl

Re: [Qemu-devel] [PATCH v1 1/2] crypto: use glib as fallback for hash algorithm

2016-07-06 Thread Eric Blake
On 07/06/2016 05:58 AM, Alberto Garcia wrote: > On Tue 05 Jul 2016 12:49:59 PM CEST, "Daniel P. Berrange" > wrote: > >> GLib >= 2.16 provides GChecksum API which is good enough >> for md5, sha1, sha256 and sha512. Use this as a final >> fallback if neither nettle or gcrypt are available. This >>

[Qemu-devel] [PATCH v3 2/6] block/qdev: Allow configuring WCE with qdev properties

2016-07-06 Thread Kevin Wolf
As cache.writeback is a BlockBackend property and as such more related to the guest device than the BlockDriverState, we already removed it from the blockdev-add interface. This patch adds the new way to set it, as a qdev property of the corresponding guest device. For example: -drive if=none,file

[Qemu-devel] [PATCH v3 6/6] block: Remove BB options from blockdev-add

2016-07-06 Thread Kevin Wolf
werror/rerror are now available as qdev options. The stats-* options are removed without an existing replacement; they should probably be configurable with a separate QMP command like I/O throttling settings. Removing id is left for another day because this involves updating qemu-iotests cases to

Re: [Qemu-devel] [PATCH v3 08/32] blockdev: Move parallels probe to its own file

2016-07-06 Thread Max Reitz
On 05.07.2016 17:24, Colin Lord wrote: > Isolate parallels probe as part of the modularization process. > > Signed-off-by: Colin Lord > --- > block/Makefile.objs | 1 + > block/parallels.c| 43 > ++-- > block/probe/parallels.c

Re: [Qemu-devel] [RFC PATCH v1 2/5] cpu: Introduce CPUState::migration_id

2016-07-06 Thread Igor Mammedov
On Wed, 6 Jul 2016 19:48:03 +0530 Bharata B Rao wrote: > On Wed, Jul 06, 2016 at 01:34:59PM +0200, Igor Mammedov wrote: > > On Wed, 6 Jul 2016 14:29:18 +0530 > > Bharata B Rao wrote: > > > > > Add CPUState::migration_id and use that as instance_id in > > > vmstate_register() call. > > > > > >

  1   2   3   4   >