Re: [Qemu-devel] [PULL 095/107] spapr: clock should count only if vm is running

2017-12-13 Thread Laurent Vivier
On 13/12/2017 20:59, Alexander Graf wrote: > > > On 13.12.17 20:29, Laurent Vivier wrote: >> On 13/12/2017 20:19, Alexander Graf wrote: >>> >>> >>> On 02.02.17 06:14, David Gibson wrote: From: Laurent Vivier This is a port to ppc of the i386 commit: 00f4d64 kvmclock: cloc

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-13 Thread Ilya Maximets
On 13.12.2017 22:48, Michael S. Tsirkin wrote: > On Wed, Dec 13, 2017 at 04:45:20PM +0300, Ilya Maximets wrote: That looks very strange. Some of the functions gets 'old_status', others the 'new_status'. I'm a bit confused. >>> >>> OK, fair enough. Fixed - let's pass old status everyw

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-13 Thread Wei Wang
On 12/13/2017 08:35 PM, Stefan Hajnoczi wrote: On Wed, Dec 13, 2017 at 04:11:45PM +0800, Wei Wang wrote: I think the current approach is fine for a prototype but is not suitable for wider use by the community because it: 1. Does not scale to multiple device types (net, scsi, blk, etc) 2. Does no

[Qemu-devel] [RESEND PATCH for-2.12 1/2] ACPI/unit-test: Add a testcase for RAM allocation in numa node

2017-12-13 Thread Dou Liyang
As QEMU supports the memory-less node, it is possible that there is no RAM in the first numa node(also be called as node0). eg: ... \ -m 128,slots=3,maxmem=1G \ -numa node -numa node,mem=128M \ But, this makes it hard for QEMU to build a known-to-work ACPI SRAT table. Only fixing it is not e

[Qemu-devel] [RESEND PATCH for-2.12 0/2] ACPI/unit-test: Add a testcase

2017-12-13 Thread Dou Liyang
These are the patches left over from the pull request: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 because of some errors when tested by "make check" command[1]. Now, the QEMU 2.11.0 has been released, rebase/retest/respin them for v2.12 dev. Changelog: --Rebase and retest thi

[Qemu-devel] [RESEND PATCH for-2.12 2/2] hw/acpi-build: Make next_base easy to follow

2017-12-13 Thread Dou Liyang
It may be hard to read the assignment statement of "next_base", so S/next_base += (1ULL << 32) - pcms->below_4g_mem_size; /next_base = mem_base + mem_len; ... for readability. No functionality change. Signed-off-by: Dou Liyang --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [PATCH] Add ability for user to specify mouse ungrab key

