Re: [Qemu-devel] [RFC v3 23/27] qmp: isolate responses into io thread

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > @@ -4294,6 +4366,11 @@ static GMainContext *monitor_io_context_get(void) > return iothread_get_g_main_context(mon_global.mon_iothread); > } > > +static AioContext *monitor_aio_context_get(void) > +{ > +return

Re: [Qemu-devel] [RFC v3 16/27] monitor: let monitor_{suspend|resume} thread safe

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > Monitor code now can be run in more than one thread. Let the suspend > and resume code for thread safety. s/for thread safety/be thread safe/ Apart from that, Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v3 15/27] monitor: introduce monitor_qmp_respond()

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > A tiny refactoring, preparing to split the QMP dispatcher away. > > Signed-off-by: Peter Xu > --- > monitor.c | 48 +++- > 1 file changed, 31 insertions(+), 17 deletions(-) > > diff --git

[Qemu-devel] about qemu-img info on block dev

2017-11-06 Thread wang.guang55
hello if we create a qcow2 file on a block dev. we can,t get the right disk size by qemu-img info。 [root@host-120-79 qemu]# ./qemu-img create -f qcow2 /dev/zs/lvol0 1G Formatting '/dev/zs/lvol0', fmt=qcow2 size=1073741824 cluster_size=65536 lazy_refcounts=off refcount_bits=16

Re: [Qemu-devel] [RFC v3 11/27] monitor: allow to use IO thread for parsing

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > For each Monitor, add one field "use_io_thr" to show whether it will be > using the dedicated monitor IO thread to handle input/output. When set, > monitor IO parsing work will be offloaded to dedicated monitor IO > thread, rather than the original main loop

Re: [Qemu-devel] [PATCH qemu v3] RFC: ppc/spapr: Receive and store device tree blob from SLOF

2017-11-06 Thread Alexey Kardashevskiy
On 20/10/17 11:46, Alexey Kardashevskiy wrote: > On 19/10/17 17:24, David Gibson wrote: >> On Tue, Oct 17, 2017 at 04:55:03PM +1100, Alexey Kardashevskiy wrote: >>> On 16/10/17 20:36, David Gibson wrote: On Mon, Oct 16, 2017 at 04:20:04PM +1100, Alexey Kardashevskiy >>> wrote: >> [snip]

Re: [Qemu-devel] [RFC v3 10/27] monitor: create monitor dedicate iothread

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > +static GMainContext *monitor_io_context_get(void) > +{ > +return iothread_get_g_main_context(mon_global.mon_iothread); > +} > + > +static void monitor_iothread_init(void) > +{ > +mon_global.mon_iothread = iothread_create("monitor_iothread", > +

Re: [Qemu-devel] [RFC v3 09/27] monitor: let mon_list be tail queue

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > It was QLIST. I want to use this list to do monitor priority job later, > which need tail insertion ability. So switching to a tail queue. > > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v3 08/27] monitor: unify global init

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > There are many places for monitor init its globals, at least: > > - monitor_init_qmp_commands() at the very beginning > - single function to init monitor_lock > - in the first entry of monitor_init() using "is_first_init" > > Unify them a bit. > >

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Alexey Kardashevskiy
On 07/11/17 17:16, Wanpeng Li wrote: > 2017-11-07 14:12 GMT+08:00 Alexey Kardashevskiy : >> On 07/11/17 17:02, Wanpeng Li wrote: >>> Hi Alexey, >>> 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy : On 07/11/17 01:08, Paolo Bonzini wrote: > On 06/11/2017

Re: [Qemu-devel] [RFC v3 07/27] monitor: move the cur_mon hack deeper for QMP

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > In monitor_qmp_read(), we have the hack to temporarily replace the > cur_mon pointer. Now we move this hack deeper inside the QMP dispatcher > routine since the Monitor pointer can be passed in to that using the new > JSON Parser opaque field now. > > This

Re: [Qemu-devel] [PATCH] linux-user: Support explicit targets for PowerPC

2017-11-06 Thread Laurent Vivier
Le 07/11/2017 à 03:50, Aaron Sierra a écrit : > Enable building PowerPC targets supporting a specific CPU, without > having to set QEMU_CPU via the environment. For example these build > targets (and many more) become available: > > qemu-ppc.e500mc > qemu-ppc.e500v2 > qemu-ppc.e5500 >

Re: [Qemu-devel] [RFC v3 06/27] qjson: add "opaque" field to JSONMessageParser

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > It'll be passed to emit() as well when it happens. Since at it, add a > typedef for the emitter function. > > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v3 05/27] monitor: move skip_flush into monitor_data_init

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > It's part of the data init. Collect it. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v3 04/27] qobject: let object_property_get_str() use new API

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > We can simplify object_property_get_str() using the new > qobject_get_try_str(). > > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v3 03/27] qobject: introduce qobject_get_try_str()

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > A quick way to fetch string from qobject when it's a QString. > > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v3 02/27] qobject: introduce qstring_get_try_str()

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > The only difference from qstring_get_str() is that it allows the qstring > to be NULL. If so, NULL is returned. > > CC: Eric Blake > CC: Markus Armbruster > Signed-off-by: Peter Xu Reviewed-by:

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

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:46, Peter Xu wrote: > This is not a problem if we are only having one single loop thread like > before. However, after per-monitor thread is introduced, this is not > true any more, and the race can happen. > > The race can be triggered with "make check -j8" sometimes: > >

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
2017-11-07 14:12 GMT+08:00 Alexey Kardashevskiy : > On 07/11/17 17:02, Wanpeng Li wrote: >> Hi Alexey, >> 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy : >>> On 07/11/17 01:08, Paolo Bonzini wrote: On 06/11/2017 13:18, Wanpeng Li wrote: > 2017-11-06 20:02

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Alexey Kardashevskiy
On 07/11/17 17:02, Wanpeng Li wrote: > Hi Alexey, > 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy : >> On 07/11/17 01:08, Paolo Bonzini wrote: >>> On 06/11/2017 13:18, Wanpeng Li wrote: 2017-11-06 20:02 GMT+08:00 Paolo Bonzini : > On 06/11/2017

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
Hi Alexey, 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy : > On 07/11/17 01:08, Paolo Bonzini wrote: >> On 06/11/2017 13:18, Wanpeng Li wrote: >>> 2017-11-06 20:02 GMT+08:00 Paolo Bonzini : On 06/11/2017 12:59, Fam Zheng wrote: >>> Could you point

