Re: [Qemu-devel] [PATCH RFC 1/4] intel_iommu: Sanity check vfio-pci config on machine init done

2019-09-16 Thread Auger Eric
Hi Peter, On 8/12/19 9:45 AM, Peter Xu wrote: > This check was previously only happened when the IOMMU is enabled in s/happened/happening > the guest. It was always too late because the enabling of IOMMU > normally only happens during the boot of guest OS. It means that we > can bail out and exit

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: fix signal delivery for ppc64abi32

2019-09-16 Thread Alex Bennée
David Gibson writes: > On Wed, Sep 11, 2019 at 10:33:45AM -0400, Richard Henderson wrote: >> On 9/11/19 5:39 AM, Alex Bennée wrote: >> > We were incorrectly setting NIP resulting in a segfault. This fixes >> > linux-test for this ABI. >> >> Perhaps better: >> We were incorrectly using the 64-bi

Re: [Qemu-devel] [PATCH RFC 2/4] qdev/machine: Introduce hotplug_allowed hook

2019-09-16 Thread Auger Eric
Hi Peter, On 8/12/19 9:45 AM, Peter Xu wrote: > Introduce this new per-machine hook to give any machine class a chance > to do a sanity check on the to-be-hotplugged device as a sanity test. > This will be used for x86 to try to detect some illegal configuration > of devices, e.g., possible confli

Re: [Qemu-devel] [PATCH RFC 3/4] pc/q35: Disallow vfio-pci hotplug without VT-d caching mode

2019-09-16 Thread Auger Eric
Hi Peter, On 8/12/19 9:45 AM, Peter Xu wrote: > Instead of bailing out when trying to hotplug a vfio-pci device with > below configuration: > > -device intel-iommu,caching-mode=off > > With this we can return a warning message to the user via QMP/HMP and > the VM will continue to work after fa

Re: [Qemu-devel] [PATCH RFC 4/4] intel_iommu: Remove the caching-mode check during flag change

2019-09-16 Thread Auger Eric
Hi Peter, On 8/12/19 9:45 AM, Peter Xu wrote: > That's never a good place to stop QEMU process... Since now we have > both the machine done sanity check and also the hotplug handler, we > can safely remove this to avoid that. > > Signed-off-by: Peter Xu Reviewed-by: Eric Auger Thanks Eric > -

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-16 Thread Paolo Bonzini
On 16/09/19 04:02, Wei Yang wrote: > On Fri, Sep 13, 2019 at 11:12:05AM +0200, Paolo Bonzini wrote: >> On 13/09/19 01:02, Wei Yang wrote: >>> It shows PHYS_MAP_NODE_NIL may represents more node the tree could hold. >> >> Which is good, it means the assert can trigger. >> > > Per my understanding,

Re: [Qemu-devel] [Qemu-riscv] [PATCH v8 18/32] riscv: sifive_u: Set the minimum number of cpus to 2

2019-09-16 Thread Bin Meng
Hi Jonathan, On Mon, Sep 16, 2019 at 1:40 AM Jonathan Behrens wrote: > > Has there been testing with "-smp 2"? A while back I thought I read that the > included uboot firmware was using a hard-coded device tree that indicated 4+1 > CPUs, which I would have expected to cause Linux boot issues? >

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_backup_prepare

2019-09-16 Thread Kevin Wolf
Am 13.09.2019 um 21:54 hat John Snow geschrieben: > > > On 9/13/19 11:25 AM, Sergio Lopez wrote: > > do_drive_backup() already acquires the AioContext, so release it > > before the call. > > > > Signed-off-by: Sergio Lopez > > --- > > blockdev.c | 6 +- > > 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [PATCH 3/4] iotests: Add @error to wait_until_completed

2019-09-16 Thread Max Reitz
On 14.09.19 00:53, John Snow wrote: > > > On 9/12/19 9:56 AM, Max Reitz wrote: >> Callers can use this new parameter to expect failure during the >> completion process. >> >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/iotests.py | 18 -- >> 1 file changed, 12 insertio

Re: [Qemu-devel] [PATCH RFC 1/4] intel_iommu: Sanity check vfio-pci config on machine init done

