[Qemu-devel] [PATCH 6/9] target/ppc: Fix vslv and vsrv

2019-05-06 Thread Anton Blanchard
vslv and vsrv are broken on little endian, we append 00 to the high byte not the low byte. Fix it by using the VsrB() accessor. Signed-off-by: Anton Blanchard --- target/ppc/int_helper.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/ppc/int_helper.c

[Qemu-devel] [PATCH 4/9] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x

2019-05-06 Thread Anton Blanchard
During the conversion these instructions were incorrectly treated as stores. We need to use set_cpu_vsr* and not get_cpu_vsr*. Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access") Signed-off-by: Anton Blanchard ---

Re: [Qemu-devel] [PATCH] Deprecate Python 2 support

2019-05-06 Thread Eduardo Habkost
On Mon, May 06, 2019 at 04:12:02PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > Python 2 will reach end of life in January 1 2020. Declare it as > > deprecated. > > > > Signed-off-by: Eduardo Habkost > > --- > > configure| 8 > > qemu-deprecated.texi |

Re: [Qemu-devel] [QEMU-PPC] [PATCH 02/13] target/ppc: Work [S]PURR implementation and add HV support

2019-05-06 Thread Suraj Jitindar Singh
On Mon, 2019-05-06 at 16:15 +1000, David Gibson wrote: > On Fri, May 03, 2019 at 03:53:05PM +1000, Suraj Jitindar Singh wrote: > > The Processor Utilisation of Resources Register (PURR) and Scaled > > Processor Utilisation of Resources Register (SPURR) provide an > > estimate > > of the resources

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 3/3] pcie: Simplify pci_adjust_config_limit()

2019-05-06 Thread David Gibson
On Fri, Apr 26, 2019 at 04:40:17PM +1000, Alexey Kardashevskiy wrote: > > > On 24/04/2019 14:19, David Gibson wrote: > > Since c2077e2c "pci: Adjust PCI config limit based on bus topology", > > pci_adjust_config_limit() has been used in the config space read and write > > paths to only permit

Re: [Qemu-devel] [PATCH] iotests: Tweak 221 sizing for different hole granularities

2019-05-06 Thread Thomas Huth
On 06/05/2019 19.21, Eric Blake wrote: > For some particular configurations of ext4, sizing an image to 84 > sectors + 1 byte causes test failures when the size of the hole is > rounded to a 4k alignment. Let's instead size things to 128 sectors + > 1 byte, as the 64k boundary is more likely to

Re: [Qemu-devel] [QEMU-PPC] [PATCH 00/13] target/ppc: Implement KVM support under TCG

2019-05-06 Thread Suraj Jitindar Singh
On Mon, 2019-05-06 at 16:20 +1000, David Gibson wrote: > On Fri, May 03, 2019 at 03:53:03PM +1000, Suraj Jitindar Singh wrote: > > This patch series adds the necessary parts so that a tcg guest is > > able to use > > kvm facilities. That is a tcg guest can boot its own kvm guests. > > The topic

[Qemu-devel] Question on QEMU : How to record debug log in VM of QEMU

2019-05-06 Thread S KH
This is a question I have encountered while using QEMU. I want to compile the source directly rather than through apt or yum and install QEMU and input the output statement to the source to check the output value. When I compiled QEMU using dpkg-buildpackage in Ubuntu, I verified that when

[Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-05-06 Thread Wei Yang
During migration, we would sync bitmap from ram_list.dirty_memory to RAMBlock.bmap in cpu_physical_memory_sync_dirty_bitmap(). Since we set RAMBlock.bmap and ram_list.dirty_memory both to all 1, this means at the first round this sync is meaningless and is a duplicated work. Leaving

Re: [Qemu-devel] [PATCH 1/9] target/ppc: Fix xvxsigdp

2019-05-06 Thread Anton Blanchard
Hi Alexey, > Out of curiosity - how did you find this one and (especially) the next > one - "Fix xxspltib"? Is there some testsuite, or by just looking at > the code? Thanks, I'm running test cases and comparing results between QEMU and real hardware. Thanks, Anton

[Qemu-devel] [PATCH 2/9] target/ppc: Fix xxspltib

2019-05-06 Thread Anton Blanchard
xxspltib raises a VMX or a VSX exception depending on the register set it is operating on. We had a check, but it was backwards. Fixes: f113283525a4 ("target-ppc: add xxspltib instruction") Signed-off-by: Anton Blanchard --- target/ppc/translate/vsx-impl.inc.c | 9 + 1 file changed, 5

[Qemu-devel] [PATCH 1/9] target/ppc: Fix xvxsigdp

2019-05-06 Thread Anton Blanchard
Fix a typo in xvxsigdp where we put both results into the lower doubleword. Fixes: dd977e4f45cb ("target/ppc: Optimize x[sv]xsigdp using deposit_i64()") Signed-off-by: Anton Blanchard --- target/ppc/translate/vsx-impl.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 3/9] target/ppc: Fix xxbrq, xxbrw

