[Qemu-devel] [QEMU-PPC] [PATCH 11/13] target/ppc: Implement hcall H_COPY_TOFROM_GUEST

2019-05-02 Thread Suraj Jitindar Singh
The hcall H_COPY_TOFROM_GUEST of used by a guest acting as a nested hypervisor to access quadrants since quadrant access is hypervisor privileged. Translate the guest address to be accessed, map the memory and perform the access on behalf of the guest. If the parameters are invalid, the address

[Qemu-devel] [QEMU-PPC] [PATCH 05/13] target/ppc: Add privileged message send facilities

2019-05-02 Thread Suraj Jitindar Singh
Privileged message send facilities exist on POWER8 processors and later and include a register and instructions which can be used to generate, observe/modify the state of and clear privileged doorbell exceptions as described below. The Directed Privileged Doorbell Exception State (DPDES) register

[Qemu-devel] [QEMU-PPC] [PATCH 12/13] target/ppc: Introduce POWER9 DD2.2 cpu type

2019-05-02 Thread Suraj Jitindar Singh
Introduce a POWER9 DD2.2 cpu type with pvr 0x004E1202. A DD2.2 POWER9 cpu type is needed to enable kvm for pseries tcg guests since it means they will use the H_ENTER_NESTED hcall to run a guest rather than trying the generic entry path which will fail. Signed-off-by: Suraj Jitindar Singh ---

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

2019-05-02 Thread Suraj Jitindar Singh
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 Jitindar Singh --- hw/ppc/ppc.c| 13 +

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

2019-05-02 Thread Suraj Jitindar Singh
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. Currently the [S]PURR registers simply count at the rate of the timebase.

[Qemu-devel] [QEMU-PPC] [PATCH 07/13] target/ppc: Handle partition scoped radix tree translation

2019-05-02 Thread Suraj Jitindar Singh
Radix tree translation is a 2 step process: Process Scoped Translation: Effective Address (EA) -> Virtual Address (VA) Paritition Scoped Translation: Virtual Address (VA) -> Real Address (RA) Performed based on: MSR[HV]

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

2019-05-02 Thread Suraj Jitindar Singh
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 main requirements for this were a few registers and instructions as well as some hcalls and the addition of partition scoped translation in the radix

Re: [Qemu-devel] [PATCH v2] hw/virtio/virtio-mmio: Convert DPRINTF to traces

2019-05-02 Thread LI, BO XUAN
Hi Yuval and Alex, Thanks for the suggestions. I'll update and send a patch v3 soon. Best regards, Boxuan Li On Wed, May 1, 2019 at 11:17 PM Alex Bennée wrote: > > Yuval Shaia writes: > > > On Wed, May 01, 2019 at 08:42:35PM +0800, LI, BO XUAN wrote: > >>On Wed, May 1, 2019 at 4:58 PM

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

2019-05-02 Thread Suraj Jitindar Singh
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 and read by the supervisor. All other accesses are illegal. Currently the VTB is

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

2019-05-02 Thread Suraj Jitindar Singh
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 address. This register is present on POWER9 processors and later. Implement