Re: [Qemu-devel] [PATCH v3 0/4] Don't write headers if BDS is INACTIVE

2017-11-06 Thread Fam Zheng
On Mon, 11/06 21:31, Jeff Cody wrote: > Changes from v2->v3: > > Patch 2: Uh... fix that misspelling. Thanks Stefan :) > Patch 3: New patch to block migration in parallels Reviewed-by: Fam Zheng

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Alexey Kardashevskiy
On 07/11/17 01:08, Paolo Bonzini wrote: > On 06/11/2017 13:18, Wanpeng Li wrote: >> 2017-11-06 20:02 GMT+08:00 Paolo Bonzini : >>> On 06/11/2017 12:59, Fam Zheng wrote: >> Could you point out the patchset for the fix? > Between 447b0d0b9ee8a0ac216c3186e0f3c427a1001f0c

[Qemu-devel] [PATCH] Revert "Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO""

2017-11-06 Thread Xiong Zhang
The original patch "c2b2e158cc7 vfio/pci-quirks: Disable stolen memory for igd VFIO" is intend to fix linux guest bootup, but it breaks windows guest bootup, so it was reverted, finally liunx guest still couldn't boot up with current code. The latest igd windows 15.45 and 15.47 driver have fixed

Re: [Qemu-devel] Drainage in bdrv_replace_child_noperm()

