Re: [Qemu-devel] [PATCH v2 27/35] vnc: Clean up error reporting in vnc_init_func()

2018-10-15 Thread Gerd Hoffmann
> >> +error_propagate(errp, local_err); > > Shall we use error_propagate(errp, local_err, ("Failed to init VNC > > server: "); > > like vnc_display_open does? > > I don't know. > > The error reporting is somewhat poor around here. Consider: > > $ qemu-system-x86_64 -display vnc=:0

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-15 Thread Gerd Hoffmann
Hi, > I don't know. The `disable-modern` option already exists but I > don't know who would want to use it. Compat property for old (2.6 & older) machine types. > > Right - maybe a flag to disable modern interface is enough. > > We thus get two types: > > - transitional (legacy) > > - non-tra

Re: [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

2018-10-15 Thread Marc-André Lureau
Hi On Mon, Oct 15, 2018 at 9:34 PM Max Reitz wrote: > > This adds some whitespace into the option help (including indentation) > and replaces '=' by ': ' (not least because '=' should be used for > values, not types). Without strong preference, I like the '=' better: it's the expected syntax for

[Qemu-devel] [RFC PATCH] block: Clean up bdrv_img_create()'s error reporting

2018-10-15 Thread Markus Armbruster
bdrv_img_create() takes an Error ** argument and used it in the conventional way, except for one place: when qemu_opts_do_parse() fails, it first reports its error to stderr or the HMP monitor with error_report_err(), then error_setg()'s a generic error. When the caller reports that second error s

Re: [Qemu-devel] [PATCH v3 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-15 Thread Paolo Bonzini
On 16/10/2018 04:52, Richard Henderson wrote: > On 10/5/18 2:14 PM, Emilio G. Cota wrote: >> -target_ulong tlb_addr = env->tlb_table[mmu_idx][index].addr_write; >> +target_ulong tlb_addr = >> +atomic_read(&env->tlb_table[mmu_idx][index].addr_write); > > This fails for 32-bit hosts

Re: [Qemu-devel] [PATCH v2 33/35] blockdev: Convert drive_new() to Error

2018-10-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 15/10/2018 16:48, Max Reitz wrote: >> On 15.10.18 13:53, Markus Armbruster wrote: >>> Calling error_report() from within a function that takes an Error ** >>> argument is suspicious. drive_new() calls error_report() even though >>> it can run within drive_init

Re: [Qemu-devel] [PATCH v2 27/35] vnc: Clean up error reporting in vnc_init_func()

2018-10-15 Thread Markus Armbruster
Fei Li writes: > On 10/15/2018 07:53 PM, Markus Armbruster wrote: >> Calling error_report() in a function that takes an Error ** argument >> is suspicious. vnc_init_func() does that, and then fails without >> setting an error. Its caller main(), via qemu_opts_foreach(), is fine >> with it, but

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-15 Thread Markus Armbruster
Eduardo Habkost writes: > On Mon, Oct 15, 2018 at 05:55:27PM +0100, Peter Maydell wrote: >> On 15 October 2018 at 17:33, Markus Armbruster wrote: >> > Kevin Wolf writes: >> > >> >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben: >> >> It's easier to port stuff to Python 3 though than maki

[Qemu-devel] check-tcg failure

2018-10-15 Thread Richard Henderson
On aa64, "cross-compiling" to aa32, with CC=arm-linux-gnueabihf-gcc configure determines aarch64-linux-user/config-target.mak:CROSS_CC_GUEST="aarch64-linux-gnu-gcc" aarch64-linux-user/config-target.mak:CROSS_CC_GUEST_STATIC=y aarch64-softmmu/config-target.mak:CROSS_CC_GUEST="aarch64-linux-gnu-gc

Re: [Qemu-devel] [PATCH v3 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-15 Thread Richard Henderson
On 10/5/18 2:14 PM, Emilio G. Cota wrote: > -target_ulong tlb_addr = env->tlb_table[mmu_idx][index].addr_write; > +target_ulong tlb_addr = > +atomic_read(&env->tlb_table[mmu_idx][index].addr_write); This fails for 32-bit hosts emulating 64-bit hosts. I think you need a separate hel

Re: [Qemu-devel] virtio-console downgrade the virtio-pci-blk performance

2018-10-15 Thread Feng Li
Hi Amit, Thanks for your response. See inline comments. Amit Shah 于2018年10月16日周二 上午2:51写道: > > On (Thu) 11 Oct 2018 [18:15:41], Feng Li wrote: > > Add Amit Shah. > > > > After some tests, we found: > > - the virtio serial port number is inversely proportional to the iSCSI > > virtio-blk-pci per

[Qemu-devel] [PATCH] Xen PCI passthrough: fix passthrough failure when irq map failure

2018-10-15 Thread Zhao Yan
Commit 5a11d0f7 mistakenly converted a log message into an error condition when irq map is failed for the pci device being passed through. Revert that part of the commit. Signed-off-by: Zhao Yan --- hw/xen/xen_pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen/xe

Re: [Qemu-devel] [PATCH] hw/arm/boot: Increase compliance with kernel arm64 boot protocol.

2018-10-15 Thread Stewart Hildebrand
Hi Philippe, On Monday, October 15, 2018 6:05 PM, Philippe Mathieu-Daudé wrote: > Hi Stewart, > > On 15/10/2018 23:26, Stewart Hildebrand wrote: > > +/* For the virt board, we write our startup "bootloader" at > > the very > > + * bottom of RAM, so that bit can't be used

Re: [Qemu-devel] [PATCH 7/9] iotests: 'new' module replacement in 169

2018-10-15 Thread Cleber Rosa
On 10/15/18 7:57 PM, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 07:38:45PM -0400, Cleber Rosa wrote: >> >> >> On 10/15/18 10:14 AM, Max Reitz wrote: >>> iotest 169 uses the 'new' module to add methods to a class. This module >>> no longer exists in Python 3. Instead, we can use a lambda.

Re: [Qemu-devel] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 08:05:02PM -0400, Cleber Rosa wrote: > > > On 10/15/18 5:17 PM, Eduardo Habkost wrote: > > On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote: > >> There are two imports that need to be modified when running the iotests > >> under Python 3: One is StringIO, which no

Re: [Qemu-devel] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Cleber Rosa
On 10/15/18 5:17 PM, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote: >> There are two imports that need to be modified when running the iotests >> under Python 3: One is StringIO, which no longer exists; instead, the >> StringIO class comes from the io module,

Re: [Qemu-devel] [PATCH 7/9] iotests: 'new' module replacement in 169

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 07:38:45PM -0400, Cleber Rosa wrote: > > > On 10/15/18 10:14 AM, Max Reitz wrote: > > iotest 169 uses the 'new' module to add methods to a class. This module > > no longer exists in Python 3. Instead, we can use a lambda. Best of > > all, this works in 2.7 just as well.

Re: [Qemu-devel] [PATCH 7/9] iotests: 'new' module replacement in 169

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > iotest 169 uses the 'new' module to add methods to a class. This module > no longer exists in Python 3. Instead, we can use a lambda. Best of > all, this works in 2.7 just as well. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/169 | 3 +--

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 11:45:56AM +0200, Cornelia Huck wrote: > On Fri, 12 Oct 2018 23:54:35 -0300 > Eduardo Habkost wrote: > > > The current virtio-*-pci device types actually represent 3 > > different types of devices: > > * virtio 1.0 non-transitional devices > > * virtio 1.0 transitional dev

Re: [Qemu-devel] [PATCH 6/9] iotests: Explicitly inherit FDs in Python

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > Python 3.2 introduced the inheritable attribute for FDs. At the same > time, it changed the default so that all FDs are not inheritable by > default, that only inheritable FDs are inherited to subprocesses, and > only if close_fds is explicitly set to Fa

Re: [Qemu-devel] [PATCH v3 0/8] tests/vm: Improvements when KVM is not available

2018-10-15 Thread Richard Henderson
On 10/12/18 5:40 PM, Philippe Mathieu-Daudé wrote: > Hi Fam, > > Few patches I added while testing the VM tests without KVM access. > I doubt many people want to suffer using TCG for VM testing, but > it was handy to debug/support aarch64 VM tests. > > Also this could be a useful TCG stress test.

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 06:27:21AM -0400, Michael S. Tsirkin wrote: > On Mon, Oct 15, 2018 at 10:16:41AM +0200, Gerd Hoffmann wrote: > > On Fri, Oct 12, 2018 at 11:54:35PM -0300, Eduardo Habkost wrote: > > > The current virtio-*-pci device types actually represent 3 > > > different types of devices

Re: [Qemu-devel] [PATCH 1/3] target/mips: Add a comment with an overview of CP0 registers

2018-10-15 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 15/10/2018 12:50, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Add a comment with an overview of CP0 registers close to the > definition of their corresponding fields in CPUMIPSState. > > Signed-off-by: Aleksandar Markovic > --- > target/mips/cpu.h | 109 > +++

qemu-devel@nongnu.org

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 13:52, Markus Armbruster wrote: > From include/qapi/error.h: > > * Pass an existing error to the caller with the message modified: > * error_propagate(errp, err); > * error_prepend(errp, "Could not frobnicate '%s': ", name); > > Fei Li pointed out that doing error_prop

Re: [Qemu-devel] [PATCH v2 26/35] ui: Convert vnc_display_init(), init_keyboard_layout() to Error

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 13:53, Markus Armbruster wrote: > From: Fei Li > > Signed-off-by: Fei Li > Cc: Gerd Hoffmann > Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé > --- > include/ui/console.h | 2 +- > ui/curses.c | 6 +++--- > ui/keymaps.c | 11 ++

Re: [Qemu-devel] [PATCH v2 27/35] vnc: Clean up error reporting in vnc_init_func()

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 13:53, Markus Armbruster wrote: > Calling error_report() in a function that takes an Error ** argument > is suspicious. vnc_init_func() does that, and then fails without > setting an error. Its caller main(), via qemu_opts_foreach(), is fine > with it, but clean it up anyway. > > C

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-15 Thread Eduardo Habkost
On Tue, Oct 16, 2018 at 12:28:07AM +0200, Philippe Mathieu-Daudé wrote: > Hi Caio, > > On 15/10/2018 20:41, Caio Carrara wrote: > > On 13-10-2018 00:37, Eduardo Habkost wrote: > >> On Fri, Oct 12, 2018 at 11:30:39PM +0200, Philippe Mathieu-Daudé wrote: > >>> Hi Cleber, > >>> > >>> On 12/10/2018 18

Re: [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > In Python 3, several functions now return iterators instead of lists. > This includes range(), items(), map(), and filter(). This means that if > we really want a list, we have to wrap those instances with list(). On > the other hand, sometimes we do ju

Re: [Qemu-devel] [PATCH v2 33/35] blockdev: Convert drive_new() to Error

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 16:48, Max Reitz wrote: > On 15.10.18 13:53, Markus Armbruster wrote: >> Calling error_report() from within a function that takes an Error ** >> argument is suspicious. drive_new() calls error_report() even though >> it can run within drive_init_func(), which takes an Error ** argume

Re: [Qemu-devel] [PATCH 5/5] fw_cfg: Drop newline in @file description

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 19:28, Max Reitz wrote: > There is no good reason why there should be a newline in this > description, so remove it. > > Signed-off-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé > --- > vl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/vl.c b/vl.

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-15 Thread Philippe Mathieu-Daudé
Hi Caio, On 15/10/2018 20:41, Caio Carrara wrote: > On 13-10-2018 00:37, Eduardo Habkost wrote: >> On Fri, Oct 12, 2018 at 11:30:39PM +0200, Philippe Mathieu-Daudé wrote: >>> Hi Cleber, >>> >>> On 12/10/2018 18:53, Cleber Rosa wrote: A number of QEMU tests are written in Python, and may benef

Re: [Qemu-devel] [PATCH 9/9] iotests: Unify log outputs between Python 2 and 3

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:53PM +0200, Max Reitz wrote: > When dumping an object into the log, there are differences between > Python 2 and 3. First, unicode strings are prefixed by 'u' in Python 2 > (they are no longer in 3, because unicode strings are the default > there). [...] This could

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 21:04, Caio Carrara wrote: > On 12-10-2018 13:53, Cleber Rosa wrote: >> A number of QEMU tests are written in Python, and may benefit >> from an untainted Python venv. >> >> By using make rules, tests that depend on specific Python libs >> can set that rule as a requirement, along wit

Re: [Qemu-devel] [PATCH 0/9] iotests: Make them work for both Python 2 and 3

2018-10-15 Thread Philippe Mathieu-Daudé
Hi Max, On 15/10/2018 16:14, Max Reitz wrote: > This series prepares the iotests to work with both Python 2 and 3. In > some places, it adds version-specific code and decides what to do based > on the version (for instance, whether to import the StringIO class from > the 'io' or the 'StringIO' mo

Re: [Qemu-devel] [PATCH 3/9] iotests: Use Python byte strings where appropriate

2018-10-15 Thread Philippe Mathieu-Daudé
On 15/10/2018 16:14, Max Reitz wrote: > Since byte strings are no longer the default in Python 3, we have to > explicitly use them where we need to, which is mostly when working with > structures. It also means that we need to open a file in binary mode > when we want to use structures. > > On th

Re: [Qemu-devel] [PATCH] hw/arm/boot: Increase compliance with kernel arm64 boot protocol.

2018-10-15 Thread Philippe Mathieu-Daudé
Hi Stewart, On 15/10/2018 23:26, Stewart Hildebrand wrote: > "The Image must be placed text_offset bytes from a 2MB aligned base > address anywhere in usable system RAM and called there." > > For the virt board, we write our startup bootloader at the very > bottom of RAM, so that bit can't be use

Re: [Qemu-devel] [PATCH v6 09/14] target/arm: Add array for supported PMU events, generate PMCEID[01]

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > +cpu->pmceid0 = pmceid & 0x; > +cpu->pmceid1 = (pmceid >> 32) & 0x; extract64(pmceid, 0, 32) and extract64(pmceid, 32, 32). > +static const pm_event pm_events[] = { > +}; > +#define MAX_EVENT_ID 0x0 Is this going to be A

Re: [Qemu-devel] [PATCH v6 08/14] target/arm: Implement PMOVSSET

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > Add an array for PMOVSSET so we only define it for v7ve+ platforms > > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 28 > 1 file changed, 28 insertions(+) Reviewed-by: Richard Henderson r~

[Qemu-devel] [PATCH] hw/arm/boot: Increase compliance with kernel arm64 boot protocol.

2018-10-15 Thread Stewart Hildebrand
"The Image must be placed text_offset bytes from a 2MB aligned base address anywhere in usable system RAM and called there." For the virt board, we write our startup bootloader at the very bottom of RAM, so that bit can't be used for the image. To avoid overlap in case the image requests to be loa

Re: [Qemu-devel] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote: > There are two imports that need to be modified when running the iotests > under Python 3: One is StringIO, which no longer exists; instead, the > StringIO class comes from the io module, so import it from there. The > other is the Config

Re: [Qemu-devel] [PATCH 4/9] iotests: Use // for Python integer division

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > In Python 3, / is always a floating-point division. We usually do not > want this, and as Python 2.7 understands // as well, change all integer > divisions to use that. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/040| 4 ++-- > te

Re: [Qemu-devel] [PATCH 7/9] iotests: 'new' module replacement in 169

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:51PM +0200, Max Reitz wrote: > iotest 169 uses the 'new' module to add methods to a class. This module > no longer exists in Python 3. Instead, we can use a lambda. Best of > all, this works in 2.7 just as well. > > Signed-off-by: Max Reitz > --- > tests/qemu-iot

Re: [Qemu-devel] [PATCH v6 07/14] target/arm: Allow AArch32 access for PMCCFILTR

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > Reviewed-by: Peter Maydell > --- > target/arm/helper.c | 27 ++- > 1 file changed, 26 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v6 06/14] target/arm: Filter cycle counter based on PMCCFILTR_EL0

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > --- a/target/arm/machine.c > +++ b/target/arm/machine.c > @@ -584,7 +584,7 @@ static int cpu_pre_save(void *opaque) > { > ARMCPU *cpu = opaque; > > -pmccntr_op_start(&cpu->env); > +pmu_op_start(&cpu->env); Does it make sense to move this

Re: [Qemu-devel] [PATCH 2/9] iotests: Flush in iotests.py's QemuIoInteractive

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > After issuing a command, flush the pipe. This does not change anything > in Python 2, but it makes a difference in Python 3. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-devel] [PATCH v6 05/14] target/arm: Reorganize PMCCNTR accesses

2018-10-15 Thread Richard Henderson
On 10/15/18 1:30 PM, Aaron Lindsay wrote: > On Oct 15 13:19, Richard Henderson wrote: >> On 10/15/18 12:50 PM, Richard Henderson wrote: >>> Ok, looking at this follow-up makes more sense than the previous patch. >>> Would >>> it make sense to squash these two together? >> >> Or, rather, split int

Re: [Qemu-devel] [PATCH v6 04/14] target/arm: Swap PMU values before/after migrations

2018-10-15 Thread Aaron Lindsay
On Oct 15 12:45, Richard Henderson wrote: > On 10/10/18 1:37 PM, Aaron Lindsay wrote: > > +static void cpu_post_save(void *opaque) > > +{ > > +ARMCPU *cpu = opaque; > > +pmccntr_sync(&cpu->env); > > +} > > I'm confused about the need for this. > Can you explain the sequence of events that

Re: [Qemu-devel] [PATCH v6 05/14] target/arm: Reorganize PMCCNTR accesses

2018-10-15 Thread Aaron Lindsay
On Oct 15 13:19, Richard Henderson wrote: > On 10/15/18 12:50 PM, Richard Henderson wrote: > > Ok, looking at this follow-up makes more sense than the previous patch. > > Would > > it make sense to squash these two together? > > Or, rather, split into two different patches: the first splits pmcc

Re: [Qemu-devel] [PATCH 6/9] iotests: Explicitly inherit FDs in Python

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:50PM +0200, Max Reitz wrote: > Python 3.2 introduced the inheritable attribute for FDs. At the same > time, it changed the default so that all FDs are not inheritable by > default, that only inheritable FDs are inherited to subprocesses, and > only if close_fds is exp

Re: [Qemu-devel] [PATCH v1 0/5] Misc RISC-V patches

2018-10-15 Thread Palmer Dabbelt
On Fri, 12 Oct 2018 02:34:12 PDT (-0700), peter.mayd...@linaro.org wrote: On 11 October 2018 at 21:52, Michael Clark wrote: Peter, I have to pull in your remote wholesale. I don't cherry-pick from your tree. I think this is truly dumb. This might serve the needs of some folk running Linux but w

Re: [Qemu-devel] [PATCH v6 05/14] target/arm: Reorganize PMCCNTR accesses

2018-10-15 Thread Aaron Lindsay
On Oct 15 12:50, Richard Henderson wrote: > On 10/10/18 1:37 PM, Aaron Lindsay wrote: > > pmccntr_read and pmccntr_write contained duplicate code that was already > > being handled by pmccntr_sync. Consolidate the duplicated code into two > > functions: pmccntr_op_start and pmccntr_op_finish. Add a

Re: [Qemu-devel] [PATCH 1/9] iotests: Make nbd-fault-injector flush

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > When closing a connection, make the nbd-fault-injector flush the socket. > Without this, the output is a bit unreliable with Python 3. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-devel] [PATCH v6 05/14] target/arm: Reorganize PMCCNTR accesses

2018-10-15 Thread Richard Henderson
On 10/15/18 12:50 PM, Richard Henderson wrote: > Ok, looking at this follow-up makes more sense than the previous patch. Would > it make sense to squash these two together? Or, rather, split into two different patches: the first splits pmccntr_sync and updates all of the existing uses, and the se

[Qemu-devel] QEMU PCIe link "negotiation"

2018-10-15 Thread Alex Williamson
Hi, I'd like to start a discussion about virtual PCIe link width and speeds in QEMU to figure out how we progress past the 2.5GT/s, x1 width links we advertise today. This matters for assigned devices as the endpoint driver may not enable full physical link utilization if the upstream port only a

Re: [Qemu-devel] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 02:59:28PM -0400, Cleber Rosa wrote: > > > On 10/15/18 10:14 AM, Max Reitz wrote: > > There are two imports that need to be modified when running the iotests > > under Python 3: One is StringIO, which no longer exists; instead, the > > StringIO class comes from the io modu

Re: [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:49PM +0200, Max Reitz wrote: > In Python 3, several functions now return iterators instead of lists. > This includes range(), items(), map(), and filter(). This means that if > we really want a list, we have to wrap those instances with list(). On > the other hand, s

[Qemu-devel] [RFC PATCH] iotests: make 083 specific to raw

2018-10-15 Thread Cleber Rosa
While testing the Python 3 changes which touch the 083 test, I noticed that it would fail with qcow2. Expanding the testing, I noticed it had nothing to do with the Python 3 changes, and in fact, it would not pass on anything but raw: raw: pass bochs: not generic cloop: not generic parallels:

Re: [Qemu-devel] [PATCH 4/9] iotests: Use // for Python integer division

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:48PM +0200, Max Reitz wrote: > In Python 3, / is always a floating-point division. We usually do not > want this, and as Python 2.7 understands // as well, change all integer > divisions to use that. > > Signed-off-by: Max Reitz Reviewed-by: Eduardo Habkost -- E

Re: [Qemu-devel] [PATCH 3/9] iotests: Use Python byte strings where appropriate

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:47PM +0200, Max Reitz wrote: > Since byte strings are no longer the default in Python 3, we have to > explicitly use them where we need to, which is mostly when working with > structures. It also means that we need to open a file in binary mode > when we want to use s

Re: [Qemu-devel] [PATCH v6 05/14] target/arm: Reorganize PMCCNTR accesses

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > pmccntr_read and pmccntr_write contained duplicate code that was already > being handled by pmccntr_sync. Consolidate the duplicated code into two > functions: pmccntr_op_start and pmccntr_op_finish. Add a companion to > c15_ccnt in CPUARMState so that we

Re: [Qemu-devel] [PATCH v6 04/14] target/arm: Swap PMU values before/after migrations

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > +static void cpu_post_save(void *opaque) > +{ > +ARMCPU *cpu = opaque; > +pmccntr_sync(&cpu->env); > +} I'm confused about the need for this. Can you explain the sequence of events that requires it? r~

Re: [Qemu-devel] [PATCH 1/9] iotests: Make nbd-fault-injector flush

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:45PM +0200, Max Reitz wrote: > When closing a connection, make the nbd-fault-injector flush the socket. > Without this, the output is a bit unreliable with Python 3. > > Signed-off-by: Max Reitz Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH 2/9] iotests: Flush in iotests.py's QemuIoInteractive

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:46PM +0200, Max Reitz wrote: > After issuing a command, flush the pipe. This does not change anything > in Python 2, but it makes a difference in Python 3. > > Signed-off-by: Max Reitz Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > In some cases it may be helpful to modify state before saving it for > migration, and then modify the state back after it has been saved. The > existing pre_save function provides half of this functionality. This > patch adds a post_save function to provi

Re: [Qemu-devel] [PATCH v6 02/14] target/arm: Mask PMOVSR writes based on supported counters

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > This is an amendment to my earlier patch: > commit 7ece99b17e832065236c07a158dfac62619ef99b > Author: Aaron Lindsay > Date: Thu Apr 26 11:04:39 2018 +0100 > > target/arm: Mask PMU register writes based on PMCR_EL0.N > > Signed-off-b

Re: [Qemu-devel] [PATCH v6 01/14] target/arm: Mark PMINTENCLR and PMINTENCLR_EL1 accesses as possibly doing IO

2018-10-15 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > I previously fixed this for PMINTENSET_EL1, but missed these. > > Signed-off-by: Aaron Lindsay > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-15 Thread Caio Carrara
On 12-10-2018 13:53, Cleber Rosa wrote: > A number of QEMU tests are written in Python, and may benefit > from an untainted Python venv. > > By using make rules, tests that depend on specific Python libs > can set that rule as a requirement, along with rules that require > the presence or installa

Re: [Qemu-devel] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > There are two imports that need to be modified when running the iotests > under Python 3: One is StringIO, which no longer exists; instead, the > StringIO class comes from the io module, so import it from there. The > other is the ConfigParser, which has

Re: [Qemu-devel] virtio-console downgrade the virtio-pci-blk performance

2018-10-15 Thread Amit Shah
On (Thu) 11 Oct 2018 [18:15:41], Feng Li wrote: > Add Amit Shah. > > After some tests, we found: > - the virtio serial port number is inversely proportional to the iSCSI > virtio-blk-pci performance. > If we set the virio-serial ports to 2(" type='virtio-serial' index='0' ports='2'/>), the perform

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-15 Thread Christian Borntraeger
On 10/15/2018 08:33 PM, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 08:19:18PM +0200, Christian Borntraeger wrote: [...] It's easier to port stuff to Python 3 though than making them work with both. I think Eduardo's RFC is in part motivated by a patch from Philippe tha

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-15 Thread Caio Carrara
On 13-10-2018 00:37, Eduardo Habkost wrote: > On Fri, Oct 12, 2018 at 11:30:39PM +0200, Philippe Mathieu-Daudé wrote: >> Hi Cleber, >> >> On 12/10/2018 18:53, Cleber Rosa wrote: >>> A number of QEMU tests are written in Python, and may benefit >>> from an untainted Python venv. >>> >>> By using mak

Re: [Qemu-devel] [RFC PATCH 07/21] accel/tcg/cputlb: convert tlb_flush debugging into trace events

2018-10-15 Thread Richard Henderson
On 10/15/18 11:23 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 10/5/18 8:48 AM, Alex Bennée wrote: >>> +trace_tlb_flush_all_work(cpu->cpu_index); >>> tlb_flush_nocheck(cpu); >>> +trace_tlb_flush_work_complete(__LINE__, cpu->cpu_index); >> >> Why is __LINE__ an intere

Re: [Qemu-devel] [RFC PATCH 08/21] accel/tcg/cputlb: convert remaining tlb_debug() to trace events

2018-10-15 Thread Richard Henderson
On 10/15/18 11:17 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 10/5/18 8:48 AM, Alex Bennée wrote: >>> To avoid overly long lines in trace events I've split the event into >>> tlb_set_page and tlb_set_page_attrs. >> >> I don't think this split is a good idea. It allows data from

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 08:19:18PM +0200, Christian Borntraeger wrote: > > > On 10/15/2018 06:33 PM, Markus Armbruster wrote: > > Kevin Wolf writes: > > > >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben: > >>> On 15 October 2018 at 10:32, Daniel P. Berrangé > >>> wrote: > On Sat,

Re: [Qemu-devel] [RFC PATCH 07/21] accel/tcg/cputlb: convert tlb_flush debugging into trace events

2018-10-15 Thread Alex Bennée
Richard Henderson writes: > On 10/5/18 8:48 AM, Alex Bennée wrote: >> +trace_tlb_flush_all_work(cpu->cpu_index); >> tlb_flush_nocheck(cpu); >> +trace_tlb_flush_work_complete(__LINE__, cpu->cpu_index); > > Why is __LINE__ an interesting argument to a trace function? Yeah - I wanted

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-15 Thread Christian Borntraeger
On 10/15/2018 06:33 PM, Markus Armbruster wrote: > Kevin Wolf writes: > >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben: >>> On 15 October 2018 at 10:32, Daniel P. Berrangé wrote: On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkos

Re: [Qemu-devel] [RFC PATCH 08/21] accel/tcg/cputlb: convert remaining tlb_debug() to trace events

2018-10-15 Thread Alex Bennée
Richard Henderson writes: > On 10/5/18 8:48 AM, Alex Bennée wrote: >> To avoid overly long lines in trace events I've split the event into >> tlb_set_page and tlb_set_page_attrs. > > I don't think this split is a good idea. It allows data from different > threads > to be interleaved. Won't w

Re: [Qemu-devel] [RFC PATCH 16/21] trace: add infrastructure for building plugins

2018-10-15 Thread Alex Bennée
Richard Henderson writes: > On 10/5/18 8:49 AM, Alex Bennée wrote: >> +GLIB_CFLAGS = $(shell pkg-config --cflags glib-2.0) >> +CFLAGS = -I$(QEMU_SRC)/include/plugins $(GLIB_CFLAGS) -fno-PIE -fPIC -O3 -g >> +LDFLAGS = $(shell pkg-config --libs glib-2.0) -shared > > I'm not keen on defaulting to

Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-15 Thread Alex Bennée
Richard Henderson writes: > On 10/5/18 8:49 AM, Alex Bennée wrote: >> +char *plugin_status(void) >> +{ >> +GString *report = g_string_new("We have "); >> +char *r; >> +g_mutex_lock(&lock); >> +g_string_append_printf(report, "%ud entries in the hash table\n", >> +

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-15 Thread Eduardo Habkost
On Sun, Oct 14, 2018 at 05:35:12PM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 12, 2018 at 11:54:35PM -0300, Eduardo Habkost wrote: > > The current virtio-*-pci device types actually represent 3 > > different types of devices: > > * virtio 1.0 non-transitional devices > > * virtio 1.0 transition

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-10-15 Thread Liran Alon
Another gentle ping on v2 of this series? Patch was submitted a month ago. Thanks, -Liran > On 8 Oct 2018, at 20:21, Liran Alon wrote: > > Gentle ping on v2 of this series. > (I noticed 1st patch of series was already applied) > > Thanks, > -Liran > >> On 16 Sep 2018, at 15:46, Liran Alon wr

Re: [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 05:55:27PM +0100, Peter Maydell wrote: > On 15 October 2018 at 17:33, Markus Armbruster wrote: > > Kevin Wolf writes: > > > >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben: > >> It's easier to port stuff to Python 3 though than making them work with > >> both. I th

[Qemu-devel] [PULL 6/6] vfio-pci: make vfio-pci device more QOM conventional

2018-10-15 Thread Alex Williamson
From: Li Qiang Define a TYPE_VFIO_PCI and drop DO_UPCAST. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Williamson --- hw/vfio/pci.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio

[Qemu-devel] [PULL 4/6] hw/arm/sysbus-fdt: Allow device matching with DT compatible value

2018-10-15 Thread Alex Williamson
From: Eric Auger Up to now we have relied on the device type to identify a device tree node creation function. Since we would like the vfio-platform device to be instantiable with different compatible strings we introduce the capability to specialize the node creation depending on actual compati

[Qemu-devel] [PULL 5/6] hw/arm/virt: Allow dynamic vfio-platform devices again

2018-10-15 Thread Alex Williamson
From: Geert Uytterhoeven Allow the instantation of generic dynamic vfio-platform devices again, without the need to create a new device-specific vfio type. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Alex Williamson --- hw/arm/virt.c |1

[Qemu-devel] [PULL 3/6] vfio/platform: Make the vfio-platform device non-abstract

2018-10-15 Thread Alex Williamson
From: Eric Auger Up to now the vfio-platform device has been abstract and could not be instantiated. The integration of a new vfio platform device required creating a dummy derived device which only set the compatible string. Following the few vfio-platform device integrations we have seen the

[Qemu-devel] [PULL 1/6] stubs: add ramfb

2018-10-15 Thread Alex Williamson
From: Gerd Hoffmann Needed to make sure code using ramfb (vfio) compiles properly even on platforms without fw_cfg (and therefore no ramfb) support. Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Williamson --- stubs/Makefile.objs |1 + stubs/ramfb.c | 13 + 2 files

[Qemu-devel] [PULL 0/6] vfio updates 2018-10-15

2018-10-15 Thread Alex Williamson
The following changes since commit ff56877e911782dedc9a424233fd3f62369c258c: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20181015-pull-request' into staging (2018-10-15 15:03:45 +0100) are available in the Git repository at: git://github.com/awilliam/qemu-vfio.git

[Qemu-devel] [PULL 2/6] hw/vfio/display: add ramfb support

2018-10-15 Thread Alex Williamson
From: Gerd Hoffmann So we have a boot display when using a vgpu as primary display. ramfb depends on a fw_cfg file. fw_cfg files can not be added and removed at runtime, therefore a ramfb-enabled vfio device can't be hotplugged. Add a nohotplug variant of the vfio-pci device (as child class).

Re: [Qemu-devel] [RFC PATCH 20/21] plugins: add hotness summary to hotblocks

2018-10-15 Thread Richard Henderson
On 10/5/18 8:49 AM, Alex Bennée wrote: > Signed-off-by: Alex Bennée > --- > trace/plugins/hotblocks/hotblocks.c | 33 - > 1 file changed, 32 insertions(+), 1 deletion(-) Oh, haha. Ignore the first half of my comment for the previous patch. r~

Re: [Qemu-devel] [RFC PATCH 18/21] linux-user: allow dumping of plugin status at end of run

2018-10-15 Thread Richard Henderson
On 10/5/18 8:49 AM, Alex Bennée wrote: > As we don't have a monitor in linux-user mode we need some way of > exporting our data to the world. We introduce a new -d option (plugin) > which turns on the existing LOG_TRACE flag which qemu_plugin_status() > will dump output to before we finally exit. >

[Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

2018-10-15 Thread Max Reitz
This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types). Furthermore, the list name is no longer printed as part of every line, but only once in advance, and only if the caller did not print a capt

Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-15 Thread Richard Henderson
On 10/5/18 8:49 AM, Alex Bennée wrote: > +char *plugin_status(void) > +{ > +GString *report = g_string_new("We have "); > +char *r; > +g_mutex_lock(&lock); > +g_string_append_printf(report, "%ud entries in the hash table\n", > + g_hash_table_size(hotblocks)

[Qemu-devel] [PATCH 4/5] object: Make option help nicer to read

2018-10-15 Thread Max Reitz
Just like in qemu_opts_print_help(), print the object name as a caption instead of on every single line, indent all options, and replace the '=' by ': '. Also, indent every object name in the list of available objects. Signed-off-by: Max Reitz --- vl.c | 12 1 file changed, 8 inser

[Qemu-devel] [PATCH 5/5] fw_cfg: Drop newline in @file description

2018-10-15 Thread Max Reitz
There is no good reason why there should be a newline in this description, so remove it. Signed-off-by: Max Reitz --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index f9ed053eab..19f8cc67ff 100644 --- a/vl.c +++ b/vl.c @@ -529,7 +529,7 @@ static QemuOpts

[Qemu-devel] [PATCH 2/5] chardev: Indent list of chardevs

2018-10-15 Thread Max Reitz
Following the example of qemu_opts_print_help(), indent all entries in the list of character devices. Signed-off-by: Max Reitz --- chardev/char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index e115166995..10d44aaefc 100644 --- a/chardev/

[Qemu-devel] [PATCH 3/5] qdev-monitor: Make device options help nicer

2018-10-15 Thread Max Reitz
Just like in qemu_opts_print_help(), print the device name as a caption instead of on every single line, indent all options, and replace the '=' by ': '. Signed-off-by: Max Reitz --- qdev-monitor.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qdev-monitor.c b/qdev-mo

[Qemu-devel] [PATCH 0/5] Various option help readability improvement suggestions

2018-10-15 Thread Max Reitz
I noticed that with the (more or less) recent series from Marc-André the output of qemu-img amend -f qcow2 -o help changed to this: $ ./qemu-img amend -f qcow2 -o help Creation options for 'qcow2': qcow2-create-opts.backing_file=str - File name of a base image qcow2-create-opts.backing_fmt=str - I

Re: [Qemu-devel] [RFC PATCH 17/21] hmp: expose status of plugins to the monitor

2018-10-15 Thread Richard Henderson
On 10/5/18 8:49 AM, Alex Bennée wrote: > Signed-off-by: Alex Bennée > --- > hmp-commands-info.hx | 17 + > include/qemu/plugins.h | 1 + > monitor.c | 14 ++ > trace/plugins.c| 15 +++ > 4 files changed, 47 insertions(+) Reviewed-by

Re: [Qemu-devel] [RFC PATCH 16/21] trace: add infrastructure for building plugins

2018-10-15 Thread Richard Henderson
On 10/5/18 8:49 AM, Alex Bennée wrote: > +GLIB_CFLAGS = $(shell pkg-config --cflags glib-2.0) > +CFLAGS = -I$(QEMU_SRC)/include/plugins $(GLIB_CFLAGS) -fno-PIE -fPIC -O3 -g > +LDFLAGS = $(shell pkg-config --libs glib-2.0) -shared I'm not keen on defaulting to -O3. I'd prefer if we passed up the fl

  1   2   3   >