2019-05-06 Thread Anton Blanchard
Fix a typo in xxbrq and xxbrw where we put both results into the lower doubleword. Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access") Signed-off-by: Anton Blanchard --- target/ppc/translate/vsx-impl.inc.c | 4 ++-- 1 file changed, 2

Re: [Qemu-devel] [PATCH 0/3] Export machine type deprecation info through QMP

2019-05-06 Thread Markus Armbruster
Eduardo Habkost writes: > This series adds machine type deprecation information to the > output of the `query-machines` QMP command. With this, libvirt > and management software will be able to show this information to > users and/or suggest changes to VM configuration to avoid > deprecated

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add qemu-options* to related field

2019-05-06 Thread Markus Armbruster
Zhang Chen writes: > From: Zhang Chen > > No one to maintain qemu-options related file, add it to Markus's > Command line option argument parsing field. > > Signed-off-by: Zhang Chen > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index

Re: [Qemu-devel] [QEMU-PPC] [PATCH] target/ppc: Add ibm, purr and ibm, spurr device-tree properties

2019-05-06 Thread Suraj Jitindar Singh
On Mon, 2019-05-06 at 13:23 +1000, David Gibson wrote: > On Mon, May 06, 2019 at 11:48:03AM +1000, Suraj Jitindar Singh wrote: > > The ibm,purr and ibm,spurr device tree properties are used to > > indicate > > that the processor implements the Processor Utilisation of > > Resources > > Register

Re: [Qemu-devel] [PATCH v2] net/colo-compare.c: Fix a crash in COLO Primary.

2019-05-06 Thread Jason Wang
On 2019/5/6 下午6:32, Lukas Straub wrote: On Sat, 20 Apr 2019 19:14:25 +0200 Lukas Straub wrote: From: Lukas Straub Because event_unhandled_count may be accessed concurrently, it needs to be protected by taking the lock. However the assert is outside the lock, probably causing it to read

[Qemu-devel] [PATCH 9/9] target/ppc: Fix vsum2sws

2019-05-06 Thread Anton Blanchard
A recent cleanup changed the pre zeroing of the result from 64 bit to 32 bit operations: -result.u64[i] = 0; +result.VsrW(i) = 0; This corrupts the result. Fixes: 60594fea298d ("target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c") Signed-off-by: Anton

[Qemu-devel] [PATCH 8/9] target/ppc: Fix dtstsfi and dtstsfiq

2019-05-06 Thread Anton Blanchard
The immediate field is 6 bits, not 5. Fixes: 217f6b88058f ("target-ppc: add dtstsfi[q] instructions") Signed-off-by: Anton Blanchard --- target/ppc/internal.h | 2 ++ target/ppc/translate/dfp-impl.inc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH for-4.1 v2 30/36] cpu: Introduce cpu_set_cpustate_pointers