2019-09-16 Thread Peter Xu
On Mon, Sep 16, 2019 at 09:11:50AM +0200, Auger Eric wrote: > > static void vtd_realize(DeviceState *dev, Error **errp) > > { > > MachineState *ms = MACHINE(qdev_get_machine()); > > @@ -3741,6 +3772,7 @@ static void vtd_realize(DeviceState *dev, Error > > **errp) > > pci_setup_iommu(bu

[Qemu-devel] [PATCH v2 1/4] intel_iommu: Sanity check vfio-pci config on machine init done

2019-09-16 Thread Peter Xu
This check was previously only happened when the IOMMU is enabled in the guest. It was always too late because the enabling of IOMMU normally only happens during the boot of guest OS. It means that we can bail out and exit directly during the guest OS boots if the configuration of devices are not

[Qemu-devel] [PATCH v2 3/4] pc/q35: Disallow vfio-pci hotplug without VT-d caching mode

2019-09-16 Thread Peter Xu
Instead of bailing out when trying to hotplug a vfio-pci device with below configuration: -device intel-iommu,caching-mode=off With this we can return a warning message to the user via QMP/HMP and the VM will continue to work after failing the hotplug: (qemu) device_add vfio-pci,bus=root.3,h

[Qemu-devel] [PATCH v2 2/4] qdev/machine: Introduce hotplug_allowed hook

2019-09-16 Thread Peter Xu
Introduce this new per-machine hook to give any machine class a chance to do a sanity check on the to-be-hotplugged device as a sanity test. This will be used for x86 to try to detect some illegal configuration of devices, e.g., possible conflictions between vfio-pci and x86 vIOMMU. Signed-off-by:

[Qemu-devel] [PATCH v2 0/4] intel_iommu: Do sanity check of vfio-pci earlier

2019-09-16 Thread Peter Xu
v2: - rebase to master [Eric] - add r-bs for Eric - remove RFC tag The VT-d code has some defects, one of them is that we cannot detect the misuse of vIOMMU and vfio-pci early enough. For example, logically this is not allowed: -device intel-iommu,caching-mode=off \ -device vfio-pci,host=05:

[Qemu-devel] [PATCH v2 4/4] intel_iommu: Remove the caching-mode check during flag change

2019-09-16 Thread Peter Xu
That's never a good place to stop QEMU process... Since now we have both the machine done sanity check and also the hotplug handler, we can safely remove this to avoid that. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/i386/intel_iom

Re: [Qemu-devel] [PATCH v2] util/hbitmap: strict hbitmap_reset

2019-09-16 Thread Kevin Wolf
Am 13.09.2019 um 20:49 hat John Snow geschrieben: > On 9/12/19 4:20 AM, Vladimir Sementsov-Ogievskiy wrote: > > Also, I'm not sure about "are" suggested by Max. "are" is for plural, but > > here I meant > > one object: sum of @start and @count. > > > > There's not great agreement universally abo

Re: [Qemu-devel] [PATCH v2 0/4] intel_iommu: Do sanity check of vfio-pci earlier

2019-09-16 Thread Peter Xu
On Mon, Sep 16, 2019 at 03:58:35PM +0800, Peter Xu wrote: > v2: > - rebase to master [Eric] > - add r-bs for Eric > - remove RFC tag No... this is the new cover letter with the old commits... I'll post again. Sorry for the noise. -- Peter Xu

[Qemu-devel] [PATCH v3 0/4] intel_iommu: Do sanity check of vfio-pci earlier

2019-09-16 Thread Peter Xu
v3: - repost with the correct tree v2: - rebase to master [Eric] - add r-bs for Eric - remove RFC tag The VT-d code has some defects, one of them is that we cannot detect the misuse of vIOMMU and vfio-pci early enough. For example, logically this is not allowed: -device intel-iommu,caching-mo

[Qemu-devel] [PATCH v3 1/4] intel_iommu: Sanity check vfio-pci config on machine init done

2019-09-16 Thread Peter Xu
This check was previously only happened when the IOMMU is enabled in the guest. It was always too late because the enabling of IOMMU normally only happens during the boot of guest OS. It means that we can bail out and exit directly during the guest OS boots if the configuration of devices are not

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] trace: Forbid trailing newline in event format

2019-09-16 Thread Kevin Wolf
Am 13.09.2019 um 12:52 hat Philippe Mathieu-Daudé geschrieben: > Hi Stefan, > > I'v been confused by trailing newline in trace reports, > so this series aims to fix this, by cleaning current > formats and add a check to catch new one introduced. Good idea. Reviewed-by: Kevin Wolf

[Qemu-devel] [PATCH v3 2/4] qdev/machine: Introduce hotplug_allowed hook

2019-09-16 Thread Peter Xu
Introduce this new per-machine hook to give any machine class a chance to do a sanity check on the to-be-hotplugged device as a sanity test. This will be used for x86 to try to detect some illegal configuration of devices, e.g., possible conflictions between vfio-pci and x86 vIOMMU. Reviewed-by: E

[Qemu-devel] [PATCH v3 4/4] intel_iommu: Remove the caching-mode check during flag change

2019-09-16 Thread Peter Xu
That's never a good place to stop QEMU process... Since now we have both the machine done sanity check and also the hotplug handler, we can safely remove this to avoid that. Reviewed-by: Eric Auger Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 4 1 file changed, 4 deletions(-) diff

Re: [Qemu-devel] [PATCH v2] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-16 Thread Kevin Wolf
Am 13.09.2019 um 12:56 hat Sergio Lopez geschrieben: > virtio_notify_config() needs to acquire the global mutex, which isn't > allowed from an iothread, and may lead to a deadlock like this: > > - main thead > * Has acquired: qemu_global_mutex. > * Is trying the acquire: iothread AioContext l

[Qemu-devel] [PATCH v3 3/4] pc/q35: Disallow vfio-pci hotplug without VT-d caching mode

2019-09-16 Thread Peter Xu
Instead of bailing out when trying to hotplug a vfio-pci device with below configuration: -device intel-iommu,caching-mode=off With this we can return a warning message to the user via QMP/HMP and the VM will continue to work after failing the hotplug: (qemu) device_add vfio-pci,bus=root.3,h

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Add xkbcommon configure options

2019-09-16 Thread Laurent Vivier
Le 14/09/2019 à 16:51, James Le Cuirot a écrit : > This dependency is currently "automagic", which is bad for distributions. > > Signed-off-by: James Le Cuirot > --- > configure | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/configure b/configure > index 30aad233d1..30544f52e6 10

Re: [Qemu-devel] [PATCH v2 2/3] block/dirty-bitmap: return int from bdrv_remove_persistent_dirty_bitmap

2019-09-16 Thread Vladimir Sementsov-Ogievskiy
14.09.2019 1:01, John Snow wrote: > > > On 9/11/19 11:00 AM, Vladimir Sementsov-Ogievskiy wrote: >> It's more comfortable to not deal with local_err. >> > > I agree. > >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> block/qcow2.h| 5 ++--- >> include/block/block_in

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-16 Thread Jason Wang
On 2019/9/16 上午9:51, Tian, Kevin wrote: Hi, Jason We had a discussion about dirty page tracking in VFIO, when vIOMMU is enabled: https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg02690.html It's actually a similar model as vhost - Qemu cannot interpose the fast-path DMAs thus relie

Re: [Qemu-devel] [PATCH v2 6/6] .travis.yml: Split enterprise vs. hobbyist acceptance test job

2019-09-16 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé > --- > .travis.yml | 18 -- > 1 file changed, 16 insertions(+), 2 deletions(-) > > diff --git a/.travis.yml b/.travis.yml > index 69a37f7387..753276eb33 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@

Re: [Qemu-devel] [PATCH v3 3/6] vmstate: replace DeviceState with VMStateIf

2019-09-16 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Replace DeviceState dependency with VMStateIf on vmstate API. > > Signed-off-by: Marc-André Lureau > --- > docs/devel/migration.rst | 2 +- > hw/block/onenand.c | 2 +- > hw/core/qdev.c | 7 --- > hw/id

Re: [Qemu-devel] [PATCH] qga: add command guest-get-devices for reporting VirtIO devices

2019-09-16 Thread Tomáš Golembiovský
gentle reminder On Thu, Aug 29, 2019 at 06:03:21PM +0200, Tomáš Golembiovský wrote: > Add command for reporting devices on Windows guest. The intent is not so > much to report the devices but more importantly the driver (and its > version) that is assigned to the device. > > Signed-off-by: Tomáš

[Qemu-devel] [PATCH v1 1/1] riscv: pmp: Allow valid instruction fetches at the start of a PMP range

2019-09-16 Thread Chris Williams
Allow Qemu guest code to execute from the very start of a PMP range without faulting. When an instruction is fetched from the first word of a PMP range,  pmp_hart_has_privs() is called with a size of zero. This causes pmp_is_in_range() to be called with an address lower than addr, when obtaining

Re: [Qemu-devel] [PULL 0/4] MIPS queue for September 12th, 2019

2019-09-16 Thread Peter Maydell
On Thu, 12 Sep 2019 at 17:30, Aleksandar Markovic wrote: > > From: Aleksandar Markovic > > The following changes since commit 6d2fdde42c3344099262431df6a3f429c509291d: > > Merge remote-tracking branch > 'remotes/stsquad/tags/pull-testing-next-100919-2' into staging (2019-09-10 > 14:52:09 +010

Re: [Qemu-devel] [PATCH v7 2/3] block/qcow2: refactor encryption code

2019-09-16 Thread Vladimir Sementsov-Ogievskiy
15.09.2019 23:36, Maxim Levitsky wrote: > * Change the qcow2_co_{encrypt|decrypt} to just receive full host and >guest offsets and use this function directly instead of calling >do_perform_cow_encrypt (which is removed by that patch). > > * Adjust qcow2_co_encdec to take full host and gues

Re: [Qemu-devel] [PATCH v2 6/6] .travis.yml: Split enterprise vs. hobbyist acceptance test job

2019-09-16 Thread Philippe Mathieu-Daudé
On 9/16/19 10:43 AM, Alex Bennée wrote: > Philippe Mathieu-Daudé writes: > >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> .travis.yml | 18 -- >> 1 file changed, 16 insertions(+), 2 deletions(-) >> >> diff --git a/.travis.yml b/.travis.yml >> index 69a37f7387..753276eb33 100

Re: [Qemu-devel] [PATCH v2 0/6] tests/acceptance: Add tests for the PReP/40p machine

2019-09-16 Thread Philippe Mathieu-Daudé
Hi David, On 9/16/19 2:42 AM, David Gibson wrote: > On Sun, Sep 15, 2019 at 11:19:34PM +0200, Philippe Mathieu-Daudé wrote: >> Quick tests worth to avoid regressions with the 40p machine. >> idea from the "Maintainers, please tell us how to boot your machines" >> thread: >> https://lists.gnu.org/a

[Qemu-devel] [PATCH 0/3] Add acceptance test for migration

2019-09-16 Thread Balamuruhan S
Add new test for migration that bringup vm with different machine types and migrate it, introduce new API in avocado_qemu to query all the machine types supported by qemu. Test run: # avocado run migration.py JOB ID : ef54f57a073eb267d2347e32225f2adbe27969de JOB LOG: /home/bala/avocado-f

[Qemu-devel] [PATCH 2/3] tests/acceptance/avocado_qemu: add method to get supported machine types

2019-09-16 Thread Balamuruhan S
add `get_machine_types()` to return list of supported machine types by the qemu binary. Signed-off-by: Balamuruhan S --- tests/acceptance/avocado_qemu/__init__.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/

[Qemu-devel] [PATCH 3/3] tests/acceptance/migration: test to migrate will all machine types

2019-09-16 Thread Balamuruhan S
add migration test to query machine types supported by qemu binary and migrate vm will all supported type. Signed-off-by: Balamuruhan S --- tests/acceptance/migration.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/acceptance/migration.py b/tests/acceptan

[Qemu-devel] [PATCH 1/3] tests/acceptance/migration: fix post migration check

2019-09-16 Thread Balamuruhan S
assert `query-migrate` in target doesn't give migration status and test errors even if migration succeeds. In target: {'execute': 'query-migrate'} {"return": {}} Signed-off-by: Balamuruhan S --- tests/acceptance/migration.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --g

Re: [Qemu-devel] [PATCH v2 2/6] tests/acceptance: Test Open Firmware on the PReP/40p

2019-09-16 Thread Artyom Tarasenko
On Sun, Sep 15, 2019 at 11:19 PM Philippe Mathieu-Daudé wrote: > > User case from: > https://tyom.blogspot.com/2019/04/aixprep-under-qemu-how-to.html > > Signed-off-by: Philippe Mathieu-Daudé Thanks a lot for this one, Philippe! Acked-by: Artyom Tarasenko > --- > tests/acceptance/ppc_prep_40p

Re: [Qemu-devel] [PATCH v2 1/6] tests/acceptance: Add test that runs NetBSD 4.0 installer on PRep/40p

2019-09-16 Thread Artyom Tarasenko
On Sun, Sep 15, 2019 at 11:19 PM Philippe Mathieu-Daudé wrote: > > As of this commit, NetBSD 4.0 is very old. However it is enough to > test the PRep/40p machine. Not just it's enough, it's also the NetBSD release which definitely was tested on physical 40p machines. (It already has reviewed-by m

Re: [Qemu-devel] [PATCH v2 6/6] .travis.yml: Split enterprise vs. hobbyist acceptance test job

2019-09-16 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 9/16/19 10:43 AM, Alex Bennée wrote: >> Philippe Mathieu-Daudé writes: >> >>> Signed-off-by: Philippe Mathieu-Daudé >>> --- >>> .travis.yml | 18 -- >>> 1 file changed, 16 insertions(+), 2 deletions(-) >>> >>> diff --git a/.travis.yml b/.tr

[Qemu-devel] [PATCH v2 0/2] trace: Forbid trailing newline in event format

2019-09-16 Thread Philippe Mathieu-Daudé
Hi Stefan, I'v been confused by trailing newline in trace reports, so this series aims to fix this, by cleaning current formats and add a check to catch new one introduced. v2: - Use regex format (easier to review) - Added R-b Regards, Phil. Philippe Mathieu-Daudé (2): trace: Remove trailing

[Qemu-devel] [PATCH v2 1/2] trace: Remove trailing newline in events

2019-09-16 Thread Philippe Mathieu-Daudé
While the tracing frawework does not forbid trailing newline in events format string, using them lead to confuse output. It is the responsibility of the backend to properly end an event line. Some of our formats have trailing newlines, remove them. Reviewed-by: John Snow Reviewed-by: Kevin Wolf

[Qemu-devel] [PATCH v2 2/2] trace: Forbid event format ending with newline character

2019-09-16 Thread Philippe Mathieu-Daudé
Event format ending with newlines confuse the trace reports. Forbid them. Add a check to refuse new format added with trailing newline: $ make [...] GEN hw/misc/trace.h Traceback (most recent call last): File "scripts/tracetool.py", line 152, in main(sys.argv) File "s

Re: [Qemu-devel] [PATCH v3 2/6] vmstate: add qom interface to get id

2019-09-16 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Add an interface to get the instance id, instead of depending on > Device and qdev_get_dev_path(). > > Signed-off-by: Marc-André Lureau > --- > hw/core/Makefile.objs| 1 + > hw/core/qdev.c | 14 ++ > hw

Re: [Qemu-devel] [PATCH v2 0/6] tests/acceptance: Add tests for the PReP/40p machine

2019-09-16 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi David, > > On 9/16/19 2:42 AM, David Gibson wrote: >> On Sun, Sep 15, 2019 at 11:19:34PM +0200, Philippe Mathieu-Daudé wrote: >>> Quick tests worth to avoid regressions with the 40p machine. >>> idea from the "Maintainers, please tell us how to boot your mach

Re: [Qemu-devel] [PATCH v6 28/42] stream: Deal with filters

2019-09-16 Thread Max Reitz
On 13.09.19 16:16, Kevin Wolf wrote: > Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: >> Because of the recent changes that make the stream job independent of >> the base node and instead track the node above it, we have to split that >> "bottom" node into two cases: The bottom COW node, and the

Re: [Qemu-devel] [PATCH v2 0/6] tests/acceptance: Add tests for the PReP/40p machine

2019-09-16 Thread Philippe Mathieu-Daudé
On 9/16/19 11:52 AM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Hi David, >> >> On 9/16/19 2:42 AM, David Gibson wrote: >>> On Sun, Sep 15, 2019 at 11:19:34PM +0200, Philippe Mathieu-Daudé wrote: Quick tests worth to avoid regressions with the 40p machine. idea from the

Re: [Qemu-devel] [PATCH v3 5/6] docs: start a document to describe D-Bus usage

2019-09-16 Thread Dr. David Alan Gilbert
(Copying in Stefan since he was looking at DBus for virtiofs) * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Signed-off-by: Marc-André Lureau > --- > docs/interop/dbus.rst | 73 ++ > docs/interop/index.rst | 1 + > 2 files changed, 74 inserti

Re: [Qemu-devel] [PATCH v2 5/6] .travis.yml: Let the avocado job run the 40p tests

2019-09-16 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée > --- > If this list continues to grow we can > - split it (as other jobs) > - move them to GitLab where we can have multi-stage jobs, > avocado tests run on top of build jobs. > --- > .travis.ym

Re: [Qemu-devel] [PATCH v2 6/6] .travis.yml: Split enterprise vs. hobbyist acceptance test job

2019-09-16 Thread Philippe Mathieu-Daudé
On 9/16/19 11:46 AM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> On 9/16/19 10:43 AM, Alex Bennée wrote: >>> Philippe Mathieu-Daudé writes: >>> Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 18 -- 1 file changed, 16 insertions(+), 2

Re: [Qemu-devel] [PATCH v6 25/42] mirror: Deal with filters

2019-09-16 Thread Max Reitz
On 13.09.19 14:55, Kevin Wolf wrote: > Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: >> This includes some permission limiting (for example, we only need to >> take the RESIZE permission for active commits where the base is smaller >> than the top). >> >> Signed-off-by: Max Reitz >> --- >> bl

Re: [Qemu-devel] [PATCH-for-4.2 v10 05/11] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot

2019-09-16 Thread Shameerali Kolothum Thodi
Hi Igor, > -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: 11 September 2019 14:07 > To: Shameerali Kolothum Thodi > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; > shannon.zha...@gmail.com; sa...@linux.int

Re: [Qemu-devel] [PATCH v2 26/28] s390x/tcg: MVST: Fault-safe handling

2019-09-16 Thread David Hildenbrand
On 11.09.19 23:52, Richard Henderson wrote: > On 9/6/19 3:57 AM, David Hildenbrand wrote: >> +/* >> + * Our access should not exceed single pages, as we must not report >> access >> + * exceptions exceeding the actually copied range (which we don't know >> at >> + * this point). W

Re: [Qemu-devel] [PATCH v3 6/6] Add dbus-vmstate object

2019-09-16 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > When instanciated, this object will connect to the given D-Bus > bus. During migration, it will take the data from org.qemu.VMState1 > instances. > > See documentation for further details. > > Signed-off-by: Marc-André Lureau I could do

Re: [Qemu-devel] [PULL 3/8] m68k: Add NeXTcube machine

2019-09-16 Thread Peter Maydell
On Sat, 7 Sep 2019 at 16:47, Thomas Huth wrote: > > It is still quite incomplete (no SCSI, no floppy emulation, no network, > etc.), but the firmware already shows up the debug monitor prompt in the > framebuffer display, so at least the very basics are already working. > > This code has been take

Re: [Qemu-devel] [PATCH v3 5/6] docs: start a document to describe D-Bus usage

2019-09-16 Thread Marc-André Lureau
Hi On Mon, Sep 16, 2019 at 2:02 PM Dr. David Alan Gilbert wrote: > > (Copying in Stefan since he was looking at DBus for virtiofs) > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > Signed-off-by: Marc-André Lureau > > --- > > docs/interop/dbus.rst | 73 ++

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_backup_prepare

2019-09-16 Thread Sergio Lopez
Kevin Wolf writes: > Am 13.09.2019 um 21:54 hat John Snow geschrieben: >> >> >> On 9/13/19 11:25 AM, Sergio Lopez wrote: >> > do_drive_backup() already acquires the AioContext, so release it >> > before the call. >> > >> > Signed-off-by: Sergio Lopez >> > --- >> > blockdev.c | 6 +- >> >

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_backup_prepare

2019-09-16 Thread Sergio Lopez
John Snow writes: > On 9/13/19 11:25 AM, Sergio Lopez wrote: >> do_drive_backup() already acquires the AioContext, so release it >> before the call. >> >> Signed-off-by: Sergio Lopez >> --- >> blockdev.c | 6 +- >> 1 file changed, 1 insertion(+), 5 deletions(-) >> >> diff --git a/blockde

[Qemu-devel] [PATCH v3] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-16 Thread Sergio Lopez
virtio_notify_config() needs to acquire the global mutex, which isn't allowed from an iothread, and may lead to a deadlock like this: - main thead * Has acquired: qemu_global_mutex. * Is trying the acquire: iothread AioContext lock via AIO_WAIT_WHILE (after aio_poll). - iothread * Has

Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-16 Thread Johannes Berg
Hi Michael, I had just wanted to prepare a resend, but > > Hmm I don't like this. I propose that with > > VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS > > we just don't allow VHOST_USER_SET_VRING_CALL (if you think it's > > important to allow them, we can say that we do not require them). > > Yo

Re: [Qemu-devel] [PATCH v2 20/28] s390x/tcg: OC: Fault-safe handling

2019-09-16 Thread David Hildenbrand
On 11.09.19 23:26, Richard Henderson wrote: > On 9/6/19 3:57 AM, David Hildenbrand wrote: >> +srca2 = access_prepare(env, dest, l, MMU_DATA_LOAD, ra); >> +desta = access_prepare(env, dest, l, MMU_DATA_STORE, ra); > > We should find a way to perform this in one step. > RWM isn't uncommon...

Re: [Qemu-devel] [PATCH] configure: Add xkbcommon configure options

2019-09-16 Thread Philippe Mathieu-Daudé
On 9/14/19 4:51 PM, James Le Cuirot wrote: > This dependency is currently "automagic", which is bad for distributions. > Fixes: 6a021536e23 Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: James Le Cuirot > --- > configure | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/con

Re: [Qemu-devel] [PATCH v3] ui: add an embedded Barrier client

2019-09-16 Thread Laurent Vivier
Ping? Le 06/09/2019 à 10:38, Laurent Vivier a écrit : > This allows to receive mouse and keyboard events from > a Barrier server. > > This is enabled by adding the following parameter on the > command line > > ... -object input-barrier,id=$id,name=$name ... > > Where $name is the name d

Re: [Qemu-devel] [PULL 00/12] target-arm queue

2019-09-16 Thread Peter Maydell
On Fri, 13 Sep 2019 at 16:49, Peter Maydell wrote: > > target-arm queue: mostly aspeed changes from Cédric. > > thanks > -- PMM > > The following changes since commit 85182c96de61f0b600bbe834d5a23e713162e892: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20190912a' in

Re: [Qemu-devel] [PATCH] qga: add command guest-get-devices for reporting VirtIO devices

2019-09-16 Thread Marc-André Lureau
Hi On Thu, Aug 29, 2019 at 8:06 PM Tomáš Golembiovský wrote: > > Add command for reporting devices on Windows guest. The intent is not so > much to report the devices but more importantly the driver (and its > version) that is assigned to the device. > > Signed-off-by: Tomáš Golembiovský > --- >

Re: [Qemu-devel] [PATCH v7 1/3] block/qcow2: Fix corruption introduced by commit 8ac0f15f335

2019-09-16 Thread Max Reitz
On 15.09.19 22:36, Maxim Levitsky wrote: > This fixes subtle corruption introduced by luks threaded encryption > in commit 8ac0f15f335 > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922 > > The corruption happens when we do a write that >* writes to two or more unallocated clus

Re: [Qemu-devel] [PATCH v7 2/3] block/qcow2: refactor encryption code

2019-09-16 Thread Max Reitz
On 15.09.19 22:36, Maxim Levitsky wrote: > * Change the qcow2_co_{encrypt|decrypt} to just receive full host and > guest offsets and use this function directly instead of calling > do_perform_cow_encrypt (which is removed by that patch). > > * Adjust qcow2_co_encdec to take full host and guest

Re: [Qemu-devel] [PATCH v7 3/3] qemu-iotests: Add test for bz #1745922

2019-09-16 Thread Max Reitz
On 15.09.19 22:36, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > Tested-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/263 | 91 ++ > tests/qemu-iotests/263.out | 40 + > tests/qemu-iotests/group | 1 + > 3 files c

Re: [Qemu-devel] [PATCH v3 5/6] docs: start a document to describe D-Bus usage

2019-09-16 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Hi > > On Mon, Sep 16, 2019 at 2:02 PM Dr. David Alan Gilbert > wrote: > > > > (Copying in Stefan since he was looking at DBus for virtiofs) > > > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > > Signed-off-by: Marc-André L

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.2 v5 1/2] kvm: s390: split too big memory section on several memslots

2019-09-16 Thread Igor Mammedov
On Tue, 3 Sep 2019 08:57:38 +0200 Christian Borntraeger wrote: > On 02.09.19 15:49, Igor Mammedov wrote: > > On Fri, 30 Aug 2019 18:19:29 +0200 > > Christian Borntraeger wrote: > > > >> On 30.08.19 11:41, Igor Mammedov wrote: > >>> On Thu, 29 Aug 2019 14:41:13 +0200 > >>> Christian Borntrae

[Qemu-devel] [PATCH v6 0/2] s390: stop abusing memory_region_allocate_system_memory()

2019-09-16 Thread Igor Mammedov
Changelog: since v5: - [1/2] fix migration that wasn't starting and make sure that KVM part is able to handle 1:n MemorySection:memslot arrangement since v3: - fix compilation issue - advance HVA along with GPA in kvm_set_phys_mem() since v2: - break migration from old Q

[Qemu-devel] [PATCH v6 1/2] kvm: s390: split too big memory section on several memslots

2019-09-16 Thread Igor Mammedov
Max memslot size supported by kvm on s390 is 8Tb, move logic of splitting RAM in chunks upto 8T to KVM code. This way it will hide KVM specific restrictions in KVM code and won't affect board level design decisions. Which would allow us to avoid misusing memory_region_allocate_system_memory() API

[Qemu-devel] [PATCH v6 2/2] s390: do not call memory_region_allocate_system_memory() multiple times

2019-09-16 Thread Igor Mammedov
s390 was trying to solve limited KVM memslot size issue by abusing memory_region_allocate_system_memory(), which breaks API contract where the function might be called only once. Beside an invalid use of API, the approach also introduced migration issue, since RAM chunks for each KVM_SLOT_MAX_BYTE

Re: [Qemu-devel] [PATCH v4 0/5] qcow2: async handling of fragmented io

2019-09-16 Thread Max Reitz
On 13.09.19 10:58, Max Reitz wrote: > On 16.08.19 17:30, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> Here is an asynchronous scheme for handling fragmented qcow2 >> reads and writes. Both qcow2 read and write functions loops through >> sequential portions of data. The series aim it to para

Re: [Qemu-devel] [PATCH v6 1/2] kvm: s390: split too big memory section on several memslots

2019-09-16 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > Max memslot size supported by kvm on s390 is 8Tb, > move logic of splitting RAM in chunks upto 8T to KVM code. > > This way it will hide KVM specific restrictions in KVM code > and won't affect board level design decisions. Which would allow > us to a

Re: [Qemu-devel] [PULL 0/2] target/hppa updates

2019-09-16 Thread Peter Maydell
On Sun, 15 Sep 2019 at 14:49, Richard Henderson wrote: > > The following changes since commit 85182c96de61f0b600bbe834d5a23e713162e892: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20190912a' into staging (2019-09-13 > 14:37:48 +0100) > > are available in the Git re

Re: [Qemu-devel] [PATCH v7 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335

2019-09-16 Thread Max Reitz
On 15.09.19 22:36, Maxim Levitsky wrote: > Commit 8ac0f15f335 accidently broke the COW of non changed areas > of newly allocated clusters, when the write spans multiple clusters, > and needs COW both prior and after the write. > This results in 'after' COW area being encrypted with wrong > sector a

[Qemu-devel] [PATCH v3 02/29] s390x/tcg: MVCL: Zero out unused bits of address

2019-09-16 Thread David Hildenbrand
We have to zero out unused bits in 24 and 31-bit addressing mode. Provide a new helper. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_hel

[Qemu-devel] [PATCH v3 04/29] s390x/tcg: MVCL: Process max 4k bytes at a time

2019-09-16 Thread David Hildenbrand
Process max 4k bytes at a time, writing back registers between the accesses. The instruction is interruptible. "For operands longer than 2K bytes, access exceptions are not recognized for locations more than 2K bytes beyond the current location being processed." Note that on z/Architect

[Qemu-devel] [PATCH v3 06/29] s390x/tcg: MVC: Use is_destructive_overlap()

2019-09-16 Thread David Hildenbrand
Let's use the new helper, that also detects destructive overlaps when wrapping. We'll make the remaining code (e.g., fast_memmove()) aware of wrapping later. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH v3 01/29] s390x/tcg: Reset exception_index to -1 instead of 0

2019-09-16 Thread David Hildenbrand
We use the marker "-1" for "no exception". s390_cpu_do_interrupt() might get confused by that. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/targ

[Qemu-devel] [PATCH v3 05/29] s390x/tcg: MVC: Increment the length once

2019-09-16 Thread David Hildenbrand
Let's increment the length once. While at it, cleanup the comment. The memset() example is given as a programming note in the PoP, so drop the description. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 20 1 file changed, 1

[Qemu-devel] [PATCH v3 00/29] s390x/tcg: mem_helper: Fault-safe handling

2019-09-16 Thread David Hildenbrand
This series fixes a bunch of issues related to some mem helpers and makes sure that they are fault-safe, meaning no system state is modified in case a fault is triggered. I can spot tons of other issues with other mem helpers that will have to be fixed later. Also, fault-safe handling for some ins

[Qemu-devel] [PATCH v3 09/29] s390x/tcg: MVCLU/MVCLE: Process max 4k bytes at a time

2019-09-16 Thread David Hildenbrand
Let's stay within single pages. ... and indicate cc=3 in case there is work remaining. Keep unicode padding simple. While reworking, properly wrap the addresses. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 54 ++- 1 file changed, 31 inse

[Qemu-devel] [PATCH v3 07/29] s390x/tcg: MVPG: Check for specification exceptions

2019-09-16 Thread David Hildenbrand
Perform the checks documented in the PoP. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index c31cf49593..7dfa848744 100644 --- a/targ

[Qemu-devel] [PATCH v3 03/29] s390x/tcg: MVCL: Detect destructive overlaps

2019-09-16 Thread David Hildenbrand
We'll have to zero-out unused bit positions, so make sure to write the addresses back. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/target/s390x/mem_helper.c

[Qemu-devel] [PATCH v3 21/29] s390x/tcg: OC: Fault-safe handling

2019-09-16 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c i

[Qemu-devel] [PATCH v3 15/29] s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY

2019-09-16 Thread David Hildenbrand
Although we basically ignore the index all the time for CONFIG_USER_ONLY, let's simply skip all the checks and always return MMU_USER_IDX in cpu_mmu_index() and get_mem_index(). Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/cpu.h | 4 target/s390x/t

[Qemu-devel] [PATCH v3 11/29] s390x/tcg: MVCOS: Lengths are 32 bit in 24/31-bit mode

2019-09-16 Thread David Hildenbrand
Triggered by a review comment from Richard, also MVCOS has a 32-bit length in 24/31-bit addressing mode. Add a new helper. Rename wrap_length() to wrap_length31(). Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-

[Qemu-devel] [PATCH v3 08/29] s390x/tcg: MVPG: Properly wrap the addresses

2019-09-16 Thread David Hildenbrand
We have to mask of any unused bits. While at it, document what exactly is missing. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s39

[Qemu-devel] [PATCH v3 18/29] s390x/tcg: MVCS/MVCP: Use access_memmove()

2019-09-16 Thread David Hildenbrand
As we are moving between address spaces, we can use access_memmove_idx() without checking for destructive overlaps (especially of real storage locations): "Each storage operand is processed left to right. The storage-operand-consistency rules are the same as for MOVE (MVC), except that

[Qemu-devel] [PATCH v3 29/29] tests/tcg: target/s390x: Test MVO

2019-09-16 Thread David Hildenbrand
Let's add the simple test based on the example from the PoP. Signed-off-by: David Hildenbrand --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/mvo.c | 25 + 2 files changed, 26 insertions(+) create mode 100644 tests/tcg/s390x/mvo.c diff --git a/test

[Qemu-devel] [PATCH v3 12/29] s390x/tcg: MVCS/MVCP: Properly wrap the length

2019-09-16 Thread David Hildenbrand
... and don't perform any move in case the length is zero. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 320e9ee65c..41d7336a1a 100644 --- a/target/s390x/mem_hel

[Qemu-devel] [PATCH v3 10/29] s390x/tcg: MVCS/MVCP: Check for special operation exceptions

2019-09-16 Thread David Hildenbrand
Let's perform the documented checks. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 12 1 file changed, 12 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 86238e0163..20e1ac0ea9 100644 --- a/ta

[Qemu-devel] [PATCH v3 23/29] s390x/tcg: NC: Fault-safe handling

2019-09-16 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c i

[Qemu-devel] [PATCH v3 13/29] s390x/tcg: MVST: Check for specification exceptions

2019-09-16 Thread David Hildenbrand
Bit position 32-55 of general register 0 must be zero. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 41d7336a1a..ec27be174b 100644 -

[Qemu-devel] [PATCH v3 14/29] s390x/tcg: MVST: Fix storing back the addresses to registers

2019-09-16 Thread David Hildenbrand
24 and 31-bit address space handling is wrong when it comes to storing back the addresses to the register. While at it, read gprs 0 implicitly. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 2 +- target/s390x/insn-data.def | 2 +- target/s39

Re: [Qemu-devel] [PATCH v7 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335

2019-09-16 Thread Maxim Levitsky
On Mon, 2019-09-16 at 15:39 +0200, Max Reitz wrote: > On 15.09.19 22:36, Maxim Levitsky wrote: > > Commit 8ac0f15f335 accidently broke the COW of non changed areas > > of newly allocated clusters, when the write spans multiple clusters, > > and needs COW both prior and after the write. > > This res

  1   2   3   >