Re: [Qemu-devel] [PATCH v3] hw/arm/aspeed: Unlock SCU when running kernel

2017-11-15 Thread Cédric Le Goater
On 11/14/2017 01:20 PM, Joel Stanley wrote: > The ASPEED hardware contains a lock register for the SCU that disables > any writes to the SCU when it is locked. The machine comes up with the > lock enabled, but on all known hardware u-boot will unlock it and leave > it unlocked when loading the kern

Re: [Qemu-devel] HAXM is now open source

2017-11-15 Thread Yu Ning
On 11/15/2017 3:13, John Snow wrote: On 11/14/2017 06:09 AM, Thomas Huth wrote: That's great news! I hope this all will help to promote QEMU on Windows and macOS quite a bit! However, during the past months, I noticed a couple of times that users ask on IRC or the qemu-discuss mailing list

Re: [Qemu-devel] [PATCH for-2.12 v3 05/11] spapr: introduce an IRQ allocator using a bitmap

2017-11-15 Thread Cédric Le Goater
On 11/14/2017 04:28 PM, Greg Kurz wrote: > On Tue, 14 Nov 2017 11:54:53 + > Cédric Le Goater wrote: > >> On 11/14/2017 09:42 AM, Greg Kurz wrote: >>> On Fri, 10 Nov 2017 15:20:11 + >>> Cédric Le Goater wrote: >>> Let's define a new set of XICSFabric IRQ operations for the latest

Re: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel'

2017-11-15 Thread Kashyap Chamarthy
On Tue, Nov 14, 2017 at 11:26:59AM -0800, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. [...] > In file included from /tmp/qemu-te

Re: [Qemu-devel] [PATCH v3 for-2.11 1/3] tpm_emulator: Add a caching layer for the TPM Established flag

2017-11-15 Thread Valluri, Amarnath
On Wed, 2017-11-15 at 04:47 +0100, Marc-André Lureau wrote: > Hi > > On Wed, Nov 15, 2017 at 2:16 AM, Stefan Berger > wrote: > > > > On 11/14/2017 06:40 PM, Marc-André Lureau wrote: > > > > > > > > > Hi > > > > > > On Tue, Nov 14, 2017 at 10:52 PM, Stefan Berger > > > wrote: > > > > > > > >

[Qemu-devel] [PATCH v2] qapi: block-core: Clarify events emitted by 'block-job-cancel'

2017-11-15 Thread Kashyap Chamarthy
When you cancel an in-progress live block operation with QMP `block-job-cancel`, it emits the event: BLOCK_JOB_CANCELLED. However, when `block-job-cancel` is issued after `drive-mirror` has indicated (by emitting the event BLOCK_JOB_READY) that the source and destination remain synchronized:

Re: [Qemu-devel] [PATCH for-2.11] qcow2: Fix overly broad madvise()

2017-11-15 Thread Alberto Garcia
On Tue 14 Nov 2017 07:41:27 PM CET, Max Reitz wrote: > @mem_size and @offset are both size_t, thus subtracting them from one > another will just return a big size_t if mem_size < offset -- even more > obvious here because the result is stored in another size_t. > > Checking that result to be positi

Re: [Qemu-devel] [RFC v3 01/27] char-io: fix possible race on IOWatchPoll

2017-11-15 Thread Stefan Hajnoczi
On Tue, Nov 14, 2017 at 07:31:10PM +0800, Peter Xu wrote: > On Tue, Nov 14, 2017 at 10:32:19AM +, Stefan Hajnoczi wrote: > > On Tue, Nov 14, 2017 at 02:09:39PM +0800, Peter Xu wrote: > > > On Mon, Nov 13, 2017 at 04:52:11PM +, Stefan Hajnoczi wrote: > > > > On Mon, Nov 06, 2017 at 05:46:17P

Re: [Qemu-devel] [PATCH] tcg: Record code_gen_buffer address for user-only memory helpers

2017-11-15 Thread Richard Henderson
On 11/14/2017 05:09 PM, Alex Bennée wrote: >> -/* 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_state >> - * for handling call return addresses. */ >> -cpu_restore_state(cpu, pc + GETPC_ADJ);

Re: [Qemu-devel] [RFC v3 00/27] QMP: out-of-band (OOB) execution support

2017-11-15 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 09:08:00PM +0800, Peter Xu wrote: > On Mon, Nov 06, 2017 at 02:12:17AM -0800, no-re...@patchew.org wrote: > > Hi, > > > > This series seems to have some coding style problems. See output below for > > more information: > > > > Subject: [Qemu-devel] [RFC v3 00/27] QMP: out-

Re: [Qemu-devel] Abnormal observation during migration: too many "write-not-dirty" pages

2017-11-15 Thread Juan Quintela
"Chunguang Li" wrote: > Hi all! Hi Sorry for the delay, I was on vacation an still getting up to speed. > I got a very abnormal observation for the VM migration. I found that many > pages marked as dirty during > migration are "not really dirty", which is, their content are the same as the >

Re: [Qemu-devel] [PATCH v3] xen-disk: use an IOThread per instance

2017-11-15 Thread Paul Durrant
Anthony, Stefano, Ping? > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 07 November 2017 10:47 > To: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org > Cc: Paul Durrant ; Stefano Stabellini > ; Anthony Perard ; > Kevin Wolf ; Max Reitz > Subject:

Re: [Qemu-devel] [RFC v3 01/27] char-io: fix possible race on IOWatchPoll

2017-11-15 Thread Peter Xu
On Wed, Nov 15, 2017 at 09:37:40AM +, Stefan Hajnoczi wrote: > On Tue, Nov 14, 2017 at 07:31:10PM +0800, Peter Xu wrote: > > On Tue, Nov 14, 2017 at 10:32:19AM +, Stefan Hajnoczi wrote: > > > On Tue, Nov 14, 2017 at 02:09:39PM +0800, Peter Xu wrote: > > > > On Mon, Nov 13, 2017 at 04:52:11P

Re: [Qemu-devel] [PATCH 0/7] s390x/pci: Improve zPCI to cover more cases

2017-11-15 Thread Pierre Morel
On 13/11/2017 18:13, Cornelia Huck wrote: On Tue, 7 Nov 2017 18:24:32 +0100 Pierre Morel wrote: Right now the PCI support is very limited (e.g. pass through of a host vfio device) To enable features like virtio-pci several modifications needs to be done. Virtio-PCI uses subregions, which may

Re: [Qemu-devel] [PATCH 4/7] s390x/pci: rework PCI STORE BLOCK

2017-11-15 Thread Pierre Morel
On 13/11/2017 18:10, Cornelia Huck wrote: On Mon, 13 Nov 2017 17:38:40 +0100 Pierre Morel wrote: On 13/11/2017 16:23, Cornelia Huck wrote: On Tue, 7 Nov 2017 18:24:36 +0100 Pierre Morel wrote: Enhance the fault detection. Add the maxstbl entry to both the Query PCI Function Group resp

Re: [Qemu-devel] Abnormal observation during migration: too many "write-not-dirty" pages

2017-11-15 Thread Dr. David Alan Gilbert
* Chunguang Li (lichungu...@hust.edu.cn) wrote: > Hi all! > > I got a very abnormal observation for the VM migration. I found that many > pages marked as dirty during migration are "not really dirty", which is, > their content are the same as the old version. > > > > > I did the migration ex

Re: [Qemu-devel] [RFC v3 27/27] tests: qmp-test: add oob test