2017-11-06 Thread Fam Zheng
On Mon, 11/06 19:49, Max Reitz wrote: > Hi everyone, > > On my quest to fix some flaky iotests, I came to a bit of a halt on 129. > (Details: Its issue is that block jobs now generally ignore throttling > in a BB (because they use their own), so we have to add a throttle node > instead.

Re: [Qemu-devel] [PATCH v3 5/5] build: delay check for empty git submodule list

2017-11-06 Thread Alexey Kardashevskiy
On 07/11/17 15:12, Alexey Kardashevskiy wrote: > On 04/11/17 02:33, Daniel P. Berrange wrote: >> We short circuit the git submodule update when passed an empty module list. >> This accidentally causes the 'status' command to write to the status file. >> The >> test needs to be delayed into the

[Qemu-devel] [PATCH] linux-user: Support explicit targets for PowerPC

2017-11-06 Thread Aaron Sierra
Enable building PowerPC targets supporting a specific CPU, without having to set QEMU_CPU via the environment. For example these build targets (and many more) become available: qemu-ppc.e500mc qemu-ppc.e500v2 qemu-ppc.e5500 qemu-ppc.e600 qemu-ppc.e6500 These (statically

[Qemu-devel] [Bug 1358619] Re: keep savevm/loadvm and migration cause snapshot crash

2017-11-06 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1358619 Title: keep

[Qemu-devel] [Bug 1326986] Re: e1000 - no link detected by VXWorks based guest

2017-11-06 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1326986 Title: e1000 - no

[Qemu-devel] [Bug 1355644] Re: windows7 reboot bluesreen 0x0000005c

2017-11-06 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1355644 Title: windows7

Re: [Qemu-devel] [PATCH v3 5/5] build: delay check for empty git submodule list

2017-11-06 Thread Alexey Kardashevskiy
On 04/11/17 02:33, Daniel P. Berrange wrote: > We short circuit the git submodule update when passed an empty module list. > This accidentally causes the 'status' command to write to the status file. The > test needs to be delayed into the individual commands to avoid this premature > writing of

[Qemu-devel] [PATCH 1/2] nbd/server: Implement sparse reads atop structured reply

2017-11-06 Thread Eric Blake
The reason that NBD added structured reply in the first place was to allow for efficient reads of sparse files, by allowing the reply to include chunks to quickly communicate holes to the client without sending lots of zeroes over the wire. Time to implement this in the server; our client can

[Qemu-devel] [PATCH 2/2] nbd/server: Optimize final chunk of sparse read

2017-11-06 Thread Eric Blake
If we are careful to handle 0-length read requests correctly, we can optimize our sparse read to send the NBD_REPLY_FLAG_DONE bit on our last OFFSET_DATA or OFFSET_HOLE chunk rather than needing a separate chunk. Signed-off-by: Eric Blake --- nbd/server.c | 13 +++--

[Qemu-devel] [PATCH 0/2] Optimize sparse reads over NBD

2017-11-06 Thread Eric Blake
When I first proposed the NBD extension of structured reads, it was in order to more efficiently read sparse files without sending lots of zeroes over the wire. These two patches feel like a feature addition, and missed soft freeze, so I'm reluctant to include them in a 2.11 pull request; on the

[Qemu-devel] [PATCH 2/8] nbd/client: Nicer trace of structured reply

2017-11-06 Thread Eric Blake
It's useful to know which structured reply chunk is being processed. Signed-off-by: Eric Blake --- nbd/client.c | 4 +++- nbd/trace-events | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nbd/client.c b/nbd/client.c index 3d680e63e1..1880103d2a

[Qemu-devel] [PATCH 7/8] nbd-client: Stricter enforcing of structured reply spec

2017-11-06 Thread Eric Blake
Ensure that the server is not sending unexpected chunk lengths for either the NONE or the OFFSET_DATA chunk, nor unexpected hole length for OFFSET_HOLE. This will flag any server that responds to a zero-length read with an OFFSET_DATA as broken, but we just fixed things to never send that

[Qemu-devel] [PATCH 8/8] nbd/server: Fix structured read of length 0

2017-11-06 Thread Eric Blake
The NBD spec is being clarified that a read of length 0 should not be attempted by a compliant client; but that a server must handle it correctly. However, it also implies that NBD_REPLY_TYPE_OFFSET_DATA must have a non-zero payload length, which means that we must either give an error or use a

[Qemu-devel] [PATCH 3/8] raw: Reflect read-only protocol layer

2017-11-06 Thread Eric Blake
We forbid operations like a zero-length write zero or a discard at the protocol layer when it is marked read-only, but those same operations were succeeding at the format layer because the raw format was not reflecting the underlying read-only status to the block layer, which then took short

[Qemu-devel] [PATCH 6/8] nbd-client: Short-circuit 0-length operations

2017-11-06 Thread Eric Blake
The NBD spec is being clarified to state that clients should not send 0-length requests to the server, as the server behavior is undefined. While such requests are unlikely to occur from real guest behavior, qemu-io can force the driver to perform them; avoid any questionable server

[Qemu-devel] [PATCH 1/8] nbd-client: Fix error message typos

2017-11-06 Thread Eric Blake
Provide missing spaces that are required when using string concatenation to break error messages across source lines. Signed-off-by: Eric Blake --- block/nbd-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/nbd-client.c

[Qemu-devel] [PATCH 0/8] various NBD fixes for 2.11

2017-11-06 Thread Eric Blake
Sparked by my question on whether we were handling zero-length reads correctly according to the NBD spec, but grew to fix other things as well such as some typos, tracing weaknesses, and better handling of read-only exports. The order these patches are listed here is bisection-friendly, but

[Qemu-devel] [PATCH 5/8] nbd: Fix struct name for structured reads

2017-11-06 Thread Eric Blake
A closer read of the NBD spec shows that a structured reply chunk for a hole is not quite identical to the prefix of a data chunk, because the hole has to also send a 32-bit size field. Although we do not yet send holes, we should fix the misleading information in our header and make it easier

[Qemu-devel] [PATCH 4/8] nbd-client: Honor server read-only advertisement

2017-11-06 Thread Eric Blake
The NBD spec says that clients should not try to write/trim to an export advertised as read-only by the server. But we failed to inform the block layer of what we learned from the server, meaning that we were depending on the server sending a proper EPERM failure for various commands. In fact,

[Qemu-devel] [PATCH v3 4/4] qemu-iotests: update unsupported image formats in 194

2017-11-06 Thread Jeff Cody
Test 194 checks for 'luks' to exclude as an unsupported format, However, most formats are unsupported, due to migration blockers. Rather than specifying a blacklist of unsupported formats, whitelist supported formats (specifically, qcow2, qed, raw, dmg). Tested-by: Alexey Kardashevskiy

[Qemu-devel] [PATCH v3 2/4] block/parallels: Do not update header or truncate image when INMIGRATE

2017-11-06 Thread Jeff Cody
If we write or modify the image file while the QEMU run state is INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set. This will cause an assert, since the image is marked inactive. Make sure we obey this flag. Tested-by: Alexey Kardashevskiy Signed-off-by: Jeff Cody

[Qemu-devel] [PATCH v3 3/4] block/parallels: add migration blocker

2017-11-06 Thread Jeff Cody
Migration does not work for parallels, and has been broken for a while (see patch 'block/parallels: Do not update header or truncate image when INMIGRATE'). The bdrv_invalidate_cache() method needs to be added for migration to be supported. Until this is done, prohibit migration.

[Qemu-devel] [PATCH v3 1/4] block/vhdx.c: Don't blindly update the header

2017-11-06 Thread Jeff Cody
The VHDX specification requires that before user data modification of the vhdx image, the VHDX header file and data GUIDs need to be updated. In vhdx_open(), if the image is set to RDWR, we go ahead and update the header. However, just because the image is set to RDWR does not mean we can go

[Qemu-devel] [PATCH v3 0/4] Don't write headers if BDS is INACTIVE

2017-11-06 Thread Jeff Cody
Changes from v2->v3: Patch 2: Uh... fix that misspelling. Thanks Stefan :) Patch 3: New patch to block migration in parallels git-backport-diff -r qemu/master.. -u 6dc6acb 001/4:[] [--] 'block/vhdx.c: Don't blindly update the header' 002/4:[] [--] 'block/parallels: Do not update header

Re: [Qemu-devel] [PATCH] crypto: afalg: fix a NULL pointer dereference

2017-11-06 Thread Longpeng (Mike)
On 2017/11/7 1:00, Eric Blake wrote: > On 11/06/2017 12:21 AM, Longpeng(Mike) wrote: >> Test-crypto-hash calls qcrypto_hash_bytesv/digest/base64 with >> errp=NULL, this will cause a NULL poniter deference if afalg_driver > > s/poniter deference/pointer dereference/ > OK. >> doesn't support

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE

2017-11-06 Thread Jeff Cody
On Mon, Nov 06, 2017 at 03:23:43PM -0500, Jeff Cody wrote: > On Fri, Nov 03, 2017 at 02:08:13PM +0300, Denis V. Lunev wrote: > > On 11/03/2017 02:05 PM, Stefan Hajnoczi wrote: > > > On Mon, Oct 30, 2017 at 02:10:27PM +0100, Jeff Cody wrote: > > >> If we write or modify the image file while the

[Qemu-devel] Re [Qemu-block] question: I found a qemu crash when attach virtio-scsi disk

2017-11-06 Thread lizhengui
The qemu works good by now after taking the patch when I attach virtio-scsi disk repeatedly. But the probability of the problem is very low,I only met this problem once. -邮件原件- 发件人: Stefan Hajnoczi [mailto:stefa...@gmail.com] 发送时间: 2017年11月7日 3:06 收件人: lizhengui 抄送: kw...@redhat.com;

Re: [Qemu-devel] [PATCH v3 0/5] Various improvements/bugfixes to submodule handling

2017-11-06 Thread Alexey Kardashevskiy
On 07/11/17 01:30, Daniel P. Berrange wrote: > On Mon, Nov 06, 2017 at 10:44:01AM +, Daniel P. Berrange wrote: >> On Fri, Nov 03, 2017 at 06:03:55PM +, Peter Maydell wrote: >>> On 3 November 2017 at 15:33, Daniel P. Berrange wrote: This short series of patches

Re: [Qemu-devel] [Qemu-block] question: I found a qemu crash when attach virtio-scsi disk

2017-11-06 Thread Fam Zheng
On Mon, 11/06 17:33, Paolo Bonzini wrote: > On 06/11/2017 17:11, Kevin Wolf wrote: > > Am 03.11.2017 um 11:26 hat Stefan Hajnoczi geschrieben: > >> On Wed, Nov 01, 2017 at 06:42:33AM +, lizhengui wrote: > >>> Hi, when I attach virtio-scsi disk to VM, the qemu crash happened at very > >>> low

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
2017-11-06 22:08 GMT+08:00 Paolo Bonzini : > On 06/11/2017 13:18, Wanpeng Li wrote: >> 2017-11-06 20:02 GMT+08:00 Paolo Bonzini : >>> On 06/11/2017 12:59, Fam Zheng wrote: >> Could you point out the patchset for the fix? > Between

Re: [Qemu-devel] [Qemu-arm] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Alistair Francis
On Mon, Nov 6, 2017 at 4:54 PM, Philippe Mathieu-Daudé wrote: > On 11/06/2017 08:33 PM, Alistair Francis wrote: >> On Mon, Nov 6, 2017 at 3:21 PM, Emilio G. Cota wrote: >>> On Mon, Nov 06, 2017 at 14:32:35 -0800, Alistair Francis wrote: Sorry for the silence

Re: [Qemu-devel] [PATCH] crypto: afalg: fix a NULL pointer dereference

2017-11-06 Thread Longpeng (Mike)
On 2017/11/7 1:18, Stefan Hajnoczi wrote: > On Mon, Nov 06, 2017 at 02:21:11PM +0800, Longpeng(Mike) wrote: >> Test-crypto-hash calls qcrypto_hash_bytesv/digest/base64 with >> errp=NULL, this will cause a NULL poniter deference if afalg_driver >> doesn't support requested algos: >> ret =

Re: [Qemu-devel] [PATCH v2 25/28] tpm-emulator: protect concurrent ctrl_chr access

2017-11-06 Thread Stefan Berger
On 11/06/2017 05:11 PM, Marc-André Lureau wrote: Hi - Original Message - On 11/06/2017 01:39 PM, Marc-André Lureau wrote: 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

Re: [Qemu-devel] [PATCH v2 00/28] TPM: code cleanup (not 2.11)

2017-11-06 Thread Stefan Berger
On 11/06/2017 01:38 PM, Marc-André Lureau wrote: Hi, Various code cleanups accumulated while doing reviews and implementing a CRB device (postponed for later), aiming at a tpm-next development branch for after qemu 2.11. I put all of these now into a tpm-next branch here.

[Qemu-devel] [PATCH 0/5] tpm: Match frontend and backend buffer sizes (not 2.11)

2017-11-06 Thread Stefan Berger
This patch series does away with the hard coded buffer size in the TIS frontend and instead retrieves the buffer size from the device that's being used. So it gets it from the host device or the external emulator. In case the frontend (CRB) cannot support the backend's current buffer size

[Qemu-devel] [PATCH 4/5] tpm: tpm_emulator: get and set buffer size of device

2017-11-06 Thread Stefan Berger
Convert the tpm_emulator backend to get the current buffer size of the external device and set it to the buffer size that the frontend (TIS) requests. Signed-off-by: Stefan Berger --- backends/tpm.c | 4 +-- hw/tpm/tpm_emulator.c| 79

[Qemu-devel] [PATCH 2/5] tpm: pull tpm_util_send() out of tpm_util_test()

2017-11-06 Thread Stefan Berger
Signed-off-by: Stefan Berger --- hw/tpm/tpm_util.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c index daf1faa..396e793 100644 --- a/hw/tpm/tpm_util.c +++

[Qemu-devel] [PATCH 3/5] tpm: tpm_passthrough: Read the buffer size from the host device

2017-11-06 Thread Stefan Berger
Rather than hard coding the buffer size in the tpm_passthrough backend read the TPM I/O buffer size from the host device. Signed-off-by: Stefan Berger --- hw/tpm/tpm_int.h | 9 hw/tpm/tpm_passthrough.c | 11 - hw/tpm/tpm_util.c| 116

[Qemu-devel] [PATCH 5/5] tpm: tpm_passthrough: Fail startup if FE buffer size < BE buffer size

2017-11-06 Thread Stefan Berger
If the requested buffer size of the frontend is smaller than the fixed buffer size of the host's TPM, fail the startup_tpm() interface function, which will make the device unusable. We fail it because the backend TPM could produce larger packets than what the frontend could pass to the OS. The

[Qemu-devel] [PATCH 1/5] tpm: Move getting TPM buffer size to backends

2017-11-06 Thread Stefan Berger
Rather than setting the size of the TPM buffer in the front-end, query the backend for the size of the buffer. In this patch we just move the hard-coded buffer size of 4096 to the backends. Signed-off-by: Stefan Berger --- backends/tpm.c | 9 +

Re: [Qemu-devel] [PATCH qemu] fdc: Exit if ISA controller does not support DMA

2017-11-06 Thread John Snow
On 10/26/2017 02:46 AM, Alexey Kardashevskiy wrote: > A "powernv" machine type defines an ISA bus but it does not add any DMA > controller to it so it is possible to hit assert(fdctrl->dma) by > adding "-machine powernv -device isa-fdc". > > This replaces assert() with an error message. > >

Re: [Qemu-devel] [Qemu-arm] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Philippe Mathieu-Daudé
On 11/06/2017 08:33 PM, Alistair Francis wrote: > On Mon, Nov 6, 2017 at 3:21 PM, Emilio G. Cota wrote: >> On Mon, Nov 06, 2017 at 14:32:35 -0800, Alistair Francis wrote: >>> Sorry for the silence here, I noticed these were broken just before I >>> went on holidays but didn't get

Re: [Qemu-devel] [PATCH qemu] isa-bus: Replace assert() about DMA with error report

2017-11-06 Thread John Snow
On 10/26/2017 04:00 AM, Alexey Kardashevskiy wrote: > Running "qemu-system-ppc64 -machine prep -device i82374" creates an ISA > bus with two i82374 DMA controllers - one is implicit from ppc_prep_init(), > the other one is from "-device i82374". QEMU asserts but it is not > immediately clear

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Alistair Francis
On Mon, Nov 6, 2017 at 12:13 PM, Emilio G. Cota wrote: > On Mon, Nov 06, 2017 at 12:10:22 -0200, Eduardo Habkost wrote: >> IMO, initialization state doesn't belong to CPUClass. We already >> have a single accelerator object in MachineState::accelerator, >> and tcg_initialized

Re: [Qemu-devel] [PATCH] linux-user: remove nmi.c and fw-path-provider.c

2017-11-06 Thread Alexey Kardashevskiy
On 06/11/17 21:15, Laurent Vivier wrote: > Le 06/11/2017 à 01:44, Alexey Kardashevskiy a écrit : >> On 04/11/17 06:38, Laurent Vivier wrote: >>> linux-user binaries don't need firmware and NMI, >>> so don't add them in this case, move QDEV >>> firmware functions to qdev-fw.c >> >> >> When

Re: [Qemu-devel] [PATCH v2 0/5] backup improvements part 1

2017-11-06 Thread John Snow
On 10/12/2017 09:53 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all. Here is a continuation of my "new backup architecture" series, > The very first part, but it is meaningful itself. > > v2: rebase on master > 01: add test and fix bug Nice, glad you caught it. Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 3/5] backup: init copy_bitmap from sync_bitmap for incremental

