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

2019-05-06 Thread Hou Qiming
My real name is "HOU Qiming". @Marcel Apfelbaum can you incorporate that in your v2 patch? Thanks! Qiming On Tue, May 7, 2019 at 2:25 PM Philippe Mathieu-Daudé wrote: > Hi Marcel, > > On 5/7/19 7:49 AM, Marcel Apfelbaum wrote: > > From: HQM > > > > In a GVT-g setup with dmabuf and GTK GUI, th

[Qemu-devel] [PATCH v3 3/5] pcie: Simplify pci_adjust_config_limit()

2019-05-06 Thread David Gibson
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 access to extended config space on buses which permit it. Specifically it prevents access on devices below a vanilla-PCI bus via some

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:08AM +1000, Anton Blanchard wrote: > 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 Applied, thanks. > --- > target/ppc/int_helper.c | 14 +++-

[Qemu-devel] Use of PreallocMode in block drivers (was: [PATCH] block/rbd: add preallocation support)

2019-05-06 Thread Markus Armbruster
Cc: Peter for a libvirt perspective. Stefano Garzarella writes: > This patch adds the support of preallocation (off/full) for the RBD > block driver. > If available, we use rbd_writesame() to quickly fill the image when > full preallocation is required. > > Signed-off-by: Stefano Garzarella > -

[Qemu-devel] [PATCH v3 0/5] Simplify some not-really-necessary PCI bus callbacks

2019-05-06 Thread David Gibson
c2077e2c "pci: Adjust PCI config limit based on bus topology" introduced checking the availability of extended config space for PCI-E devices which are in a bus topology that doesn't permit extended config space access (e.g. under PCI-E to PCI then PCI to PCI-E bridges). This caused some problems

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

2019-05-06 Thread Philippe Mathieu-Daudé
Hi Marcel, On 5/7/19 7:49 AM, Marcel Apfelbaum wrote: > 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.

[Qemu-devel] [PATCH v3 1/5] pcie: Remove redundant test in pcie_mmcfg_data_{read, write}()

2019-05-06 Thread David Gibson
These functions have an explicit test for accesses above the device's config size. But pci_host_config_{read,write}_common() which they're about to call already have checks against the config space limit and do the right thing. So, remove the redundant tests. Signed-off-by: David Gibson Reviewe

[Qemu-devel] [PATCH v3 2/5] pci: Simplify pci_bus_is_root()

2019-05-06 Thread David Gibson
pci_bus_is_root() currently relies on a method in the PCIBusClass. But it's always known if a PCI bus is a root bus when we create it, so using a dynamic method is overkill. This replaces it with an IS_ROOT bit in a new flags field, which is set on root buses and otherwise clear. As a bonus this

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:09AM +1000, Anton Blanchard wrote: > 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 Hrm. So, what lives in those extra bits in the 'w' instructions? Is

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:06AM +1000, Anton Blanchard wrote: > 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 regis

[Qemu-devel] [PATCH v3 4/5] pci: Make is_bridge a bool

2019-05-06 Thread David Gibson
The is_bridge field in PCIDevice acts as a bool, but is declared as an int. Declare it as a bool for clarity, and change everything that writes it to use true/false instead of 0/1 to match. Signed-off-by: David Gibson --- hw/pci-bridge/dec.c| 4 ++-- hw/pci-bridge/i82801b11.c

[Qemu-devel] [PATCH v3 5/5] pci: Fold pci_get_bus_devfn() into its sole caller

2019-05-06 Thread David Gibson
The only remaining caller of pci_get_bus_devfn() is pci_nic_init_nofail(), itself an old compatibility function. Fold the two together to avoid re-using the stale interface. While we're there replace the explicit fprintf()s with error_report(). Signed-off-by: David Gibson --- hw/pci/pci.c | 61

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:11AM +1000, Anton Blanchard wrote: > 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

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 09:43:34AM +1000, Suraj Jitindar Singh wrote: > 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

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:05AM +1000, Anton Blanchard wrote: > 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 Blanchar

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:03AM +1000, 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 Applied, thanks. > --- > target/ppc

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:04AM +1000, Anton Blanchard wrote: > 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 >

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

2019-05-06 Thread David Gibson
On Tue, May 07, 2019 at 10:48:07AM +1000, Anton Blanchard wrote: > We were using set_cpu_vsr* when we should have used set_cpu_vsrl* Commit message doesn't appear to match the code. > > Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() > helpers for VSR register access")

[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

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

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 bd83618c

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 05:59:32

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 wor

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] 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 n

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 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] 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 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 acc

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 mach

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 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] 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 RAMBlock->bma

[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's

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 u

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 +- > 1

[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 Blanchar

[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 a/target/pp

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 | 8

[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 b/

[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 --- target/ppc/translate/vsx-

[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 b/tar

[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 delet

[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 in

[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 a/targ

[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 inser

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 garb

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 li

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 (PU

[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 --- Based

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: > > https://

[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 out

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 withou

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

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.) --- hw/s390

[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 resu

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 w

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 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 fb6f0

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? alpha_cpu

[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 pe

[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 --- block/file-posix.

[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 p

[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 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 &error_abort when loosening permissions. However, a failure in such a case should actually be handled in quite the

[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 bdrv_child_try_set

[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 t

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 " T

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 QEM

[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 con

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 >> been

[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 +- target/riscv/transla

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

2019-05-06 Thread Richard Henderson
: https://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 s

[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 to

[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 555a46522b.

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 thi

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 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 " alloc

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 t

[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 +

[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: Richard

[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 b/target/ppc/int

[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, 4

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 most

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 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 ++-- 1

[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 inser

[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 ind

[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 Le

[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 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 b/cryp

[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_

[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é Signed-off

[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 P.

[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

  1   2   3   >