2017-12-13 Thread no-reply
Hi, This series failed build test on ppc host. Please find the details below. Message-id: 20171210195931.26042-1-programmingk...@gmail.com Type: series Subject: [Qemu-devel] [PATCH] Add ability for user to specify mouse ungrab key === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be in

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-13 Thread Wei Wang
On 12/13/2017 10:16 PM, Tetsuo Handa wrote: Wei Wang wrote: On 12/12/2017 09:20 PM, Tetsuo Handa wrote: Wei Wang wrote: +void xb_clear_bit_range(struct xb *xb, unsigned long start, unsigned long end) +{ + struct radix_tree_root *root = &xb->xbrt; + struct radix_tree_node *node; +

Re: [Qemu-devel] Adding more function keys support

2017-12-13 Thread Programmingkid
> On Dec 13, 2017, at 9:20 PM, Eric Blake wrote: > > On 12/13/2017 01:18 PM, Programmingkid wrote: > >> Thank you BALATON for the file. One thing that caught my eye in this file is >> this: >> > >> if (usage->code == KEY_FN) { >> asc->fn_on = !!value; >> >> Why would they

Re: [Qemu-devel] Adding more function keys support

2017-12-13 Thread Eric Blake
On 12/13/2017 01:18 PM, Programmingkid wrote: > Thank you BALATON for the file. One thing that caught my eye in this file is > this: > > if (usage->code == KEY_FN) { > asc->fn_on = !!value; > > Why would they need the double !? Double '!!' is an idiomatic way to force a v

Re: [Qemu-devel] [PATCH v1 1/2] qmp.c: (re)implement qmp_cpu

2017-12-13 Thread Eric Blake
On 12/13/2017 12:15 PM, Daniel Henrique Barboza wrote: > Commit 755f196898 ("qapi: Convert the cpu command") added the qmp_cpu > function in qmp.c, leaving it blank. It the same commit, a working > hmp_cpu was implemented. Since then, no further changes were made in > qmp_cpu, resulting now in a wo

Re: [Qemu-devel] [PATCH 00/13] i.MX FEC and SD changes

2017-12-13 Thread Philippe Mathieu-Daudé
Hi Andrey, Peter, On 12/12/2017 02:40 PM, Peter Maydell wrote: > On 11 December 2017 at 21:29, Andrey Smirnov wrote: >> Hi everyone, >> >> This patchset is a spin-off from original i.MX7 support submission >> found here [1], containing all of the patchest that are more or less >> agreed upon and

[Qemu-devel] [PATCH 6/8] sdhci: add a check_capab_baseclock() qtest

2017-12-13 Thread Philippe Mathieu-Daudé
So far only the bcm2835 is tested (52 MHz for the raspi2 machine). Signed-off-by: Philippe Mathieu-Daudé --- I didn't dig the dark web enough to get the other datashits tests/sdhci-test.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/sdhci-t

[Qemu-devel] [RFC PATCH 7/8] sdhci: add a check_capab_sdma() qtest

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- RFC because I still need to verify with DS. tests/sdhci-test.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/sdhci-test.c b/tests/sdhci-test.c index 966bd00499..b7646bccc6 100644 --- a/tests/sdhci-test.

[Qemu-devel] [PATCH 8/8] sdhci: add a check_capab_v3() qtest

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/sdhci-test.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/sdhci-test.c b/tests/sdhci-test.c index b7646bccc6..60b28f27b3 100644 --- a/tests/sdhci-test.c +++ b/tests/sdhci-test.c @@ -13,6 +13,8 @@ #define SDHC_CAPAB

[Qemu-devel] [PATCH 4/8] sdhci: fix CAPAB/MAXCURR registers, both are 64bit and read-only

2017-12-13 Thread Philippe Mathieu-Daudé
running qtests: $ make check-qtest-arm GTESTER check-qtest-arm SDHC rd_4b @0x44 not implemented SDHC wr_4b @0x40 <- 0x89abcdef not implemented SDHC wr_4b @0x44 <- 0x01234567 not implemented Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sdhci.h | 4 ++-- hw/sd/sdhci.c

[Qemu-devel] [PATCH 1/8] sdhci: add a "sd-spec-version" property

2017-12-13 Thread Philippe Mathieu-Daudé
default to SDHCI v2 Signed-off-by: Philippe Mathieu-Daudé --- I am not sure which real VENDOR is HCVER=0x24, we probably don't care. hw/sd/sdhci-internal.h | 4 ++-- include/hw/sd/sdhci.h | 10 ++ hw/sd/sdhci.c | 5 - 3 files changed, 16 insertions(+), 3 deletions(-) di

[Qemu-devel] [PATCH 5/8] sdhci: add check_capab_readonly() qtest

2017-12-13 Thread Philippe Mathieu-Daudé
read the CAPAB register. Signed-off-by: Philippe Mathieu-Daudé --- tests/sdhci-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/sdhci-test.c b/tests/sdhci-test.c index 4ebe1e349b..01373a69df 100644 --- a/tests/sdhci-test.c +++ b/tests/sdhci-test.c

[Qemu-devel] [PATCH 3/8] sdhci: add qtest to check the SD Spec version

2017-12-13 Thread Philippe Mathieu-Daudé
read the HCVER register with check_specs_version() Machines tested: - Specs v2: smdkc210 - Specs v3: sabrelite raspi2 xilinx-zynq-a9 Signed-off-by: Philippe Mathieu-Daudé --- tests/sdhci-test.c | 74 ++ tests/Makefile.include | 1 + 2

[Qemu-devel] [PATCH 0/8] SDHCI: add a qtest and fix few issues

2017-12-13 Thread Philippe Mathieu-Daudé
This series adds a qtest for the SD Host Controller Interface. To keep it simple, for each device using a SDHCI IP we ask the the capabilities it supports, and verify with the public datashits availables. So far the QEMU devices only implement the v2 and v3 Specs. This exposes few inconsistencie

[Qemu-devel] [PATCH 2/8] sdhci: some ARM boards do support SD_HOST_SPECv3_VERS

2017-12-13 Thread Philippe Mathieu-Daudé
set the property with object_property_set_uint() or qdev_prop_set_uint8(). [Zynq part based on a patch from Alistair Francis from qemu/xilinx tag xilinx-v2015.2] Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2835_peripherals.c | 7 +++ hw/arm/fsl-imx6.c| 6 ++ hw/arm/

Re: [Qemu-devel] [PATCH 00/26] SDCard housekeeping

2017-12-13 Thread Philippe Mathieu-Daudé
attaching a more complete boot log. > Once this series applied, booting some Linux on a vexpress-a9 with few > sd*command traces enabled result in this outputs (which result useful to > understand/fix the different SD implementations): $ cat /tmp/events sd*command* sdcard_set_mode sdcard_read_blo

Re: [Qemu-devel] [PATCH v13 00/12] Add ARMv8 RAS virtualization support in QEMU

2017-12-13 Thread gengdongjiu
Hi peter, On 2017/12/14 2:12, Peter Maydell wrote: >> [v13,11/12] hw/arm/virt: Add RAS platform version for migration >> [v13,12/12] target-arm: kvm64: handle SIGBUS signal from kernel or KVM > Hi; unfortunately I only have one more working day this year, which > isn't really enough to get up to s

Re: [Qemu-devel] [PATCH v2] dump-guest-memory.py: fix "You can't do that without a process to debug"

2017-12-13 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20171212172208.13588-1-marcandre.lur...@redhat.com Subject: [Qemu-devel] [PATCH v2] dump-guest-memory.py: fix "You can't do that without a process to debug" Type: series === TEST SCRIPT

[Qemu-devel] [PATCH 7/7] block/backup: use block_job_throttle

2017-12-13 Thread John Snow
Signed-off-by: John Snow --- block/backup.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/block/backup.c b/block/backup.c index d71b25c017..a5ede5f643 100644 --- a/block/backup.c +++ b/block/backup.c @@ -334,6 +334,8 @@ static void backup_complete(BlockJob *job,

[Qemu-devel] [PATCH 6/7] block/stream: use block_job_throttle

2017-12-13 Thread John Snow
Signed-off-by: John Snow --- block/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/stream.c b/block/stream.c index e85af18c54..3ad3190387 100644 --- a/block/stream.c +++ b/block/stream.c @@ -139,7 +139,7 @@ static void coroutine_fn stream_run(void *opaque)

[Qemu-devel] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-13 Thread John Snow
Instead of only sleeping for 0ms when we've hit a timeout, optionally take a longer more explicit delay_ns that always forces the sleep. Signed-off-by: John Snow --- block/mirror.c | 4 ++-- blockjob.c | 9 - include/block/blockjob_int.h | 10 +++---

[Qemu-devel] [PATCH 3/7] blockjob: create block_job_throttle

2017-12-13 Thread John Snow
This will replace mirror_throttle, for reuse in other jobs. Signed-off-by: John Snow --- block/mirror.c | 15 ++- blockjob.c | 11 +++ include/block/blockjob_int.h | 9 + 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a

[Qemu-devel] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition

2017-12-13 Thread John Snow
They're all the same. If it actually becomes important to configure it, it can become a job or driver property. Signed-off-by: John Snow --- block/backup.c | 1 - block/commit.c | 2 -- block/mirror.c | 1 - block/stream.c | 2 -- include/b

[Qemu-devel] [PATCH 5/7] block/commit: use block_job_throttle

2017-12-13 Thread John Snow
Depending on the value of `speed` and how fast our backends are, delay_ns might be 0 very, very often. This creates some warning messages that spook users, but it's also pretty inefficient. Use block_job_throttle instead to yield a little more intelligently. Signed-off-by: John Snow --- block/c

[Qemu-devel] [PATCH 0/7] blockjob: refactor mirror_throttle

2017-12-13 Thread John Snow
mirror_throttle attempts to make sure we yield every so often when we're doing operations that may not otherwise be as cooperative as we'd like. This pattern is useful to other jobs like commit as well; if commit continuously decides not to copy data (and calculates delay_ns to be 0), we'll freque

[Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-13 Thread John Snow
The mirror job makes a semi-inaccurate record of the last time we left a "pause", but this doesn't always correlate to the time we actually last successfully yielded control. Record the time we last left a yield centrally. Signed-off-by: John Snow --- block/mirror.c | 8 ++-- bloc

[Qemu-devel] [ANNOUNCE] QEMU 2.11.0 is now available

2017-12-13 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 2.11.0 release. This release contains 2000+ commits from 165 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at:

[Qemu-devel] [PATCH 25/26] sdcard: add/use a SDCardCommandClass enum instead of magic numbers

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 48 +--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 9b90987d7f..688bb40bd1 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -274,11 +274,45 @@ static con

[Qemu-devel] [PATCH 24/26] sdcard: use a 16-bit type for the 16-bit RCA register

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index b8a5a344f5..9b90987d7f 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -844,7 +844,7 @@ static void sd_lock_command(SDState *sd) static sd_rsp_type_t

[Qemu-devel] [PATCH 23/26] sdcard: add ACMD trace events

2017-12-13 Thread Philippe Mathieu-Daudé
and his sd_acmd_abbreviation() companion to pretty-print the ACMD id. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 25 - hw/sd/trace-events | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 8104d6c055.

[Qemu-devel] [PATCH 26/26] sdcard: add/use a ccc_spi enum for the commands supported in SPI mode

2017-12-13 Thread Philippe Mathieu-Daudé
We can now simplify the 'if (sd->spi) ...' checks, reporting an UNIMP error and returning a sd_illegal value. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 83 +++--- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/

[Qemu-devel] [PATCH 18/26] sdcard: move Memory Card registers together

2017-12-13 Thread Philippe Mathieu-Daudé
Aesthetic, but ease review. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index d8e3f60536..992236df75 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -85,14 +85,17 @@ struct SDState

[Qemu-devel] [PATCH 17/26] sdcard: rename sd_set_REG() functions called by sd_reset() as sd_reset_REG()

2017-12-13 Thread Philippe Mathieu-Daudé
They are only called once, during reset :) Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index b231411108..d8e3f60536 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -245,7 +

[Qemu-devel] [PATCH 22/26] sdcard: reduce sd_cmd traces

2017-12-13 Thread Philippe Mathieu-Daudé
Do not trace CMD55 used to start an ACMD. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 6 -- hw/sd/trace-events | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c50ac752d4..8104d6c055 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd

[Qemu-devel] [PATCH 13/26] sdcard: add more trace events

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 12 hw/sd/trace-events | 8 2 files changed, 20 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index bd583be835..84e02745f1 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -449,6 +449,7 @@ static void sd_reset(

[Qemu-devel] [PATCH 21/26] sdcard: add sd_cmd_abbreviation() to resolve the SD command id

2017-12-13 Thread Philippe Mathieu-Daudé
This simplify reading trace output :) Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 42 +- hw/sd/trace-events | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 99678c89d5..c50ac752d4 100

[Qemu-devel] [PATCH 12/26] sdcard: replace DPRINTF() by trace events

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 11 +-- hw/sd/trace-events | 4 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 2fa05f42b7..bd583be835 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -773,6 +773,8 @@ static sd_r

[Qemu-devel] [PATCH 20/26] sdcard: add/use SD_CMD_MAX to check valid SD commands

2017-12-13 Thread Philippe Mathieu-Daudé
We check once in sd_do_command() if the command is valid (and remove duplicate checks in sd_normal_command() and cmd_valid_while_locked()). Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/hw/sd/sd.c b

[Qemu-devel] [RFC PATCH 14/26] sdcard: use qemu_hexbuf_strdup() to trace command response

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 26 +++--- hw/sd/trace-events | 1 + 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 84e02745f1..2a249b1612 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -35,6 +35,7 @@

[Qemu-devel] [PATCH 10/26] sdcard: use more detailled state/mode trace events

2017-12-13 Thread Philippe Mathieu-Daudé
sd_set_mode() can now use sd_state_name(), and sd_set_state() use sd_mode_name(). Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 6 -- hw/sd/trace-events | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index bd4a896cba..c1ed7b5

[Qemu-devel] [PATCH 16/26] sdcard: let cmd_valid_while_locked() returns a bool

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 542170c3ec..b231411108 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1475,7 +1475,7 @@ static sd_rsp_type_t sd_app_command(SDState *sd, re

[Qemu-devel] [PATCH 19/26] sdcard: add DSR register

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 992236df75..8a10e28080 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -90,6 +90,7 @@ struct SDState { /* SD Memory Card Registers */ uint8_t cid[128 / BI

[Qemu-devel] [PATCH 07/26] sdcard: add sdcard_set_mode() trace event

2017-12-13 Thread Philippe Mathieu-Daudé
Use sd_mode_name() to pretty-print the SDCardMode. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 16 +++- hw/sd/trace-events | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 2c0f8a7dbd..465d254f2e 100644 --- a/hw/

[Qemu-devel] [PATCH 11/26] sdcard: use warn_report() instead of fprintf()

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c1ed7b59f1..2fa05f42b7 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -725,7 +725,7 @@ static void sd_lock_command(SDState *sd) sd->card_sta

[Qemu-devel] [PATCH 15/26] sdcard: use PW_LEN define instead of '16' magic

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 2a249b1612..542170c3ec 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -47,6 +47,8 @@ #define OCR_POWER_UP0x8000 #define OCR

[Qemu-devel] [PATCH 08/26] sdcard: add sd_set_state()

2017-12-13 Thread Philippe Mathieu-Daudé
This will ease to trace state changes (in the following patchs). Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 128 - 1 file changed, 67 insertions(+), 61 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 465d254f2e..f67

[Qemu-devel] [PATCH] test/i386 - Allow TCG to boot with > 1TB memory

2017-12-13 Thread Antonio Huete Jiménez
From daea6caf8d9e023d06a825a774b678d26d978209 Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Tue, 12 Dec 2017 19:17:49 +0100 Subject: [PATCH] test/i386 - Allow TCG to boot with > 1TB memory. Currently for TCG the cpu 'phys_bits' property can't be specified as it is hardcoded to be ei

[Qemu-devel] [PATCH 09/26] sdcard: add a sdcard_set_state() trace event

2017-12-13 Thread Philippe Mathieu-Daudé
and his sd_state_name() companion to pretty-print the SDCardState. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 24 +++- hw/sd/trace-events | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index f67c9ff49c..bd4a8

[Qemu-devel] [PATCH 04/26] sdcard: replace fprintf() -> qemu_log_mask()

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 9b3745a019..6227a3518b 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1557,14 +1557,16 @@ static void sd_blk_read(SDState *sd, uint64_t addr,

[Qemu-devel] [PATCH 05/26] sdcard: rename sd_set_mode() -> sd_update_mode()

2017-12-13 Thread Philippe Mathieu-Daudé
This will ease to trace mode changes (in the following patchs). Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 6227a3518b..f63459d2c0 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -128,7 +12

[Qemu-devel] [RFC PATCH 02/26] sdcard: add a Python qtest

2017-12-13 Thread Philippe Mathieu-Daudé
Use Python to write high-level SD commands. Signed-off-by: Philippe Mathieu-Daudé --- tests/Makefile.include | 2 + tests/sdcard_tests.py | 172 + 2 files changed, 174 insertions(+) create mode 100755 tests/sdcard_tests.py diff --git a/tests/M

[Qemu-devel] [PATCH 03/26] sdcard: use ldst API

2017-12-13 Thread Philippe Mathieu-Daudé
To keep the code way easier to review! Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 51 ++- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 8e12b07ee4..9b3745a019 100644 --- a/hw/sd/sd.c +++ b

[Qemu-devel] [PATCH 06/26] sdcard: add sd_set_mode()

2017-12-13 Thread Philippe Mathieu-Daudé
This will ease to trace mode changes (in the following patch). Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index f63459d2c0..2c0f8a7dbd 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -12

[Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus

2017-12-13 Thread Philippe Mathieu-Daudé
Use Base64 to serialize the binary blobs in JSON. So far at most 512 bytes will be transfered, which result in a 684 bytes payload. Since this command is intented for qtesting, this is acceptable. Signed-off-by: Philippe Mathieu-Daudé --- qapi-schema.json| 41

[Qemu-devel] [PATCH 00/26] SDCard housekeeping

2017-12-13 Thread Philippe Mathieu-Daudé
Now that we have a way to write qtest in Python, lets start with a simple test to perform basic card identification, covering many functions of the sd/sd.c file. [patch 1] When a device is not MMIO-connected but rather plugged into a Bus, it is easier to write tests using QMP. So we add a 'sdbus-c

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-13 Thread Maxime Coquelin
Hi Stefan, On 12/13/2017 09:08 PM, Stefan Hajnoczi wrote: On Wed, Dec 13, 2017 at 3:01 PM, Michael S. Tsirkin wrote: On Wed, Dec 13, 2017 at 12:35:21PM +, Stefan Hajnoczi wrote: I'm not saying that DPDK should use libvhost-user. I'm saying that it's easy to add vfio vhost-pci support (fo

[Qemu-devel] [PATCH 6/6] tests: add a Makefile rule to run Python qtests

2017-12-13 Thread Philippe Mathieu-Daudé
We can now add Python qtests to the common $(check-qtest-y) / $(check-qtest-$(TARGET)-y) variable. Using the $(filter...) function, the check-qtest-% rule splits between C/Python qtests and can run both types. Signed-off-by: Philippe Mathieu-Daudé --- tests/Makefile.include | 11 --- 1

[Qemu-devel] [PATCH 4/6] qtest.py: add verify_machine(supported_machines)

2017-12-13 Thread Philippe Mathieu-Daudé
We can now restrict tests to specific machines. Signed-off-by: Philippe Mathieu-Daudé --- scripts/qtest.py | 16 1 file changed, 16 insertions(+) diff --git a/scripts/qtest.py b/scripts/qtest.py index 733686a6fe..429eb67c2a 100644 --- a/scripts/qtest.py +++ b/scripts/qtest.py @

Re: [Qemu-devel] [PATCH 3/4] hw/registerfields: add 64-bit extract/deposit macros

2017-12-13 Thread francisco iglesias
On 13 December 2017 at 06:17, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/registerfields.h | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/include/hw/registerfields.h b/include/hw/registerfields.h > index ad9d7a82a3..f59e7f47bd

[Qemu-devel] [PATCH 3/6] qtest.py: use TMPDIR/TEMP if the TEST_DIR env var is missing

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- scripts/qtest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qtest.py b/scripts/qtest.py index 78db8d02c0..733686a6fe 100644 --- a/scripts/qtest.py +++ b/scripts/qtest.py @@ -18,12 +18,13 @@ import qemu import re import

[Qemu-devel] [PATCH 5/6] qtest.py: add a simple main() which calls unittest.main()

2017-12-13 Thread Philippe Mathieu-Daudé
We can now write complex qtests with a high-level language (Python). (partly copied from iotests::main) Signed-off-by: Philippe Mathieu-Daudé --- scripts/qtest.py | 33 + 1 file changed, 33 insertions(+) diff --git a/scripts/qtest.py b/scripts/qtest.py index 429e

[Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-13 Thread Philippe Mathieu-Daudé
Hi, With this series we can now write tests using Python rather than C. For complex tests this can reduce the test development time, we can focus on the test purposes instead of his implementation details. - 1,2: we already have Python classes to run Block tests, move all the non Block-related

[Qemu-devel] [PATCH 2/6] iotests.py: move the generic QMPTestCase to qtest.py

2017-12-13 Thread Philippe Mathieu-Daudé
All those methods are generic and can be reused. Add a few 'from qtest import ...' to keep the patch short. Signed-off-by: Philippe Mathieu-Daudé --- scripts/qtest.py | 102 ++ tests/qemu-iotests/iotests.py | 86 +++---

[Qemu-devel] [PATCH 1/6] iotests.py: split BlockQMPTestCase class of QMPTestCase

2017-12-13 Thread Philippe Mathieu-Daudé
Add a new class BlockQMPTestCase based on QMPTestCase, which only contains the block methods. This will allow to reuse the generic methods in the next patch. Patch created mostly mechanically. Signed-off-by: Philippe Mathieu-Daudé --- tests/qemu-iotests/iotests.py | 4 tests/qemu-iotests/

Re: [Qemu-devel] [PATCH v2] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2017-12-13 Thread John Snow
On 12/13/2017 10:44 AM, Alberto Garcia wrote: > This patch tweaks TestParallelOps in iotest 030 so it allocates data > in smaller regions (256KB/512KB instead of 512KB/1MB) and the > block-stream job in test_stream_commit() only needs to copy data that > is at the very end of the image. > > This

Re: [Qemu-devel] [PATCH 1/2] block/iscsi: dont leave allocmap in an invalid state on UNMAP failure

2017-12-13 Thread Paolo Bonzini
On 08/12/2017 12:51, Peter Lieven wrote: > we forgot to set the allocmap to invalid if an UNMAP call fails. This is only needed for "a power loss, a medium error, or hardware error" according to the spec, but I guess this is the safe thing to do. Paolo > Cc: qemu-sta...@nongnu.org > Signed-off-b

Re: [Qemu-devel] [PATCH v4 4/6] vhost: add regions to temporary list

2017-12-13 Thread Paolo Bonzini
On 13/12/2017 19:08, Dr. David Alan Gilbert (git) wrote: > +if (dev->tmp_mem->nregions) { > +/* Since we already have at least one region, lets see if > + * this extends it; since we're scanning in order, we only > + * have to look at the last one, and the FlatView that

Re: [Qemu-devel] [PATCH v2 0/9] blockdev: fix QMP 'transaction' with IOThreads

2017-12-13 Thread Paolo Bonzini
On 06/12/2017 15:45, Stefan Hajnoczi wrote: > v2: > * Use StrOrNull for x-blockdev-set-iothread iothread argument [eblake] > > (This is for QEMU 2.12 because this bug is not -rc4 critical) > > Previously AioContext was held across QMP 'transaction' in an attempt to > achieve bdrv_drained_begin/e

Re: [Qemu-devel] [PATCH v2 0/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-13 Thread Paolo Bonzini
On 07/12/2017 21:13, Stefan Hajnoczi wrote: > v2: > * Added docs/devel/multiple-iothreads.txt doc update [Kevin] > * Added qemu-iotests 203 test case [Kevin] > * Added iothread_stop() race fix to make 203 reliable > > Patch 1 is Paolo's recursive locking removal in bdrv_inactivate_all(). This

Re: [Qemu-devel] QEMU not honouring bootorder

2017-12-13 Thread Paolo Bonzini
On 11/12/2017 13:14, Michal Privoznik wrote: >>> qemu-system-x86_64 \ >>> -boot menu=on,strict=on \ >>> -device lsi,id=scsi0,bus=pci.0 \ >>> -drive >>> file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 >>> \ >>> -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,b

Re: [Qemu-devel] [PATCH v2] blockjob: kick jobs on set-speed

2017-12-13 Thread Paolo Bonzini
On 13/12/2017 21:46, John Snow wrote: > > When a user provides a new speed, kick the job to allow it to recalculate > its delay. > > Signed-off-by: John Snow > --- > > RFC: Why is block_job_mutex shared between all jobs, > instead of being per-job? Because that patch was partly extracted

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-13 Thread Michael S. Tsirkin
> * VHOST_USER_SET_VRING_KICK > >Set up vring kick doorbell (unless bit 8 is set) before sending >VHOST_USER_SET_VRING_KICK to the guest. But guest can't use it, now can it? What guest needs is a mapping to interrupts. > * VHOST_USER_SET_VRING_CALL > >Set up the vring call doorb

[Qemu-devel] [PATCH v2] blockjob: kick jobs on set-speed

2017-12-13 Thread John Snow
If users set an unreasonably low speed (like one byte per second), the calculated delay may exceed many hours. While we like to punish users for asking for stupid things, we do also like to allow users to correct their wicked ways. When a user provides a new speed, kick the job to allow it to reca

[Qemu-devel] [PATCH 09/11] sdhci: implement the SD_BUS_MASTER interface

2017-12-13 Thread Philippe Mathieu-Daudé
The SDHCI is a SD master, let it implement the SD_BUS_MASTER interface, this even allow remove the SDHCI_BUS type. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdh

[Qemu-devel] [PATCH 11/11] hw/arm/xilinx_zynq: use sdbus_create_slave() to name the different SD busses

2017-12-13 Thread Philippe Mathieu-Daudé
Using the "bus-name" property we can now address any bus. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/xilinx_zynq.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 1836a4ed45..9275ae6daf 100644 --- a/hw/arm/xilin

[Qemu-devel] [PATCH 06/11] sdbus: rename SDCardClass -> SDSlaveClass

2017-12-13 Thread Philippe Mathieu-Daudé
By default a SD bus connect SD cards, however it may accept other SD devices like a SDIO device. The current class is not restricted to a SD "Card" device. To better reflect this is a SD bus slave, simply rename it. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd-internal.h | 10 +- h

[Qemu-devel] [PATCH 10/11] hw/sd/pxa2xx: implement the SD_BUS_MASTER interface

2017-12-13 Thread Philippe Mathieu-Daudé
This MMC Interface is a SD bus master. Replace qbus_create_inplace() by sdbus_create_bus(), remove the PXA2XX_MMCI_BUS type. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/pxa2xx_mmci.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 08/11] sdbus: add a SD_BUS_MASTER interface

2017-12-13 Thread Philippe Mathieu-Daudé
Now than we have clearly separated the SD slave devices, let continue adding the SD master interface, this will simplify the design. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd-internal.h | 3 +++ hw/sd/core.c| 7 +++ 2 files changed, 10 insertions(+) diff --git a/hw/sd/sd-in

[Qemu-devel] [PATCH 07/11] sdbus: add a SD_BUS_SLAVE interface

2017-12-13 Thread Philippe Mathieu-Daudé
Devices implementing this interface can be (hot-)plugged to a SD bus. The sdcard device is currently the unique implementation. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd-internal.h | 5 +++-- hw/sd/core.c| 7 +++ hw/sd/sd.c | 4 3 files changed, 14 insertions(

[Qemu-devel] [PATCH 05/11] sdbus: add sdbus_create_slave()

2017-12-13 Thread Philippe Mathieu-Daudé
The slave qdev is created connected to the parent SDBus. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sd.h | 2 ++ hw/sd/core.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h index dc9d697c12..d402231724 100644 --- a

[Qemu-devel] [PATCH 04/11] sdbus: add sdbus_create_bus() to replace qbus_create_inplace()

2017-12-13 Thread Philippe Mathieu-Daudé
A "bus-name" property can be use to change the default SDHCI "sd-bus" name. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sd.h | 1 + include/hw/sd/sdhci.h| 3 ++- hw/arm/bcm2835_peripherals.c | 2 +- hw/sd/core.c | 5 + hw/sd/sdhci.c

[Qemu-devel] [PATCH 03/11] sdbus: add trace events

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/core.c | 25 + hw/sd/trace-events | 6 ++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/hw/sd/core.c b/hw/sd/core.c index bd9350d21c..eda595973b 100644 --- a/hw/sd/core.c +++ b/hw/sd/core.c @@ -21

[Qemu-devel] [PATCH 02/11] bcm2835_peripherals: move GPIO 'sdbus' property link from init() -> realize()

2017-12-13 Thread Philippe Mathieu-Daudé
We can then use dynamic sdbus creation (from realized HCI devices). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2835_peripherals.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 12e0dd11af..7f

[Qemu-devel] [PATCH 00/11] QOM'ify SDBus, housekeeping

2017-12-13 Thread Philippe Mathieu-Daudé
Hi, This series also refactor the SDBus codebase to ease further development/series. - 1: we add another hexbuf_strdup() helper, hoping someone will come with a clever way to do the same :) - 2,4,5: add a sdbus_create_bus(master) and sdbus_create_slave(bus) to use instead of the current

[Qemu-devel] [RFC PATCH 01/11] util/cutils: add qemu_hexbuf_strdup(), yet another hexdump()

2017-12-13 Thread Philippe Mathieu-Daudé
This will be helpful for tracing() API. Signed-off-by: Philippe Mathieu-Daudé --- "yet", so probably duplicating a better way to do it :| include/qemu/cutils.h | 3 +++ util/hexdump.c| 19 +++ 2 files changed, 22 insertions(+) diff --git a/include/qemu/cutils.h b/inclu

Re: [Qemu-devel] [PATCH] docs: Convert migration.txt to rst

2017-12-13 Thread Dr. David Alan Gilbert
* Kashyap Chamarthy (kcham...@redhat.com) wrote: > On Tue, Dec 12, 2017 at 01:56:00PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Mostly just manual conversion with very minor fixes. > > > > Signed-off-by: Dr. David Alan Gilbert > > --- > > docs/devel/

[Qemu-devel] [PATCH 14/14] sdhci: add a "dma-memory" property

2017-12-13 Thread Philippe Mathieu-Daudé
Add a dma property allowing machine creation to provide the address-space sdhci dma operates on. [based on a patch from Alistair Francis from qemu/xilinx tag xilinx-v2016.1] Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sdhci.h | 2 ++ hw/sd/sdhci.c | 24 ++--

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-13 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 3:01 PM, Michael S. Tsirkin wrote: > On Wed, Dec 13, 2017 at 12:35:21PM +, Stefan Hajnoczi wrote: >> I'm not saying that DPDK should use libvhost-user. I'm saying that it's >> easy to add vfio vhost-pci support (for the PCI adapter I described) to >> DPDK. This patch

Re: [Qemu-devel] [RFC v5 16/26] monitor: separate QMP parser and dispatcher

2017-12-13 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:50PM +0800, Peter Xu wrote: > @@ -3956,12 +3968,122 @@ static void handle_qmp_command(JSONMessageParser > *parser, GQueue *tokens, > } > } > > -err_out: > -monitor_qmp_respond(mon, rsp, err, id); > +/* Respond if necessary */ > +monitor_qmp

[Qemu-devel] [PATCH dontapply] virtio: rework set_status callbacks

2017-12-13 Thread Michael S. Tsirkin
set status calls do not nest properly. The issue is that if someone calls set_status nested from within set_status, then status gets over-written because status is only set at the last moment, it's thus actually incorrect most of the time. But most people just want the new status, so it is better

[Qemu-devel] [PATCH 13/14] sdhci: add sdhci_init_capareg() to initialize the CAPAB register

2017-12-13 Thread Philippe Mathieu-Daudé
following patches modifying CAPAB will be easier to review. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index dadc4787b2..78bb8e8e89 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/

[Qemu-devel] [PATCH] virtio_error: don't invoke status callbacks

2017-12-13 Thread Michael S. Tsirkin
Backends don't need to know what frontend requested a reset, and notifying then from virtio_error is messy because virtio_error itself might be invoked from backend. Let's just set the status directly. Reported-by: Ilya Maximets Signed-off-by: Michael S. Tsirkin --- Ilya this should fix the cr

[Qemu-devel] [PATCH 11/14] sdhci: convert the DPRINT() calls into trace events

2017-12-13 Thread Philippe Mathieu-Daudé
zero-initialize ADMADescr 'dscr' in sdhci_do_adma() to avoid: hw/sd/sdhci.c: In function ‘sdhci_do_adma’: hw/sd/sdhci.c:714:29: error: ‘dscr.addr’ may be used uninitialized in this function [-Werror=maybe-uninitialized] trace_sdhci_adma("link", s->admasysaddr);

[Qemu-devel] [PATCH 10/14] sdhci: use qemu_log_mask(UNIMP) instead of fprintf()

2017-12-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 044e3d62f1..8fcd48f849 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -936,7 +936,8 @@ static uint64_t sdhci_read(void *opaque,

  1   2   3   >