Re: [Qemu-devel] [PATCH 08/42] tpm: remove TPMDriverOps

2017-10-10 Thread Valluri, Amarnath
On Tue, 2017-10-10 at 00:55 +0200, Marc-André Lureau wrote: > Use TPMBackendClass to hold class methods/fields. > > Signed-off-by: Marc-André Lureau > --- >  include/sysemu/tpm_backend.h | 15 +-- >  backends/tpm.c   | 31 --- >  hw/tpm/tpm_emulat

[Qemu-devel] qemu-system-nios2 hangs when emulator is quit

2017-10-10 Thread Thomas Huth
Hi Chris, hi Marek, I recently noticed that when I start qemu-system-nios2 (build from the very latest git master branch) and then type "quit" at the monitor (or simply try to close the GTK window), QEMU does not shut down right and hangs somewhere in pause_all_vcpus() forever. Do you have any id

Re: [Qemu-devel] Using qemu command not able launch VM

2017-10-10 Thread Markus Armbruster
John Snow writes: > On 10/07/2017 03:53 AM, Koushik Dutta wrote: >> Hi All (qemu members), >> >> I installed qemu utility in my host machine. I want to start Virtual >> machine using qemu command. >> >> My host machine: Intel-X86 >> Script for launching VM : >> >> T=/home/koushik/vpp/cloud_ubu

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Wei Wang
On 10/09/2017 11:20 PM, Michael S. Tsirkin wrote: On Sat, Sep 30, 2017 at 12:05:52PM +0800, Wei Wang wrote: +static inline void xb_set_page(struct virtio_balloon *vb, + struct page *page, + unsigned long *pfn_min, +

Re: [Qemu-devel] [PATCH 08/42] tpm: remove TPMDriverOps

2017-10-10 Thread Valluri, Amarnath
> > > > > -.opts = tpm_emulator_cmdline_opts, > > -.desc = "TPM emulator backend driver", > And i feel, the above two members are better suited for Object > members than Class. > Please ignore this comment, i was wrong. - Amarnath

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 13/24] ppc: spapr: define core types statically

2017-10-10 Thread Greg Kurz
On Mon, 9 Oct 2017 21:51:00 +0200 Igor Mammedov wrote: > spapr core type definition doesn't have any fields that > require it to be defined at runtime. So replace code > that fills in TypeInfo at runtime with static TypeInfo > array that does the same at complie time. > > Signed-off-by: Igor Ma

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-10 Thread Dou Liyang
Hi Eduardo, I couldn't reproduce the failure too. But, I have some concern below. At 10/06/2017 11:37 PM, Peter Maydell wrote: On 6 October 2017 at 16:27, Eduardo Habkost wrote: On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote: This fails tests, I'm afraid: [...] acpi-test: Wa

Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-10 Thread Markus Armbruster
Ian Jackson writes: > Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new > -runasid option"): >> The last thing the QEMU command line needs is more exotic options. Are >> you sure we need a new one here? Can we make existing -runas serve? >> Precedence: Coreutils[*].

[Qemu-devel] [PATCH] scripts/checkpatch.pl: fix false error of externs checking.

2017-10-10 Thread Jiang Biao
When adding a function declaration in a .c file without extern keywork decoration, checkpatch.pl will report *externs should be avoided in .c files* false error. This patch fixes the bug. Signed-off-by: Jiang Biao --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [Qemu-devel] qemu-system-nios2 hangs when emulator is quit

2017-10-10 Thread Marek Vasut
On 10/10/2017 09:20 AM, Thomas Huth wrote: > Hi Chris, hi Marek, Hi, > I recently noticed that when I start qemu-system-nios2 (build from the > very latest git master branch) and then type "quit" at the monitor (or > simply try to close the GTK window), QEMU does not shut down right and > hangs

Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client

