Re: [Qemu-devel] [PATCH v3 1/3] qom: make base type user-creatable abstract

2016-09-26 Thread Daniel P. Berrange
On Mon, Sep 26, 2016 at 06:16:25PM +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > qom/object_interfaces.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c > index bf59846..9288242 100644 > ---

Re: [Qemu-devel] [PATCH v3 3/3] object: Add 'help' option for all available backends and properties

2016-09-26 Thread Daniel P. Berrange
On Mon, Sep 26, 2016 at 06:16:27PM +0800, Lin Ma wrote: > '-object help' prints available user creatable backends. > '-object $typename,help' prints relevant properties. > > Signed-off-by: Lin Ma > --- > backends/hostmem.c | 4 > crypto/secret.c

Re: [Qemu-devel] [PULL 17/33] block: Accept device model name for x-blockdev-remove-medium

2016-09-26 Thread Paolo Bonzini
On 22/09/2016 18:29, Kevin Wolf wrote: > -qmp_x_blockdev_remove_medium(device, ); > +qmp_x_blockdev_remove_medium(true, device, false, NULL, errp); > if (err) { > error_propagate(errp, err); > goto fail; Bug: changed to errp, so err is always NULL. Paolo

Re: [Qemu-devel] [PULL 23/36] cadence_gem: Add queue support

2016-09-26 Thread Paolo Bonzini
On 22/09/2016 19:22, Peter Maydell wrote: > +case GEM_RECEIVE_Q1_PTR ... GEM_RECEIVE_Q15_PTR: > +s->rx_desc_addr[offset - GEM_RECEIVE_Q1_PTR + 1] = val; > +break; MAX_PRIORITY_QUEUES is still 8, so this can cause an out-of-bounds write in s->rx_desc_addr (and likewise for

Re: [Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 13:10, Igor Mammedov wrote: > On Thu, 22 Sep 2016 18:16:47 +0200 > Paolo Bonzini wrote: > >> On 22/09/2016 18:00, Igor Mammedov wrote: Why not just return initial_apic_id? This is the meaning the property had before your patch. >>> >>>

[Qemu-devel] [PATCH 08/18] target-riscv: Add Atomic Instructions

2016-09-26 Thread Sagar Karandikar
Signed-off-by: Sagar Karandikar --- target-riscv/translate.c | 154 +++ 1 file changed, 154 insertions(+) diff --git a/target-riscv/translate.c b/target-riscv/translate.c index 767cdbe..af82eab 100644 ---

[Qemu-devel] [PATCH 17/18] target-riscv: Add support for Host-Target Interface (HTIF) Devices

2016-09-26 Thread Sagar Karandikar
HTIF devices are currently used for the console and signaling test completion for tests in riscv-tests. These are not part of any RISC-V standard and will be phased out once better device support is available. Signed-off-by: Sagar Karandikar --- hw/riscv/Makefile.objs

[Qemu-devel] [PATCH 12/18] target-riscv: Add system instructions

2016-09-26 Thread Sagar Karandikar
System instructions, stubs for csr read/write, necessary helpers Signed-off-by: Sagar Karandikar --- target-riscv/helper.h| 11 target-riscv/op_helper.c | 144 +++ target-riscv/translate.c | 119

[Qemu-devel] [PATCH 04/18] target-riscv: Add framework for instruction decode

2016-09-26 Thread Sagar Karandikar
Body of decode_opc with LUI, AUIPC, JAL instructions Decode table in instmap.h Signed-off-by: Sagar Karandikar --- target-riscv/instmap.h | 328 +++ target-riscv/translate.c | 64 + 2 files changed, 392

[Qemu-devel] [PATCH 2/2] xen: add qemu device for each pvusb backend

2016-09-26 Thread Juergen Gross
In order to be able to specify to which pvusb controller a new pvusb device should be added we need a qemu device for each pvusb controller with an associated id. Add such a device when a new controller is requested and attach the usb bus of that controller to the new device. Any device connected

Re: [Qemu-devel] [PATCH 12/18] target-riscv: Add system instructions

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 14:38, Bastian Koppelmann wrote: > On 09/26/2016 02:21 PM, Paolo Bonzini wrote: >> >> >> On 26/09/2016 12:56, Sagar Karandikar wrote: >>> +#ifndef CONFIG_USER_ONLY >>> +DEF_HELPER_4(csrrw, tl, env, tl, tl, tl) >>> +DEF_HELPER_5(csrrs, tl, env, tl, tl, tl, tl) >>>

[Qemu-devel] [PATCH 0/2] Xen pvUSB correction

2016-09-26 Thread Juergen Gross
Trying to use pvUSB in a Xen guest with a qemu emulated USB controller will crash qemu as it tries to attach a pvUSB device to the emulated controller. This can be avoided by adding a unique id to each pvUSB controller which can be used when attaching the pvUSB device. In order to make this

Re: [Qemu-devel] write_zeroes/trim on the whole disk

2016-09-26 Thread Paolo Bonzini
On 24/09/2016 14:27, Vladimir Sementsov-Ogievskiy wrote: > On 24.09.2016 15:06, Vladimir Sementsov-Ogievskiy wrote: >> On 24.09.2016 00:21, Wouter Verhelst wrote: >>> On Fri, Sep 23, 2016 at 02:00:06PM -0500, Eric Blake wrote: My preference would be a new flag to the existing commands, with

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 14:46, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of

[Qemu-devel] [PATCH] block: Fix error path in qmp_blockdev_change_medium()

2016-09-26 Thread Kevin Wolf
Commit 00949bab incorrectly changed one instance of into errp while touching the line. Change it back. Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 29c6561..62d0dd0 100644 ---

Re: [Qemu-devel] [PULL 17/33] block: Accept device model name for x-blockdev-remove-medium

2016-09-26 Thread Kevin Wolf
Am 26.09.2016 um 12:59 hat Paolo Bonzini geschrieben: > On 22/09/2016 18:29, Kevin Wolf wrote: > > -qmp_x_blockdev_remove_medium(device, ); > > +qmp_x_blockdev_remove_medium(true, device, false, NULL, errp); > > if (err) { > > error_propagate(errp, err); > > goto

[Qemu-devel] [PATCH 1/2] xen: add an own bus for xen backend devices

2016-09-26 Thread Juergen Gross
Add a bus for Xen backend devices in order to be able to establish a dedicated device path for pluggable devices. Signed-off-by: Juergen Gross --- hw/xen/xen_backend.c | 19 --- include/hw/xen/xen_backend.h | 4 2 files changed, 20 insertions(+), 3

[Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Vladimir Sementsov-Ogievskiy
This extension allows big requests for TRIM and WRITE_ZEROES through special 'shift' parameter, which means that offset and length should be shifted left by several bits. This is needed for efficient clearing large regions of the disk (up to the whole disk). Signed-off-by: Vladimir

Re: [Qemu-devel] vhost-user-test failure

2016-09-26 Thread Maxime Coquelin
Hi, On 09/26/2016 02:13 PM, Eduardo Habkost wrote: On Sun, Sep 25, 2016 at 04:55:53PM -0400, Marc-André Lureau wrote: Hi - Original Message - This time with Marc-André in cc:... On 09/23/2016 07:40 PM, Maxime Coquelin wrote: On 09/23/2016 05:41 PM, Michael S. Tsirkin wrote: On

Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters

2016-09-26 Thread Kevin Wolf
Am 26.09.2016 um 11:51 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 26.09.2016 um 10:08 hat Pavel Dovgalyuk geschrieben: > > > This patch disables snapshotting for block driver filters. > > > It is needed, because snapshots should be created > > > in

Re: [Qemu-devel] [PATCH] usb: ehci: fix memory leak in ehci_process_itd

2016-09-26 Thread 李强
Ping! 2016-09-19 10:48 GMT+08:00 Li Qiang : > From: Li Qiang > > While processing isochronous transfer descriptors(iTD), if the page > select(PG) field value is out of bands it will return. In this > situation the ehci's sg list doesn't be freed thus leading

Re: [Qemu-devel] [PATCH 2/2] build-sys: put glib_cflags in QEMU_CFLAGS

2016-09-26 Thread Paolo Bonzini
On 25/09/2016 22:57, Marc-André Lureau wrote: > This way, overriding CFLAGS on make command line keeps glib-cflags > and doesn't break the build. > > Signed-off-by: Marc-André Lureau > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [Qemu-devel] How does a guest OS differentiate between a Reboot/Shutdown ACPI event

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 04:38, Srinivasan J wrote: > > I have Ubuntu 14.04.1 (ubuntu-14.04.1-server-amd64.iso) guest running > in a KVM host. The host is running Ubuntu 16.04. I'm trying to find > out how Ubuntu 14.04.1 differentiates between virsh shutdown and virsh > reboot commands issued in the host.

Re: [Qemu-devel] [PATCH 0/3] RDMA error handling

2016-09-26 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@digitalocean.com) wrote: > Reviewed-by: Michael R. Hines > > (By the way, I no longer work for IBM and no longer have direct access to > RDMA hardware. If someone is willing to let me login to something that does > in the future, I don't mind

Re: [Qemu-devel] [PATCH 10/16] docs: include formal model for TCG exclusive sections

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini > --- > docs/tcg-exclusive.promela | 176 > + > 1 file changed, 176 insertions(+) > create mode 100644 docs/tcg-exclusive.promela > > diff --git

Re: [Qemu-devel] [PATCH 13/16] cpus-common: simplify locking for start_exclusive/end_exclusive

2016-09-26 Thread Alex Bennée
Paolo Bonzini writes: > It is not necessary to hold qemu_cpu_list_mutex throughout the > exclusive section, because no other exclusive section can run > while pending_cpus != 0. > > exclusive_idle() is called in cpu_exec_start(), and that prevents > any CPUs created after

Re: [Qemu-devel] [PATCH 1/4] target-cris: Do not dump cpu state with -d in_asm

2016-09-26 Thread Alex Bennée
Richard Henderson writes: > Dumping cpu state is what -d cpu is for. > > Cc: Edgar E. Iglesias > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > target-cris/translate.c | 25

Re: [Qemu-devel] [PATCH 1/3] virtio: add virtio_detach_element()

2016-09-26 Thread Greg Kurz
On Mon, 19 Sep 2016 14:28:03 +0100 Stefan Hajnoczi wrote: > During device reset or similar situations a VirtQueueElement needs to be > freed without pushing it onto the used ring or rewinding the virtqueue. > Extract a new function to do this. > > Later patches add

[Qemu-devel] [PATCH v3 8/9] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error()

2016-09-26 Thread Greg Kurz
The virtio_scsi_bad_req() function is called when a guest sends a request with missing or ill-sized headers. This generally happens when the virtio_scsi_parse_req() function returns an error. With this patch, virtio_scsi_bad_req() will mark the device as broken, detach the request from the

[Qemu-devel] [PULL 08/27] colo-compare: introduce packet comparison thread

2016-09-26 Thread Jason Wang
From: Zhang Chen If primary packet is same with secondary packet, we will send primary packet and drop secondary packet, otherwise notify COLO frame to do checkpoint. If primary packet comes but secondary packet does not, after REGULAR_PACKET_CHECK_MS milliseconds

[Qemu-devel] [PATCH 18/18] target-riscv: Add generic test board, activate target

2016-09-26 Thread Sagar Karandikar
Signed-off-by: Sagar Karandikar --- configure | 6 + default-configs/riscv32-softmmu.mak | 38 ++ default-configs/riscv64-softmmu.mak | 38 ++ hw/riscv/Makefile.objs | 2 + hw/riscv/riscv_board.c | 264

[Qemu-devel] [PATCH 13/18] target-riscv: Add CSR read/write helpers

2016-09-26 Thread Sagar Karandikar
Signed-off-by: Sagar Karandikar --- target-riscv/op_helper.c | 324 +++ 1 file changed, 324 insertions(+) diff --git a/target-riscv/op_helper.c b/target-riscv/op_helper.c index ee51f02..8449d1b 100644 ---

[Qemu-devel] [PATCH 02/18] target-riscv: Add RISC-V Target stubs inside target-riscv/

2016-09-26 Thread Sagar Karandikar
Signed-off-by: Sagar Karandikar --- target-riscv/Makefile.objs | 1 + target-riscv/cpu.c | 154 ++ target-riscv/cpu.h | 497 + target-riscv/helper.c | 59 ++ target-riscv/helper.h |

[Qemu-devel] [PATCH 09/18] target-riscv: Add FMADD, FMSUB, FNMADD, FNMSUB Instructions,

2016-09-26 Thread Sagar Karandikar
Along with FP helper infrastructure, changes to softfloat-specialize Signed-off-by: Sagar Karandikar --- fpu/softfloat-specialize.h | 7 ++- target-riscv/Makefile.objs | 2 +- target-riscv/fpu_helper.c | 151 +

[Qemu-devel] [PATCH V8 6/6] coroutine: reduce stack size to 60kB

2016-09-26 Thread Peter Lieven
evaluation with the recently introduced maximum stack usage monitoring revealed that the actual used stack size was never above 4kB so allocating 1MB stack for each coroutine is a lot of wasted memory. So reduce the stack size to 60kB which should still give enough head room. The guard page added

[Qemu-devel] [PATCH 11/18] target-riscv: Add Double Precision Floating-Point Instructions

2016-09-26 Thread Sagar Karandikar
Signed-off-by: Sagar Karandikar --- target-riscv/fpu_helper.c | 225 ++ target-riscv/helper.h | 30 +++ target-riscv/translate.c | 135 3 files changed, 390 insertions(+) diff --git

[Qemu-devel] [PATCH V8 3/6] coroutine-ucontext: use helper for allocating stack memory

2016-09-26 Thread Peter Lieven
Signed-off-by: Peter Lieven --- util/coroutine-ucontext.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 31254ab..6621f3f 100644 --- a/util/coroutine-ucontext.c +++

Re: [Qemu-devel] [PATCH] virtio-serial: virtio console emergency write support

2016-09-26 Thread Amit Shah
Hi, On (Wed) 21 Sep 2016 [14:17:48], Sascha Silbe wrote: > Add support for the virtio 1.0 "emergency write" > (VIRTIO_CONSOLE_F_EMERG_WRITE) feature. This is useful for early guest > debugging and might be used in cases where the guest crashes so badly > that it cannot use virtqueues. > >

[Qemu-devel] [PATCH V8 1/6] oslib-posix: add helpers for stack alloc and free

2016-09-26 Thread Peter Lieven
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: Peter Lieven ---

Re: [Qemu-devel] [PATCH 2/5] apic: add send_msi() to APICCommonClass

2016-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2016 23:04:29 +0200 Radim Krčmář wrote: > The MMIO based interface to APIC doesn't work well with MSIs that have > upper address bits set (remapped x2APIC MSIs). A specialized interface > is a quick and dirty way to avoid the shortcoming. > > Signed-off-by:

[Qemu-devel] [PATCH 10/18] target-riscv: Add Single Precision Floating-Point Instructions

2016-09-26 Thread Sagar Karandikar
Signed-off-by: Sagar Karandikar --- target-riscv/fpu_helper.c | 206 ++ target-riscv/helper.h | 28 +++ target-riscv/translate.c | 146 3 files changed, 380 insertions(+) diff --git

[Qemu-devel] [PATCH V8 0/6] coroutine: mmap stack memory and stack size

2016-09-26 Thread Peter Lieven
I decided to split this from the rest of the Qemu RSS usage series as it contains the more or less non contentious patches. I omitted the MAP_GROWSDOWN flag in mmap as we are not 100% sure which side effects it has. I kept the guard page which is now nicely makes the stacks visible in smaps. The

[Qemu-devel] [PATCH V8 4/6] coroutine-sigaltstack: use helper for allocating stack memory

2016-09-26 Thread Peter Lieven
Signed-off-by: Peter Lieven --- util/coroutine-sigaltstack.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index 9c2854c..d9c7f66 100644 --- a/util/coroutine-sigaltstack.c +++

[Qemu-devel] [PATCH 05/18] target-riscv: Add Arithmetic instructions

2016-09-26 Thread Sagar Karandikar
Arithmetic Instructions Arithmetic Immediate Instructions MULHSU Helper GPR Helpers necessary for above Signed-off-by: Sagar Karandikar --- target-riscv/helper.h| 4 + target-riscv/op_helper.c | 10 ++ target-riscv/translate.c | 338

[Qemu-devel] [PATCH V8 2/6] coroutine: add a macro for the coroutine stack size

2016-09-26 Thread Peter Lieven
Signed-off-by: Peter Lieven Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32.c | 2 +- 4

[Qemu-devel] [PATCH V8 5/6] oslib-posix: add a configure switch to debug stack usage

2016-09-26 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven --- configure | 19 +++ util/oslib-posix.c | 40 +++- 2 files changed, 58 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH v2 2/5] vmstateify rc4030

2016-09-26 Thread Dr. David Alan Gilbert
Hi Aurelien, Yongbok, Can you pick up this one MIPS patch from my vmstate series which is for MIPS; Peter said he'd prefer it to go through your MIPS trees. Thanks, Dave * Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > >

Re: [Qemu-devel] vhost-user-test failure

2016-09-26 Thread Eduardo Habkost
On Sun, Sep 25, 2016 at 04:55:53PM -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > This time with Marc-André in cc:... > > > > On 09/23/2016 07:40 PM, Maxime Coquelin wrote: > > > > > > > > > On 09/23/2016 05:41 PM, Michael S. Tsirkin wrote: > > >> On Fri, Sep 23, 2016

Re: [Qemu-devel] [PATCH 00/18] target-riscv: Add full-system emulation support for the RISC-V Instruction Set Architecture (RV64G, RV32G)

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 12:56, Sagar Karandikar wrote: > -cpu-qom.h merged into cpu.h Please follow the model of other targets. RISCVCPUClass and the RISCVCPU typedef should be in cpu-qom.h. Paolo

Re: [Qemu-devel] [PATCH 12/18] target-riscv: Add system instructions

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 12:56, Sagar Karandikar wrote: > +#ifndef CONFIG_USER_ONLY > +DEF_HELPER_4(csrrw, tl, env, tl, tl, tl) > +DEF_HELPER_5(csrrs, tl, env, tl, tl, tl, tl) > +DEF_HELPER_5(csrrc, tl, env, tl, tl, tl, tl) > +DEF_HELPER_2(sret, tl, env, tl) > +DEF_HELPER_2(mret, tl, env, tl) >

Re: [Qemu-devel] [PATCH 12/18] target-riscv: Add system instructions

2016-09-26 Thread Bastian Koppelmann
On 09/26/2016 02:21 PM, Paolo Bonzini wrote: > > > On 26/09/2016 12:56, Sagar Karandikar wrote: >> +#ifndef CONFIG_USER_ONLY >> +DEF_HELPER_4(csrrw, tl, env, tl, tl, tl) >> +DEF_HELPER_5(csrrs, tl, env, tl, tl, tl, tl) >> +DEF_HELPER_5(csrrc, tl, env, tl, tl, tl, tl) >> +DEF_HELPER_2(sret, tl,

[Qemu-devel] [PATCH v5] MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-26 Thread Junlian Bell
qemu tracks guest time based on vector [base_rtc, last_update], in which last_update stands for a monotonic tick which is actually uptime of the host. according to rtc implementation codes of recent releases and upstream, after migration, the time base vector [base_rtc, last_update] isn't updated

Re: [Qemu-devel] KVM call for agenda for 2016-08-27

2016-09-26 Thread Juan Quintela
Juan Quintela wrote: > Hi > Kindly reminder that call is Tomorrow an there aren't yet any topics. Thanks, Juan. > Please, send any topic that you are interested in covering. > > At the end of Monday I will send an email with the agenda or the > cancellation of the call,

[Qemu-devel] [PULL 01/28] memory: introduce IOMMUNotifier and its caps

2016-09-26 Thread Paolo Bonzini
From: Peter Xu IOMMU Notifier list is used for notifying IO address mapping changes. Currently VFIO is the only user. However it is possible that future consumer like vhost would like to only listen to part of its notifications (e.g., cache invalidations). This patch

[Qemu-devel] [PULL 03/28] intel_iommu: allow UNMAP notifiers

2016-09-26 Thread Paolo Bonzini
From: Peter Xu Intel vIOMMU is still lacking of a complete IOMMU notifier mechanism. Before that is achieved, let's open a door for vhost DMAR support, which only requires cache invalidations (UNMAP operations). Meanwhile, converting hw_error() to error_report() and exit(1),

[Qemu-devel] [PULL 02/28] memory: introduce IOMMUOps.notify_flag_changed

2016-09-26 Thread Paolo Bonzini
From: Peter Xu The new interface can be used to replace the old notify_started() and notify_stopped(). Meanwhile it provides explicit flags so that IOMMUs can know what kind of notifications it is requested for. Acked-by: David Gibson

[Qemu-devel] [PULL 09/28] build-sys: put glib_cflags in QEMU_CFLAGS

2016-09-26 Thread Paolo Bonzini
From: Marc-André Lureau This way, overriding CFLAGS on make command line keeps glib-cflags and doesn't break the build. Signed-off-by: Marc-André Lureau Message-Id: <20160925205748.6280-2-marcandre.lur...@redhat.com> Signed-off-by:

[Qemu-devel] [PULL 15/28] cpus-common: move CPU list management to common code

2016-09-26 Thread Paolo Bonzini
Add a mutex for the CPU list to system emulation, as it will be used to manage safe work. Abstract manipulation of the CPU list in new functions cpu_list_add and cpu_list_remove. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by:

[Qemu-devel] [PULL 12/28] cpus: Rename flush_queued_work()

2016-09-26 Thread Paolo Bonzini
From: Sergey Fedorov To avoid possible confusion, rename flush_queued_work() to process_queued_cpu_work(). Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée

Re: [Qemu-devel] [PATCH V8 1/6] oslib-posix: add helpers for stack alloc and free

2016-09-26 Thread Kevin Wolf
Am 26.09.2016 um 13:44 hat Peter Lieven geschrieben: > the allocated stack will be adjusted to the minimum supported stack size > by the OS and rounded up to be a multiple of the system pagesize. > Additionally an architecture dependent guard page is added to the stack > to catch stack overflows.

[Qemu-devel] [PULL 19/28] docs: include formal model for TCG exclusive sections

2016-09-26 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- docs/tcg-exclusive.promela | 177 + 1 file changed, 177 insertions(+) create mode 100644 docs/tcg-exclusive.promela diff --git

[Qemu-devel] [PULL 06/28] compiler: Swap 'public domain' header for license

2016-09-26 Thread Paolo Bonzini
From: Felipe Franciosi As discussed on the list [1], having a comment stating that this file is "public domain" is arguably wrong and not legally binding. This patch replaces that comment with a clear GPLv2+ license as proposed in [2]. [1]

[Qemu-devel] [PULL 14/28] linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick()

2016-09-26 Thread Paolo Bonzini
From: Sergey Fedorov Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id:

[Qemu-devel] [PULL 23/28] cpus-common: Introduce async_safe_run_on_cpu()

2016-09-26 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- cpus-common.c | 33 +++-- include/qom/cpu.h | 14 ++ 2 files changed, 45 insertions(+), 2

[Qemu-devel] [PULL 20/28] cpus-common: always defer async_run_on_cpu work items

2016-09-26 Thread Paolo Bonzini
async_run_on_cpu is only called from the I/O thread, not from CPU threads, so it doesn't make any difference. It will make a difference however for async_safe_run_on_cpu. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Paolo

[Qemu-devel] [PULL 25/28] cpus-common: lock-free fast path for cpu_exec_start/end

2016-09-26 Thread Paolo Bonzini
Set cpu->running without taking the cpu_list lock, only requiring it if there is a concurrent exclusive section. This requires adding a new field to CPUState, which records whether a running CPU is being counted in pending_cpus. When an exclusive section is started concurrently with

Re: [Qemu-devel] [PATCH v2 4/5] trace: [tcg] Do not generate TCG code to trace dinamically-disabled events

2016-09-26 Thread Stefan Hajnoczi
On Thu, Sep 15, 2016 at 05:50:58PM +0200, Lluís Vilanova wrote: In the subject line: s/dinamically-disabled/dynamically/ > for e in events: > +# tracer without checks > +out('', > +'static inline void __nocheck__%(api)s(%(args)s)', In QEMU we avoid using double

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 15:53, Vladimir Sementsov-Ogievskiy wrote: > On 26.09.2016 15:51, Paolo Bonzini wrote: >> This is very ad hoc. Can we instead have a block size common to all >> commands? Block devices in practice have one, in fact that's why >> they're called block devices... > > Block size can

Re: [Qemu-devel] [PATCH v2 0/5] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches

2016-09-26 Thread Stefan Hajnoczi
On Thu, Sep 15, 2016 at 05:50:37PM +0200, Lluís Vilanova wrote: > Avoids generating TCG code to call guest code tracing events in vCPUs that are > not dynamically tracing that event. > > Currently, events with the 'tcg' property always generate TCG code to trace > that > event at guest code

[Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26

2016-09-26 Thread Paolo Bonzini
The following changes since commit eaff9c4367ac3f7ac44f6c6f4cb7bcd4daa89af5: Merge remote-tracking branch 'remotes/lalrae/tags/mips-20160923' into staging (2016-09-23 15:28:07 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to

[Qemu-devel] [PULL 07/28] migration: sync all address spaces

2016-09-26 Thread Paolo Bonzini
Migrating a VM during reboot sometimes results in differences between the source and destination in the SMRAM area. This is because migration_bitmap_sync() only fetches from KVM the dirty log of address_space_memory. SMRAM memory slots are ignored and the modifications to SMRAM are not sent to

[Qemu-devel] [PULL 04/28] x86: ioapic: boost default version to 0x20

2016-09-26 Thread Paolo Bonzini
From: Peter Xu It's 2.8 now, and maybe it's time to switch IOAPIC default version to 0x20. Signed-off-by: Peter Xu Message-Id: <1474608795-23058-1-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/intc/ioapic.c

[Qemu-devel] [PULL 05/28] checkpatch: downgrade "architecture specific defines should be avoided"

2016-09-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index dde3f5f..3afa19a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2407,7 +2407,7

[Qemu-devel] [PULL 17/28] cpus-common: fix uninitialized variable use in run_on_cpu

2016-09-26 Thread Paolo Bonzini
Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- cpus-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index 2005bfe..d6cd426

[Qemu-devel] [PULL 08/28] build-sys: remove unused GLIB_CFLAGS

2016-09-26 Thread Paolo Bonzini
From: Marc-André Lureau Message-Id: <20160925205748.6280-1-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 8fa62ad..c831600 100755 ---

[Qemu-devel] [PULL 11/28] cpus: Move common code out of {async_, }run_on_cpu()

2016-09-26 Thread Paolo Bonzini
From: Sergey Fedorov Move the code common between run_on_cpu() and async_run_on_cpu() into a new function queue_work_on_cpu(). Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée

[Qemu-devel] [PULL 16/28] cpus-common: move CPU work item management to common code

2016-09-26 Thread Paolo Bonzini
From: Sergey Fedorov Make CPU work core functions common between system and user-mode emulation. User-mode does not use run_on_cpu, so do not implement it. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov

Re: [Qemu-devel] [PATCH V8 4/6] coroutine-sigaltstack: use helper for allocating stack memory

2016-09-26 Thread Kevin Wolf
Am 26.09.2016 um 13:44 hat Peter Lieven geschrieben: > Signed-off-by: Peter Lieven > --- > util/coroutine-sigaltstack.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c > index

[Qemu-devel] [PULL 13/28] linux-user: Use QemuMutex and QemuCond

2016-09-26 Thread Paolo Bonzini
From: Sergey Fedorov Convert pthread_mutex_t and pthread_cond_t to QemuMutex and QemuCond. This will allow to make some locks and conditional variables common between user and system mode emulation. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey

[Qemu-devel] [PULL 10/28] cpus: pass CPUState to run_on_cpu helpers

2016-09-26 Thread Paolo Bonzini
From: Alex Bennée CPUState is a fairly common pointer to pass to these helpers. This means if you need other arguments for the async_run_on_cpu case you end up having to do a g_malloc to stuff additional data into the routine. For the current users this isn't a massive

[Qemu-devel] [PULL 21/28] cpus-common: remove redundant call to exclusive_idle()

2016-09-26 Thread Paolo Bonzini
No need to call exclusive_idle() from cpu_exec_end since it is done immediately afterwards in cpu_exec_start. Any exclusive section could run as soon as cpu_exec_end leaves, because cpu->running is false and the mutex is not taken, so the call does not add any protection either. Reviewed-by:

[Qemu-devel] [PULL 18/28] cpus-common: move exclusive work infrastructure from linux-user

2016-09-26 Thread Paolo Bonzini
This will serve as the base for async_safe_run_on_cpu. Because start_exclusive uses CPU_FOREACH, merge exclusive_lock with qemu_cpu_list_lock: together with a call to exclusive_idle (via cpu_exec_start/end) in cpu_list_add, this protects exclusive work against concurrent CPU addition and removal.

[Qemu-devel] [PULL 24/28] tcg: Make tb_flush() thread safe

2016-09-26 Thread Paolo Bonzini
From: Sergey Fedorov Use async_safe_run_on_cpu() to make tb_flush() thread safe. This is possible now that code generation does not happen in the middle of execution. It can happen that multiple threads schedule a safe work to flush the translation buffer. To keep

[Qemu-devel] [PULL 27/28] replay: vmstate for replay module

2016-09-26 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch introduces vmstate for replay data structures. It allows saving and loading vmstate while replaying. Signed-off-by: Pavel Dovgalyuk Message-Id: <20160926080810.6992.68420.stgit@PASHA-ISP> Signed-off-by: Paolo

[Qemu-devel] [PULL 22/28] cpus-common: simplify locking for start_exclusive/end_exclusive

2016-09-26 Thread Paolo Bonzini
It is not necessary to hold qemu_cpu_list_mutex throughout the exclusive section, because no other exclusive section can run while pending_cpus != 0. exclusive_idle() is called in cpu_exec_start(), and that prevents any CPUs created after start_exclusive() from entering cpu_exec() during an

[Qemu-devel] [PULL 20/27] e1000e: Fix CTRL_EXT.EIAME behavior

2016-09-26 Thread Jason Wang
From: Dmitry Fleytman CTRL_EXT.EIAME bit controls clearing of IAM bits, but current code clears IMS bits instead. See spec. 10.2.2.5 Extended Device Control Register. Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang ---

Re: [Qemu-devel] [PATCH v3 0/2] Produce better termination message

2016-09-26 Thread Michal Privoznik
On 22.09.2016 18:43, Paolo Bonzini wrote: > > > On 21/09/2016 18:27, Michal Privoznik wrote: >> This is v2 of: >> http://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg05058.html >> >> Diff to v2: >> - In 1/2 I've dropped stdio funcs in favour of g_file_get_contents() (thanks >> Dan!) >>

[Qemu-devel] Questions about gcc linker errors in crypto sub-directory

2016-09-26 Thread Gonglei (Arei)
Hi Daniel, I'm coding cryptodev-vhost-user.c as a new cryptodev backend, but the gcc report some linker errors: crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_crypto_cleanup': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:87: undefined reference to

Re: [Qemu-devel] Questions about gcc linker errors in crypto sub-directory

2016-09-26 Thread Daniel P. Berrange
On Mon, Sep 26, 2016 at 09:03:45AM +, Gonglei (Arei) wrote: > Hi Daniel, > > I'm coding cryptodev-vhost-user.c as a new cryptodev backend, > but the gcc report some linker errors: > > crypto/cryptodev-vhost-user.o: In function > `qcrypto_cryptodev_vhost_crypto_cleanup': >

[Qemu-devel] [PULL 26/27] mcf_fec: fix error in qemu_send_packet argument

2016-09-26 Thread Jason Wang
From: Paolo Bonzini This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/mcf_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Qemu-devel] [Qemu-block] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-26 Thread Thomas Huth
On 26.09.2016 10:22, Kevin Wolf wrote: > Am 23.09.2016 um 18:42 hat John Snow geschrieben: >> On 09/23/2016 12:09 PM, Thomas Huth wrote: >>> The folder include/hw/ide/ belongs to the IDE section. >>> >>> Signed-off-by: Thomas Huth >>> --- >>> MAINTAINERS | 1 + >>> 1 file

[Qemu-devel] [PATCH v3 0/3] object: Add 'help' option for all available backends and properties

2016-09-26 Thread Lin Ma
Print available object backend types and the relevant properties. V2->v3: * make type user-creatable abstract. * auto generate enum value strings during qemu configuration.(Borrowwed Daniel's code) * save the generated enum value strings into member description of ObjectProperty. * drop the

[Qemu-devel] [PATCH v4]MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-26 Thread zhong...@sangfor.com.cn
MC146818 RTC: coordinate guest clock base to destination host after migration qemu tracks guest time based on vector [base_rtc, last_update], in which last_update stands for a monotonic tick which is actually uptime of the host. according to rtc implementation codes of recent releases and

Re: [Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2016 18:16:47 +0200 Paolo Bonzini wrote: > On 22/09/2016 18:00, Igor Mammedov wrote: > > > Why not just return initial_apic_id? This is the meaning the property > > > had before your patch. > > > > initial_apic_id is immutable but 'id' could be changed at

Re: [Qemu-devel] [PATCH v4]MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 12:54, zhong...@sangfor.com.cn wrote: > MC146818 RTC: coordinate guest clock base to destination host after migration > > qemu tracks guest time based on vector [base_rtc, last_update], in which > last_update stands for a monotonic tick which is actually uptime of the host. >

Re: [Qemu-devel] [PATCH 15/18] target-riscv: Interrupt Handling

2016-09-26 Thread Richard Henderson
On 09/26/2016 03:56 AM, Sagar Karandikar wrote: +if (interruptno + 1) { This is a very odd way to write interruptno != -1. And did you really mean interruptno >= 0? r~

Re: [Qemu-devel] [Nbd] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Wouter Verhelst
On Mon, Sep 26, 2016 at 03:21:46PM -0500, Eric Blake wrote: > I'd much rather support a single flag that says to zero the entire disk > than to introduce stateful variable-amount shifting. That's almost exactly the opposite of what I said :) Now, I don't feel very strong either way, but what

Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user

2016-09-26 Thread Peter Maydell
On 26 September 2016 at 16:36, Riku Voipio wrote: > On 27 September 2016 at 00:08, Peter Maydell wrote: >> Do you have some examples of the false positives you want >> to suppress here? For new code I would hope that we can >> handle

Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure

2016-09-26 Thread Cédric Le Goater
On 09/27/2016 04:35 AM, David Gibson wrote: > On Mon, Sep 26, 2016 at 06:11:36PM +0200, Cédric Le Goater wrote: >> On 09/23/2016 04:46 AM, David Gibson wrote: >>> On Thu, Sep 22, 2016 at 10:25:59AM +0200, Cédric Le Goater wrote: >> @@ -493,6 +525,8 @@ static void

Re: [Qemu-devel] [PATCH] spapr_vscsi: fix build error introduced by f19661c8

2016-09-26 Thread David Gibson
On Mon, Sep 26, 2016 at 03:17:44PM +0100, Felipe Franciosi wrote: > A typo introduced in f19661c8 prevents qemu from building when configured > with --enable-trace-backend=dtrace. > > Signed-off-by: Felipe Franciosi Applied to ppc-for-2.8, thanks. > --- >

<    1   2   3   4   >