2017-11-06 Thread John Snow
On 10/12/2017 07:23 AM, Vladimir Sementsov-Ogievskiy wrote: > 10.10.2017 01:56, John Snow wrote: >> >> On 10/02/2017 10:39 AM, Vladimir Sementsov-Ogievskiy wrote: >>> We should not copy non-dirty clusters in write notifiers. So, >>> initialize copy_bitmap from sync_bitmap. >>> >> ...! Duh, good

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Alistair Francis
On Mon, Nov 6, 2017 at 3:21 PM, Emilio G. Cota wrote: > On Mon, Nov 06, 2017 at 14:32:35 -0800, Alistair Francis wrote: >> Sorry for the silence here, I noticed these were broken just before I >> went on holidays but didn't get a chance to fix anything. >> >> For the Xilinx case I

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Emilio G. Cota
On Mon, Nov 06, 2017 at 14:32:35 -0800, Alistair Francis wrote: > Sorry for the silence here, I noticed these were broken just before I > went on holidays but didn't get a chance to fix anything. > > For the Xilinx case I was thinking of patching the machine code to > sanely follow the -smp

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Alistair Francis
On Mon, Nov 6, 2017 at 1:54 PM, Emilio G. Cota wrote: > On Mon, Nov 06, 2017 at 12:10:22 -0200, Eduardo Habkost wrote: >> On Fri, Nov 03, 2017 at 06:24:07PM -0400, Emilio G. Cota wrote: >> > /** >> > * MachineClass: >> > * @max_cpus: maximum number of CPUs supported. Default:

[Qemu-devel] [PATCH v2] aarch64: advertise the GIC system register interface

2017-11-06 Thread Stefano Stabellini
When QEMU emulates a GICv3, it needs to advertise the presence of the system register interface, which is done via id_aa64pfr0. To do that, and at the same time to avoid advertising the presence of the system register interface when it is actually not available, set a boolean property in

Re: [Qemu-devel] [PATCH v3 04/42] MAINTAINERS: add an entry for the i82378 (superio)

2017-11-06 Thread Hervé Poussineau
Le 17/10/2017 à 18:43, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Hervé Poussineau --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0706b474e7..510505b2f3

Re: [Qemu-devel] [PATCH v2 25/28] tpm-emulator: protect concurrent ctrl_chr access

2017-11-06 Thread Marc-André Lureau
Hi - Original Message - > On 11/06/2017 01:39 PM, Marc-André Lureau wrote: > > 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. > >

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Emilio G. Cota
On Mon, Nov 06, 2017 at 12:10:22 -0200, Eduardo Habkost wrote: > On Fri, Nov 03, 2017 at 06:24:07PM -0400, Emilio G. Cota wrote: > > /** > > * MachineClass: > > * @max_cpus: maximum number of CPUs supported. Default: 1 > > + * @force_max_cpus: if set, force the global max_cpus to match

Re: [Qemu-devel] [PATCH v3 02/42] MAINTAINERS: add an entry for the i82374 (southbridge)

2017-11-06 Thread Hervé Poussineau
Le 17/10/2017 à 18:43, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6f56c1349b..331f7391c1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -713,6

Re: [Qemu-devel] RFC: connecting chardev to a command forked by qemu

2017-11-06 Thread Patrick Ohly
On Mon, 2017-11-06 at 17:26 +, Daniel P. Berrange wrote: > I can see the argument about it making QEMU easier to use, and those > who care about security aren't forced to use this new feature. It > none the less has a cost on maintainers and existance of these > features does reflect on QEMU's

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

2017-11-06 Thread 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 include/hw/pci/pci.h | 1 + qemu-options.hx

[Qemu-devel] [PATCH v2 0/2] Fix eepro100 simple transmission, add i82559 PCI ID

2017-11-06 Thread Mike Nawrocki
This patch set does two things. First, it fixes the simple transmission mode for the eepro100 chipset. Second, it adds the PCI device ID 0x1030 for the i82559a chipset. This ID is set as the "alternate" PCI device ID for that chipset, and may be selected via the new property "use-alt-device-id".

[Qemu-devel] [PATCH v2 1/2] Fix eepro100 simple transmission mode

2017-11-06 Thread Mike Nawrocki
The simple transmission mode was treating the area immediately after the transmit command block (TCB) as if it were a transmit buffer descriptor, when in reality it is simply the packet data. This change simply copies the data following the TCB into the packet buffer. Signed-off-by: Mike Nawrocki

Re: [Qemu-devel] [PATCH v2 28/28] tpm: remove tpm_register_model()

2017-11-06 Thread Stefan Berger
On 11/06/2017 01:39 PM, Marc-André Lureau wrote: Query object classes that implements TPMIf instead. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- include/sysemu/tpm_backend.h | 2 -- hw/tpm/tpm_tis.c

Re: [Qemu-devel] [PATCH v2 27/28] tpm-tis: use DEFINE_PROP_TPMBE

2017-11-06 Thread Stefan Berger
On 11/06/2017 01:39 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- hw/tpm/tpm_tis.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/tpm/tpm_tis.c

Re: [Qemu-devel] [PATCH v2 26/28] qdev: add DEFINE_PROP_TPMBE

2017-11-06 Thread Stefan Berger
On 11/06/2017 01:39 PM, Marc-André Lureau wrote: A property to lookup a tpm backend. Signed-off-by: Marc-André Lureau --- include/hw/qdev-properties.h | 3 ++ hw/core/qdev-properties-system.c | 64 2 files changed,

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE

2017-11-06 Thread Jeff Cody
On Fri, Nov 03, 2017 at 02:08:13PM +0300, Denis V. Lunev wrote: > On 11/03/2017 02:05 PM, Stefan Hajnoczi wrote: > > On Mon, Oct 30, 2017 at 02:10:27PM +0100, Jeff Cody wrote: > >> If we write or modify the image file while the QEMU run state is > >> INMIGRATE, then the BDRV_O_INACTIVE BDS flag is

Re: [Qemu-devel] [PATCH 2/2] Add i82559a eepro100 interface

2017-11-06 Thread Michael Nawrocki
On 11/01/2017 11:32 AM, Michael S. Tsirkin wrote: On Wed, Nov 01, 2017 at 02:48:17PM +, Nawrocki, Michael wrote: On 10/31/17, 13:50, "Dr. David Alan Gilbert" wrote: * Mike Nawrocki (michael.nawro...@gtri.gatech.edu) wrote: > Signed-off-by: Mike Nawrocki

Re: [Qemu-devel] [PATCH v2] linux-user: fix is_proc_myself to check the paths via realpath

2017-11-06 Thread Zach Riggle
Ping! What needs to be done to move this forward? My current implementation is compatible with musl. On Thu, Nov 2, 2017 at 12:36 PM Peter Maydell wrote: > On 28 October 2017 at 06:14, Eric Blake wrote: > > By definition, in linux-user, we ARE using

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

2017-11-06 Thread Alberto Garcia
On Mon 06 Nov 2017 05:55:00 PM CET, Kevin Wolf wrote: > error_setg_errno() takes a positive errno code. > > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-06 Thread Emilio G. Cota
On Mon, Nov 06, 2017 at 12:10:22 -0200, Eduardo Habkost wrote: > IMO, initialization state doesn't belong to CPUClass. We already > have a single accelerator object in MachineState::accelerator, > and tcg_initialized could be moved to a AccelState::initialized > field. I don't know how to

Re: [Qemu-devel] [PATCH v2] linux-user: return EINVAL from prctl(PR_*_SECCOMP)

2017-11-06 Thread Riku Voipio
On Mon, Nov 06, 2017 at 06:03:51PM +, James Cowgill wrote: > If an application tries to install a seccomp filter using > prctl(PR_SET_SECCOMP), the filter is likely for the target instead of the host > architecture. This will probably cause qemu to be immediately killed when it > executes

[Qemu-devel] [PULL 0/2] 9pfs fixes for 2.11 20171106

2017-11-06 Thread Greg Kurz
The following changes since commit 299d1ea9bb56bd9f45f905125489bdd7d543a1aa: Merge remote-tracking branch 'remotes/yongbok/tags/mips-20171106' into staging (2017-11-06 16:13:10 +) are available in the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for you

[Qemu-devel] [PULL 1/2] 9pfs: drop one user of struct V9fsFidState

2017-11-06 Thread Greg Kurz
To comply with QEMU coding style. Signed-off-by: Greg Kurz --- hw/9pfs/9p.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index d1cfeaf10e4f..cdfc4f4ce787 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -117,7 +117,7 @@

[Qemu-devel] [PULL 2/2] 9pfs: fix v9fs_mark_fids_unreclaim() return value

2017-11-06 Thread Greg Kurz
The return value of v9fs_mark_fids_unreclaim() is then propagated to pdu_complete(). It should be a negative errno, not -1. Signed-off-by: Greg Kurz Reviewed-by: Eric Blake --- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH 2/4] linux-user: fix 'finshed' typo in comment

2017-11-06 Thread Riku Voipio
Applied to linux-user, thanks Riku On Wed, Oct 18, 2017 at 06:01:41PM -0400, Emilio G. Cota wrote: > Signed-off-by: Emilio G. Cota > --- > linux-user/syscall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c

[Qemu-devel] [Bug 1727737] Re: qemu-arm stalls on a GCC sanitizer test since qemu-2.7

2017-11-06 Thread Peter Maydell
Thanks. With that extra library, if I run with QEMU_STRACE=1 the following looks very suspicious: 28865 getpid() = 28865 28865 mmap2(NULL,2101248,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x43234000 28865 mprotect(0x43234000,4096,PROT_NONE) = 0 28865

Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64

2017-11-06 Thread James Clarke
On 6 Nov 2017, at 19:57, Riku Voipio wrote: > > On Wed, Oct 04, 2017 at 10:38:50AM +0200, John Paul Adrian Glaubitz wrote: >> Hi! >> >> Any chance that this patch gets merged soon? >> >> Looks like it has been reviewed by at least Richard and Philippe. > > Sorry, slipped

Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64

2017-11-06 Thread Riku Voipio
On Wed, Oct 04, 2017 at 10:38:50AM +0200, John Paul Adrian Glaubitz wrote: > Hi! > > Any chance that this patch gets merged soon? > > Looks like it has been reviewed by at least Richard and Philippe. Sorry, slipped under radar. Applied to linux-user. > Adrian > > On 09/15/2017 09:33 PM,

Re: [Qemu-devel] [PATCH] .gitignore: remove vscclient

2017-11-06 Thread Eric Blake
On 11/06/2017 01:30 PM, Marc-André Lureau wrote: > > > - Original Message - >> On 11/06/2017 12:54 PM, Marc-André Lureau wrote: >>> It was removed with libcacard. >> >> which was back in which commit? I'm trying to get an idea of how long >> this entry has been stale. > > Since: > >

  1   2   3   4   >