2019-05-06 Thread Richard Henderson
On 4/29/19 7:40 AM, Peter Maydell wrote: >> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c >> index 698dd9cb82..790670ebeb 100644 >> --- a/target/s390x/cpu.c >> +++ b/target/s390x/cpu.c >> @@ -282,17 +282,18 @@ static void s390_cpu_initfn(Object *obj) >> { >> CPUState *cs = CPU(obj);

Re: [Qemu-devel] [PATCH 1/9] target/ppc: Fix xvxsigdp

2019-05-06 Thread Alexey Kardashevskiy
On 07/05/2019 10:48, Anton Blanchard wrote: > Fix a typo in xvxsigdp where we put both results into the lower > doubleword. > > Fixes: dd977e4f45cb ("target/ppc: Optimize x[sv]xsigdp using deposit_i64()") > Signed-off-by: Anton Blanchard > --- > target/ppc/translate/vsx-impl.inc.c | 2 +- >

Re: [Qemu-devel] [PATCH v2 3/3] aspeed: use sysbus_init_child_obj() to initialize children

2019-05-06 Thread Joel Stanley
On Mon, 6 May 2019 at 14:21, Cédric Le Goater wrote: > > Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley

Re: [Qemu-devel] [PATCH v2 1/3] aspeed: add a per SoC mapping for the interrupt space

2019-05-06 Thread Joel Stanley
On Mon, 6 May 2019 at 14:21, Cédric Le Goater wrote: > > This will simplify the definition of new SoCs, like the AST2600 which > should use a different CPU and a different IRQ number layout. > > Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley

Re: [Qemu-devel] [PATCH v2 0/2] Acceptance Tests: Test the Raspberry Pi 2 board

2019-05-06 Thread Philippe Mathieu-Daudé
On 5/6/19 11:41 PM, Eduardo Habkost wrote: > On Sat, May 04, 2019 at 01:52:51PM +0200, Philippe Mathieu-Daudé wrote: >> On 3/13/19 12:45 AM, Philippe Mathieu-Daudé wrote: >>> Add the raspi2 to the list of boards tested by the >>> boot_linux_console Avocado test. >>> >>> Based on "Acceptance Tests:

Re: [Qemu-devel] [PATCH] tests/qemu-iotests: Fix more reference output files due to recent qemu-io change

2019-05-06 Thread Thomas Huth
On 06/05/2019 18.52, Eric Blake wrote: > On 5/6/19 10:32 AM, Max Reitz wrote: >> On 01.05.19 15:41, Thomas Huth wrote: >>> The output of qemu-io changed recently - most tests have been fixed in >>> commit 36b9986b08787019ef42 ("tests/qemu-iotests: Fix output of qemu-io >>> related tests") already,

Re: [Qemu-devel] [PATCH v2 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-05-06 Thread Yan Zhao
On Mon, May 06, 2019 at 03:41:58PM +0800, Zhenyu Wang wrote: > On 2019.05.06 11:20:32 +0800, Zhenyu Wang wrote: > > On 2019.05.05 21:51:02 -0400, Yan Zhao wrote: > > > This feature implements the version attribute for Intel's vGPU mdev > > > devices. > > > > > > version attribute is rw. > > > It's

[Qemu-devel] [PATCH v2] ui/console: Precautionary glBindTexture and surface->texture validation in surface_gl_update_texture

2019-05-06 Thread Marcel Apfelbaum
From: HQM In a GVT-g setup with dmabuf and GTK GUI, the current 2D texture at surface_gl_update_texture is not necessarily surface->texture. Adding a glBindTexture fixes related crashes and artifacts, and is generally more secure. Signed-off-by: HQM Tested-by: Marcel Apfelbaum [fixed malformed

[Qemu-devel] [PATCH 5/9] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p

2019-05-06 Thread Anton Blanchard
We were using set_cpu_vsr* when we should have used set_cpu_vsrl* Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access") Signed-off-by: Anton Blanchard --- target/ppc/translate/vsx-impl.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH 7/9] target/ppc: Fix vrlwmi and vrlwnm

2019-05-06 Thread Anton Blanchard
We should only look at 5 bits of each byte, not 6. Fixes: 3e00884f4e9f ("target-ppc: add vrldnmi and vrlwmi instructions") Signed-off-by: Anton Blanchard --- target/ppc/int_helper.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/ppc/int_helper.c

Re: [Qemu-devel] [PATCH] tests: Force Python I/O encoding for check-qapi-schema

2019-05-06 Thread Philippe Mathieu-Daudé
On 5/6/19 11:38 PM, Eduardo Habkost wrote: > test-qapi.py doesn't force a specific encoding for stderr or > stdout, but the reference files used by check-qapi-schema are in > UTF-8. This breaks check-qapi-schema under certain circumstances > (e.g. if using the C locale and Python < 3.7). > > We

Re: [Qemu-devel] [PATCH v2 2/3] aspeed: add a per SoC mapping for the memory space

2019-05-06 Thread Joel Stanley
On Mon, 6 May 2019 at 14:21, Cédric Le Goater wrote: > > This will simplify the definition of new SoCs, like the AST2600 which > should use a slightly different address space and have a different set > of controllers. > > Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley

Re: [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-05-06 Thread Yan Zhao
On Tue, Apr 30, 2019 at 11:29:08PM +0800, Cornelia Huck wrote: > On Wed, 24 Apr 2019 04:15:58 -0400 > Yan Zhao wrote: > > > On Wed, Apr 24, 2019 at 03:56:24PM +0800, Cornelia Huck wrote: > > > On Tue, 23 Apr 2019 23:10:37 -0400 > > > Yan Zhao wrote: > > > > > > > On Tue, Apr 23, 2019 at

Re: [Qemu-devel] [PATCH v2 3/3] aspeed: use sysbus_init_child_obj() to initialize children

2019-05-06 Thread Philippe Mathieu-Daudé
Hi Cédric, On 5/6/19 4:20 PM, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > hw/arm/aspeed_soc.c | 50 ++--- > 1 file changed, 20 insertions(+), 30 deletions(-) > > diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c > index

[Qemu-devel] [PULL 3/3] decodetree: Add DisasContext argument to !function expanders

2019-05-06 Thread Richard Henderson
This does require adjusting all existing users. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 24 target/hppa/translate.c | 16 target/riscv/insn_trans/trans_rvc.inc.c | 10 +-

[Qemu-devel] [PATCH 6/7] block: Add *loosen_restrictions to *check*_perm()

2019-05-06 Thread Max Reitz
This patch makes three functions report whether the necessary permission change purely loosens restrictions or not. These functions are: - bdrv_check_perm() - bdrv_check_update_perm() - bdrv_child_check_perm() Callers can use this result to decide whether a failure is fatal or not (see the next

[Qemu-devel] [PATCH 1/7] file-posix: Update open_flags in raw_set_perm()

2019-05-06 Thread Max Reitz
raw_check_perm() + raw_set_perm() can change the flags associated with the current FD. If so, we have to update BDRVRawState.open_flags accordingly. Otherwise, we may keep reopening the FD even though the current one already has the correct flags. Signed-off-by: Max Reitz ---

Re: [Qemu-devel] [PATCH v4 24/24] target/i386: Implement CPUID_EXT_RDRAND

2019-05-06 Thread Eduardo Habkost
On Mon, May 06, 2019 at 10:33:53AM -0700, Richard Henderson wrote: > We now have an interface for guest visible random numbers. > > Cc: Paolo Bonzini > Cc: Eduardo Habkost > Signed-off-by: Richard Henderson Reviewed-by: Eduardo Habkost -- Eduardo

[Qemu-devel] [PATCH v4 23/24] target/ppc: Use qemu_guest_getrandom for DARN

2019-05-06 Thread Richard Henderson
We now have an interface for guest visible random numbers. Acked-by: David Gibson Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 42 + 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/target/ppc/int_helper.c

Re: [Qemu-devel] [PATCH v2 3/5] vvfat: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}()

2019-05-06 Thread Eric Blake
On 5/6/19 12:19 PM, Vladimir Sementsov-Ogievskiy wrote: +++ b/block/vvfat.c @@ -1494,8 +1494,8 @@ static int vvfat_read(BlockDriverState *bs, int64_t sector_num, DLOG(fprintf(stderr, "sectors %" PRId64 "+%" PRId64 "

[Qemu-devel] [Bug 1826568] Re: RISC-V Disassembler/translator instruction decoding disagreement

2019-05-06 Thread Floyd42
Sorry, I don't have the test code, since this was created by a memory corruption. However, the way I understand the message is, that there is some internal disagreement how to decode the op-code "05139517e2bf" - which mige be an invalid opcode anyway. So a simple test application would just

Re: [Qemu-devel] [PATCH 5/5] hw/block/pflash_cfi02: Add the DeviceReset() handler

2019-05-06 Thread Philippe Mathieu-Daudé
On 5/6/19 5:17 PM, Laszlo Ersek wrote: > On 05/05/19 22:06, Philippe Mathieu-Daudé wrote: >> The pflash device is a child of TYPE_DEVICE, so it can implement >> the DeviceReset handler. Actually it has to implement it, else >> on machine reset it might stay in an incoherent state, as it has >>

Re: [Qemu-devel] [RFC PATCH] tests/qemu-iotests: re-format output to for make check-block

2019-05-06 Thread Alex Bennée
Thomas Huth writes: > On 03/05/2019 18.15, Alex Bennée wrote: >> >> Thomas Huth writes: >> >>> On 03/05/2019 16.39, Alex Bennée wrote: This attempts to clean-up the output to better match the output of the rest of the QEMU check system. This includes: - formatting as "

Re: [Qemu-devel] [PATCH 0/7] Delete 16 *_cpu_class_by_name() functions

2019-05-06 Thread Eduardo Habkost
On Mon, May 06, 2019 at 01:53:28PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > This series adds a new CPUClass::class_name_format field, which > > allows us to delete 16 of the 21 *_cpu_class_by_name() functions > > that exist today. > > Which five remain, and why?

[Qemu-devel] [PATCH 5/7] block: Fix order in bdrv_replace_child()

2019-05-06 Thread Max Reitz
We have to start by applying the permission restrictions to new_bs before we can loosen them on old_bs. See the comment for the explanation. Signed-off-by: Max Reitz --- block.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH v4 20/24] hw/misc/exynos4210_rng: Use qemu_guest_getrandom

2019-05-06 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Cc: qemu-...@nongnu.org Cc: Igor Mitsyanko Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/misc/exynos4210_rng.c | 11 --- 1 file changed,

Re: [Qemu-devel] [PATCH] net: avoid to use variable length array in net_client_init()

2019-05-06 Thread Stefano Garzarella
On Mon, May 06, 2019 at 03:23:08PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > net_client_init() uses a variable length array to store the prefix > > of 'ipv6-net' parameter (e.g. if ipv6-net=fec0::0/64, the prefix > > is 'fec0::0'). > > Since the IPv6 prefix can be at

[Qemu-devel] [PATCH v4 19/24] hw/misc/bcm2835_rng: Use qemu_guest_getrandom_nofail

2019-05-06 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of rolling our own error handling locally. Cc: qemu-...@nongnu.org Cc: Andrew Baumann Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

[Qemu-devel] [PATCH v4 24/24] target/i386: Implement CPUID_EXT_RDRAND

2019-05-06 Thread Richard Henderson
We now have an interface for guest visible random numbers. Cc: Paolo Bonzini Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- target/i386/helper.h | 2 ++ target/i386/cpu.c| 5 ++-- target/i386/int_helper.c | 21 +++ target/i386/translate.c | 55

Re: [Qemu-devel] Failing QEMU iotest 175

2019-05-06 Thread Eric Blake
On 5/4/19 1:51 AM, Thomas Huth wrote: >> Hmm, it's passing for me on ext4, but that probably means we have >> different configuration parameters. I'm not sure how to easily show what >> parameters a particular ext4 partition uses to compare the differences >> between your setup and mine (mine is

Re: [Qemu-devel] [PATCH v1] hw/rdma: Add support for GID state changes for non-qmp frameworks

2019-05-06 Thread Kamal Heib
On 5/6/19 7:37 PM, Yuval Shaia wrote: > Any GID change in guest must be propagated to the host. This is already > done by firing QMP event to management system such as libvirt which in > turn will update the host with the relevant change. > > When qemu is executed on non-qmp framework (ex from

[Qemu-devel] [PATCH 3/7] block/mirror: Fix child permissions

2019-05-06 Thread Max Reitz
We cannot use bdrv_child_try_set_perm() to give up all restrictions on the child edge, and still have bdrv_mirror_top_child_perm() request BLK_PERM_WRITE. Fix this by making bdrv_mirror_top_child_perm() return 0/BLK_PERM_ALL when we want to give up all permissions, and replacing

[Qemu-devel] [PATCH 7/7] block: Ignore loosening perm restrictions failures

2019-05-06 Thread Max Reitz
We generally assume that loosening permission restrictions can never fail. We have seen in the past that this assumption is wrong. This has led to crashes because we generally pass _abort when loosening permissions. However, a failure in such a case should actually be handled in quite the

[Qemu-devel] [PATCH 4/7] block/commit: Drop bdrv_child_try_set_perm()

2019-05-06 Thread Max Reitz
commit_top_bs never requests or unshares any permissions. There is no reason to make this so explicit here. Signed-off-by: Max Reitz --- block/commit.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/commit.c b/block/commit.c index 14e5bb394c..44b3083b84 100644 --- a/block/commit.c

[Qemu-devel] [PATCH v4 15/24] linux-user/aarch64: Use qemu_guest_getrandom for PAUTH keys

2019-05-06 Thread Richard Henderson
Use a better interface for random numbers than rand() * 3. Cc: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 2 -- linux-user/aarch64/cpu_loop.c | 29 ++- linux-user/syscall.c

[Qemu-devel] [PATCH v4 18/24] hw/misc/nrf51_rng: Use qemu_guest_getrandom_nofail

2019-05-06 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of error_abort directly. Cc: qemu-...@nongnu.org Reviewed-by: Joel Stanley Signed-off-by: Richard Henderson --- hw/misc/nrf51_rng.c | 4 ++--

[Qemu-devel] [PATCH v4 09/24] ui/vnc: Use gcrypto_random_bytes for start_auth_vnc

2019-05-06 Thread Richard Henderson
Use a better interface for random numbers than rand(). Fail gracefully if for some reason we cannot use the crypto system. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- v2: Use qcrypto_random_bytes, not

[Qemu-devel] [PATCH v4 05/24] crypto: Use O_CLOEXEC in qcrypto_random_init

2019-05-06 Thread Richard Henderson
Avoids leaking the /dev/urandom fd into any child processes. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- crypto/random-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/random-platform.c

[Qemu-devel] [PATCH v4 07/24] crypto: Change the qcrypto_random_bytes buffer type to void*

2019-05-06 Thread Richard Henderson
Using uint8_t* merely requires useless casts for use with other types to be filled with randomness. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- include/crypto/random.h | 2 +- crypto/random-gcrypt.c | 2 +- crypto/random-gnutls.c

[Qemu-devel] [PATCH v4 16/24] linux-user: Remove srand call

2019-05-06 Thread Richard Henderson
We no longer use rand() within linux-user. Cc: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index e05aebe4e1..5d1c6a115b 100644 ---

Re: [Qemu-devel] [Bug 1826393] Re: QEMU 3.1.0 stuck waiting for 800ms (5 times slower) in pre-bios phase

2019-05-06 Thread Waldemar Kozaczuk
The last bios indeed helped. It knows runs under 200ms. Do you anticipate doing minor release of 3.1.0 with updated bios to address this issue? Or users are expected to upgrade to QEMU 4.0.0? Regards, Waldek On Thu, May 2, 2019 at 4:05 AM Stefano Garzarella < 1826...@bugs.launchpad.net> wrote:

Re: [Qemu-devel] [PATCH] net: avoid to use variable length array in net_client_init()

2019-05-06 Thread Eric Blake
On 5/3/19 12:06 PM, Stefano Garzarella wrote: > net_client_init() uses a variable length array to store the prefix > of 'ipv6-net' parameter (e.g. if ipv6-net=fec0::0/64, the prefix > is 'fec0::0'). > Since the IPv6 prefix can be at most as long as an IPv6 address, > we can use an array with fixed

[Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'

2019-05-06 Thread Christian Schoenebeck via Qemu-devel
This is the counter part patch against latest libvirt git master head to support the 'vii' feature of patch 5, which introduces the XML config XML tag "important" on libvirt side. To stick with the previous example mentioned with patch 5, likewise libvirt XML configuration might then look like

Re: [Qemu-devel] [PATCH v2 2/2] configure: disallow spaces and colons in source path and build path

2019-05-06 Thread Antonio Ospite
On Mon, 6 May 2019 12:27:46 -0500 Eric Blake wrote: > On 5/3/19 3:27 AM, Antonio Ospite wrote: > > From: Antonio Ospite > > > > The configure script breaks when the qemu source directory is in a path > > containing white spaces, in particular the list of targets is not > > correctly generated

[Qemu-devel] [PATCH v4 11/24] cpus: Initialize pseudo-random seeds for all guest cpus

2019-05-06 Thread Richard Henderson
When the -seed option is given, call qemu_guest_random_seed_main, putting the subsystem into deterministic mode. Pass derived seeds to each cpu created; which is a no-op unless the subsystem is in deterministic mode. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé

[Qemu-devel] [PATCH v4 10/24] util: Add qemu_guest_getrandom and associated routines

2019-05-06 Thread Richard Henderson
This routine is intended to produce high-quality random numbers to the guest. Normally, such numbers are crypto quality from the host, but a command-line option can force the use of a fully deterministic sequence for use while debugging. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel

[Qemu-devel] [PATCH v4 21/24] target/arm: Put all PAC keys into a structure

2019-05-06 Thread Richard Henderson
This allows us to use a single syscall to initialize them all. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 12 +++- linux-user/aarch64/cpu_loop.c | 6 +- linux-user/syscall.c | 10 +- target/arm/helper.c

[Qemu-devel] [PULL 1/3] decodetree: Initial support for variable-length ISAs

2019-05-06 Thread Richard Henderson
Assuming that the ISA clearly describes how to determine the length of the instruction, and the ISA has a reasonable maximum instruction length, the input to the decoder can be right-justified in an appropriate insn word. This is not 100% convenient, as out-of-line %fields are numbered relative

[Qemu-devel] [PULL 2/3] decodetree: Expand a decode_load function

2019-05-06 Thread Richard Henderson
Read the instruction, loading no more bytes than necessary. Signed-off-by: Richard Henderson --- scripts/decodetree.py | 175 +- 1 file changed, 172 insertions(+), 3 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index

[Qemu-devel] [PULL 0/3] decodetree: Support variable-length ISAs

2019-05-06 Thread Richard Henderson
://github.com/rth7680/qemu.git tags/pull-dt-20190506 for you to fetch changes up to 451e4ffdb0003ab5ed0d98bd37b385c076aba183: decodetree: Add DisasContext argument to !function expanders (2019-05-06 11:18:34 -0700) Add support

[Qemu-devel] [PATCH 0/7] block: Ignore loosening perm restrictions failures

2019-05-06 Thread Max Reitz
Hi, This series is mainly a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1703793. The problem described there is that mirroring to a gluster volume, then switching off the volume makes qemu crash. There are two problems here: (1) file-posix reopens the FD all the time because it thinks

[Qemu-devel] [PATCH 2/7] block: Add bdrv_child_refresh_perms()

2019-05-06 Thread Max Reitz
If a block node uses bdrv_child_try_set_perm() to change the permission it takes on its child, the result may be very short-lived. If anything makes the block layer recalculate the permissions internally, it will invoke the node driver's .bdrv_child_perm() implementation. The permission/shared

Re: [Qemu-devel] [PATCH v2 1/3] q35: set split kernel irqchip as default

2019-05-06 Thread Eduardo Habkost
On Mon, May 06, 2019 at 11:13:28AM -0500, Paolo Bonzini wrote: > On 05/05/19 04:06, Peter Xu wrote: > >> I wonder if it's possible to untangle this and make the irqchip > >> option stop affecting guest ABI on 4.1+ machine-types? This way > >> QEMU could choose smarter defaults in the future

[Qemu-devel] [PATCH v4 17/24] aspeed/scu: Use qemu_guest_getrandom_nofail

2019-05-06 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of rolling our own error handling locally. Cc: qemu-...@nongnu.org Cc: Andrew Jeffery Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric

[Qemu-devel] [PATCH v4 13/24] linux-user: Call qcrypto_init if not using -seed

2019-05-06 Thread Richard Henderson
Cc: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 7dfb202e5d..e05aebe4e1 100644 --- a/linux-user/main.c

[Qemu-devel] [PATCH v4 14/24] linux-user: Use qemu_guest_getrandom_nofail for AT_RANDOM

2019-05-06 Thread Richard Henderson
Use a better interface for random numbers than rand * 16. Cc: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[Qemu-devel] [PATCH v4 22/24] target/arm: Implement ARMv8.5-RNG

2019-05-06 Thread Richard Henderson
Cc: qemu-...@nongnu.org Cc: Peter Maydell Signed-off-by: Richard Henderson --- v3: Log errors with -d unimp, for lack of a better flag. --- target/arm/cpu.h| 5 + target/arm/cpu64.c | 1 + target/arm/helper.c | 44 3 files changed, 50

Re: [Qemu-devel] [RFC PATCH] tests/qemu-iotests: re-format output to for make check-block

2019-05-06 Thread Alex Bennée
Vladimir Sementsov-Ogievskiy writes: > 05.05.2019 18:54, Thomas Huth wrote: >> On 03/05/2019 18.15, Alex Bennée wrote: >>> >>> Thomas Huth writes: >>> On 03/05/2019 16.39, Alex Bennée wrote: > This attempts to clean-up the output to better match the output of the > rest of the

Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file

2019-05-06 Thread Michael Rolnik
Yes Sent from my cell phone, please ignore typos On Mon, May 6, 2019, 6:11 PM Eric Blake wrote: > On 5/4/19 3:36 AM, Sarah Harris wrote: > > Signed-off-by: Sarah Harris > > --- > > > +++ b/qapi/common.json > > @@ -187,7 +187,7 @@ > > # Since: 3.0 > > ## > > { 'enum' : 'SysEmuTarget', > > -

[Qemu-devel] [PATCH] blockdev-backup: don't check aio_context too early

2019-05-06 Thread John Snow
in blockdev_backup_prepare, we check to make sure that the target is associated with a compatible aio context. However, do_blockdev_backup is called later and has some logic to move the target to a compatible aio_context. The transaction version will fail certain commands needlessly early as a

Re: [Qemu-devel] [PATCH RFC] s390/css: handle CCW_FLAG_SKIP

2019-05-06 Thread Eric Farman
On 5/6/19 1:17 PM, Cornelia Huck wrote: If a ccw has CCW_FLAG_SKIP set, and the command is of type read, read backwards, or sense, no data should be written to the guest for that command. Signed-off-by: Cornelia Huck --- Only extremely lightly tested (i.e., can boot a guest.) ---

[Qemu-devel] [PATCH] tests: Force Python I/O encoding for check-qapi-schema

2019-05-06 Thread Eduardo Habkost
test-qapi.py doesn't force a specific encoding for stderr or stdout, but the reference files used by check-qapi-schema are in UTF-8. This breaks check-qapi-schema under certain circumstances (e.g. if using the C locale and Python < 3.7). We need to make sure test-qapi.py always generate UTF-8

Re: [Qemu-devel] [PATCH v2 0/2] Acceptance Tests: Test the Raspberry Pi 2 board

2019-05-06 Thread Eduardo Habkost
On Sat, May 04, 2019 at 01:52:51PM +0200, Philippe Mathieu-Daudé wrote: > On 3/13/19 12:45 AM, Philippe Mathieu-Daudé wrote: > > Add the raspi2 to the list of boards tested by the > > boot_linux_console Avocado test. > > > > Based on "Acceptance Tests: target architecture support" v5: > >

[Qemu-devel] [PATCH v1 1/1] target/riscv: Allow setting ISA extensions via CPU props

2019-05-06 Thread Alistair Francis
This patch allows us to enable/disable the RISC-V ISA extensions from the QEMU command line. This works with the rv32 and rv64 machines. The idea is that in the future we can now add extensions and leave them disabled by default until enabled by the user. Signed-off-by: Alistair Francis ---

Re: [Qemu-devel] [QEMU-PPC] [PATCH 01/13] target/ppc: Implement the VTB for HV access

2019-05-06 Thread David Gibson
On Fri, May 03, 2019 at 03:53:04PM +1000, Suraj Jitindar Singh wrote: > The virtual timebase register (VTB) is a 64-bit register which > increments at the same rate as the timebase register, present on POWER8 > and later processors. > > The register is able to be read/written by the hypervisor

Re: [Qemu-devel] [QEMU-PPC] [PATCH 04/13] target/ppc: Add SPR TBU40

2019-05-06 Thread David Gibson
On Fri, May 03, 2019 at 03:53:07PM +1000, Suraj Jitindar Singh wrote: > The spr TBU40 is used to set the upper 40 bits of the timebase > register, present on POWER5+ and later processors. > > This register can only be written by the hypervisor, and cannot be read. > > Signed-off-by: Suraj

Re: [Qemu-devel] [QEMU-PPC] [PATCH 02/13] target/ppc: Work [S]PURR implementation and add HV support

2019-05-06 Thread David Gibson
On Fri, May 03, 2019 at 03:53:05PM +1000, Suraj Jitindar Singh wrote: > The Processor Utilisation of Resources Register (PURR) and Scaled > Processor Utilisation of Resources Register (SPURR) provide an estimate > of the resources used by the thread, present on POWER7 and later > processors. > >

Re: [Qemu-devel] [QEMU-PPC] [PATCH 03/13] target/ppc: Add SPR ASDR

2019-05-06 Thread David Gibson
On Fri, May 03, 2019 at 03:53:06PM +1000, Suraj Jitindar Singh wrote: > The Access Segment Descriptor Register (ASDR) provides information about > the storage element when taking a hypervisor storage interrupt. When > performing nested radix address translation, this is normally the guest > real

Re: [Qemu-devel] [PATCH v2 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-05-06 Thread Zhenyu Wang
On 2019.05.06 11:20:32 +0800, Zhenyu Wang wrote: > On 2019.05.05 21:51:02 -0400, Yan Zhao wrote: > > This feature implements the version attribute for Intel's vGPU mdev > > devices. > > > > version attribute is rw. > > It's used to check device compatibility for two mdev devices. > > version

Re: [Qemu-devel] [PATCH for-4.1 00/24] Fix record/replay and add reverse debugging

2019-05-06 Thread Pavel Dovgalyuk
Ping. Can anyone PULL these patches? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@gmail.com] > Sent: Monday, April 22, 2019 2:20 PM > To: qemu-devel@nongnu.org > Cc: kw...@redhat.com; peter.mayd...@linaro.org; war2jor...@live.com; >

Re: [Qemu-devel] Spreading the load on QEMU pullreq handling and release work

2019-05-06 Thread Aleksandar Markovic
On Apr 30, 2019 7:38 PM, "Peter Maydell" wrote: > > For most releases in the past five years, I've been handling the > work of applying pull requests, tagging release candidates, and > so on. (For one or two releases somebody else has done this when > I've been off on holiday.) This takes up a

Re: [Qemu-devel] [PATCH] target/sh4: Fix LGPL information in the file headers

2019-05-06 Thread Thomas Huth
On 13/02/2019 16.58, Thomas Huth wrote: > It's either "GNU *Library* General Public License version 2" or "GNU > Lesser General Public License version *2.1*", but there was no "version > 2.0" of the "Lesser" license. So assume that version 2.1 is meant here. > > Signed-off-by: Thomas Huth > ---

[Qemu-devel] [QEMU PATCH] MAINTAINERS: Downgrade status of block sections without "M:" to "Odd Fixes"

2019-05-06 Thread Thomas Huth
Fixes might still get picked up via the qemu-block mailing list, so the status is not "Orphan" yet. Also add the gluster mailing list as suggested by Niels here: https://patchwork.kernel.org/patch/10613297/#22409943 Signed-off-by: Thomas Huth --- MAINTAINERS | 5 +++-- 1 file changed, 3

Re: [Qemu-devel] [QEMU PATCH] MAINTAINERS: Downgrade status of block sections without "M:" to "Odd Fixes"

2019-05-06 Thread Niels de Vos
On Mon, May 06, 2019 at 08:18:54AM +0200, Thomas Huth wrote: > Fixes might still get picked up via the qemu-block mailing list, > so the status is not "Orphan" yet. > Also add the gluster mailing list as suggested by Niels here: > > https://patchwork.kernel.org/patch/10613297/#22409943 > >

Re: [Qemu-devel] [QEMU-PPC] [PATCH 00/13] target/ppc: Implement KVM support under TCG

2019-05-06 Thread David Gibson
On Fri, May 03, 2019 at 03:53:03PM +1000, Suraj Jitindar Singh wrote: > This patch series adds the necessary parts so that a tcg guest is able to use > kvm facilities. That is a tcg guest can boot its own kvm guests. The topic line is a bit hard to parse. IIUC there are basically two things in

[Qemu-devel] [Bug 1826827] Re: dtc crash; pnv_dt_serial cannot find lpc's phandle

2019-05-06 Thread David Gibson
IIUC there are two bugs here 1) The powernv machine in qemu is attempting to use a phandle for node that doesn't have one. It will need to assign a phandle to that node and re-use it elsewhere. This should be pretty straightforward. 2) dtc is crashing with an assertion - that shouldn't happen,

Re: [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects

2019-05-06 Thread Philippe Mathieu-Daudé
On 5/6/19 6:10 AM, Thomas Huth wrote: > On 05/05/2019 20.07, Philippe Mathieu-Daudé wrote: >> All these devices do not contain any target-specific code. While >> most of them are arch-specific, they are shared between different >> targets of the same arch family (ARM and AArch64, MIPS32/MIPS64, >>

Re: [Qemu-devel] [PATCH] qom/object: Display more helpful message when an object type is missing

2019-05-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > When writing a new board, adding device which uses other devices > (container) or simply refactoring, one can discover the hard way > his machine misses some devices. In the case of containers, the > error is not obvious: > > $ qemu-system-microblaze -M

Re: [Qemu-devel] [PATCH] s390-bios: Skip bootmap signature entries

2019-05-06 Thread Christian Borntraeger
On 03.05.19 11:34, Thomas Huth wrote: > On 29/04/2019 15.09, Jason J. Herne wrote: >> Newer versions of zipl have the ability to write signature entries to the >> boot >> script for secure boot. We don't yet support secure boot, but we need to skip >> over signature entries while reading the boot

Re: [Qemu-devel] [PATCH] virtfs: Add missing "id" parameter in documentation

2019-05-06 Thread Greg Kurz
On Mon, 6 May 2019 05:49:40 +0200 Thomas Huth wrote: > On 05/05/2019 20.32, Greg Kurz wrote: > > Hi Thomas, > > > > Thanks for the janitoring :) > > > > On Sun, 5 May 2019 16:45:27 +0200 > > Thomas Huth wrote: > > > >> ... and remove the square brackets from "path" and "security_model", >

Re: [Qemu-devel] [PATCH v4 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-05-06 Thread Philippe Mathieu-Daudé
On 4/26/19 6:26 PM, Stephen Checkoway wrote: > Simplify and refactor for upcoming commits. In particular, pull out all > of the code to modify the status into simple helper functions. Status > handling becomes more complex once multiple chips are interleaved to > produce a single device. > > No

  1   2   3   >