Re: [PATCH v2 03/21] iotests: Add _filter_json_filename

2019-11-07 Thread Maxim Levitsky
On Thu, 2019-11-07 at 09:59 +0100, Max Reitz wrote: > On 06.11.19 16:44, Maxim Levitsky wrote: > > On Tue, 2019-10-15 at 16:27 +0200, Max Reitz wrote: > > > Signed-off-by: Max Reitz > > > --- > > > tests/qemu-iotests/common.filter | 24 > > > 1 file changed, 24

privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
Hi, related TianoCore BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 (I'm starting this thread separately because at least some of the topics are specific to QEMU, and I didn't want to litter the BZ with a discussion that may not be interesting to all participants CC'd on the BZ. I

Re: [virtio-dev] Re: guest / host buffer sharing ...

2019-11-07 Thread Gerd Hoffmann
On Thu, Nov 07, 2019 at 11:16:18AM +, Dr. David Alan Gilbert wrote: > * Gerd Hoffmann (kra...@redhat.com) wrote: > > Hi, > > > > > > This is not about host memory, buffers are in guest ram, everything else > > > > would make sharing those buffers between drivers inside the guest (as > > > >

Deprecating stuff for 4.2 (was: [Qemu-devel] Exposing feature deprecation to machine clients)

2019-11-07 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 07.11.2019 21:52, Philippe Mathieu-Daudé wrote: [...] >> Pre-release period, time to deprecate some stuffs :) >> >> How should we proceed? Do you have something in mind? >> >> There are older threads about this. Should we start a new thread? Gather the

Re: [PATCH v1 2/4] virtio: make seg_max virtqueue size dependent

2019-11-07 Thread Denis Plotnikov
The 1st patch from the series seems to be useless. The patch extending queue length by adding machine type may break vm-s which use seabios with max queue size = 128. Looks like only this patch doesn't break anything and helps to express queue size and seg max dependency (the specification

Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall

2019-11-07 Thread Guoheyi
On 2019/11/7 16:57, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 09:44:36AM +0800, Guoheyi wrote: On 2019/11/7 1:55, Cornelia Huck wrote: On Tue, 5 Nov 2019 17:10:53 +0800 Heyi Guo wrote: To keep backward compatibility, we add new KVM capability "KVM_CAP_FORWARD_HYPERCALL" to probe

Re: [RFC PATCH 00/18] Add qemu-storage-daemon

2019-11-07 Thread Kevin Wolf
Am 07.11.2019 um 11:33 hat Daniel P. Berrangé geschrieben: > On Thu, Oct 17, 2019 at 03:01:46PM +0200, Kevin Wolf wrote: > > 2. I'm not completely sure if the command line syntax is the final > >version that we want to support long-term. Many options directly use > >QAPI visitors

[Patch v2 6/6] migration/postcopy: enable compress during postcopy

2019-11-07 Thread Wei Yang
postcopy requires to place a whole host page, while migration thread migrate memory in target page size. This makes postcopy need to collect all target pages in one host page before placing via userfaultfd. To enable compress during postcopy, there are two problems to solve: 1. Random order

[Patch v2 5/6] migration/postcopy: enable random order target page arrival

2019-11-07 Thread Wei Yang
After using number of target page received to track one host page, we could have the capability to handle random order target page arrival in one host page. This is a preparation for enabling compress during postcopy. Signed-off-by: Wei Yang --- v2: * use uintptr_t to calculate place_dest

[Patch v2 2/6] migration/postcopy: wait for decompress thread in precopy

2019-11-07 Thread Wei Yang
Compress is not supported with postcopy, it is safe to wait for decompress thread just in precopy. This is a preparation for later patch. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH v4 15/20] fuzz: add fuzzer skeleton

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:50:00PM +, Oleinik, Alexander wrote: > diff --git a/tests/fuzz/fuzz.c b/tests/fuzz/fuzz.c > new file mode 100644 > index 00..0e38f81c48 > --- /dev/null > +++ b/tests/fuzz/fuzz.c > @@ -0,0 +1,177 @@ > +/* > + * fuzzing driver > + * > + * Copyright Red Hat

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 13:50, Paolo Bonzini wrote: > On 07/11/19 12:55, Daniel P. Berrangé wrote: >>> Yes, I would make SMM use a cryptographic pseudo-random number generator >>> and seed it from virtio-rng from DXE, way before the OS starts and can >>> "attack" it. >>> >>> Once you've gotten a seed, you

Re: [PATCH v4 20/20] fuzz: add documentation to docs/devel/

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:50:04PM +, Oleinik, Alexander wrote: > +== Building the fuzzers == > + > +NOTE: If possible, build a 32-bit binary. When forking, the 32-bit fuzzer is > +much faster, since the page-map has a smaller size. This is due to the fact > that > +AddressSanitizer mmaps

Re: [PATCH v4 00/20] Add virtual device fuzzing support

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:49:47PM +, Oleinik, Alexander wrote: > This series adds a framework for coverage-guided fuzzing of > virtual-devices. Fuzzing targets are based on qtest and can make use of > the libqos abstractions. > > V4: > * add/transfer license headers to new files > *

Re: [PATCH v4 09/20] libqos: split qos-test and libqos makefile vars

2019-11-07 Thread Darren Kenny
On Wed, Oct 30, 2019 at 02:49:55PM +, Oleinik, Alexander wrote: From: Alexander Oleinik Most qos-related objects were specified in the qos-test-obj-y variable. qos-test-obj-y also included qos-test.o which defines a main(). This made it difficult to repurpose qos-test-obj-y to link

[PATCH 2/4] Add use of RCU for qemu_logfile.

2019-11-07 Thread Robert Foley
This now allows changing the logfile while logging is active, and also solves the issue of a seg fault while changing the logfile. Any read access to the qemu_logfile handle will use the rcu_read_lock()/unlock() around the use of the handle. To fetch the handle we will use atomic_rcu_read(). We

[PATCH 3/4] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-07 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley --- include/qemu/log.h| 14 +++---

[PULL 2/3] qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK

2019-11-07 Thread Max Reitz
Masks for L2 table entries should have 64 bit. Fixes: b6c246942b14d3e0dec46a6c5868ed84e7dbea19 Buglink: https://bugs.launchpad.net/qemu/+bug/185 Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Message-id: 20191028161841.1198-2-mre...@redhat.com Reviewed-by: Alberto Garcia Signed-off-by:

Re: [PATCH v4 19/20] fuzz: add virtio-net fuzz target

2019-11-07 Thread Stefan Hajnoczi
On Thu, Nov 7, 2019 at 2:44 PM Jason Wang wrote: > On 2019/10/30 下午10:50, Oleinik, Alexander wrote: > > From: Alexander Oleinik > > > > The virtio-net fuzz target feeds inputs to all three virtio-net > > virtqueues, and uses forking to avoid leaking state between fuzz runs. > > > >

Re: [PATCH v14 03/11] tests: Add test for QAPI builtin type time

2019-11-07 Thread Tao Xu
On 11/7/2019 9:31 PM, Eduardo Habkost wrote: On Thu, Nov 07, 2019 at 02:24:52PM +0800, Tao Xu wrote: On 11/7/2019 4:53 AM, Eduardo Habkost wrote: On Mon, Oct 28, 2019 at 03:52:12PM +0800, Tao Xu wrote: Add tests for time input such as zero, around limit of precision, signed upper limit,

Re: [PATCH v1 4/4] iotests: add test for virtio-scsi and virtio-blk machine type settings

2019-11-07 Thread Denis Plotnikov
On 07.11.2019 19:30, Cleber Rosa wrote: > On Wed, Nov 06, 2019 at 04:26:41PM -0300, Eduardo Habkost wrote: >> On Wed, Nov 06, 2019 at 11:04:16AM +0100, Max Reitz wrote: >>> On 06.11.19 10:24, Stefan Hajnoczi wrote: On Tue, Nov 05, 2019 at 07:11:05PM +0300, Denis Plotnikov wrote: > It

Re: guest / host buffer sharing ...

2019-11-07 Thread Gerd Hoffmann
Hi, > > Adding a list of common properties to the spec certainly makes sense, > > so everybody uses the same names. Adding struct-ed properties for > > common use cases might be useful too. > > Why not define VIRTIO devices for wayland and friends? There is an out-of-tree implementation of

Re: guest / host buffer sharing ...

2019-11-07 Thread Stefan Hajnoczi
On Fri, Nov 8, 2019 at 8:22 AM Gerd Hoffmann wrote: > > > Adding a list of common properties to the spec certainly makes sense, > > > so everybody uses the same names. Adding struct-ed properties for > > > common use cases might be useful too. > > > > Why not define VIRTIO devices for wayland

Re: [virtio-dev] Re: guest / host buffer sharing ...

2019-11-07 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > Hi, > > > > This is not about host memory, buffers are in guest ram, everything else > > > would make sharing those buffers between drivers inside the guest (as > > > dma-buf) quite difficult. > > > > Given it's just guest memory, can the guest just

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 12:55, Daniel P. Berrangé wrote: >> Yes, I would make SMM use a cryptographic pseudo-random number generator >> and seed it from virtio-rng from DXE, way before the OS starts and can >> "attack" it. >> >> Once you've gotten a seed, you can create a CSPRNG with a stream cipher >>

Re: [PATCH v4 16/20] fuzz: add support for fork-based fuzzing.

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:50:01PM +, Oleinik, Alexander wrote: > diff --git a/tests/fuzz/fork_fuzz.c b/tests/fuzz/fork_fuzz.c > new file mode 100644 > index 00..4c4d00b034 > --- /dev/null > +++ b/tests/fuzz/fork_fuzz.c > @@ -0,0 +1,51 @@ > +/* > + * Fork-based fuzzing helpers > + * >

Re: The problems about COLO

2019-11-07 Thread Lukas Straub
On Thu, 7 Nov 2019 16:14:43 +0800 Daniel Cho wrote: > Hi Lukas, > Thanks for your reply. > > However, we test the question 1 with steps below the error message, we > notice the secondary VM's image > will break while it reboots. > Here is the error message. >

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 14:27, Laszlo Ersek wrote: > The VirtioRngDxe driver is a UEFI driver that follows the UEFI driver > model. Meaning (in this context), it is connected to the virtio-rng > device in the BDS phase, by platform BDS code. > > Put differently, the non-privileged driver that's the source of

Re: [RFC v4 PATCH 49/49] multi-process: add configure and usage information

2019-11-07 Thread Michael S. Tsirkin
On Thu, Nov 07, 2019 at 03:02:20PM +0100, Stefan Hajnoczi wrote: > This documentation suggests that QEMU spawns the remote processes. How > do this work with unprivileged QEMU? Is there an additional step where > QEMU drops privileges after having spawned remote processes? > > Remote processes

Re: [RFC v4 PATCH 49/49] multi-process: add configure and usage information

2019-11-07 Thread Daniel P . Berrangé
On Thu, Nov 07, 2019 at 03:02:20PM +0100, Stefan Hajnoczi wrote: > On Thu, Oct 24, 2019 at 05:09:30AM -0400, Jagannathan Raman wrote: > > From: Elena Ufimtseva > > > > Signed-off-by: Elena Ufimtseva > > Signed-off-by: Jagannathan Raman > > Signed-off-by: John G Johnson > > --- > >

Re: [RFC v4 PATCH 48/49] multi-process: add the concept description to docs/devel/qemu-multiprocess

2019-11-07 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:09:29AM -0400, Jagannathan Raman wrote: > diff --git a/docs/devel/qemu-multiprocess.rst > b/docs/devel/qemu-multiprocess.rst > new file mode 100644 > index 000..2c42c6e > --- /dev/null > +++ b/docs/devel/qemu-multiprocess.rst > @@ -0,0 +1,1102 @@ > +Disaggregating

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 11:25, Ard Biesheuvel wrote: > On Thu, 7 Nov 2019 at 11:11, Laszlo Ersek wrote: >> (1) For UEFI HTTPS boot, TLS would likely benefit from good quality >> entropy. If the VM config includes virtio-rng (hence the guest firmware >> has EFI_RNG_PROTOCOL), then it should be used as a part

Re: [PATCH 1/2] migration/compress: compress QEMUFile is not writable

2019-11-07 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > We open a file with empty_ops for compress QEMUFile, which means this is > not writable. That explanation sounds reasonable; but I'm confused by the history of this; the code was added by Liang Li in : b3be289 qemu-file: Fix

Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall

2019-11-07 Thread Cornelia Huck
On Thu, 7 Nov 2019 19:57:22 +0800 Guoheyi wrote: > On 2019/11/7 16:57, Michael S. Tsirkin wrote: > > On Thu, Nov 07, 2019 at 09:44:36AM +0800, Guoheyi wrote: > >> > >> On 2019/11/7 1:55, Cornelia Huck wrote: > >>> On Tue, 5 Nov 2019 17:10:53 +0800 > >>> Heyi Guo wrote: > >>> > To

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 12:37, Paolo Bonzini wrote: > On 07/11/19 11:25, Ard Biesheuvel wrote: >>> This looks problematic on QEMU. Entropy is a valuable resource, and >>> whatever resource SMM drivers depend on, should not be possible for e.g. >>> a 3rd party UEFI driver (or even for the runtime OS) to

Re: [PATCH v4 14/20] fuzz: Add target/fuzz makefile rules

2019-11-07 Thread Darren Kenny
On Wed, Oct 30, 2019 at 02:50:00PM +, Oleinik, Alexander wrote: From: Alexander Oleinik Signed-off-by: Alexander Oleinik --- Makefile| 15 ++- Makefile.objs | 4 +++- Makefile.target | 18 +-

Re: [RFC v2 13/22] intel_iommu: add PASID cache management infrastructure

2019-11-07 Thread Peter Xu
On Wed, Nov 06, 2019 at 07:56:21AM +, Liu, Yi L wrote: > > > +static inline struct pasid_key *vtd_get_pasid_key(uint32_t pasid, > > > + uint16_t sid) > > > +{ > > > +struct pasid_key *key = g_malloc0(sizeof(*key)); > > > > I think you can

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 11:25, Ard Biesheuvel wrote: >> This looks problematic on QEMU. Entropy is a valuable resource, and >> whatever resource SMM drivers depend on, should not be possible for e.g. >> a 3rd party UEFI driver (or even for the runtime OS) to exhaust. >> Therefore, it's not *only* the case

Re: [PATCH 0/6] migration/postcopy: enable compress during postcopy

2019-11-07 Thread Wei Yang
On Thu, Nov 07, 2019 at 09:15:44AM +, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> On Wed, Nov 06, 2019 at 08:11:44PM +, Dr. David Alan Gilbert wrote: >> >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> >> This patch set tries enable compress

Re: [PATCH v14 03/11] tests: Add test for QAPI builtin type time

2019-11-07 Thread Eduardo Habkost
On Thu, Nov 07, 2019 at 02:24:52PM +0800, Tao Xu wrote: > On 11/7/2019 4:53 AM, Eduardo Habkost wrote: > > On Mon, Oct 28, 2019 at 03:52:12PM +0800, Tao Xu wrote: > > > Add tests for time input such as zero, around limit of precision, > > > signed upper limit, actual upper limit, beyond limits,

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Daniel P . Berrangé
On Thu, Nov 07, 2019 at 02:44:11PM +0100, Laszlo Ersek wrote: > On 11/07/19 13:47, Paolo Bonzini wrote: > > On 07/11/19 12:52, Daniel P. Berrangé wrote: > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 > >> > >> Is it

Re: Looking for issues/features for my first contribution

2019-11-07 Thread Stefan Hajnoczi
On Wed, Nov 06, 2019 at 05:50:44PM -0600, Rajath Shashidhara wrote: > Hi all, > > I am a Computer Science graduate student at The University of Texas at > Austin (UT, Austin). I am looking forward to contributing to qemu ! > > This semester, I am taking a class in Virtualization >

Re: [PATCH v1 2/3] target/microblaze: Plug temp leaks with delay slot setup

2019-11-07 Thread Richard Henderson
On 11/6/19 3:14 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Plug temp leaks with delay slot setup. > > Signed-off-by: Edgar E. Iglesias > --- > target/microblaze/translate.c | 26 ++ > 1 file changed, 14 insertions(+), 12 deletions(-) Reviewed-by:

Re: [RFC PATCH v2 12/26] qcow2: Handle QCOW2_CLUSTER_UNALLOCATED_SUBCLUSTER

2019-11-07 Thread Alberto Garcia
On Mon 04 Nov 2019 02:10:37 PM CET, Max Reitz wrote: [QCOW2_CLUSTER_UNALLOCATED_SUBCLUSTER] > I still don’t know what you’re doing in the later patches, but to me > it looks a bit like you don’t dare breaking up the existing structure > that just deals with clusters. Yeah, I decided to extend

Re: [PULL 0/3] virtio, pci: fixes

2019-11-07 Thread Peter Maydell
On Wed, 6 Nov 2019 at 12:35, Michael S. Tsirkin wrote: > > The following changes since commit 36609b4fa36f0ac934874371874416f7533a5408: > > Merge remote-tracking branch > 'remotes/palmer/tags/palmer-for-master-4.2-sf1' into staging (2019-11-02 > 17:59:03 +) > > are available in the Git

Re: [PATCH v2 20/21] iotests: Disable data_file where it cannot be used

2019-11-07 Thread Maxim Levitsky
On Thu, 2019-11-07 at 12:36 +0100, Max Reitz wrote: > On 06.11.19 16:52, Maxim Levitsky wrote: > > On Tue, 2019-10-15 at 16:27 +0200, Max Reitz wrote: > > > Signed-off-by: Max Reitz > > > --- > > > tests/qemu-iotests/007 | 5 +++-- > > > tests/qemu-iotests/014 | 2 ++ > > >

Re: [RFC v4 PATCH 49/49] multi-process: add configure and usage information

2019-11-07 Thread Jag Raman
On 11/7/2019 9:39 AM, Daniel P. Berrangé wrote: On Thu, Nov 07, 2019 at 03:02:20PM +0100, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:30AM -0400, Jagannathan Raman wrote: From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 12:52, Daniel P. Berrangé wrote: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 > > Is it practical to provide a jitter entropy source for EDK2 > too ? The hard part is not collecting jitter (though the

Re: [PATCH v4 19/20] fuzz: add virtio-net fuzz target

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:50:03PM +, Oleinik, Alexander wrote: > +static void virtio_net_fuzz_multi(QTestState *s, > +const unsigned char *Data, size_t Size) > +{ > +typedef struct vq_action { > +uint8_t queue; > +uint8_t length; > +uint8_t write; > +

Re: [RFC v4 PATCH 49/49] multi-process: add configure and usage information

2019-11-07 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:09:30AM -0400, Jagannathan Raman wrote: > From: Elena Ufimtseva > > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannathan Raman > Signed-off-by: John G Johnson > --- > docs/qemu-multiprocess.txt | 86 > ++ > 1 file

[PATCH 1/4] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-07 Thread Robert Foley
This is being added in preparation for using RCU with the logfile handle. Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- util/log.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/util/log.c b/util/log.c index

Re: [Patch v2 5/6] migration/postcopy: enable random order target page arrival

2019-11-07 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > After using number of target page received to track one host page, we > could have the capability to handle random order target page arrival in > one host page. > > This is a preparation for enabling compress during postcopy. > > Signed-off-by:

Re: [PATCH 0/4] Make the qemu_logfile handle thread safe.

2019-11-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191107142613.2379-1-robert.fo...@linaro.org/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: [PATCH 2/2] Acceptance test: update kernel for m68k/q800 test

2019-11-07 Thread Wainer dos Santos Moschetta
On 10/31/19 3:08 AM, Alex Bennée wrote: Cleber Rosa writes: There's an updated version of the Debian package containing the m68k Kernel. Now, if the package gets updated again, the test won't fail, but will be canceled. A more permanent solution is certainly needed. At least for open

Re: QEMU HTML documentation now on qemu.org

2019-11-07 Thread Stefan Hajnoczi
On Thu, Nov 7, 2019 at 11:07 AM Daniel P. Berrangé wrote: > > On Wed, Nov 06, 2019 at 05:19:28PM +0100, Stefan Hajnoczi wrote: > > Hi, > > You can now access the latest QEMU HTML documentation built from > > qemu.git/master nightly at: > > > > https://wiki.qemu.org/docs/qemu-doc.html > >

Re: [qemu-web PATCH] Add device fuzzing blog post

2019-11-07 Thread Stefan Hajnoczi
On Thu, Nov 7, 2019 at 10:43 AM Thomas Huth wrote: > > - Original Message - > > From: "Stefan Hajnoczi" > > Sent: Thursday, November 7, 2019 10:11:36 AM > > > > This blog post covers the device fuzzing GSoC project that Alexander > > Olenik did in 2019. > [...] > > +This article was

Re: Looking for issues/features for my first contribution

2019-11-07 Thread Alex Bennée
Rajath Shashidhara writes: > Hi all, > > I am a Computer Science graduate student at The University of Texas at > Austin (UT, Austin). I am looking forward to contributing to qemu ! > > This semester, I am taking a class in Virtualization > (https://github.com/vijay03/cs378-f19) and

Re: [PATCH v2 20/21] iotests: Disable data_file where it cannot be used

2019-11-07 Thread Max Reitz
On 06.11.19 16:52, Maxim Levitsky wrote: > On Tue, 2019-10-15 at 16:27 +0200, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/007 | 5 +++-- >> tests/qemu-iotests/014 | 2 ++ >> tests/qemu-iotests/015 | 5 +++-- >> tests/qemu-iotests/026 | 5 - >>

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Dr. David Alan Gilbert
* Laszlo Ersek (ler...@redhat.com) wrote: > On 11/07/19 11:18, Dr. David Alan Gilbert wrote: > > * Laszlo Ersek (ler...@redhat.com) wrote: > >> Hi, > >> > >> related TianoCore BZ: > >> > >> https://bugzilla.tianocore.org/show_bug.cgi?id=1871 > >> > >> (I'm starting this thread separately because

Re: [PULL 0/1] Seabios 20191106 patches

2019-11-07 Thread Peter Maydell
On Wed, 6 Nov 2019 at 12:26, Gerd Hoffmann wrote: > > The following changes since commit 36609b4fa36f0ac934874371874416f7533a5408: > > Merge remote-tracking branch > 'remotes/palmer/tags/palmer-for-master-4.2-sf1' into staging (2019-11-02 > 17:59:03 +) > > are available in the Git

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Daniel P . Berrangé
On Thu, Nov 07, 2019 at 12:37:11PM +0100, Paolo Bonzini wrote: > On 07/11/19 11:25, Ard Biesheuvel wrote: > >> This looks problematic on QEMU. Entropy is a valuable resource, and > >> whatever resource SMM drivers depend on, should not be possible for e.g. > >> a 3rd party UEFI driver (or even for

[Patch v2 1/6] migration/postcopy: reduce memset when it is zero page and matches_target_page_size

2019-11-07 Thread Wei Yang
In this case, page_buffer content would not be used. Skip this to save some time. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index

[Patch v2 0/6] migration/postcopy: enable compress during postcopy

2019-11-07 Thread Wei Yang
This patch set tries enable compress during postcopy. postcopy requires to place a whole host page, while migration thread migrate memory in target page size. This makes postcopy need to collect all target pages in one host page before placing via userfaultfd. To enable compress during postcopy,

[Patch v2 3/6] migration/postcopy: count target page number to decide the place_needed

2019-11-07 Thread Wei Yang
In postcopy, it requires to place whole host page instead of target page. Currently, it relies on the page offset to decide whether this is the last target page. We also can count the target page number during the iteration. When the number of target page equals (host page size / target page

[Patch v2 4/6] migration/postcopy: set all_zero to true on the first target page

2019-11-07 Thread Wei Yang
For the first target page, all_zero is set to true for this round check. After target_pages introduced, we could leverage this variable instead of checking the address offset. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 2 +- 1 file changed, 1

[PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley --- tests/test-logging.c | 74

[PATCH 0/4] Make the qemu_logfile handle thread safe.

2019-11-07 Thread Robert Foley
This patch adds thread safety to the qemu_logfile handle. This now allows changing the logfile while logging is active, and also solves the issue of a seg fault while changing the logfile. This patch adds use of RCU for handling the swap out of the old qemu_logfile file descriptor. Robert

[Bug 1848556] Re: qemu-img check failing on remote image in Eoan

2019-11-07 Thread Christian Ehrhardt 
Focal is complete the MPs reviewed, SRU Teamplates ready and pre-tests done. Uploading to E-unapproved for the SRU Teams consideration. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1848556 Title:

Re: [virtio-dev] Re: guest / host buffer sharing ...

2019-11-07 Thread Gerd Hoffmann
Hi, > > This is not about host memory, buffers are in guest ram, everything else > > would make sharing those buffers between drivers inside the guest (as > > dma-buf) quite difficult. > > Given it's just guest memory, can the guest just have a virt queue on > which it places pointers to the

Re: [PATCH 2/2] migration/compress: disable compress if failed to setup

2019-11-07 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > In current logic, if compress_threads_save_setup() returns -1 the whole > migration would fail, while we could handle it gracefully by disable > compress. I think it's fine for migration to fail here; the user askd for compression - if it

Re: guest / host buffer sharing ...

2019-11-07 Thread Stefan Hajnoczi
On Wed, Nov 6, 2019 at 1:50 PM Gerd Hoffmann wrote: > > In the graphics buffer sharing use case, how does the other side > > determine how to interpret this data? > > The idea is to have free form properties (name=value, with value being > a string) for that kind of metadata. > > > Shouldn't

Re: [RFC 3/3] tests/vhost-user-fs-test: add vhost-user-fs test case

2019-11-07 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Tue, Oct 29, 2019 at 12:36:05AM +, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > +static void after_test(void *arg G_GNUC_UNUSED) > > > +{ > > > +unlink(socket_path); > > > + > > > +

Re: [PATCH v4 18/20] fuzz: add i440fx fuzz targets

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:50:03PM +, Oleinik, Alexander wrote: > +static void i440fx_fuzz_qos_fork(QTestState *s, > +const unsigned char *Data, size_t Size) { > +if (fork() == 0) { > +i440fx_fuzz_qos(s, Data, Size); > +_Exit(0); > +} else { > +

Re: [PATCH v4 19/20] fuzz: add virtio-net fuzz target

2019-11-07 Thread Jason Wang
On 2019/10/30 下午10:50, Oleinik, Alexander wrote: From: Alexander Oleinik The virtio-net fuzz target feeds inputs to all three virtio-net virtqueues, and uses forking to avoid leaking state between fuzz runs. Signed-off-by: Alexander Oleinik Can this fuzz vhost-net or vhost-user (I only

Re: [PATCH v2 2/4] Memory: Enable writeback for given memory region

2019-11-07 Thread Beata Michalska
On Wed, 6 Nov 2019 at 12:20, Richard Henderson wrote: > > On 11/6/19 12:40 AM, Beata Michalska wrote: > > +void qemu_ram_writeback(RAMBlock *block, ram_addr_t start, ram_addr_t > > length) > > +{ > > +void *addr = ramblock_ptr(block, start); > > + > > +/* > > + * The requested range

[PULL 3/3] iotests: Add test for 4G+ compressed qcow2 write

2019-11-07 Thread Max Reitz
Test what qemu-img check says about an image after one has written compressed data to an offset above 4 GB. Signed-off-by: Max Reitz Message-id: 20191028161841.1198-3-mre...@redhat.com Reviewed-by: Alberto Garcia Signed-off-by: Max Reitz --- tests/qemu-iotests/272 | 79

Re: [PATCH 0/2] Acceptance test: update kernel used on m68k/q800 test

2019-11-07 Thread Eric Blake
On 10/29/19 6:23 PM, Cleber Rosa wrote: The boot_linux_console.py:BootLinuxConsole.test_m68k_q800 was very recently merged, but between its last review and now, the Kernel package used went missing. meta-question: Why was this series posted in-reply-to the pull request, rather than as a new

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 11:18, Dr. David Alan Gilbert wrote: > * Laszlo Ersek (ler...@redhat.com) wrote: >> Hi, >> >> related TianoCore BZ: >> >> https://bugzilla.tianocore.org/show_bug.cgi?id=1871 >> >> (I'm starting this thread separately because at least some of the topics >> are specific to QEMU, and I

Re: [PATCH 1/2] migration/compress: compress QEMUFile is not writable

2019-11-07 Thread Wei Yang
On Thu, Nov 07, 2019 at 11:59:10AM +, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> We open a file with empty_ops for compress QEMUFile, which means this is >> not writable. > >That explanation sounds reasonable; but I'm confused by the history of >this;

Re: [PATCH v8 1/3] docs: improve qcow2 spec about extending image header

2019-11-07 Thread Vladimir Sementsov-Ogievskiy
06.11.2019 22:19, Eric Blake wrote: > On 10/18/19 9:36 AM, Vladimir Sementsov-Ogievskiy wrote: > >>> Maybe: >>> >>> if software doesn't know how to interpret the field, it may be safely >>> ignored unless a corresponding incompatible feature flag bit is set; >>> however, the field should be

Re: [PATCH v4 17/20] fuzz: add support for qos-assisted fuzz targets

2019-11-07 Thread Stefan Hajnoczi
On Wed, Oct 30, 2019 at 02:50:02PM +, Oleinik, Alexander wrote: > +static char *qos_build_main_args() Please use func(void) in C. In C () functions have unspecified and unchecked arguments whereas in C++ () means (void). We want the compiler to complain if arguments are passed to this

Re: [RFC PATCH 06/18] qemu-storage-daemon: Add --nbd-server option

2019-11-07 Thread Eric Blake
On 11/7/19 2:33 AM, Kevin Wolf wrote: As a replacement nbd-server-add, I envisioned adding something like a block-export-add, which would work the way that --export already does. It would also come with query-block-exports and block-export-del, and it wouldn't contain only NBD devices, but

[Bug 1851547] Re: qemu 4 crashes with this parameter attached -usb -device usb-host, hostbus=1, hostaddr=7 \

2019-11-07 Thread Marietto
001:008 Compx 2.4G Receiver. Problem arise because I've detached one of my USB disk and the numbering of the USB devices attached changed. specially the compx 2.4g receiver changed from hostaddr 7 to 8 and when this happens qemu 4 seems to work not as good as qemu 3. -- You received this bug

How to clone CPUState in a new thread?

2019-11-07 Thread Michael Goffioul
[originally posted on qemu-discuss] === (initial) Hi, I'm working on a project that wants to replace houdini (ARM-to-x86 translation layer for Android from Intel) with a free open-source implementation. I'm trying to leverage qemu user-mode to achieve that, but it requires code changes to allow

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Ard Biesheuvel
On Thu, 7 Nov 2019 at 14:44, Laszlo Ersek wrote: > > On 11/07/19 13:47, Paolo Bonzini wrote: > > On 07/11/19 12:52, Daniel P. Berrangé wrote: > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 > >> > >> Is it practical

Re: [PATCH v1 3/3] target/microblaze: Plug temp leak around eval_cond_jmp()

2019-11-07 Thread Richard Henderson
On 11/6/19 3:14 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Plug temp leak around eval_cond_jmp(). > > Signed-off-by: Edgar E. Iglesias > --- > target/microblaze/translate.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

[PULL 1/3] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-11-07 Thread Max Reitz
From: Tuguoyi There are two issues in In check_constraints_on_bitmap(), 1) The sanity check on the granularity will cause uint64_t integer left-shift overflow when cluster_size is 2M and the granularity is BIGGER than 32K. 2) The way to calculate image size that the maximum bitmap supported can

[PULL 0/3] Block patches for 4.2.0-rc0/4.1.1

2019-11-07 Thread Max Reitz
The following changes since commit d0f90e1423b4f412adc620eee93e8bfef8af4117: Merge remote-tracking branch 'remotes/kraxel/tags/audio-20191106-pull-request' into staging (2019-11-07 09:21:52 +) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [PATCH v4 08/20] tests: provide test variables to other targets

2019-11-07 Thread Darren Kenny
On Wed, Oct 30, 2019 at 02:49:54PM +, Oleinik, Alexander wrote: From: Alexander Oleinik Before, when tests/Makefile.include was included, the contents would be ignored if config-host.mak was defined. Moving the ifneq responsible for this allows a target to depend on both testing-related

Re: privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 14:58, Paolo Bonzini wrote: > On 07/11/19 14:27, Laszlo Ersek wrote: >> The VirtioRngDxe driver is a UEFI driver that follows the UEFI driver >> model. Meaning (in this context), it is connected to the virtio-rng >> device in the BDS phase, by platform BDS code. >> >> Put differently,

Re: guest / host buffer sharing ...

2019-11-07 Thread Frank Yang
So I'm not really sure why people are having issues sharing buffers that live on the GPU. Doesn't that show up as some integer ID on the host, and some $GuestFramework (dmabuf, gralloc) ID on the guest, and it all works out due to maintaining the correspondence in your particular stack of virtual

Re: [RFC PATCH 06/18] qemu-storage-daemon: Add --nbd-server option

2019-11-07 Thread Kevin Wolf
Am 07.11.2019 um 14:45 hat Eric Blake geschrieben: > On 11/7/19 2:33 AM, Kevin Wolf wrote: > > As a replacement nbd-server-add, I envisioned adding something like a > > block-export-add, which would work the way that --export already does. > > It would also come with query-block-exports and

Re: [PATCH v2] virtio: notify virtqueue via host notifier when available

2019-11-07 Thread Felipe Franciosi
Thanks Stefan for the quick fix! Sorry for not adding a Tested-by. It's implicit. :) F. > On Nov 6, 2019, at 11:33 AM, Michael S. Tsirkin wrote: > > On Tue, Nov 05, 2019 at 03:09:46PM +0100, Stefan Hajnoczi wrote: >> Host notifiers are used in several cases: >> 1. Traditional ioeventfd where

Re: [PATCH v1 Resend] target/i386: set the CPUID level to 0x14 on old machine-type

2019-11-07 Thread Eduardo Habkost
On Wed, Nov 06, 2019 at 12:55:32AM +, Kang, Luwei wrote: > > > The CPUID level need to be set to 0x14 manually on old machine-type if > > > Intel PT is enabled in guest. e.g. in Qemu 3.1 -machine pc-i440fx-3.1 > > > -cpu qemu64,+intel-pt will be CPUID[0].EAX(level)=7 and > > >

Re: [PATCH v7 5/8] Acceptance tests: keep a stable reference to the QEMU build dir

2019-11-07 Thread Wainer dos Santos Moschetta
On 11/4/19 1:13 PM, Cleber Rosa wrote: This is related to the the differences in in-tree and out-of-tree builds in QEMU. For simplification, means my build directory. Currently, by running a `make check-acceptance` one gets (in tests/acceptance/avocado_qemu/__init__.py): SRC_ROOT_DIR:

Re: [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled

2019-11-07 Thread Thomas Huth
On 07/11/2019 20.09, Philippe Mathieu-Daudé wrote: [...] Bluetooth is dead, long live BT! v4.2.0-rc0 just got tagged. We should stop linking unmaintained dead code. If nobody step in to nuke BT, we should consider applying this series before we release QEMU 5.0 with dead Bluetooth. This

[PATCH 2/3] qtest: fix qtest_qmp_device_add leak

2019-11-07 Thread Marc-André Lureau
Spotted by ASAN. Signed-off-by: Marc-André Lureau --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index 3706bccd8d..91e9cb220c 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -1274,6 +1274,7 @@ void

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Alex Bennée
Robert Foley writes: > Thanks for providing the stack trace. > > We debugged this and it seems to come about because of an interesting > circumstance. We added our new tests after a pre-existing test, > parse_path(), which runs into an issue, a dangling pointer, which > could lead to a double

Re: [Qemu-devel] Exposing feature deprecation to machine clients

2019-11-07 Thread Vladimir Sementsov-Ogievskiy
07.11.2019 21:52, Philippe Mathieu-Daudé wrote: > Hi Markus, > > On 8/15/19 7:40 PM, John Snow wrote: >> On 8/15/19 10:16 AM, Markus Armbruster wrote: >>> John Snow writes: > [...] I asked Markus this not too long ago; do we want to amend the QAPI schema specification to allow commands

[PATCH v2] WHPX: support for xcr0

2019-11-07 Thread Sunil Muthuswamy
Support for xcr0 to be able to enable xsave/xrstor. This by itself is not sufficient to enable xsave/xrstor. WHPX XSAVE API's also needs to be hooked up. Signed-off-by: Sunil Muthuswamy --- You will need the Windows 10 SDK for RS5 (build 17763) or above to to be able to compile this patch

<    1   2   3   >