2017-10-10 Thread Paolo Bonzini
On 09/10/2017 19:27, Vladimir Sementsov-Ogievskiy wrote: > > +int ret = nbd_co_do_receive_one_chunk(s, handle, only_structured, > + &request_ret, qiov, payload); > + > +if (ret < 0) { > +s->quit = true; > +} else { > +/* For asse

Re: [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-10 Thread Kevin Wolf
Am 10.10.2017 um 08:58 hat Markus Armbruster geschrieben: > Doug Gale writes: > > > I used exclamations as a concise way of indicating that the driver did > > something nonsensical, or horribly invalid, like something likely to > > cause a memory corruption, trying to start the controller with a

Re: [Qemu-devel] [PATCH v2 2/4] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged

2017-10-10 Thread Benjamin Herrenschmidt
On Mon, 2017-10-09 at 17:49 +0200, Cédric Le Goater wrote: > When a CPU is stopped with the 'stop-self' RTAS call, its state > 'halted' is switched to 1 and, in this case, the MSR is not taken into > account anymore in the cpu_has_work() routine. Only the pending > hardware interrupts are checked w

Re: [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH

2017-10-10 Thread Dong Jia Shi
* Halil Pasic [2017-10-04 17:41:39 +0200]: [...] > diff --git a/hw/s390x/css.c b/hw/s390x/css.c > index 4f47dbc8b0..b2978c3bae 100644 > --- a/hw/s390x/css.c > +++ b/hw/s390x/css.c > @@ -1003,12 +1003,11 @@ static void sch_handle_start_func_virtual(SubchDev > *sch) > > } > > -static int sch_h

Re: [Qemu-devel] qemu-system-nios2 hangs when emulator is quit

2017-10-10 Thread Thomas Huth
On 10.10.2017 09:57, Marek Vasut wrote: > On 10/10/2017 09:20 AM, Thomas Huth wrote: >> Hi Chris, hi Marek, > > Hi, > >> I recently noticed that when I start qemu-system-nios2 (build from the >> very latest git master branch) and then type "quit" at the monitor (or >> simply try to close the GTK

Re: [Qemu-devel] [PATCH 31/42] tpm-backend: move set 'id' to common code

2017-10-10 Thread Valluri, Amarnath
On Tue, 2017-10-10 at 00:56 +0200, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- >  include/sysemu/tpm_backend.h |  2 +- >  hw/tpm/tpm_emulator.c| 12 +++- >  hw/tpm/tpm_passthrough.c |  9 +++-- >  tpm.c|  3 ++- >  4 files changed,

Re: [Qemu-devel] [PATCH 22/42] tpm-backend: store TPMIf interface, improve backend_init()

2017-10-10 Thread Valluri, Amarnath
On Tue, 2017-10-10 at 00:56 +0200, Marc-André Lureau wrote: > Store the TPM interface, the actual object may be different from > TPMState. Keep a reference on the interface, and check the backend > wasn't already initialized. > > Signed-off-by: Marc-André Lureau > --- >  include/sysemu/tpm_backen

Re: [Qemu-devel] [PATCH 0/8] sun4m : sparc32_dma tidy-ups

2017-10-10 Thread Artyom Tarasenko
On Mon, Oct 9, 2017 at 11:06 PM, Mark Cave-Ayland wrote: > This patchset aims to tidy-up the sparc32_dma code by improving the > modelling of the espdma/ledma devices using both QOM and the memory > API which didn't exist when the code was first written. > > The result is that it is now possible t

Re: [Qemu-devel] [PATCH] disas: Always initialize read_memory_inner_func properly

2017-10-10 Thread Thomas Huth
On 27.09.2017 16:58, Thomas Huth wrote: > I've recently seen this with valgrind while running the HMP tester: > > ==22373== Conditional jump or move depends on uninitialised value(s) > ==22373==at 0x4A41FD: arm_disas_set_info (cpu.c:504) > ==22373==by 0x3867A7: monitor_disas (disas.c:390)

Re: [Qemu-devel] [PATCH v6 2/7] hw/misc: add vmcoreinfo device

2017-10-10 Thread Daniel P. Berrange
On Tue, Oct 10, 2017 at 12:44:26AM +0300, Michael S. Tsirkin wrote: > On Mon, Oct 09, 2017 at 02:02:18PM +0100, Daniel P. Berrange wrote: > > On Mon, Oct 09, 2017 at 02:43:44PM +0200, Igor Mammedov wrote: > > > On Mon, 9 Oct 2017 12:03:36 +0100 > > > "Daniel P. Berrange" wrote: > > > > > > > On M

Re: [Qemu-devel] [PATCH 02/18] block: BDS deletion during bdrv_drain_recurse

2017-10-10 Thread Kevin Wolf
Am 13.09.2017 um 20:18 hat Max Reitz geschrieben: > Drainined a BDS child may lead to both the original BDS and/or its other > children being deleted (e.g. if the original BDS represents a block > job). We should prepare for this in both bdrv_drain_recurse() and > bdrv_drained_begin() by monitorin

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [RFC 0/8] virtio-crypto: add multiplexing mode support

2017-10-10 Thread Longpeng (Mike)
On 2017/10/9 19:17, Gonglei (Arei) wrote: > >> -Original Message- >> From: Halil Pasic [mailto:pa...@linux.vnet.ibm.com] >> Sent: Monday, October 09, 2017 7:05 PM >> >> On 10/09/2017 11:22 AM, Gonglei (Arei) wrote: >>> The next patch refactors make sense to me, >>> but why do we need to

Re: [Qemu-devel] [PATCH v2 04/10] nbd-server: refactor simple reply sending

2017-10-10 Thread Daniel P. Berrange
On Mon, Oct 09, 2017 at 02:18:10PM -0500, Eric Blake wrote: > [adding Dan for a qio question - search for your name below] > > On 10/09/2017 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: > > Get rid of calculating structure fields offsets by hand and set_cork, > > rename nbd_co_send_reply to nbd_c

Re: [Qemu-devel] qemu-system-nios2 hangs when emulator is quit

2017-10-10 Thread Marek Vasut
On 10/10/2017 10:15 AM, Thomas Huth wrote: > On 10.10.2017 09:57, Marek Vasut wrote: >> On 10/10/2017 09:20 AM, Thomas Huth wrote: >>> Hi Chris, hi Marek, >> >> Hi, >> >>> I recently noticed that when I start qemu-system-nios2 (build from the >>> very latest git master branch) and then type "quit"

Re: [Qemu-devel] [PATCH v1 5/6] kvm: kvm_log_start/stop are only called with known sections

2017-10-10 Thread Thomas Huth
On 11.09.2017 19:49, David Hildenbrand wrote: > Let's properly align the sections first and bail out if we would ever > get called with a memory section we don't know yet. > > Signed-off-by: David Hildenbrand > --- > accel/kvm/kvm-all.c | 18 -- > 1 file changed, 12 insertions(+)

Re: [Qemu-devel] [PATCH v2 04/10] nbd-server: refactor simple reply sending

2017-10-10 Thread Paolo Bonzini
On 10/10/2017 10:40, Daniel P. Berrange wrote: > The I/O channels code does not make guarantees wrt concurrent usage of > threads or coroutines. It is the callers responsibility to avoid any > concurrent usage for all APIs. With coroutines you are at least avoiding > the danger of corrupting memory

Re: [Qemu-devel] [PATCH 05/18] block/mirror: Convert to coroutines

2017-10-10 Thread Kevin Wolf
Am 13.09.2017 um 20:18 hat Max Reitz geschrieben: > In order to talk to the source BDS (and maybe in the future to the > target BDS as well) directly, we need to convert our existing AIO > requests into coroutine I/O requests. > > Signed-off-by: Max Reitz Please follow through with it and add a

Re: [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board

2017-10-10 Thread Cédric Le Goater
On 10/06/2017 05:10 PM, Peter Maydell wrote: > On 20 September 2017 at 08:01, Cédric Le Goater wrote: >> The Witherspoon boards are OpenPOWER system hosting POWER9 Processors. >> Let's add support for their BMC including a couple of I2C devices as >> found on real HW. >> >> Signed-off-by: Cédric L

Re: [Qemu-devel] [PATCH 08/18] block/mirror: Use source as a BdrvChild

2017-10-10 Thread Kevin Wolf
Am 13.09.2017 um 20:19 hat Max Reitz geschrieben: > With this, the mirror_top_bs is no longer just a technically required > node in the BDS graph but actually represents the block job operation. > > Signed-off-by: Max Reitz > --- > block/mirror.c | 18 ++ > 1 file changed, 10 ins

Re: [Qemu-devel] [PATCH v1 4/5] s390x/pci: Refuse to realize VFIO-PCI if AIS needed but supported

2017-10-10 Thread Cornelia Huck
On Mon, 9 Oct 2017 19:16:23 +0200 Pierre Morel wrote: > On 09/10/2017 16:45, Alex Williamson wrote: > > On Wed, 4 Oct 2017 15:49:38 +0200 > > Pierre Morel wrote: > > > >> In S390x the Adapter Interrupt Suppression facility is used to mask > >> interrupts of other PCI devices during interrupt

Re: [Qemu-devel] [RFC v2 10/33] migration: allow dst vm pause on postcopy

2017-10-10 Thread Peter Xu
On Mon, Oct 09, 2017 at 07:58:13PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Thu, Sep 21, 2017 at 08:29:03PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > When there is IO error on the incoming channel (e.g., netwo

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 08:41, Dou Liyang wrote: > If we want do the "bios-tables-test", we need iasl support. > > otherwise, when I run "make V=1 check" without iasl, the test > will report error: This works in master at the moment, I think (whether by skipping the test or by using pre-compiled ta

[Qemu-devel] [PATCH v3 0/3] exec: further refine address_space_get_iotlb_entry()

2017-10-10 Thread Maxime Coquelin
This series is a rebase of the first two patches of Peter's series improving address_space_get_iotlb_entry(): Message-Id: <1496404254-17429-1-git-send-email-pet...@redhat.com> This third version sets initial page mask to ~0. In case of multiple iommus chained on top of each other, the min page mas

[Qemu-devel] [PATCH v3 1/3] exec: add page_mask for flatview_do_translate

2017-10-10 Thread Maxime Coquelin
From: Peter Xu The function is originally used for flatview_space_translate() and what we care about most is (xlat, plen) range. However for iotlb requests, we don't really care about "plen", but the size of the page that "xlat" is located on. While, plen cannot really contain this information.

[Qemu-devel] [PATCH v3 3/3] memory: fix off-by-one error in memory_region_notify_one()

2017-10-10 Thread Maxime Coquelin
This patch fixes an off-by-one error that could lead to the notifyee to receive notifications for ranges it is not registered to. The bug has been spotted by code review. Fixes: bd2bfa4c52e5 ("memory: introduce memory_region_notify_one()") Cc: qemu-sta...@nongnu.org Cc: Peter Xu Signed-off-by: M

[Qemu-devel] [PATCH v3 2/3] exec: simplify address_space_get_iotlb_entry

2017-10-10 Thread Maxime Coquelin
From: Peter Xu This patch let address_space_get_iotlb_entry() to use the newly introduced page_mask parameter in flatview_do_translate(). Then we will be sure the IOTLB can be aligned to page mask, also we should nicely support huge pages now when introducing a764040. Fixes: a764040 ("exec: abst

Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: fix false error of externs checking.

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 08:54, Jiang Biao wrote: > When adding a function declaration in a .c file without extern > keywork decoration, checkpatch.pl will report *externs should be > avoided in .c files* false error. This patch fixes the bug. I don't think this is a bug. "extern int foo(void);" and

Re: [Qemu-devel] [PATCH 10/18] block/mirror: Make source the file child

2017-10-10 Thread Kevin Wolf
Am 13.09.2017 um 20:19 hat Max Reitz geschrieben: > Regarding the source BDS, the mirror BDS is arguably a filter node. > Therefore, the source BDS should be its "file" child. > > Signed-off-by: Max Reitz TODO: Justification why this doesn't break things like bdrv_is_allocated_above() that itera

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Alex Bennée
Peter Maydell writes: > Running the test program > http://people.linaro.org/~peter.maydell/thumb-over-page > (source at http://people.linaro.org/~peter.maydell/thumb-over-page.c) > in the usermode emulator: > ./build/x86/arm-linux-user/qemu-arm > ~/linaro/qemu-misc-tests/thumb-over-page Does t

Re: [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 10:19, Cédric Le Goater wrote: > On 10/06/2017 05:10 PM, Peter Maydell wrote: >>> +mc->ignore_memory_transaction_failures = true; >> >> Please don't set this flag for new board models, it is only >> for our legacy existing ones. Instead implement any devices >> that you n

Re: [Qemu-devel] [PATCH 13/18] block/mirror: Keep write perm for pending writes

2017-10-10 Thread Kevin Wolf
Am 13.09.2017 um 20:19 hat Max Reitz geschrieben: > The owner of the mirror BDS might retire its write permission; but there > may still be pending mirror operations so the mirror BDS cannot > necessarily retire its write permission for its child then. > > Signed-off-by: Max Reitz I'm confused.

Re: [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH

2017-10-10 Thread Halil Pasic
On 10/10/2017 10:13 AM, Dong Jia Shi wrote: > * Halil Pasic [2017-10-04 17:41:39 +0200]: > > [...] > >> diff --git a/hw/s390x/css.c b/hw/s390x/css.c >> index 4f47dbc8b0..b2978c3bae 100644 >> --- a/hw/s390x/css.c >> +++ b/hw/s390x/css.c >> @@ -1003,12 +1003,11 @@ static void sch_handle_start_fu

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 10:53, Alex Bennée wrote: > > Peter Maydell writes: > >> Running the test program >> http://people.linaro.org/~peter.maydell/thumb-over-page >> (source at http://people.linaro.org/~peter.maydell/thumb-over-page.c) >> in the usermode emulator: >> ./build/x86/arm-linux-user/q

Re: [Qemu-devel] [RFC v2 32/33] migration: allow migrate_incoming for paused VM

2017-10-10 Thread Peter Xu
On Mon, Oct 09, 2017 at 06:28:06PM +0100, Dr. David Alan Gilbert wrote: [...] > > > > /* > > > > @@ -1291,14 +1301,25 @@ void migrate_del_blocker(Error *reason) > > > > void qmp_migrate_incoming(const char *uri, Error **errp) > > > > { > > > > Error *local_err = NULL; > > > > -static

Re: [Qemu-devel] [PATCH v3 3/3] memory: fix off-by-one error in memory_region_notify_one()

2017-10-10 Thread Peter Xu
On Tue, Oct 10, 2017 at 11:42:47AM +0200, Maxime Coquelin wrote: > This patch fixes an off-by-one error that could lead to the > notifyee to receive notifications for ranges it is not > registered to. > > The bug has been spotted by code review. > > Fixes: bd2bfa4c52e5 ("memory: introduce memory_

Re: [Qemu-devel] [Qemu-block] [PATCH 15/18] block/mirror: Add active mirroring

2017-10-10 Thread Kevin Wolf
Am 18.09.2017 um 18:26 hat Max Reitz geschrieben: > On 2017-09-18 12:06, Stefan Hajnoczi wrote: > > On Sat, Sep 16, 2017 at 03:58:01PM +0200, Max Reitz wrote: > >> On 2017-09-14 17:57, Stefan Hajnoczi wrote: > >>> On Wed, Sep 13, 2017 at 08:19:07PM +0200, Max Reitz wrote: > This patch implemen

Re: [Qemu-devel] [PATCH v1 0/2] Reporting of rotation rate for disks

2017-10-10 Thread Paolo Bonzini
On 04/10/2017 13:40, Daniel P. Berrange wrote: > > There is no mechanism to report this information to virtio-blk. > We could perhaps argue that people should use virtio-scsi instead, > because fixing virtio-blk would require enhancement to both QEMU > and Linux virtio-blk drivers (and other guest

Re: [Qemu-devel] [PATCH v2] char: don't skip client cleanup if 'connected' flag is unset

2017-10-10 Thread Paolo Bonzini
On 05/10/2017 17:50, Daniel P. Berrange wrote: > The tcp_chr_free_connection & tcp_chr_disconnect methods both > skip all of their cleanup work unless the 's->connected' flag > is set. This flag is set when the incoming client connection > is ready to use. Crucially this is *after* the TLS handsha

Re: [Qemu-devel] [PATCH v3 0/3] exec: further refine address_space_get_iotlb_entry()

2017-10-10 Thread Paolo Bonzini
On 10/10/2017 11:42, Maxime Coquelin wrote: > This series is a rebase of the first two patches of Peter's series > improving address_space_get_iotlb_entry(): > Message-Id: <1496404254-17429-1-git-send-email-pet...@redhat.com> > > This third version sets initial page mask to ~0. In case of multiple

[Qemu-devel] [PATCH] build: remove CONFIG_LIBDECNUMBER

2017-10-10 Thread Paolo Bonzini
It is used only by PPC TCG, so just move it in target/ppc/Makefile.objs Signed-off-by: Paolo Bonzini --- Makefile.target | 6 -- default-configs/ppc-linux-user.mak| 1 - default-configs/ppc-softmmu.mak | 1 - default-configs/ppc64-linux-user.mak

Re: [Qemu-devel] [PATCH v2 2/8] s390x/css: IO instr handler ending control

2017-10-10 Thread Thomas Huth
On 09.10.2017 17:00, Halil Pasic wrote: > > > On 10/09/2017 01:07 PM, Thomas Huth wrote: >> On 09.10.2017 12:54, Halil Pasic wrote: >>> >>> >>> On 10/09/2017 10:20 AM, Thomas Huth wrote: On 04.10.2017 17:41, Halil Pasic wrote: > CSS code needs to tell the IO instruction handlers located

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Paolo Bonzini
On 10/10/2017 12:07, Peter Maydell wrote: > On 10 October 2017 at 10:53, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> Running the test program >>> http://people.linaro.org/~peter.maydell/thumb-over-page >>> (source at http://people.linaro.org/~peter.maydell/thumb-over-page.c) >>> in the

Re: [Qemu-devel] [PATCH 31/42] tpm-backend: move set 'id' to common code

2017-10-10 Thread Marc-André Lureau
Hi - Original Message - > On Tue, 2017-10-10 at 00:56 +0200, Marc-André Lureau wrote: > > Signed-off-by: Marc-André Lureau > > --- > >  include/sysemu/tpm_backend.h |  2 +- > >  hw/tpm/tpm_emulator.c| 12 +++- > >  hw/tpm/tpm_passthrough.c |  9 +++-- > >  tpm.c 

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 11:41, Paolo Bonzini wrote: > I've seen the same on x86. Using the program counter from translate.c > here looks very fishy: > > /* Now we have a real cpu fault. Since this is the exact location of > * the exception, we must undo the adjustment done by cpu_restore_

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Alex Bennée
Peter Maydell writes: > On 10 October 2017 at 10:53, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> Running the test program >>> http://people.linaro.org/~peter.maydell/thumb-over-page >>> (source at http://people.linaro.org/~peter.maydell/thumb-over-page.c) >>> in the usermode emulator

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Paolo Bonzini
On 10/10/2017 12:52, Peter Maydell wrote: > On 10 October 2017 at 11:41, Paolo Bonzini wrote: >> I've seen the same on x86. Using the program counter from translate.c >> here looks very fishy: >> >> /* Now we have a real cpu fault. Since this is the exact location of >> * the exception,

Re: [Qemu-devel] [PATCH 22/42] tpm-backend: store TPMIf interface, improve backend_init()

2017-10-10 Thread Marc-André Lureau
Hi - Original Message - > On Tue, 2017-10-10 at 00:56 +0200, Marc-André Lureau wrote: > > Store the TPM interface, the actual object may be different from > > TPMState. Keep a reference on the interface, and check the backend > > wasn't already initialized. > > > > Signed-off-by: Marc-And

Re: [Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 11:54, Alex Bennée wrote: > > Peter Maydell writes: > >> On 10 October 2017 at 10:53, Alex Bennée wrote: >>> >>> Peter Maydell writes: >>> Running the test program http://people.linaro.org/~peter.maydell/thumb-over-page (source at http://people.linaro.org/~p

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Tetsuo Handa
Wei Wang wrote: > On 10/09/2017 11:20 PM, Michael S. Tsirkin wrote: > > On Sat, Sep 30, 2017 at 12:05:52PM +0800, Wei Wang wrote: > >> +static inline void xb_set_page(struct virtio_balloon *vb, > >> + struct page *page, > >> + unsigned long *pfn_min,

[Qemu-devel] [PATCH v2 0/2] vga: handle cirrus vbe mode wraparounds

2017-10-10 Thread Gerd Hoffmann
Fix for CVE-2017-13672 (3d90c6254863693a6b13d918d2b8682e08bbc681) was incomplete, here are the missing bits. Gerd Hoffmann (2): vga: drop line_offset variable vga: handle cirrus vbe mode wraparounds. hw/display/vga.c | 33 +++-- 1 file changed, 23 insertions(+), 1

[Qemu-devel] [PATCH v2 2/2] vga: handle cirrus vbe mode wraparounds.

2017-10-10 Thread Gerd Hoffmann
Commit "3d90c62548 vga: stop passing pointers to vga_draw_line* functions" is incomplete. It doesn't handle the case that the vga rendering code tries to create a shared surface, i.e. a pixman image backed by vga video memory. That can not work in case the guest display wraps from end of video me

[Qemu-devel] [PATCH v2 1/2] vga: drop line_offset variable

2017-10-10 Thread Gerd Hoffmann
--- hw/display/vga.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index ed24ef7076..bf774e3402 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1464,7 +1464,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_upda

Re: [Qemu-devel] [v20 1/2] virtio-crypto: Add virtio crypto device specification

2017-10-10 Thread Longpeng (Mike)
On 2017/10/9 23:43, Halil Pasic wrote: > > > On 09/29/2017 07:24 AM, Longpeng(Mike) wrote: >> From: Gonglei >> >> The virtio crypto device is a virtual crypto device (ie. hardware >> crypto accelerator card). Currently, the virtio crypto device provides >> the following crypto services: CIPHE

[Qemu-devel] [Bug 1718964] Re: Memory leak when using websocket over a low speed network

2017-10-10 Thread Daniel Berrange
In the modern code this needs fixing in the io/channel-websock.c impl - it is checking the output buffer limit against the wrong buffer - it uses 'rawoutput' instead of 'encoutput', so this fix is easy enough there. The code is in fact broken all the way back to day1 of the introduction of websock

Re: [Qemu-devel] [RFC v2 10/33] migration: allow dst vm pause on postcopy

2017-10-10 Thread Peter Xu
On Tue, Oct 10, 2017 at 05:38:01PM +0800, Peter Xu wrote: [...] > > > But I agree about the reasoning. How > > > about one more patch to postpone the "active" to "postcopy-active" > > > state change after the package is handled correctly? Like: > > > > > > -- > > > diff --git a/mig

Re: [Qemu-devel] [PATCH v2 00/24] generalize parsing of cpu_model (part 3/PPC)

2017-10-10 Thread Igor Mammedov
On Tue, 10 Oct 2017 13:21:37 +1100 David Gibson wrote: > On Mon, Oct 09, 2017 at 09:50:47PM +0200, Igor Mammedov wrote: > > Applied to ppc-for-2.11. There was a small error in 19/24, which > reverted pnv to defaulting to POWER9 v1.0 whereas I've recently > changed it to v2.0. Rather than requi

Re: [Qemu-devel] [PATCH 31/42] tpm-backend: move set 'id' to common code

2017-10-10 Thread Valluri, Amarnath
On Tue, 2017-10-10 at 06:47 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > On Tue, 2017-10-10 at 00:56 +0200, Marc-André Lureau wrote: > > > > > > Signed-off-by: Marc-André Lureau > > > --- > > >  include/sysemu/tpm_backend.h |  2 +- > > >  hw/tpm/tpm_emulator.c  

Re: [Qemu-devel] [PATCH v2 2/8] s390x/css: IO instr handler ending control

2017-10-10 Thread Cornelia Huck
On Tue, 10 Oct 2017 12:28:35 +0200 Thomas Huth wrote: > On 09.10.2017 17:00, Halil Pasic wrote: > > > > > > On 10/09/2017 01:07 PM, Thomas Huth wrote: > >> Then, in the follow up patches, you do something like this: > >> > >>return (IOInstEnding){.cc = 0}; > >> > >> ... and that just loo

Re: [Qemu-devel] [PATCH] isapc: Remove unnecessary migration compatibility code

2017-10-10 Thread Igor Mammedov
On Fri, 6 Oct 2017 10:25:02 -0300 Eduardo Habkost wrote: > We don't touch isapc when we change guest ABI and add new entries > to PC_COMPAT_* or new PCMachineClass compat flags. This means > isapc never guaranteed guest ABI and cross-QEMU-version live > migration compatibility. There's no poin

Re: [Qemu-devel] [PATCH v2 2/8] s390x/css: IO instr handler ending control

2017-10-10 Thread Halil Pasic
[..] >> >> Yeah, the ABI is smart enough (where it matters) and this one is obviously >> less that 8 bytes. I read this as you assumed that the return won't be >> passed via register (general purpose register 2 for a z host + ELF assumed), >> and that would have been ugly indeed. >> >> Btw I have

Re: [Qemu-devel] [PATCH v2 2/8] s390x/css: IO instr handler ending control

2017-10-10 Thread Halil Pasic
On 10/10/2017 01:39 PM, Cornelia Huck wrote: > On Tue, 10 Oct 2017 12:28:35 +0200 > Thomas Huth wrote: > >> On 09.10.2017 17:00, Halil Pasic wrote: >>> >>> >>> On 10/09/2017 01:07 PM, Thomas Huth wrote: > Then, in the follow up patches, you do something like this: return (I

Re: [Qemu-devel] [PATCH 00/42] TPM: code cleanup & CRB device

2017-10-10 Thread Marc-André Lureau
Hi Stefan On Tue, Oct 10, 2017 at 4:34 AM, Stefan Berger wrote: > On 10/09/2017 06:55 PM, Marc-André Lureau wrote: >> >> Hi, >> >> I accumulated a series of patch doing some TPM code cleanup while >> doing review. I removed some dead code, simplified other parts, and >> tried to isolate implement

Re: [Qemu-devel] [v20 1/2] virtio-crypto: Add virtio crypto device specification

2017-10-10 Thread Halil Pasic
On 10/10/2017 01:12 PM, Longpeng (Mike) wrote: > > > On 2017/10/9 23:43, Halil Pasic wrote: > >> >> >> On 09/29/2017 07:24 AM, Longpeng(Mike) wrote: >>> From: Gonglei >>> >>> The virtio crypto device is a virtual crypto device (ie. hardware >>> crypto accelerator card). Currently, the virtio

Re: [Qemu-devel] [PULL 00/23] Queued TCG patches

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 01:55, Richard Henderson wrote: > One trivial cleanup from Jiang. Cherry-picking half of Emilio's > patch set that has been reviewed. > > > r~ > > > The following changes since commit 530049bc1dcc24c1178a29d99ca08b6dd08413e0: > > Merge remote-tracking branch 'remotes/kevin

Re: [Qemu-devel] [RFC v2 10/33] migration: allow dst vm pause on postcopy

2017-10-10 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Mon, Oct 09, 2017 at 07:58:13PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Thu, Sep 21, 2017 at 08:29:03PM +0100, Dr. David Alan Gilbert wrote: > > > > * Peter Xu (pet...@redhat.com) wrote: > > > > > When there

[Qemu-devel] [PATCH] hw/vfio: improve error message when cannot init vfio event notifiers

2017-10-10 Thread Jim Quigley
More information is required to assist trouble-shooting when QEMU fails to initialise the event notifications for devices assigned with VFIO-PCI. Instead of supplying the user with a cryptic error number only, print out a proper error message with strerror() so that the user has a better way to fig

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Wei Wang
On 10/10/2017 07:08 PM, Tetsuo Handa wrote: Wei Wang wrote: On 10/09/2017 11:20 PM, Michael S. Tsirkin wrote: On Sat, Sep 30, 2017 at 12:05:52PM +0800, Wei Wang wrote: +static inline void xb_set_page(struct virtio_balloon *vb, + struct page *page, +

[Qemu-devel] [PATCH] pc: make sure that plugged CPUs are of the same type

2017-10-10 Thread Igor Mammedov
heterogeneous cpus are not supported and hotplugging different cpu model crashes QEMU: qemu-system-x86_64 -cpu qemu64 -smp 1,maxcpus=2 (qemu) device_add host-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=foo (qemu) info cpus error: failed to get MSR 0x38d qemu-system-x86_64: target/i38

[Qemu-devel] [PATCH] bcm2835_systimer: add bcm2835 system timer

2017-10-10 Thread Thomas Venriès
The BCM2835 System Timer is a memory-mapped peripheral available on the BCM2835 used in the Raspberry Pi. It features a 64-bit free-running counter that runs at 1 MHz and four separate "output compare registers" that can be used to schedule interrupts. Signed-off-by: Thomas Venriès --- hw/arm/bc

Re: [Qemu-devel] i386/kvm: QEMU crash when doing 'info cpus' after CPU hotplug

2017-10-10 Thread Igor Mammedov
On Mon, 9 Oct 2017 19:19:15 +0200 Greg Kurz wrote: > Hi x86 folks, > > While trying to reproduce on x86 an issue we're currently hitting on ppc, > I got this: > > $ ./x86_64-softmmu/qemu-system-x86_64 -snapshot -no-shutdown -nographic > -machine q35,accel=kvm -smp 1,maxcpus=2 -serial mon:stdio

Re: [Qemu-devel] [PATCH] pc: make sure that plugged CPUs are of the same type

2017-10-10 Thread Paolo Bonzini
On 10/10/2017 14:34, Igor Mammedov wrote: > heterogeneous cpus are not supported and hotplugging different > cpu model crashes QEMU: > > qemu-system-x86_64 -cpu qemu64 -smp 1,maxcpus=2 > (qemu) device_add host-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=foo > (qemu) info cpus > error:

Re: [Qemu-devel] [PULL 1/6] vga: fix display update region calculation (split screen)

2017-10-10 Thread Peter Maydell
On 13 September 2017 at 08:41, Gerd Hoffmann wrote: > vga display update mis-calculated the region for the dirty bitmap > snapshot in case split screen mode is used. This can trigger an > assert in cpu_physical_memory_snapshot_get_dirty(). > > Impact: DoS for privileged guest users. > > Fixes: C

Re: [Qemu-devel] hot plug cpu report error

2017-10-10 Thread Igor Mammedov
On Mon, 9 Oct 2017 20:21:12 +0800 Paul Schlacter wrote: > report error: > > intel_rapl: no valid rapl domains found in package 0 > > intel_rapl: no valid rapl domains found in package 0 > > > and then will shutdown after in a moment of time > > > qemu log : > > qemu: qemu_mutex_lock: Inval

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-10 Thread Eduardo Habkost
On Tue, Oct 10, 2017 at 03:41:56PM +0800, Dou Liyang wrote: > Hi Eduardo, > > I couldn't reproduce the failure too. But, I have some concern below. > > At 10/06/2017 11:37 PM, Peter Maydell wrote: > > On 6 October 2017 at 16:27, Eduardo Habkost wrote: > > > On Fri, Oct 06, 2017 at 01:17:42PM +01

Re: [Qemu-devel] [PATCH v11 3/5] msf2: Add Smartfusion2 SPI controller

2017-10-10 Thread Peter Maydell
On 20 September 2017 at 21:17, Philippe Mathieu-Daudé wrote: > From: Subbaraya Sundeep > > Modelled Microsemi's Smartfusion2 SPI controller. > > Signed-off-by: Subbaraya Sundeep > Reviewed-by: Alistair Francis > Tested-by: Philippe Mathieu-Daudé > +#define FRAMESZ_MASK 0x1F > +static

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 13:52, Eduardo Habkost wrote: > This shouldn't happen if CONFIG_IASL is not defined. Did you run > configure again after removing iasl? I've neither added nor removed iasl from the build systems in question. Pull request tests just apply the pull and run make/make check. t

Re: [Qemu-devel] [PATCH v2 00/24] generalize parsing of cpu_model (part 3/PPC)

2017-10-10 Thread David Gibson
On Tue, Oct 10, 2017 at 01:38:41PM +0200, Igor Mammedov wrote: > On Tue, 10 Oct 2017 13:21:37 +1100 > David Gibson wrote: > > > On Mon, Oct 09, 2017 at 09:50:47PM +0200, Igor Mammedov wrote: > > > > Applied to ppc-for-2.11. There was a small error in 19/24, which > > reverted pnv to defaulting

Re: [Qemu-devel] [PATCH v5 00/23] make bdrv_get_block_status byte-based

2017-10-10 Thread Kevin Wolf
Am 04.10.2017 um 04:00 hat Eric Blake geschrieben: > There are patches floating around to add NBD_CMD_BLOCK_STATUS, > but NBD wants to report status on byte granularity (even if the > reporting will probably be naturally aligned to sectors or even > much higher levels). I've therefore started the

Re: [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH

2017-10-10 Thread Cornelia Huck
On Wed, 4 Oct 2017 17:41:39 +0200 Halil Pasic wrote: > Simplify the error handling of the SSCH and RSCH handler avoiding > arbitrary and cryptic error codes being used to tell how the instruction > is supposed to end. Let the code detecting the condition tell how it's > to be handled in a less

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-10 Thread Dou Liyang
Hi Eduardo, At 10/10/2017 08:52 PM, Eduardo Habkost wrote: This shouldn't happen if CONFIG_IASL is not defined. Did you run configure again after removing iasl? Oops, Yes, the result above is in CONFIG_IASL = iasl. :-( I have been aware of this problem. I am waiting the result of the test w

Re: [Qemu-devel] [PATCH v2 8/8] s390x: factor out common ioinst handler logic

2017-10-10 Thread Cornelia Huck
On Wed, 4 Oct 2017 17:41:44 +0200 Halil Pasic wrote: > Some of ioinst the handlers look very much the same: they basically > delegate the work to the appropriate css function (doing some always the > same stuff before and after the call to the appropriate css function). > Let us create a templat

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Tetsuo Handa
Wei Wang wrote: > > And even if we could remove balloon_lock, you still cannot use > > __GFP_DIRECT_RECLAIM at xb_set_page(). I think you will need to use > > "whether it is safe to wait" flag from > > "[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()" . > > Without the lock b

Re: [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board

2017-10-10 Thread Cédric Le Goater
On 10/10/2017 11:54 AM, Peter Maydell wrote: > On 10 October 2017 at 10:19, Cédric Le Goater wrote: >> On 10/06/2017 05:10 PM, Peter Maydell wrote: +mc->ignore_memory_transaction_failures = true; >>> >>> Please don't set this flag for new board models, it is only >>> for our legacy existi

[Qemu-devel] [PATCH] spapr: Correct RAM size calculation for HPT resizing

2017-10-10 Thread David Gibson
In order to prevent the guest from forcing the allocation of large amounts of qemu memory (or host kernel memory, in the case of KVM HV), we limit the size of Hashed Page Table (HPT) it is allowed to allocated, based on its RAM size. However, the current calculation is not correct: it only adds up

Re: [Qemu-devel] [PATCH] disas: Always initialize read_memory_inner_func properly

2017-10-10 Thread Paolo Bonzini
On 27/09/2017 16:58, Thomas Huth wrote: > I've recently seen this with valgrind while running the HMP tester: > > ==22373== Conditional jump or move depends on uninitialised value(s) > ==22373==at 0x4A41FD: arm_disas_set_info (cpu.c:504) > ==22373==by 0x3867A7: monitor_disas (disas.c:390)

Re: [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board

2017-10-10 Thread Peter Maydell
On 10 October 2017 at 14:21, Cédric Le Goater wrote: > On 10/10/2017 11:54 AM, Peter Maydell wrote: >> The goal is to model hardware correctly. Hardware gives >> aborts if you touch a physical address with no device there, >> and so QEMU's model should do the same. If you have guest >> code that t

Re: [Qemu-devel] [PATCH 26/88] S390: use g_new() family of functions

2017-10-10 Thread Cornelia Huck
On Fri, 6 Oct 2017 20:49:21 -0300 Philippe Mathieu-Daudé wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Philippe Mathieu-Daudé > [PMD: more changes in hw/s390x/css.c, added target/s390x/cpu_models.c] > --- > hw/s390x/css.c| 10 +- >

Re: [Qemu-devel] [PATCH v2 1/8] s390x/css: be more consistent if broken beyond repair

2017-10-10 Thread Cornelia Huck
On Wed, 4 Oct 2017 17:41:37 +0200 Halil Pasic wrote: > Calling do_subchannel_work with no function control flags set in SCSW is > a programming error. Currently the handle this differently in > do_subchannel_work_virtual and do_subchannel_work_passthrough. Let's be > consistent and guard with a

Re: [Qemu-devel] [PATCH v1 5/6] kvm: kvm_log_start/stop are only called with known sections

2017-10-10 Thread Paolo Bonzini
On 10/10/2017 11:06, Thomas Huth wrote: > On 11.09.2017 19:49, David Hildenbrand wrote: >> Let's properly align the sections first and bail out if we would ever >> get called with a memory section we don't know yet. >> >> Signed-off-by: David Hildenbrand >> --- >> accel/kvm/kvm-all.c | 18 +++

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-10 Thread Dou Liyang
Hi Peter, At 10/10/2017 05:40 PM, Peter Maydell wrote: On 10 October 2017 at 08:41, Dou Liyang wrote: If we want do the "bios-tables-test", we need iasl support. otherwise, when I run "make V=1 check" without iasl, the test will report error: This works in master at the moment, I think (whe

  1   2   3   4   5   >