2017-11-15 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 05:46:43PM +0800, Peter Xu wrote: > +/* > + * Try a time-consuming command, following by a OOB command, make > + * sure we get OOB command before the time-consuming one (which is > + * run in the parser). > + * > + * When writting up this test script,

[Qemu-devel] [PATCH] sga: stop using sgabios rom for 2.11+

2017-11-15 Thread Gerd Hoffmann
seabios 1.11 got builtin serial console support, so we don't need sgabios any more. "-machine graphics=off" should be used instead. update sga.c accordingly. Signed-off-by: Gerd Hoffmann --- include/hw/compat.h | 4 hw/misc/sga.c | 26 +- 2 files changed, 29

Re: [Qemu-devel] [PATCH v6] NUMA: Enable adding NUMA node implicitly

2017-11-15 Thread Igor Mammedov
On Wed, 15 Nov 2017 09:29:22 +0800 Dou Liyang wrote: > Hi Igor, > > [...] > >> +parse_numa_node(ms, &node, NULL); > > I get build break here: > > > > numa.c:451:13: error: too few arguments to function ‘parse_numa_node’ > > parse_numa_node(ms, &node, NULL); > > > >

Re: [Qemu-devel] [PATCH v6] NUMA: Enable adding NUMA node implicitly

2017-11-15 Thread Igor Mammedov
On Tue, 14 Nov 2017 10:34:01 +0800 Dou Liyang wrote: > Linux and Windows need ACPI SRAT table to make memory hotplug work properly, > however currently QEMU doesn't create SRAT table if numa options aren't > present > on CLI. > > Which breaks both linux and windows guests in certain conditions:

Re: [Qemu-devel] [RFC v3 18/27] qmp: add new event "request-dropped"

2017-11-15 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 05:46:34PM +0800, Peter Xu wrote: > diff --git a/qapi-schema.json b/qapi-schema.json > index 531fd4c0db..650714da06 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -3222,3 +3222,38 @@ > # Since: 2.11 > ## > { 'command': 'watchdog-set-action', 'data' : {'acti

Re: [Qemu-devel] [Question] Qemu's Heap Becomes Very Large and Never Reduce Down

2017-11-15 Thread Stefan Hajnoczi
On Wed, Nov 15, 2017 at 03:14:52AM +, Xulei (Stone) wrote: > Hi, guys > > I met a strange problem, with qemu 2.8.1: > qemu consumes too many heap memory after several operations and can not > release them anymore: > hot pulg/unplug disk & net, vnc connect/disconnect, guestOS reboot, etc. > >

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.11] qcow2: Fix overly broad madvise()

2017-11-15 Thread Darren Kenny
FWIW, Reviewed-by: Darren Kenny Thanks, Darren. On Tue, Nov 14, 2017 at 07:41:27PM +0100, Max Reitz wrote: @mem_size and @offset are both size_t, thus subtracting them from one another will just return a big size_t if mem_size < offset -- even more obvious here because the result is stored i

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.11] qcow2: Fix overly broad madvise()

2017-11-15 Thread Darren Kenny
Should have said that this is subject to the typo that Eric pointed out, of course. Thanks, Darren. On Wed, Nov 15, 2017 at 11:04:19AM +, Darren Kenny wrote: FWIW, Reviewed-by: Darren Kenny Thanks, Darren. On Tue, Nov 14, 2017 at 07:41:27PM +0100, Max Reitz wrote: @mem_size and @offs

Re: [Qemu-devel] [PATCH v2 2/2] Add new PCI ID for i82559a

2017-11-15 Thread Jason Wang
On 2017年11月15日 05:41, Stefan Weil wrote: Am 06.11.2017 um 21:35 schrieb Mike Nawrocki: Adds a new PCI ID for the i82559a (0x8086 0x1030) interface. Enables this ID with a new property "use-alt-device-id" to preserve compatibility. Signed-off-by: Mike Nawrocki --- hw/net/eepro100.c| 12

Re: [Qemu-devel] [PULL 7/8] Add new PCI ID for i82559a

2017-11-15 Thread Jason Wang
On 2017年11月15日 14:43, Stefan Weil wrote: Hi, I currently think that this patch is wrong and should be reverted. It fixes a certain use case by hacking the PCI device id, but does not model the way how that device id is set on the real hardware correctly. As far as I know, all i82559 have a d

Re: [Qemu-devel] [PATCH V5] hw/pci-host: Fix x86 Host Bridges 64bit PCI hole

2017-11-15 Thread Marcel Apfelbaum
On 15/11/2017 4:16, Michael S. Tsirkin wrote: On Mon, Nov 13, 2017 at 03:07:45PM +0200, Marcel Apfelbaum wrote: On 11/11/2017 17:25, Marcel Apfelbaum wrote: Currently there is no MMIO range over 4G reserved for PCI hotplug. Since the 32bit PCI hole depends on the number of cold-plugged PCI devi

[Qemu-devel] Effect of qemu-img convert -m and -W options

2017-11-15 Thread Richard W.M. Jones
[CC to qemu-devel since I'm obviously doing something wrong here, I'm just not sure what.] I was getting ready to add multiple threads to ‘qemu-img convert’ (the longest part of v2v conversions) when I noticed that it had them already! (To be fair this was only added in February this year so no w

Re: [Qemu-devel] [PATCH v3] hw/arm/aspeed: Unlock SCU when running kernel

2017-11-15 Thread Peter Maydell
On 15 November 2017 at 08:18, Cédric Le Goater wrote: > On 11/14/2017 01:20 PM, Joel Stanley wrote: >> The ASPEED hardware contains a lock register for the SCU that disables >> any writes to the SCU when it is locked. The machine comes up with the >> lock enabled, but on all known hardware u-boot

Re: [Qemu-devel] [PATCH for-2.11] target/arm: Report GICv3 sysregs present in ID registers if needed

2017-11-15 Thread Peter Maydell
On 15 November 2017 at 01:14, Alistair Francis wrote: > On Tue, Nov 7, 2017 at 7:01 AM, Peter Maydell > wrote: >> The CPU ID registers ID_AA64PFR0_EL1, ID_PFR1_EL1 and ID_PFR1 >> have a field for reporting presence of GICv3 system registers. >> We need to report this field correctly in order for

Re: [Qemu-devel] [PATCH v3 for-2.11 1/3] tpm_emulator: Add a caching layer for the TPM Established flag

2017-11-15 Thread Stefan Berger
On 11/14/2017 10:47 PM, Marc-André Lureau wrote: Hi On Wed, Nov 15, 2017 at 2:16 AM, Stefan Berger wrote: On 11/14/2017 06:40 PM, Marc-André Lureau wrote: Hi On Tue, Nov 14, 2017 at 10:52 PM, Stefan Berger wrote: Add a caching layer for the TPM established flag so that we don't need to go

[Qemu-devel] building user interfaces as modules

2017-11-15 Thread Gerd Hoffmann
Hi, I'm trying to revamp the display initialization code: * First use a qapi type for the display options, so we can use -blockdev style command line parsing for -display (not there yet, but closer). * Second initialize all user interfaces the same way and build a registry for U

[Qemu-devel] [PULL 3/4] tpm_tis: Return TPM_VERSION_UNSPEC in case of BE failure

2017-11-15 Thread Stefan Berger
In case the backend has a failure, such as the tpm_emulator's CMD_INIT failing, the TIS goes into failure mode and does not respond to reads or writes to MMIO registers. In this case we need to prevent the ACPI table from being added and the straight-forward way is to indicate that there's no known

[Qemu-devel] [PULL 1/4] specs: Extend TPM spec with TPM emulator description

2017-11-15 Thread Stefan Berger
Following the recent extension of QEMU with a TPM emulator device, update the specs describing for how to interact with the device. The results of commands run inside a Linux VM are expected to be similar to those when the TPM passthrough device is used, so we just reuse that. Signed-off-by: Stef

[Qemu-devel] [PULL 2/4] tpm-emulator: protect concurrent ctrl_chr access

2017-11-15 Thread Stefan Berger
From: Marc-André Lureau The control chardev is being used from the data thread to set the locality of the next request. Altough the chr has a write mutex, we may potentially read the reply from another thread request. Add a mutex to protect from concurrent control commands. Signed-off-by: Marc-

[Qemu-devel] [PULL 0/4] Merge tpm 2017/11/15 v1

2017-11-15 Thread Stefan Berger
This pull request is for 2.11 and extends documentation as well as fixes bugs related to concurrency and failure mode. The following changes since commit 4ffa88c99c54d2a30f79e3dbecec50b023eff1c8: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-11-08-1' into staging (2017-

[Qemu-devel] [PULL 4/4] tpm_tis: Return 0 for every register in case of failure mode

2017-11-15 Thread Stefan Berger
Rather than returning ~0, return 0 for every register in case of failure mode. The '0' is better to indicate that there's no device there. It avoids SeaBIOS detecting a device and getting stuck on it trying to read and write its registers. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lure

[Qemu-devel] [PULL for-2.11 3/3] target/arm: Fix GETPC usage in do_paired_cmpxchg64_l/be

2017-11-15 Thread Richard Henderson
Use of GETPC must be restricted to those functions that are directly called from TCG generated code. Reviewed-by: Alex Bennée Fixes: 2399d4e7cec22ecf1c51062d2ebfd45220dbaace Signed-off-by: Richard Henderson --- target/arm/helper-a64.c | 14 ++ 1 file changed, 6 insertions(+), 8 dele

[Qemu-devel] [PULL for-2.11 0/3] tcg: user-mode memory helper fixes

2017-11-15 Thread Richard Henderson
tags/pull-tcg-20171115 for you to fetch changes up to 3c5f9c3f35dd3b6d1d1cd68c9d4d86fc3c59c397: target/arm: Fix GETPC usage in do_paired_cmpxchg64_l/be (2017-11-15 10:34:33 +0100) User-mode memory helper fixes

[Qemu-devel] [PULL for-2.11 2/3] target/arm: Use helper_retaddr in stxp helpers

2017-11-15 Thread Richard Henderson
We use raw memory primitives along the !parallel_cpus paths in order to simplify the endianness handling. Because of that, we did not benefit from the generic changes to cpu_ldst_user_only_template.h. The simplest fix is to manipulate helper_retaddr here. Reviewed-by: Alex Bennée Signed-off-by:

[Qemu-devel] [PULL for-2.11 1/3] tcg: Record code_gen_buffer address for user-only memory helpers

2017-11-15 Thread Richard Henderson
When we handle a signal from a fault within a user-only memory helper, we cannot cpu_restore_state with the PC found within the signal frame. Use a TLS variable, helper_retaddr, to record the unwind start point to find the faulting guest insn. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Repo

[Qemu-devel] [PATCH] ps2: fix PS2Queue counter field type

2017-11-15 Thread P J P
From: Prasad J Pandit During Qemu guest migration, a destination process invokes ps2 post_load function. In that, if 'rptr' and 'count' fields were tampered, it could lead to OOB access or infinite loop issues. Change their type to 'uint8_t' so they remain within bounds. Reported-by: Cyrille Cha

Re: [Qemu-devel] [PATCH] ps2: fix PS2Queue counter field type

2017-11-15 Thread Daniel P. Berrange
On Wed, Nov 15, 2017 at 06:16:02PM +0530, P J P wrote: > From: Prasad J Pandit > > During Qemu guest migration, a destination process invokes ps2 > post_load function. In that, if 'rptr' and 'count' fields were > tampered, it could lead to OOB access or infinite loop issues. > Change their type t

[Qemu-devel] KVM call for agenda -- 2017-11-21

2017-11-15 Thread Juan Quintela
Hi 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, so hurry up. After discussions on the QEMU Summit, we are going to have always open a KVM call where you can add topics. Call details: By

Re: [Qemu-devel] [PATCH v2 2/2] Add new PCI ID for i82559a

2017-11-15 Thread Michael Nawrocki
On 11/14/2017 04:41 PM, Stefan Weil wrote: Am 06.11.2017 um 21:35 schrieb Mike Nawrocki: Adds a new PCI ID for the i82559a (0x8086 0x1030) interface. Enables this ID with a new property "use-alt-device-id" to preserve compatibility. Signed-off-by: Mike Nawrocki --- hw/net/eepro100.c| 12

Re: [Qemu-devel] [PATCH v3] hw/arm/aspeed: Unlock SCU when running kernel

2017-11-15 Thread Cédric Le Goater
On 11/15/2017 11:56 AM, Peter Maydell wrote: > On 15 November 2017 at 08:18, Cédric Le Goater wrote: >> On 11/14/2017 01:20 PM, Joel Stanley wrote: >>> The ASPEED hardware contains a lock register for the SCU that disables >>> any writes to the SCU when it is locked. The machine comes up with the

Re: [Qemu-devel] [PATCH] build-sys: restrict vmcoreinfo to fw_cfg+dma capable targets

2017-11-15 Thread Marc-André Lureau
Michael, Could you pick this patch for 2.11 ? thanks On Mon, Nov 6, 2017 at 1:40 PM, Daniel Henrique Barboza wrote: > > > On 11/06/2017 09:53 AM, Marc-André Lureau wrote: >> >> vmcoreinfo is built for all targets. However, it requires fw_cfg with >> DMA operations support (write operation). Res

Re: [Qemu-devel] [Question] Qemu's Heap Becomes Very Large and Never Reduce Down

2017-11-15 Thread Paolo Bonzini
On 15/11/2017 04:14, Xulei (Stone) wrote: > Hi, guys > > I met a strange problem, with qemu 2.8.1: > qemu consumes too many heap memory after several operations and can not > release them anymore:  > hot pulg/unplug disk & net, vnc connect/disconnect, guestOS reboot, etc. Try with newer QEMU; unt

Re: [Qemu-devel] [PATCH] ps2: fix PS2Queue counter field type

2017-11-15 Thread Paolo Bonzini
On 15/11/2017 13:51, Daniel P. Berrange wrote: > If you're concerned that someone is tampering with QEMU state > in transit during migration, then you're going to end up playing > whack-a-mole across the entire QEMU codebase IMHO. The answer > to the problem of tampering is to have encryption of th

Re: [Qemu-devel] [PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2017-11-15 Thread Michael S. Tsirkin
On Wed, Nov 15, 2017 at 11:47:58AM +0800, Wei Wang wrote: > On 11/15/2017 05:21 AM, Michael S. Tsirkin wrote: > > On Tue, Nov 14, 2017 at 08:02:03PM +0800, Wei Wang wrote: > > > On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: > > > > > - guest2host_cmd: written by the guest to ACK to the host abo

Re: [Qemu-devel] [PATCH] ps2: fix PS2Queue counter field type

2017-11-15 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 15/11/2017 13:51, Daniel P. Berrange wrote: > > If you're concerned that someone is tampering with QEMU state > > in transit during migration, then you're going to end up playing > > whack-a-mole across the entire QEMU codebase IMHO. The answer > >

Re: [Qemu-devel] Abnormal observation during migration: too many "write-not-dirty" pages

2017-11-15 Thread Chunguang Li
> -原始邮件- > 发件人: "Dr. David Alan Gilbert" > 发送时间: 2017-11-15 18:11:37 (星期三) > 收件人: "Chunguang Li" > 抄送: qemu-devel@nongnu.org, quint...@redhat.com, amit.s...@redhat.com, > pbonz...@redhat.com, stefa...@redhat.com > 主题: Re: [Qemu-devel] Abnormal observation during migration: too many >

Re: [Qemu-devel] [PATCH] ps2: fix PS2Queue counter field type

2017-11-15 Thread Paolo Bonzini
On 15/11/2017 14:30, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> On 15/11/2017 13:51, Daniel P. Berrange wrote: >>> If you're concerned that someone is tampering with QEMU state >>> in transit during migration, then you're going to end up playing >>> whack-a-mole

Re: [Qemu-devel] [PATCH for-2.11] qcow2: Fix overly broad madvise()

2017-11-15 Thread Max Reitz
On 2017-11-15 10:09, Alberto Garcia wrote: > On Tue 14 Nov 2017 07:41:27 PM CET, Max Reitz wrote: >> @mem_size and @offset are both size_t, thus subtracting them from one >> another will just return a big size_t if mem_size < offset -- even more >> obvious here because the result is stored in anoth

Re: [Qemu-devel] [PATCH] exec: Skip mru section if it's a partial page and not resolving subpage

2017-11-15 Thread Paolo Bonzini
On 14/11/2017 23:42, BALATON Zoltan wrote: > This fixes a crash caused by picking the wrong memory region in > address_space_lookup_region seen with client code accessing a device > model that uses alias memory regions. > > Signed-off-by: BALATON Zoltan > --- > exec.c | 1 + > 1 file changed, 1

Re: [Qemu-devel] HAXM is now open source

2017-11-15 Thread Paolo Bonzini
On 15/11/2017 09:25, Yu Ning wrote: > > > On 11/15/2017 3:13, John Snow wrote: >> >> On 11/14/2017 06:09 AM, Thomas Huth wrote: >>> >>> That's great news! I hope this all will help to promote QEMU on Windows >>> and macOS quite a bit! >>> >>> However, during the past months, I noticed a couple of

[Qemu-devel] [Bug 1728256] Re: Memory corruption in Windows 10 guest / amd64

2017-11-15 Thread adg
I've also had the exact symptoms and issues you've described. I have also noticed that the VM would BSOD with the CRITICAL_STRUCTURE_CORRUPTION message when the host system would read VM memory from swap. After disabling swap on the host system I've completely managed to eliminate this BSOD issue.

Re: [Qemu-devel] Abnormal observation during migration: too many "write-not-dirty" pages

2017-11-15 Thread Chunguang Li
> -Original Messages- > From: "Juan Quintela" > Sent Time: 2017-11-15 17:45:44 (Wednesday) > To: "Chunguang Li" > Cc: qemu-devel@nongnu.org, dgilb...@redhat.com, amit.s...@redhat.com, > pbonz...@redhat.com, stefa...@redhat.com > Subject: Re: Abnormal observation during migration: too

Re: [Qemu-devel] Abnormal observation during migration: too many "write-not-dirty" pages

2017-11-15 Thread Dr. David Alan Gilbert
* Chunguang Li (lichungu...@hust.edu.cn) wrote: > > > > > -原始邮件- > > 发件人: "Dr. David Alan Gilbert" > > 发送时间: 2017-11-15 18:11:37 (星期三) > > 收件人: "Chunguang Li" > > 抄送: qemu-devel@nongnu.org, quint...@redhat.com, amit.s...@redhat.com, > > pbonz...@redhat.com, stefa...@redhat.com > > 主题:

Re: [Qemu-devel] [RFC 1/5] hw/vfio: Add function for getting reserved_region of device iommu group

2017-11-15 Thread Shameerali Kolothum Thodi
Hi Alex, > -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, November 14, 2017 3:48 PM > To: Zhuyijun > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; Shameerali Kolothum > Thodi ; Zhaoshengl

[Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-15 Thread Longpeng(Mike)
Hi guys, We got a BUG report from our testers yesterday, the testing scenario was migrating a VM (Windows guest, *4 vcpus*, 4GB, vhost-user net: *7 queues*). We found the cause reason, and we'll report the BUG or send a fix patch to upstream if necessary( we haven't test the upstream yet, sorry..

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-15 Thread Jason Wang
On 2017年11月15日 22:55, Longpeng(Mike) wrote: Hi guys, We got a BUG report from our testers yesterday, the testing scenario was migrating a VM (Windows guest, *4 vcpus*, 4GB, vhost-user net: *7 queues*). We found the cause reason, and we'll report the BUG or send a fix patch to upstream if nece

Re: [Qemu-devel] [PATCH 2/5] qcow2: multiple clusters write compressed

2017-11-15 Thread Max Reitz
On 2017-11-14 11:16, Anton Nefedov wrote: > From: Pavel Butsykin > > At the moment, qcow2_co_pwritev_compressed can process the requests size > less than or equal to one cluster. This patch added possibility to write > compressed data in the QCOW2 more than one cluster. The implementation > is si

Re: [Qemu-devel] [PATCH] fix scripts/update-linux-headers.sh here document

2017-11-15 Thread Christian Borntraeger
On 11/10/2017 10:03 AM, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Tested-by: Christian Borntraeger > --- > scripts/update-linux-headers.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh > in

Re: [Qemu-devel] [PATCH 1/5] qcow2: reject unaligned offsets in write compressed

2017-11-15 Thread Max Reitz
On 2017-11-14 11:16, Anton Nefedov wrote: > Misaligned compressed write is not supported. > > Signed-off-by: Anton Nefedov > --- > block/qcow2.c | 4 > 1 file changed, 4 insertions(+) Thanks, applied to my block branch for 2.11: https://github.com/XanClic/qemu/commits/block Max signat

Re: [Qemu-devel] [PATCH for-2.12 v3 07/11] spapr: introduce an 'irq_base' number

2017-11-15 Thread Cédric Le Goater
On 11/14/2017 03:45 PM, Greg Kurz wrote: > On Fri, 10 Nov 2017 15:20:13 + > Cédric Le Goater wrote: > >> 'irq_base' is a base IRQ number which lets us allocate only the subset >> of the IRQ numbers used on the sPAPR platform. It is sync with the >> ICSState 'offset' attribute and this is slig

Re: [Qemu-devel] [PATCH] fix scripts/update-linux-headers.sh here document

2017-11-15 Thread Paolo Bonzini
On 10/11/2017 10:03, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > scripts/update-linux-headers.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh > index 8b847e279b..e2b159aa3d 100755 > ---

Re: [Qemu-devel] [PATCH] Revert "docker: Enable features explicitly in test-full"

2017-11-15 Thread Paolo Bonzini
On 18/10/2017 10:20, Fam Zheng wrote: > This reverts commit 5e8a7fe673ca5949bd51939ee36faaf3b1320de8. > > It's hard to get all images to have all these packages, the usual > "FEATURES" and "require" mechanism doesn't scale with so many features. > With that change, the test basically only works in

[Qemu-devel] [PATCH] s390/kvm_virtio/linux-headers: remove traces of old virtio transport

2017-11-15 Thread Christian Borntraeger
We no longer support the old s390 transport, neither does the newest Linux kernel. Remove it from the linux header script as well as the s390x virtio code. We still should handle the VIRTIO_NOTIFY hypercall, to tolerate early printk on older guest kernels without an sclp console. We continue to ig

Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30)

2017-11-15 Thread Alberto Garcia
On Fri 10 Nov 2017 04:02:23 AM CET, Fam Zheng wrote: >> > I'm thinking that perhaps we should add the pause point directly to >> > block_job_defer_to_main_loop(), to prevent any block job from >> > running the exit function when it's paused. >> >> I was trying this and unfortunately this breaks th

[Qemu-devel] [Bug 1724570] Re: qemu-system-x86_64 generates ACPI tables with broken endianess when run on big-endian hosts

2017-11-15 Thread Thomas Huth
I think something like this should fix this issue: diff a/tests/bios-tables-test.c b/tests/bios-tables-test.c --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -279,8 +279,19 @@ static void dump_aml_files(test_data *data, bool rebuild) } g_assert(fd >= 0); +

Re: [Qemu-devel] [PATCH for-2.12 v3 09/11] spapr: split the IRQ number space for LSI interrupts

2017-11-15 Thread Greg Kurz
On Fri, 10 Nov 2017 15:20:15 + Cédric Le Goater wrote: > The type of an interrupt, MSI or LSI, is stored under the flag > attribute of the ICSIRQState array. To reduce the use of this array > and consequently of the ICSState object (This is needed to introduce > the new XIVE model), we choose

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-15 Thread Longpeng(Mike)
2017-11-15 23:05 GMT+08:00 Jason Wang : > > > On 2017年11月15日 22:55, Longpeng(Mike) wrote: >> >> Hi guys, >> >> We got a BUG report from our testers yesterday, the testing scenario was >> migrating a VM (Windows guest, *4 vcpus*, 4GB, vhost-user net: *7 >> queues*). >> >> We found the cause reason,

[Qemu-devel] [qemu-img] support for XVA

2017-11-15 Thread Gandalf Corvotempesta
I'm thinking if support for XVA files could be added to qemu-img The file-format is well known (it's just a tar archive) and there are scripts that are able to convert an XVA file to a RAW image. (ie: https://gist.github.com/miebach/0433947bcf053de23159) Running these script on their own is very t

[Qemu-devel] [Bug 1680679] Re: qemu cannot run twice

2017-11-15 Thread misairu
Does your Subsystem ID and Subsystem Vendor ID (of your GPU) show correctly inside the WindowsVM? It should be the same ID shown in your host. Otherwise that will trigger the Code 43 error. I once have this problem but now solve this by some vfio-pci option. Now I have a laptop that passthrough m

Re: [Qemu-devel] [PATCH for-2.12 v3 09/11] spapr: split the IRQ number space for LSI interrupts

2017-11-15 Thread Cédric Le Goater
On 11/15/2017 03:52 PM, Greg Kurz wrote: > On Fri, 10 Nov 2017 15:20:15 + > Cédric Le Goater wrote: > >> The type of an interrupt, MSI or LSI, is stored under the flag >> attribute of the ICSIRQState array. To reduce the use of this array >> and consequently of the ICSState object (This is ne

[Qemu-devel] [PATCH v3] ssh: switch from libssh2 to libssh

2017-11-15 Thread Pino Toscano
Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various advantages over libssh2: - easier API for authentication (for example for using ssh-agent) - easier API for known_hosts handling - supports newer types of keys in known_hosts Kerber

Re: [Qemu-devel] [PATCH 2/5] qcow2: multiple clusters write compressed

2017-11-15 Thread Anton Nefedov
On 15/11/2017 6:11 PM, Max Reitz wrote: On 2017-11-14 11:16, Anton Nefedov wrote: From: Pavel Butsykin At the moment, qcow2_co_pwritev_compressed can process the requests size less than or equal to one cluster. This patch added possibility to write compressed data in the QCOW2 more than one cl

Re: [Qemu-devel] [PATCH 2/5] qcow2: multiple clusters write compressed

2017-11-15 Thread Max Reitz
On 2017-11-15 17:28, Anton Nefedov wrote: > On 15/11/2017 6:11 PM, Max Reitz wrote: >> On 2017-11-14 11:16, Anton Nefedov wrote: >>> From: Pavel Butsykin >>> >>> At the moment, qcow2_co_pwritev_compressed can process the requests size >>> less than or equal to one cluster. This patch added possibi

Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30)

2017-11-15 Thread Anton Nefedov
On 15/11/2017 6:42 PM, Alberto Garcia wrote: On Fri 10 Nov 2017 04:02:23 AM CET, Fam Zheng wrote: I'm thinking that perhaps we should add the pause point directly to block_job_defer_to_main_loop(), to prevent any block job from running the exit function when it's paused. I was trying this an

Re: [Qemu-devel] [PATCH for-2.12 v3 07/11] spapr: introduce an 'irq_base' number

2017-11-15 Thread Greg Kurz
On Wed, 15 Nov 2017 15:24:08 + Cédric Le Goater wrote: > On 11/14/2017 03:45 PM, Greg Kurz wrote: > > On Fri, 10 Nov 2017 15:20:13 + > > Cédric Le Goater wrote: > > > >> 'irq_base' is a base IRQ number which lets us allocate only the subset > >> of the IRQ numbers used on the sPAPR pl

Re: [Qemu-devel] [PATCH] s390/kvm_virtio/linux-headers: remove traces of old virtio transport

2017-11-15 Thread Cornelia Huck
On Wed, 15 Nov 2017 16:42:23 +0100 Christian Borntraeger wrote: > We no longer support the old s390 transport, neither does the newest > Linux kernel. Remove it from the linux header script as well as the > s390x virtio code. We still should handle the VIRTIO_NOTIFY hypercall, > to tolerate earl

Re: [Qemu-devel] [PATCH v3] ssh: switch from libssh2 to libssh

2017-11-15 Thread Richard W.M. Jones
On Wed, Nov 15, 2017 at 05:26:48PM +0100, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for know

Re: [Qemu-devel] [PATCH v6 3/5] fw_cfg: do DMA read operation

2017-11-15 Thread Michael S. Tsirkin
On Mon, Nov 13, 2017 at 08:29:56PM +0100, Marc-André Lureau wrote: > Modify fw_cfg_read_blob() to use DMA if the device supports it. > Return errors, because the operation may fail. > > To avoid polling with unbound amount of time, the DMA operation is > expected to complete within 200ms, or will

Re: [Qemu-devel] [qemu-img] support for XVA

2017-11-15 Thread Eric Blake
[adding libguestfs] On 11/15/2017 09:52 AM, Gandalf Corvotempesta wrote: > I'm thinking if support for XVA files could be added to qemu-img > The file-format is well known (it's just a tar archive) and there are scripts > that are able to convert an XVA file to a RAW image. (ie: > https://gist.git

Re: [Qemu-devel] [qemu-img] support for XVA

2017-11-15 Thread Gandalf Corvotempesta
XVA is a tar archive. I don't think would be possible to directly use the image stored inside without extracting and merging each chunks Any random reads would be impossible to do, only a huge sequential dump to build the raw image Il 15 nov 2017 6:33 PM, "Eric Blake" ha scritto: [adding libgue

[Qemu-devel] [PATCH] iotests: Make 087 pass without AIO enabled

2017-11-15 Thread Max Reitz
If AIO has not been enabled in the qemu build that is to be tested, we should skip the "aio=native without O_DIRECT" test instead of failing. Signed-off-by: Max Reitz --- Cleber wanted to fix this in July with his "build configuration query tool and conditional (qemu-io)test skip" series (https:/

[Qemu-devel] [PULL 01/10] fix: unrealize virtio device if we fail to hotplug it

2017-11-15 Thread Michael S. Tsirkin
From: linzhecheng If we fail to hotplug virtio-blk device and then suspend or shutdown VM, qemu is likely to crash. Re-production steps: 1. Run VM named vm001 2. Create a virtio-blk.xml which contains wrong configurations: 3. Run command : virsh attach-device vm001 virtio-blk.xml erro

[Qemu-devel] [PULL 00/10] pc, pci, virtio: fixes for rc1

2017-11-15 Thread Michael S. Tsirkin
The following changes since commit 1fa0f627d03cd0d0755924247cafeb42969016bf: Update version for v2.11.0-rc1 release (2017-11-14 18:37:49 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to 6ed0c1c

[Qemu-devel] [PULL 04/10] test: fix detection of errors from iasl

2017-11-15 Thread Michael S. Tsirkin
From: "Daniel P. Berrange" The conditional looking for errors while loading asl files would ignore errors from loading the expected data, if the actual data succeeded. Signed-off-by: Daniel P. Berrange Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-te

[Qemu-devel] [PULL 06/10] hw/pcie-pci-bridge: restrict to X86 and ARM

2017-11-15 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The PCIE-PCI bridge is specific to "pure" PCIe systems (on QEMU we have X86 and ARM), it does not make sense to have it in other archs. Reported-by: Thomas Huth Signed-off-by: Marcel Apfelbaum Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Phil

[Qemu-devel] [PULL 03/10] tests: report errors when iasl exits with non-zero status

2017-11-15 Thread Michael S. Tsirkin
From: "Daniel P. Berrange" If iasl exits with non-zero status, the test unhelpfully just reports that the AML did not match, because the data files it thought iasl generated do not exist. This adds an explicit check for the exit status of iasl and prints stderr if it was non-zero. Thus gives us a

[Qemu-devel] [PULL 02/10] pci: Initialize pci_dev->name before use

2017-11-15 Thread Michael S. Tsirkin
From: Alexey Kardashevskiy This moves pci_dev->name initialization earlier so pci_dev->bus_master_as could get a name instead of an empty string. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Alexey Kardashevskiy Reviewed-by: Michael S. Tsirkin Signed-off-by: Micha

[Qemu-devel] [PULL 05/10] hw/pci-host: Fix x86 Host Bridges 64bit PCI hole

2017-11-15 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Currently there is no MMIO range over 4G reserved for PCI hotplug. Since the 32bit PCI hole depends on the number of cold-plugged PCI devices and other factors, it is very possible is too small to hotplug PCI devices with large BARs. Fix it by reserving 2G for I4400FX chip

[Qemu-devel] [PULL 07/10] tests/acpi-test-data: update _CRS in DSDT

2017-11-15 Thread Michael S. Tsirkin
commit dadf988e81b15065ac1d6dbaf4b87b5b80c7b670 hw/pci-host: Fix x86 Host Bridges 64bit PCI hole Added a 64 bit hole to _CRS of PCI0. Update the expected files accordingly. Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/DSDT | Bin 5098 -> 5144 bytes tests/acpi-test-d

[Qemu-devel] [PULL 08/10] NUMA: Enable adding NUMA node implicitly

2017-11-15 Thread Michael S. Tsirkin
From: Dou Liyang Linux and Windows need ACPI SRAT table to make memory hotplug work properly, however currently QEMU doesn't create SRAT table if numa options aren't present on CLI. Which breaks both linux and windows guests in certain conditions: * Windows: won't enable memory hotplug without

[Qemu-devel] [PULL 09/10] vmcoreinfo: put it in the 'misc' device category

2017-11-15 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/misc/vmcoreinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index a618e12..31db57a 100644 --- a/hw/misc/vmcor

Re: [Qemu-devel] [RFC 1/5] hw/vfio: Add function for getting reserved_region of device iommu group

2017-11-15 Thread Alex Williamson
On Wed, 15 Nov 2017 09:49:41 + Shameerali Kolothum Thodi wrote: > Hi Alex, > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, November 14, 2017 3:48 PM > > To: Zhuyijun > > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > > eri

[Qemu-devel] [PULL 10/10] build-sys: restrict vmcoreinfo to fw_cfg+dma capable targets

2017-11-15 Thread Michael S. Tsirkin
From: Marc-André Lureau vmcoreinfo is built for all targets. However, it requires fw_cfg with DMA operations support (write operation). Restrict vmcoreinfo exposure to architectures that are supporting FW_CFG_DMA, that is arm-virt and x86 only atm. Signed-off-by: Marc-André Lureau Reviewed-by:

Re: [Qemu-devel] [PATCH 3/5] block: support compressed write for copy-on-read

2017-11-15 Thread Max Reitz
On 2017-11-14 11:16, Anton Nefedov wrote: > Signed-off-by: Anton Nefedov > --- > block/io.c | 30 -- > block/trace-events | 2 +- > 2 files changed, 25 insertions(+), 7 deletions(-) > > diff --git a/block/io.c b/block/io.c > index 3d5ef2c..93c6b24 100644 > --

  1   2   >