Re: [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats

2019-05-02 Thread Stefan Weil
On 03.05.19 07:11, Thomas Huth wrote: > On 03/05/2019 02.37, Cao Jiaxi wrote: >> I encountered the following compilation error on mingw: >> >> /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro >> redefined [-Werror,-Wmacro-redefined] >> #define __USE_MINGW_ANSI_STDIO 1

Re: [Qemu-devel] [PATCH v3 27/40] s390x/tcg: Implement VECTOR ELEMENT ROTATE AND INSERT UNDER MASK

2019-05-02 Thread Richard Henderson
On 5/2/19 7:10 AM, David Hildenbrand wrote: > Use the new vector expansion for GVecGen3i. > > Signed-off-by: David Hildenbrand > --- > target/s390x/helper.h | 2 ++ > target/s390x/insn-data.def | 2 ++ > target/s390x/translate_vx.inc.c | 51 + >

Re: [Qemu-devel] [PATCH v3 12/40] s390x/tcg: Implement VECTOR COUNT TRAILING ZEROS

2019-05-02 Thread Richard Henderson
On 5/2/19 7:09 AM, David Hildenbrand wrote: > Implement it similar to VECTOR COUNT LEADING ZEROS. > > Signed-off-by: David Hildenbrand > --- > target/s390x/helper.h | 2 ++ > target/s390x/insn-data.def | 2 ++ > target/s390x/translate_vx.inc.c | 28

Re: [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats

2019-05-02 Thread Thomas Huth
On 03/05/2019 02.37, Cao Jiaxi wrote: > I encountered the following compilation error on mingw: > > /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro > redefined [-Werror,-Wmacro-redefined] > #define __USE_MINGW_ANSI_STDIO 1 > ^ >

Re: [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64

2019-05-02 Thread Thomas Huth
On 03/05/2019 02.37, Cao Jiaxi wrote: > Windows ARM64 uses LLP64 model, which breaks current assumptions. > > Signed-off-by: Cao Jiaxi > --- > util/cacheinfo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/cacheinfo.c b/util/cacheinfo.c > index

Re: [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion

2019-05-02 Thread Thomas Huth
On 03/05/2019 02.36, Cao Jiaxi wrote: > The win2qemu[] is supposed to be the conversion table to convert between > STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. > > But it was incorrectly written that it forces to set a GuestDiskBusType > value to STORAGE_BUS_TYPE, which generates

Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets

2019-05-02 Thread Thomas Huth
On 03/05/2019 02.36, Cao Jiaxi wrote: > gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW > targets. > > Signed-off-by: Cao Jiaxi > --- > contrib/libvhost-user/libvhost-user.h | 2 +- > include/qemu/compiler.h | 2 +- > scripts/cocci-macro-file.h

Re: [Qemu-devel] Failing QEMU iotest 221

2019-05-02 Thread Thomas Huth
On 03/05/2019 00.02, Eric Blake wrote: > On 4/28/19 10:21 AM, Thomas Huth wrote: >> QEMU iotest 221 is failing for me, too, when I run it with -raw: > > Which filesystem? ext4 again. $ stat -f /home/thuth/tmp/qemu-build/tests/qemu-iotests/ File:

Re: [Qemu-devel] Failing QEMU iotest 175

2019-05-02 Thread Thomas Huth
On 02/05/2019 23.56, Eric Blake wrote: > On 4/28/19 10:18 AM, Thomas Huth wrote: >> QEMU iotest 175 is failing for me when I run it with -raw: >> > >> == creating image with default preallocation == >> Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 >> -size=1048576, blocks=0 >>

Re: [Qemu-devel] [PATCH v3 04/40] s390x/tcg: Implement VECTOR ADD WITH CARRY COMPUTE CARRY

2019-05-02 Thread Richard Henderson
On 5/2/19 7:09 AM, David Hildenbrand wrote: > Similar to VECTOR ADD COMPUTE CARRY, however 128-bit handling only. > Courtesy of Richard H. > > Signed-off-by: David Hildenbrand > --- > target/s390x/insn-data.def | 2 ++ > target/s390x/translate_vx.inc.c | 32

Re: [Qemu-devel] [PATCH v3 02/40] s390x/tcg: Implement VECTOR ADD COMPUTE CARRY

2019-05-02 Thread Richard Henderson
On 5/2/19 7:09 AM, David Hildenbrand wrote: > 128-bit handling courtesy of Richard H. > > Signed-off-by: David Hildenbrand > --- > target/s390x/insn-data.def | 2 + > target/s390x/translate_vx.inc.c | 94 + > 2 files changed, 96 insertions(+) Reviewed-by:

Re: [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion

2019-05-02 Thread Richard Henderson
On 5/2/19 5:36 PM, Cao Jiaxi wrote: > The win2qemu[] is supposed to be the conversion table to convert between > STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. > > But it was incorrectly written that it forces to set a GuestDiskBusType > value to STORAGE_BUS_TYPE, which generates an

Re: [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64

2019-05-02 Thread Richard Henderson
On 5/2/19 5:37 PM, Cao Jiaxi wrote: > Windows ARM64 uses LLP64 model, which breaks current assumptions. > > Signed-off-by: Cao Jiaxi > --- > util/cacheinfo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/cacheinfo.c b/util/cacheinfo.c > index

[Qemu-devel] [PATCH v2] arm: aspeed: Set SDRAM size

2019-05-02 Thread Joel Stanley
We currently use Qemu's default of 128MB. As we know how much ram each machine ships with, make it easier on users by setting a default. It can still be overridden with -m on the command line. Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery Reviewed-by: Richard Henderson --- v2: -

Re: [Qemu-devel] [PATCH] Revert "armv7m: Guard against no -kernel argument"

2019-05-02 Thread Joel Stanley
On Wed, 1 May 2019 at 16:23, Stefan Hajnoczi wrote: > > On Mon, Apr 29, 2019 at 12:53:48PM +, Joel Stanley wrote: > > On Fri, 26 Apr 2019 at 09:17, Stefan Hajnoczi wrote: > > > > > > A user-friendly error message is needed here. The check for -kernel was > > > too specific and is not

Re: [Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties

2019-05-02 Thread Eduardo Habkost
On Thu, May 02, 2019 at 05:09:28PM +0200, Igor Mammedov wrote: > On Tue, 30 Apr 2019 15:30:31 +0800 > Like Xu wrote: > > > On 2019/4/4 22:25, Igor Mammedov wrote: > > > On Fri, 29 Mar 2019 16:48:38 +0800 > > > Like Xu wrote: > > > > > [...] > > > > > The division of responsibility for this

Re: [Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties

2019-05-02 Thread Eduardo Habkost
On Tue, Apr 30, 2019 at 03:30:31PM +0800, Like Xu wrote: > On 2019/4/4 22:25, Igor Mammedov wrote: > > On Fri, 29 Mar 2019 16:48:38 +0800 > > Like Xu wrote: > > > > > > > > > diff --git a/cpus.c b/cpus.c > > > index e83f72b..834a697 100644 > > > --- a/cpus.c > > > +++ b/cpus.c > > > @@

[Qemu-devel] [PULL 19/19] configure: automatically pick python3 is available

2019-05-02 Thread Eduardo Habkost
From: Daniel P. Berrangé Unless overridden via an env var or configure arg, QEMU will only look for the 'python' binary in $PATH. This is unhelpful on distros which are only shipping Python 3.x (eg Fedora) in their default install as, if they comply with PEP 394, the bare 'python' binary won't

[Qemu-devel] [PULL 15/19] tests/boot_linux_console: add a test for aarch64 + virt

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Just like the previous tests, boots a Linux kernel on a aarch64 target using the virt machine. One special option added is the CPU type, given that the kernel selected fails to boot on the virt machine's default CPU (cortex-a15). Signed-off-by: Cleber Rosa Reviewed-by: Caio

[Qemu-devel] [PULL 14/19] tests/boot_linux_console: add a test for mips64el + malta

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta board and verify the serial is working. If mips64el is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:mips64el" tags. Alternatively, this test can

[Qemu-devel] [PULL 18/19] tests/boot_linux_console: add a test for alpha + clipper

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta board and verify the serial is working. One extra command added to the QEMU command line is '-vga std', because the kernel used is known to crash without it. If alpha is a target being built, "make

[Qemu-devel] [PATCH v3] hw/usb/hcd-xhci: Fix GCC 9 build warning

2019-05-02 Thread Alistair Francis
Fix this build warning with GCC 9 on Fedora 30: hw/usb/hcd-xhci.c:3339:66: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 5 [-Werror=format-truncation=] 3339 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);

[Qemu-devel] [PULL 17/19] tests/boot_linux_console: add a test for s390x + s390-ccw-virtio

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Just like the previous tests, boots a Linux kernel on a s390x target using the s390-ccw-virtio machine. Because it's not possible to have multiple VT220 consoles, '-nodefaults' is used, so that the one set with set_console() works correctly. Signed-off-by: Cleber Rosa

[Qemu-devel] [PULL 16/19] tests/boot_linux_console: add a test for arm + virt

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Just like the previous tests, boots a Linux kernel on an arm target using the virt machine. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Message-Id: <20190312171824.5134-19-cr...@redhat.com> Signed-off-by: Eduardo Habkost --- .travis.yml

[Qemu-devel] [PULL 10/19] tests/boot_linux_console: increase timeout

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa When running on very low powered environments, some tests may time out causing false negatives. As a conservative change, and for considering that human time (investigating false negatives) is worth more than some extra machine cycles (and time), let's increase the overall

[Qemu-devel] [PULL 09/19] tests/boot_linux_console: add common kernel command line options

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa The 'printk.time=0' option makes it easier to parse the console output. Let's set it as a default, and reusable, kernel command line options for this and future similar tests. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck

[Qemu-devel] [PULL 13/19] tests/boot_linux_console: add a test for mips + malta

2019-05-02 Thread Eduardo Habkost
From: Philippe Mathieu-Daudé Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta board and verify the serial is working. Also, it relies on the serial device set by the machine itself. If mips is a target being built, "make check-acceptance" will automatically include this test

[Qemu-devel] [PULL 11/19] tests/boot_linux_console: refactor the console watcher into utility method

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa This introduces a utility method that monitors the console device and looks for either a message that signals the test success or failure. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Message-Id:

[Qemu-devel] [PULL 06/19] tests/acceptance: look for target architecture in test tags first

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa A test can, optionally, be tagged for one or many architectures. If a test has been tagged for a single architecture, there's a high chance that the test won't run on other architectures. This changes the default order of choosing a default target architecture to use based on

[Qemu-devel] [PULL 08/19] tests/boot_linux_console: update the x86_64 kernel

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Update to the stock Fedora 29 kernel, from the Fedora 28. New tests will be added using the 29 kernel, so for consistency, let's also update it here. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 12/19] scripts/qemu.py: support adding a console with the default serial device

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa The set_console() utility function either adds a device based on the explicitly given device type, or adds a known good type of device based on the machine type. But, for a number of machine types, it may be impossible or inconvenient to add the devices by means of "-device"

[Qemu-devel] [PULL 04/19] tests/acceptance: introduce arch parameter and attribute

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa It's useful to define the architecture that should be used in situations such as: * the intended target of the QEMU binary to be used on tests * the architecture of code to be run within the QEMU binary, such as a kernel image or a full blown guest OS image This commit

[Qemu-devel] [PULL 03/19] tests/acceptance: fix doc reference to avocado_qemu directory

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa The "this directory" reference is misleading and confusing, it's a leftover from when this text was proposed in a README file inside the "tests/acceptance/avocado_qemu" directory. When that text was moved to the top level docs directory, the reference was not updated.

[Qemu-devel] [PULL 05/19] tests/acceptance: use "arch:" tag to filter target specific tests

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Currently, some tests contains target architecture information, in the form of a "x86_64" tag. But that tag is not respected in the default execution, that is, "make check-acceptance" doesn't do anything with it. That said, even the target architecture handling currently

[Qemu-devel] [PULL 00/19] Python queue, 2019-05-02

2019-05-02 Thread Eduardo Habkost
The following changes since commit 8482ff2eb3bb95020eb2f370a9b3ea26511e41df: Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging (2019-05-02 12:04:51 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git

[Qemu-devel] [PULL 02/19] tests/acceptance: improve docstring on pick_default_qemu_bin()

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Making it clear what is returned by this utility function. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Message-Id: <20190312171824.5134-3-cr...@redhat.com> Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [PULL 07/19] tests/boot_linux_console: rename the x86_64 after the arch and machine

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa Given that the test is specific to x86_64 and pc, and new tests are going to be added to the same class, let's rename it accordingly. Also, let's make the class documentation not architecture specific. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by:

[Qemu-devel] [PULL 01/19] tests/acceptance: show avocado test execution by default

2019-05-02 Thread Eduardo Habkost
From: Cleber Rosa The current version of the "check-acceptance" target will only show one line for execution of all tests. That's probably OK if the tests to be run are quick enough and they're always the same. But, there's already one test alone that takes on average ~5 seconds to run, we

[Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64

2019-05-02 Thread Cao Jiaxi
Windows ARM64 uses LLP64 model, which breaks current assumptions. Signed-off-by: Cao Jiaxi --- util/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cacheinfo.c b/util/cacheinfo.c index 3cd080b83d..eebe1ce9c5 100644 --- a/util/cacheinfo.c +++

[Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64

2019-05-02 Thread Cao Jiaxi
Windows ARM64 uses LLP64 model, which breaks current assumptions. Signed-off-by: Cao Jiaxi --- util/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cacheinfo.c b/util/cacheinfo.c index 3cd080b83d..eebe1ce9c5 100644 --- a/util/cacheinfo.c +++

[Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats

2019-05-02 Thread Cao Jiaxi
I encountered the following compilation error on mingw: /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro redefined [-Werror,-Wmacro-redefined] #define __USE_MINGW_ANSI_STDIO 1 ^ /mnt/d/llvm-mingw/aarch64-w64-mingw32/include/_mingw.h:433:9: note: previous

[Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets

2019-05-02 Thread Cao Jiaxi
gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi --- contrib/libvhost-user/libvhost-user.h | 2 +- include/qemu/compiler.h | 2 +- scripts/cocci-macro-file.h| 7 ++- slirp/src/util.h

[Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion

2019-05-02 Thread Cao Jiaxi
The win2qemu[] is supposed to be the conversion table to convert between STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. But it was incorrectly written that it forces to set a GuestDiskBusType value to STORAGE_BUS_TYPE, which generates an enum conversion warning in clang.

[Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats

2019-05-02 Thread Cao Jiaxi
I encountered the following compilation error on mingw: /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro redefined [-Werror,-Wmacro-redefined] #define __USE_MINGW_ANSI_STDIO 1 ^ /mnt/d/llvm-mingw/aarch64-w64-mingw32/include/_mingw.h:433:9: note: previous

[Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion

2019-05-02 Thread Cao Jiaxi
The win2qemu[] is supposed to be the conversion table to convert between STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. But it was incorrectly written that it forces to set a GuestDiskBusType value to STORAGE_BUS_TYPE, which generates an enum conversion warning in clang.

[Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets

2019-05-02 Thread Cao Jiaxi
gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi --- contrib/libvhost-user/libvhost-user.h | 2 +- include/qemu/compiler.h | 2 +- scripts/cocci-macro-file.h| 7 ++- slirp/src/util.h

[Qemu-devel] [PATCH v3 0/4] Initial Windows on ARM (AArch64 64-Bit) host support

2019-05-02 Thread Cao Jiaxi
Initial Windows on ARM (AArch64 64-Bit) host support This series of patches is for initial support of Windows 10 on ARM as a QEMU host. Currently only TCG intepreter is working correctly, it crashes when TCG JIT is enabled. For now we assume it is built using the clang aarch64-w64-mingw32

Re: [Qemu-devel] [PATCH 0/3] Cleanup migration/ram.c

2019-05-02 Thread Wei Yang
On Thu, May 02, 2019 at 09:35:50AM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richard.weiy...@gmail.com) wrote: >> On Wed, May 01, 2019 at 09:24:06PM -0700, no-re...@patchew.org wrote: >> >Patchew URL: >> >https://patchew.org/QEMU/20190430034412.12935-1-richardw.y...@linux.intel.com/ >> >

[Qemu-devel] [PULL 0/2] slirp: move slirp as git submodule project

2019-05-02 Thread Samuel Thibault
The following changes since commit 8482ff2eb3bb95020eb2f370a9b3ea26511e41df: Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging (2019-05-02 12:04:51 +0100) are available in the Git repository at: https://people.debian.org/~sthibault/qemu.git

[Qemu-devel] [PULL 1/2] build-sys: pass CFLAGS & LDFLAGS to subdir-slirp

2019-05-02 Thread Samuel Thibault
From: Marc-André Lureau CFLAGS/LDFLAGS have debug and sanitizers flags, which should be passed to slirp compilation. Signed-off-by: Marc-André Lureau Message-Id: <20190424110041.8175-2-marcandre.lur...@redhat.com> Signed-off-by: Samuel Thibault --- Makefile | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v2 2/4] qga: Fix an enum conversion warningincommands-win32.c, hit by clang.

2019-05-02 Thread GH Cao
On 5/3/19 6:20 AM, Eric Blake wrote: > Where is enum STORAGE_BUS_TYPE defined? In the Windows SDK (winioctl.h), so a two-way conversion table is needed. > In fact, it looks like win2qemu[] is supposed to be that table, > but it was incorrectly written. You WANT to do: > diff --git

Re: [Qemu-devel] Failing QEMU iotest 221

2019-05-02 Thread Eric Blake
On 4/28/19 10:21 AM, Thomas Huth wrote: > QEMU iotest 221 is failing for me, too, when I run it with -raw: Which filesystem? > > tests/qemu-iotests$ ./check -raw 221 > QEMU -- > "/home/thuth/tmp/qemu-build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64" > -nodefaults

Re: [Qemu-devel] Failing QEMU iotest 175

2019-05-02 Thread Eric Blake
On 4/28/19 10:18 AM, Thomas Huth wrote: > QEMU iotest 175 is failing for me when I run it with -raw: > > == creating image with default preallocation == > Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 > -size=1048576, blocks=0 > +size=1048576, blocks=2 What filesystem? It should be

Re: [Qemu-devel] [PATCH v2 2/4] qga: Fix an enum conversion warningin commands-win32.c, hit by clang.

2019-05-02 Thread Eric Blake
On 5/2/19 4:18 PM, driver1998 wrote: > On 5/1/19 2:25 AM, Eric Blake wrote: >> This adds lots of explicit casts. Are they actually necessary? Without >> seeing the actual warning, it seems fishy to have to be this explicit. > > So here are the warnings, on clang version 9.0.0 (trunk 351977). > >

Re: [Qemu-devel] [PATCH v2 4/4] include/qemu/osdep.h: Move the__USE_MINGW_ANSI_STDIO define up to avoid confliction.

2019-05-02 Thread Eric Blake
On 5/2/19 4:05 PM, driver1998 wrote: > On 5/1/19 2:30 AM, Eric Blake wrote: >> Your entire series is missing 'In-Reply-To:' and 'References:' headers, >> making each message show up as individual new threads rather than >> properly threaded to a 0/4 cover letter. You'll want to fix your sending >>

Re: [Qemu-devel] [PATCH v2 2/4] qga: Fix an enum conversion warningin commands-win32.c, hit by clang.

2019-05-02 Thread driver1998
On 5/1/19 2:25 AM, Eric Blake wrote: > This adds lots of explicit casts. Are they actually necessary? Without > seeing the actual warning, it seems fishy to have to be this explicit. So here are the warnings, on clang version 9.0.0 (trunk 351977). qga/commands-win32.c:461:24: error: implicit

Re: [Qemu-devel] [PATCH v2 4/4] include/qemu/osdep.h: Move the__USE_MINGW_ANSI_STDIO define up to avoid confliction.

2019-05-02 Thread driver1998
On 5/1/19 2:30 AM, Eric Blake wrote: > Your entire series is missing 'In-Reply-To:' and 'References:' headers, > making each message show up as individual new threads rather than > properly threaded to a 0/4 cover letter. You'll want to fix your sending > habits to avoid that problem in future

Re: [Qemu-devel] [PATCH for-4.1 6/8] target/riscv: Split RVC32 and RVC64 insns into separate files

2019-05-02 Thread Alistair Francis
On Thu, Apr 25, 2019 at 9:04 AM Palmer Dabbelt wrote: > > On Sun, 31 Mar 2019 20:11:53 PDT (-0700), richard.hender...@linaro.org wrote: > > This eliminates all functions in insn_trans/trans_rvc.inc.c, > > so the entire file can be removed. > > > > Signed-off-by: Richard Henderson You need to

Re: [Qemu-devel] [PATCH 0/4] Remove some qdev_get_machine() calls from CONFIG_USER_ONLY

2019-05-02 Thread Eduardo Habkost
On Fri, Apr 26, 2019 at 04:55:17PM +0800, Like Xu wrote: > On 2019/4/26 4:00, Eduardo Habkost wrote: > > This series moves some qdev code outside qdev.o, so it can be > > compiled only in CONFIG_SOFTMMU. > > > > The code being moved includes two qdev_get_machine() calls, so > > this will make it

[Qemu-devel] [PULL 12/13] hw/sparc/leon3: Allow load of uImage firmwares

2019-05-02 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Currently the Leon3 machine doesn't allow to load legacy u-boot images: $ qemu-system-sparc -M leon3_generic -d in_asm \ -kernel HelenOS-0.6.0-sparc32-leon3.bin qemu-system-sparc: could not load kernel 'HelenOS-0.6.0-sparc32-leon3.bin' $ file

[Qemu-devel] [PULL 07/13] configure: fix pam test warning

2019-05-02 Thread Laurent Vivier
From: "Dr. David Alan Gilbert" The pam test generates a warning on Fedora 29 with -O3 compilation because the headers declare that the pam_conversation pointer to pam_start must be non-NULL. Change it to use the same 0 initialised structure as we actually use in qauthz. Signed-off-by: Dr.

[Qemu-devel] [PULL 13/13] sockets: avoid string truncation warnings when copying UNIX path

2019-05-02 Thread Laurent Vivier
From: Daniel P. Berrangé In file included from /usr/include/string.h:494, from include/qemu/osdep.h:101, from util/qemu-sockets.c:18: In function ‘strncpy’, inlined from ‘unix_connect_saddr.isra.0’ at util/qemu-sockets.c:925:5:

[Qemu-devel] [PULL 02/13] CODING_STYLE: specify the indent rule for multiline code

2019-05-02 Thread Laurent Vivier
From: Wei Yang We didn't specify the indent rule for multiline code here, which may mislead users. And in current code, the code use various styles. Add this rule in CODING_STYLE to make sure this is clear to every one. Signed-off-by: Wei Yang Suggested-by: Igor Mammedov Reviewed-by: Igor

[Qemu-devel] [PULL 10/13] net: Print output of "-net nic, model=help" to stdout instead of stderr

2019-05-02 Thread Laurent Vivier
From: Thomas Huth We are printing all other help output to stdout already (e.g. "-help", "-cpu help" and "-machine help" output). So the "-net nic,model=help" output should go to stdout instead of stderr, too. And while we're at it, also print the NICs line by line, like we do it e.g. with the

[Qemu-devel] [PULL 06/13] qom: use object_new_with_type in object_new_with_propv

2019-05-02 Thread Laurent Vivier
From: Wei Yang Function object_new_with_propv already get the Type of the object, so we could leverage object_new_with_type here. Signed-off-by: Wei Yang Reviewed-by: Marc-André Lureau Reviewed-by: Stefano Garzarella Message-Id: <20190311083234.20841-1-richardw.y...@linux.intel.com>

[Qemu-devel] [PULL 11/13] Makefile: Let the 'clean' rule remove qemu-ga.exe on Windows hosts

2019-05-02 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Commit 48ff7a625b36 added the QEMU Guest Agent tool with the optional ".exe" suffix for Windows hosts, but forgot to use this suffix in the 'clean' rule. Calling this rule let a dangling executable in the build directory. Correct this by using the proper optional

[Qemu-devel] [PULL 03/13] CODING_STYLE: indent example code as all others

2019-05-02 Thread Laurent Vivier
From: Wei Yang All the example code are indented with four spaces except this one. Fix this by adding four spaces here. Signed-off-by: Wei Yang Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov Reviewed-by: Stefano Garzarella Message-Id:

[Qemu-devel] [PULL 05/13] doc: fix the configuration path

2019-05-02 Thread Laurent Vivier
From: Marc-André Lureau Use a CONFDIR variable to show the configured sysconf path in the generated documentations (html, man pages etc). Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1644985 Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[Qemu-devel] [PULL 09/13] Header cleanups

2019-05-02 Thread Laurent Vivier
From: Aruna Jayasena Removed unwanted includes from cpu-common.h This task was under https://wiki.qemu.org/Contribute/BiteSizedTasks Signed-off-by: Aruna Jayasena Reviewed-by: Peter Maydell Reviewed-by: Thomas Huth Message-Id: <20190409155635.10276-1-aruna...@cse.mrt.ac.lk> [lv: fix conflict

[Qemu-devel] [PULL 00/13] Trivial branch patches

2019-05-02 Thread Laurent Vivier
The following changes since commit 8482ff2eb3bb95020eb2f370a9b3ea26511e41df: Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging (2019-05-02 12:04:51 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git

[Qemu-devel] [PULL 04/13] Clean up includes

2019-05-02 Thread Laurent Vivier
From: Markus Armbruster Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h

[Qemu-devel] [PULL 08/13] Update configure

2019-05-02 Thread Laurent Vivier
From: Stefan Weil The last *.aml file was removed in commit 13b1881aacc7e5018773bd545bbaf8d5476699ee. Signed-off-by: Stefan Weil Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190409053320.14612-1...@weilnetz.de> Signed-off-by: Laurent Vivier --- configure |

[Qemu-devel] [PULL 01/13] hw/net/pcnet: Use qemu_log_mask(GUEST_ERROR) instead of printf

2019-05-02 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Avoid to clutter stdout until explicitly requested (with -d guest_errors): $ qemu-system-mips -M malta -m 512 -kernel vmlinux-3.2.0-4-4kc-malta Bad SWSTYLE=0x04 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id:

Re: [Qemu-devel] [PATCH v4 13/15] tests: acpi: add simple arm/virt testcase

2019-05-02 Thread Laszlo Ersek
On 05/02/19 16:52, Igor Mammedov wrote: > adds simple arm/virt test case that starts guest with > bios-tables-test.aarch64.iso.qcow2 boot image which > initializes UefiTestSupport* structure in RAM once > guest is booted. > > * see commit: tests: acpi: add acpi_find_rsdp_address_uefi() helper >

Re: [Qemu-devel] [PATCH v4 11/15] tests: acpi: allow to override default accelerator

2019-05-02 Thread Laszlo Ersek
On 05/02/19 16:51, Igor Mammedov wrote: > By default test cases were run with 'kvm:tcg' accelerators to speed up > tests execution. While it works for x86, were change of accelerator > doesn't affect ACPI tables, the approach doesn't works for ARM usecase > though. > > In arm/virt case, KVM mode

Re: [Qemu-devel] [PATCH v2 1/5] util/qemu-sockets: Fix GCC 9 build warnings

2019-05-02 Thread Alistair Francis
On Wed, May 1, 2019 at 2:41 AM Daniel P. Berrangé wrote: > > On Tue, Apr 30, 2019 at 11:28:22PM +, Alistair Francis wrote: > > Fix this warning when building with GCC9 on Fedora 30: > > In function ‘strncpy’, > > inlined from ‘unix_connect_saddr.isra.0’ at util/qemu-sockets.c:925:5: > >

Re: [Qemu-devel] [RFC] Virtio RNG: Consider changing the default entropy source to /dev/urandom?

2019-05-02 Thread Kashyap Chamarthy
[Reviving this old thread as I don't think we came to a conclusion on this.] On Fri, Sep 21, 2018 at 05:43:23PM +0200, Kashyap Chamarthy wrote: > Hi folks, > > As Markus pointed out in this 'qemu-devel' thread[1], > backends/rng-random.c uses '/dev/random' in TYPE_RNG_RANDOM's > instance_init()

Re: [Qemu-devel] [PATCH v2 2/5] hw/usb/hcd-xhci: Fix GCC 9 build warning

2019-05-02 Thread Alistair Francis
On Wed, May 1, 2019 at 7:12 AM Richard Henderson wrote: > > On 4/30/19 4:28 PM, Alistair Francis wrote: > > for (i = 0; i < usbports; i++) { > > +g_assert(i < MAX(MAXPORTS_2, MAXPORTS_3)); > > I would hope that it works to move this out of the loop: > > g_assert(usbports <=

Re: [Qemu-devel] [PATCH v2 3/5] hw/usb/dev-mtp: Fix GCC 9 build warning

2019-05-02 Thread Alistair Francis
On Wed, May 1, 2019 at 2:40 AM Daniel P. Berrangé wrote: > > On Tue, Apr 30, 2019 at 11:28:41PM +, Alistair Francis wrote: > > Fix this warning with GCC 9 on Fedora 30: > > hw/usb/dev-mtp.c:1715:36: error: taking address of packed member of ‘struct > > ’ may result in an unaligned pointer

Re: [Qemu-devel] [PATCH] s390/ipl: cast to SCSIDevice directly

2019-05-02 Thread Christian Borntraeger
On 02.05.19 17:55, Cornelia Huck wrote: > Coverity notes that the result of object_dynamic_cast() to > SCSIDevice is not checked in s390_gen_initial_iplp(); as > we know that we always have a SCSIDevice in that branch, > we can instead cast via SCSI_DEVICE directly. > And it even does look

Re: [Qemu-devel] [PATCH v3 1/7] tests/qemu-iotests/005: Add a sanity check for large sparse file support

2019-05-02 Thread Alex Bennée
Thomas Huth writes: > "check -raw 005" fails when running on certain filesystems - these do not > support such large sparse files. Use the same check as in test 220 to > skip the test in this case. > > Suggested-by: Eric Blake > Reviewed-by: Eric Blake > Signed-off-by: Thomas Huth

Re: [Qemu-devel] [PATCH v2 4/5] linux-user/uname: Fix GCC 9 build warnings

2019-05-02 Thread Alistair Francis
On Wed, May 1, 2019 at 5:00 AM Eric Blake wrote: > > On 5/1/19 4:40 AM, Laurent Vivier wrote: > > On 01/05/2019 01:28, Alistair Francis wrote: > >> Fix this warning when building with GCC9 on Fedora 30: > >> In function ‘strncpy’, > >> inlined from ‘sys_uname’ at > >>

Re: [Qemu-devel] [PATCH] linux-user: avoid treading on gprof's SIGPROF signals

2019-05-02 Thread Laurent Vivier
On 02/05/2019 18:27, Laurent Desnogues wrote: > On Thu, May 2, 2019 at 6:17 PM Laurent Vivier wrote: >> >> On 02/05/2019 16:58, Alex Bennée wrote: >>> The guest tends to get confused when it receives signals it doesn't >>> know about. Given the gprof magic has also set up it's own handler we >>>

Re: [Qemu-devel] [PATCH v2 3/4] util/cacheinfo.c: Use uintptr_t instead of unsigned long in AArch64 arch_cache_info()

2019-05-02 Thread Richard Henderson
On 5/2/19 1:26 AM, Thomas Huth wrote: >> @@ -107,7 +107,7 @@ static void sys_cache_info(int *isize, int *dsize) >> static void arch_cache_info(int *isize, int *dsize) >> { >> if (*isize == 0 || *dsize == 0) { >> -unsigned long ctr; >> +uintptr_t ctr; > > Looking at the

Re: [Qemu-devel] [PATCH v2 1/6] hw/acpi: Move the IPMI stub to the stubs/ directory

2019-05-02 Thread Philippe Mathieu-Daudé
Hi Corey, On 5/2/19 3:24 PM, Corey Minyard wrote: > On Sun, Apr 28, 2019 at 08:47:26AM +0200, Philippe Mathieu-Daudé wrote: >> Move the IPMI stub file to the stubs/ directory to simplify the >> hw/acpi Makefile. >> >> Signed-off-by: Philippe Mathieu-Daudé > > I'm not sure of the overall view of

Re: [Qemu-devel] [PATCH] linux-user: avoid treading on gprof's SIGPROF signals

2019-05-02 Thread Laurent Desnogues
On Thu, May 2, 2019 at 6:17 PM Laurent Vivier wrote: > > On 02/05/2019 16:58, Alex Bennée wrote: > > The guest tends to get confused when it receives signals it doesn't > > know about. Given the gprof magic has also set up it's own handler we > > would do well to avoid stomping on it as well. > >

Re: [Qemu-devel] [PATCH v2 3/5] sockets: avoid string truncation warnings when copying UNIX path

2019-05-02 Thread Laurent Vivier
On 12/04/2019 14:16, Daniel P. Berrangé wrote: > In file included from /usr/include/string.h:494, > from include/qemu/osdep.h:101, > from util/qemu-sockets.c:18: > In function ‘strncpy’, > inlined from ‘unix_connect_saddr.isra.0’ at util/qemu-sockets.c:925:5:

[Qemu-devel] [PULL 8/8] hw/pci-host: Use object_initialize_child for correct reference counting

2019-05-02 Thread Thomas Huth
Both functions, object_initialize() and object_property_add_child() increase the reference counter of the new object, so one of the references has to be dropped afterwards to get the reference counting right. Otherwise the child object might not be properly cleaned up when the parent gets

Re: [Qemu-devel] [PATCH v4 4/8] hw/arm/virt: Add memory hotplug framework

2019-05-02 Thread Igor Mammedov
On Tue, 9 Apr 2019 11:29:31 +0100 Shameer Kolothum wrote: > From: Eric Auger > > This patch adds the memory hot-plug/hot-unplug infrastructure > in machvirt. The device memory is not yet exposed to the Guest > either though DT or ACPI and hence both cold/hot plug of memory s/though/through/ >

[Qemu-devel] [PULL 2/8] qtest: Move accel code to accel/qtest.c

2019-05-02 Thread Thomas Huth
From: Eduardo Habkost QTest has two parts: the server (-qtest) and the accelerator (-machine accel=qtest). The accelerator depends on CONFIG_POSIX due to its usage of sigwait(), but the server doesn't. Move the accel code to accel/qtest.c. Later we will disable compilation of accel/qtest.c on

  1   2   3   4   >