[PATCH v3 1/4] qom/object: enable setter for uint types

2019-11-29 Thread Felipe Franciosi
Traditionally, the uint-specific property helpers only offer getters. When adding object (or class) uint types, one must therefore use the generic property helper if a setter is needed (and probably duplicate some code writing their own getters/setters). This enhances the uint-specific property

Re: [PATCH v5 05/13] hw/core/resettable: add support for changing parent

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Add a function resettable_change_parent() to do the required > plumbing when changing the parent a of Resettable object. > > We need to make sure that the reset state of the object remains > coherent with the reset state of the new parent. > >

Re: [PATCH v5 09/13] docs/devel/reset.txt: add doc about Resettable interface

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Signed-off-by: Damien Hedde Subject line still says ".txt". > --- > > Should I add an entry into index.rst ? Yes, please. I have one substantive comment on this patch: in the MyDev example of implementing reset, you make the

Re: [PATCH v5 10/13] vl: replace deprecated qbus_reset_all registration

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Replace deprecated qbus_reset_all by resettable_cold_reset_fn for > the sysbus reset registration. > > Apart for the raspi machines, this does not impact the behavior > because: > + at this point resettable just call the old reset methods of

[PATCH v6 20/21] fuzz: add virtio-scsi fuzz target

2019-11-29 Thread Oleinik, Alexander
The virtio-scsi fuzz target sets up and fuzzes the available virtio-scsi queues. After an element is placed on a queue, the fuzzer can select whether to perform a kick, or continue adding elements. Signed-off-by: Alexander Bulekov --- tests/fuzz/Makefile.include | 1 +

[PATCH v6 12/21] libqtest: add in-process qtest.c tx/rx handlers

2019-11-29 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- tests/libqtest.c | 54 tests/libqtest.h | 3 ++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index a7df92319a..e0bc5bbe0b 100644 --- a/tests/libqtest.c

Re: [PATCH v37 00/17] QEMU AVR 8 bit cores

2019-11-29 Thread Aleksandar Markovic
On Thursday, November 28, 2019, Alex Bennée wrote: > > Aleksandar Markovic writes: > > > On Thursday, November 28, 2019, Michael Rolnik > wrote: > > > >> I don't see why you say that the peripherals are inside the chip, there > is > >> CPU within target/avr directory and then there are some

[PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-11-29 Thread Felipe Franciosi
Several objects implemented their own uint property getters and setters, despite them being straightforward (without any checks/validations on the values themselves) and identical across objects. This makes use of an enhanced API for object_property_add_uintXX_ptr() which offers default setters.

[PATCH v3 2/4] ich9: fix getter type for sci_int property

2019-11-29 Thread Felipe Franciosi
When QOM APIs were added to ich9 in 6f1426ab, the getter for sci_int was written using uint32_t. However, the object property is uint8_t. This fixes the getter for correctness. Signed-off-by: Felipe Franciosi --- hw/isa/lpc_ich9.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-)

Re: [PATCH 2/2] Add -mem-shared option

2019-11-29 Thread Paolo Bonzini
On 29/11/19 13:16, Igor Mammedov wrote: > As for "-m", I'd make it just an alias that translates > -m/mem-path/mem-prealloc I think we should just deprecate -mem-path/-mem-prealloc in 5.0. CCing Thomas as mister deprecation. :) > combination to appropriate '-object' for '-machine memdev'

RE: Network connection with COLO VM

2019-11-29 Thread Zhang, Chen
From: Daniel Cho Sent: Friday, November 29, 2019 10:43 AM To: Zhang, Chen Cc: Dr. David Alan Gilbert ; lukasstra...@web.de; qemu-devel@nongnu.org Subject: Re: Network connection with COLO VM Hi David, Zhang, Thanks for replying my question. We know why will occur this issue. As you said,

Re: libcap vs libcap-ng mess

2019-11-29 Thread Paolo Bonzini
On 29/11/19 19:01, Dr. David Alan Gilbert wrote: >> It's not entirely trivial because fsdev-proxy-helper wants to keep the >> effective set and clear the permitted set; in libcap-ng you can only ^ (Wrong, this is "modify" the permitted set. The permitted set is already

Re: libcap vs libcap-ng mess

2019-11-29 Thread Paolo Bonzini
On 29/11/19 19:20, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> On 29/11/19 19:01, Dr. David Alan Gilbert wrote: It's not entirely trivial because fsdev-proxy-helper wants to keep the effective set and clear the permitted set; in libcap-ng you can only

Re: libcap vs libcap-ng mess

2019-11-29 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 29/11/19 19:20, Dr. David Alan Gilbert wrote: > > * Paolo Bonzini (pbonz...@redhat.com) wrote: > >> On 29/11/19 19:01, Dr. David Alan Gilbert wrote: > It's not entirely trivial because fsdev-proxy-helper wants to keep the > effective set

[PATCH v6 16/21] fuzz: add support for fork-based fuzzing.

2019-11-29 Thread Oleinik, Alexander
fork() is a simple way to ensure that state does not leak in between fuzzing runs. Unfortunately, the fuzzer mutation engine relies on bitmaps which contain coverage information for each fuzzing run, and these bitmaps should be copied from the child to the parent(where the mutation occurs). These

Re: libcap vs libcap-ng mess

2019-11-29 Thread Paolo Bonzini
Il ven 29 nov 2019, 19:54 Dr. David Alan Gilbert ha scritto: > > Yes, it's per thread. The state can be built from > > capng_clear/capng_get_caps_process + capng_update, and left in there > > forever. There is also capng_save_state/capng_restore_state which, as > > far as I can see from the

Re: [PATCH for-5.0 0/8] docs: integrate doc comments with Sphinx build

2019-11-29 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191129140217.17797-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH for-5.0 0/8] docs: integrate doc comments with Sphinx build Type: series Message-id:

Re: libcap vs libcap-ng mess

2019-11-29 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 29/11/19 19:01, Dr. David Alan Gilbert wrote: > >> It's not entirely trivial because fsdev-proxy-helper wants to keep the > >> effective set and clear the permitted set; in libcap-ng you can only > ^ > > (Wrong, this is

[PATCH v6 09/21] libqos: split qos-test and libqos makefile vars

2019-11-29 Thread Oleinik, Alexander
Most qos-related objects were specified in the qos-test-obj-y variable. qos-test-obj-y also included qos-test.o which defines a main(). This made it difficult to repurpose qos-test-obj-y to link anything beside tests/qos-test against libqos. This change separates objects that are libqos-specific

[PATCH v6 01/21] softmmu: split off vl.c:main() into main.c

2019-11-29 Thread Oleinik, Alexander
A program might rely on functions implemented in vl.c, but implement its own main(). By placing main into a separate source file, there are no complaints about duplicate main()s when linking against vl.o. For example, the virtual-device fuzzer uses a main() provided by libfuzzer, and needs to

[PATCH v6 06/21] module: check module wasn't already initialized

2019-11-29 Thread Oleinik, Alexander
The virtual-device fuzzer must initialize QOM, prior to running vl:qemu_init, so that it can use the qos_graph to identify the arguments required to initialize a guest for libqos-assisted fuzzing. This change prevents errors when vl:qemu_init tries to (re)initialize the previously initialized QOM

[PATCH v6 00/21] Add virtual device fuzzing support

2019-11-29 Thread Oleinik, Alexander
This series adds a framework for coverage-guided fuzzing of virtual-devices. Fuzzing targets are based on qtest and can make use of the libqos abstractions. In this version, I added a virtio-scsi fuzzer. The actual fuzzing code is very similar to the the virtio-net fuzzer. I experimented with

[PATCH v3 0/4] Improve default object property_add uint helpers

2019-11-29 Thread Felipe Franciosi
This improves the family of object_property_add_uintXX_ptr helpers by enabling a default getter/setter only when desired. To prevent an API behavioural change (from clients that already used these helpers and did not want a setter), we add a OBJ_PROP_FLAG_READ flag that allow clients to only have

Re: [RFC 0/1] ATI R300 emulated grpahics card V2

2019-11-29 Thread BALATON Zoltan
On Thu, 28 Nov 2019, Gerd Hoffmann wrote: The infrastructure to branch into model-specific code is pretty rough right now, we might refine that, for example with some helper functions (ati_get_model() returning an enum, or ati_is_$model() functions returning bool, or both). Maybe we could

Re: [PATCH v5 11/13] hw/s390x/ipl: replace deprecated qdev_reset_all registration

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Replace deprecated qdev_reset_all by resettable_cold_reset_fn for > the ipl registration in the main reset handlers. > > This does not impact the behavior for the following reasons: > + at this point resettable just call the old reset methods

Re: [PATCH v5 13/13] hw/gpio/bcm2835_gpio: Update to resettable

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Transition the bcm2835_gpio device class to Resettable. > The sdbus reparenting is delayed in hold phase to respect > resettable side-effect rules. > > Signed-off-by: Damien Hedde Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v5 00/13] Multi-phase reset mechanism

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Hi all, > > The purpose of this series is to split the current reset procedure > into multiple phases. This will help to solve some ordering > difficulties we have during reset. Previous version can be found here: >

Re: qom device lifecycle interaction with hotplug/hotunplug ?

2019-11-29 Thread Eduardo Habkost
On Fri, Nov 29, 2019 at 12:45:09PM +, Peter Maydell wrote: > On Fri, 29 Nov 2019 at 12:26, Igor Mammedov wrote: > > But from the my very limited understanding, on real hardware, > > once device is uplugged it's gone (finalized) from machine > > perspective, so it's unclear to my why someone

[PATCH v6 10/21] libqos: move useful qos-test funcs to qos_external

2019-11-29 Thread Oleinik, Alexander
The moved functions are not specific to qos-test and might be useful elsewhere. For example the virtual-device fuzzer makes use of them for qos-assisted fuzz-targets. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- tests/Makefile.include | 1 +

[PATCH v6 02/21] libqos: Rename i2c_send and i2c_recv

2019-11-29 Thread Oleinik, Alexander
The names i2c_send and i2c_recv collide with functions defined in hw/i2c/core.c. This causes an error when linking against libqos and softmmu simultaneously (for example when using qtest inproc). Rename the libqos functions to avoid this. Signed-off-by: Alexander Bulekov --- tests/libqos/i2c.c

[PATCH v6 03/21] fuzz: Add FUZZ_TARGET module type

2019-11-29 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- include/qemu/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 65ba596e46..684753d808 100644 --- a/include/qemu/module.h +++

Re: [PATCH v5 03/13] hw/core: create Resettable QOM interface

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > This commit defines an interface allowing multi-phase reset. This aims > to solve a problem of the actual single-phase reset (built in > DeviceClass and BusClass): reset behavior is dependent on the order > in which reset handlers are called.

Re: [PATCH v5 12/13] hw/gpio/bcm2835_gpio: Isolate sdbus reparenting

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Split gpfsel_set() in 2 so that the sdbus reparenting is done > in a dedicated function. > > Signed-off-by: Damien Hedde > --- > Cc: Peter Maydell > Cc: Andrew Baumann > Cc: Philippe Mathieu-Daudé > Cc: qemu-...@nongnu.org > --- >

Re: [PATCH v2 2/2] s390x/cpumodel: Introduce dynamic feature groups

2019-11-29 Thread Eduardo Habkost
On Tue, Nov 26, 2019 at 03:07:32PM +0100, David Hildenbrand wrote: > On 26.11.19 13:59, Christian Borntraeger wrote: > > re-adding ccs from the cover-letter > > > On 25.11.19 18:20, David Hildenbrand wrote: > > As soon as dynamic feature groups are used, the CPU model becomes >

Re: qom device lifecycle interaction with hotplug/hotunplug ?

2019-11-29 Thread Eduardo Habkost
On Fri, Nov 29, 2019 at 01:40:55PM +0100, Igor Mammedov wrote: > On Thu, 28 Nov 2019 13:33:58 -0300 > Eduardo Habkost wrote: > > > On Thu, Nov 28, 2019 at 04:00:06PM +, Peter Maydell wrote: > > > Hi; this is a question which came up in Damien's reset series > > > which I don't know the

[PATCH v6 17/21] fuzz: add support for qos-assisted fuzz targets

2019-11-29 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- tests/fuzz/qos_fuzz.c | 232 ++ tests/fuzz/qos_fuzz.h | 33 ++ 2 files changed, 265 insertions(+) create mode 100644 tests/fuzz/qos_fuzz.c create mode 100644 tests/fuzz/qos_fuzz.h diff --git

[PATCH v6 11/21] libqtest: make bufwrite rely on the TransportOps

2019-11-29 Thread Oleinik, Alexander
When using qtest "in-process" communication, qtest_sendf directly calls a function in the server (qtest.c). Previously, bufwrite used socket_send, which bypasses the TransportOps enabling the call into qtest.c. This change replaces the socket_send calls with ops->send, maintaining the benefits of

[PATCH v6 13/21] fuzz: add configure flag --enable-fuzzing

2019-11-29 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- configure | 39 +++ 1 file changed, 39 insertions(+) diff --git a/configure b/configure index 6099be1d84..5fb2494a8e 100755 --- a/configure +++ b/configure @@ -504,6 +504,7 @@ debug_mutex="no"

Re: [RFC 00/10] R300 QEMU device V2

2019-11-29 Thread BALATON Zoltan
Hello, On Thu, 28 Nov 2019, Aaron Zakhrov wrote: I tested my code with the vgabios-ati.bin rom file and it seems to get passed the earlier issue I had. Good, so then the BIOS problem seems to be sorted for now. (Maybe it needed the tables or EDID support that some drivers use from the VGA

Re: libcap vs libcap-ng mess

2019-11-29 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 29/11/19 10:34, Daniel P. Berrangé wrote: > >> y) Should we flip over to only using one or the other - what > >> are the advantages? > > In libvirt we use libcap-ng. We picked this originally as its API > > design allows you do write simpler

[PATCH v3 3/4] ich9: Simplify ich9_lpc_initfn

2019-11-29 Thread Felipe Franciosi
Currently, ich9_lpc_initfn simply serves as a caller to ich9_lpc_add_properties. This simplifies the code a bit by eliminating ich9_lpc_add_properties altogether and executing its logic in the parent object initialiser function. Signed-off-by: Felipe Franciosi --- hw/isa/lpc_ich9.c | 15

Re: [PATCH v6] hw/core/loader-fit: fix freeing errp in fit_load_fdt

2019-11-29 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 29.11.2019 18:23, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 29.11.2019 17:11, Vladimir Sementsov-Ogievskiy wrote: 29.11.2019 17:03, Markus Armbruster wrote: > Vladimir Sementsov-Ogievskiy writes: > >>

[PATCH v6 18/21] fuzz: add i440fx fuzz targets

2019-11-29 Thread Oleinik, Alexander
These three targets should simply fuzz reads/writes to a couple ioports, but they mostly serve as examples of different ways to write targets. They demonstrate using qtest and qos for fuzzing, as well as using rebooting and forking to reset state, or not resetting it at all. Signed-off-by:

[PATCH v6 14/21] fuzz: Add target/fuzz makefile rules

2019-11-29 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- Makefile| 15 ++- Makefile.objs | 4 +++- Makefile.target | 18 +- tests/fuzz/Makefile.include | 4 4 files changed, 38 insertions(+), 3 deletions(-)

[PATCH v6 04/21] qtest: add qtest_server_send abstraction

2019-11-29 Thread Oleinik, Alexander
qtest_server_send is a function pointer specifying the handler used to transmit data to the qtest client. In the standard configuration, this calls the CharBackend handler, but now it is possible for other types of handlers, e.g direct-function calls if the qtest client and server exist within the

[PATCH v6 07/21] qtest: add in-process incoming command handler

2019-11-29 Thread Oleinik, Alexander
The handler allows a qtest client to send commands to the server by directly calling a function, rather than using a file/CharBackend Signed-off-by: Alexander Bulekov --- include/sysemu/qtest.h | 1 + qtest.c| 13 + 2 files changed, 14 insertions(+) diff --git

[PATCH v6 21/21] fuzz: add documentation to docs/devel/

2019-11-29 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 119 + 1 file changed, 119 insertions(+) create mode 100644 docs/devel/fuzzing.txt diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt new file mode 100644 index

Re: [PATCH v5 04/13] hw/core: add Resettable support to BusClass and DeviceClass

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > This commit adds support of Resettable interface to buses and devices: > + ResettableState structure is added in the Bus/Device state > + Resettable methods are implemented. > + device/bus_is_in_reset function defined > > This commit allows to

[PATCH v6 15/21] fuzz: add fuzzer skeleton

2019-11-29 Thread Oleinik, Alexander
tests/fuzz/fuzz.c serves as the entry point for the virtual-device fuzzer. Namely, libfuzzer invokes the LLVMFuzzerInitialize and LLVMFuzzerTestOneInput functions, both of which are defined in this file. This change adds a "FuzzTarget" struct, along with the fuzz_add_target function, which should

[PATCH v6 05/21] libqtest: Add a layer of abstraciton to send/recv

2019-11-29 Thread Oleinik, Alexander
This makes it simple to swap the transport functions for qtest commands to and from the qtest client. For example, now it is possible to directly pass qtest commands to a server handler that exists within the same process, without the standard way of writing to a file descriptor. Signed-off-by:

[PATCH v6 08/21] tests: provide test variables to other targets

2019-11-29 Thread Oleinik, Alexander
Before, when tests/Makefile.include was included, the contents would be ignored if config-host.mak was defined. Moving the ifneq responsible for this allows a target to depend on both testing-related and host-related objects. For example the virtual-device fuzzer relies on both libqtest/libqos

[PATCH v6 19/21] fuzz: add virtio-net fuzz target

2019-11-29 Thread Oleinik, Alexander
The virtio-net fuzz target feeds inputs to all three virtio-net virtqueues, and uses forking to avoid leaking state between fuzz runs. Signed-off-by: Alexander Bulekov --- tests/fuzz/Makefile.include | 1 + tests/fuzz/virtio_net_fuzz.c | 105 +++ 2 files

Re: [PATCH v37 00/17] QEMU AVR 8 bit cores

2019-11-29 Thread Aleksandar Markovic
On Friday, November 29, 2019, Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Thursday, November 28, 2019, Alex Bennée > wrote: > >> >> Aleksandar Markovic writes: >> >> > On Thursday, November 28, 2019, Michael Rolnik >> wrote: >> > >> >> I don't see why you say that the

[PATCH v2] configure: Use lld --image-base for --disable-pie user mode binaries

2019-11-29 Thread Fangrui Song
On 2019-11-27, Alex Bennée wrote: Fangrui Song writes: For lld, --image-base is the preferred way to set the base address. lld does not actually implement -Ttext-segment, but treats it as an alias for -Ttext. -Ttext-segment=0x6000 combined with --no-rosegment can create a 1.6GB

Re: [PATCH v5 06/13] hw/core/qdev: handle parent bus change regarding resettable

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > In qdev_set_parent_bus(), when changing the parent bus of a > realized device, if the source and destination buses are not in the > same reset state, some adaptation are required. This patch adds "adaptations" > needed call to

Re: [PATCH v5 08/13] hw/core: deprecate old reset functions and introduce new ones

2019-11-29 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:07, Damien Hedde wrote: > > Deprecate device_legacy_reset(), qdev_reset_all() and > qbus_reset_all() to be replaced by new functions > device_cold_reset() and bus_cold_reset() which uses resettable API. > > Also introduce resettable_cold_reset_fn() which may be used as a

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Eduardo Habkost
On Fri, Nov 29, 2019 at 10:31:36AM +0100, Paolo Bonzini wrote: > On 28/11/19 17:10, Eduardo Habkost wrote: > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > >> Hi, > >> > >> Setting up shared memory for vhost-user is a bit complicated from > >> command line, as it requires

Re: [PATCH 2/2] Add -mem-shared option

2019-11-29 Thread Eduardo Habkost
On Fri, Nov 29, 2019 at 01:01:54PM +0100, Markus Armbruster wrote: > Paolo Bonzini writes: > > > On 29/11/19 11:07, Igor Mammedov wrote: > So user who wants something non trivial could override default > non-numa behavior with > -object

Re: [PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-11-29 Thread Marc-André Lureau
On Fri, Nov 29, 2019 at 9:46 PM Felipe Franciosi wrote: > > Several objects implemented their own uint property getters and setters, > despite them being straightforward (without any checks/validations on > the values themselves) and identical across objects. This makes use of > an enhanced API

Re: [PATCH v3 3/4] ich9: Simplify ich9_lpc_initfn

2019-11-29 Thread Marc-André Lureau
On Fri, Nov 29, 2019 at 9:46 PM Felipe Franciosi wrote: > > Currently, ich9_lpc_initfn simply serves as a caller to > ich9_lpc_add_properties. This simplifies the code a bit by eliminating > ich9_lpc_add_properties altogether and executing its logic in the parent > object initialiser function. >

Re: [PATCH v3 1/4] qom/object: enable setter for uint types

2019-11-29 Thread Marc-André Lureau
Hi On Fri, Nov 29, 2019 at 9:46 PM Felipe Franciosi wrote: > > Traditionally, the uint-specific property helpers only offer getters. > When adding object (or class) uint types, one must therefore use the > generic property helper if a setter is needed (and probably duplicate > some code writing

Re: [PATCH v3 2/4] ich9: fix getter type for sci_int property

2019-11-29 Thread Marc-André Lureau
On Fri, Nov 29, 2019 at 9:46 PM Felipe Franciosi wrote: > > When QOM APIs were added to ich9 in 6f1426ab, the getter for sci_int was > written using uint32_t. However, the object property is uint8_t. This > fixes the getter for correctness. > > Signed-off-by: Felipe Franciosi Reviewed-by:

Re: [Qemu-devel] [PATCH v5 0/2] arm/acpi: simplify aml code and enable SHPC

2019-11-29 Thread Guoheyi
Hi Peter, Igor, I couldn't find these 2 patches in the latest tree. Could you help to merge them? Thanks, HG On 2019/3/13 0:09, Igor Mammedov wrote: On Sat, 9 Mar 2019 10:30:47 +0800 Heyi Guo wrote: After the introduction of generic PCIe root port and PCIe-PCI bridge, we will also have

[PATCH v20 7/8] tests/numa: Add case for QMP build HMAT

2019-11-29 Thread Tao Xu
Check configuring HMAT usecase Acked-by: Markus Armbruster Suggested-by: Igor Mammedov Signed-off-by: Tao Xu --- Changes in v20: - Use g_assert_true and g_assert_false to replace g_assert (Thomas and Markus) Changes in v19: - Add some fail cases for hmat-cache when level=0

Re: [PATCH v2 1/6] migration/multifd: move Params update and pages cleanup into multifd_send_fill_packet()

2019-11-29 Thread Wei Yang
On Tue, Nov 19, 2019 at 11:57:22AM +0100, Juan Quintela wrote: >Wei Yang wrote: >> Fill data and update/cleanup related field in one place. Also make the >> code a little clean. >> >> Signed-off-by: Wei Yang > >Reviewed-by: Juan Quintela > >right cleanup. > Hi, Juan Do you have other comments

Re: [PATCH v6] error: rename errp to errp_in where it is IN-argument

2019-11-29 Thread Vladimir Sementsov-Ogievskiy
28.11.2019 23:29, Markus Armbruster wrote: >>> [PATCH v6] block/snapshot: rename Error ** parameter to more common >>> errp >>> [PATCH v6] hw/i386/amd_iommu: rename Error ** parameter to more >>> common errp >>> [PATCH v6] qga: rename Error ** parameter to more common errp >>>

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-11-29 Thread Igor Mammedov
On Thu, 28 Nov 2019 13:10:21 -0300 Eduardo Habkost wrote: > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > Hi, > > > > Setting up shared memory for vhost-user is a bit complicated from > > command line, as it requires NUMA setup such as: m 4G -object > >

Re: [PATCH for-5.0 v2 05/23] quorum: Fix child permissions

2019-11-29 Thread Vladimir Sementsov-Ogievskiy
11.11.2019 19:01, Max Reitz wrote: > Quorum cannot share WRITE or RESIZE on its children. Presumably, it > only does so because as a filter, it seemed intuitively correct to point > its .bdrv_child_perm to bdrv_filter_default_perm(). > > However, it is not really a filter, and

[PATCH v20 2/8] numa: Extend CLI to provide memory latency and bandwidth information

2019-11-29 Thread Tao Xu
From: Liu Jingqi Add -numa hmat-lb option to provide System Locality Latency and Bandwidth Information. These memory attributes help to build System Locality Latency and Bandwidth Information Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). Before using hmat-lb option, enable

[PATCH v20 4/8] hmat acpi: Build Memory Proximity Domain Attributes Structure(s)

2019-11-29 Thread Tao Xu
From: Liu Jingqi HMAT is defined in ACPI 6.3: 5.2.27 Heterogeneous Memory Attribute Table (HMAT). The specification references below link: http://www.uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf It describes the memory attributes, such as memory side cache attributes and

[PATCH v20 8/8] tests/bios-tables-test: add test cases for ACPI HMAT

2019-11-29 Thread Tao Xu
ACPI table HMAT has been introduced, QEMU now builds HMAT tables for Heterogeneous Memory with boot option '-numa node'. Add test cases on PC and Q35 machines with 2 numa nodes. Because HMAT is generated when system enable numa, the following tables need to be added for this test:

Re: [PATCH 2/3] target/arm: Honor HCR_EL2.TID1 trapping requirements

2019-11-29 Thread Edgar E. Iglesias
On Thu, Nov 28, 2019 at 04:17:17PM +, Marc Zyngier wrote: > HCR_EL2.TID1 mandates that access from EL1 to REVIDR_EL1, AIDR_EL1 > (and their 32bit equivalents) as well as TCMTR, TLBTR are trapped > to EL2. QEMU ignores it, naking it harder for a hypervisor to Typo: "making it harder" >

Re: [PATCH 3/3] target/arm: Handle trapping to EL2 of AArch32 VMRS instructions

2019-11-29 Thread Edgar E. Iglesias
On Thu, Nov 28, 2019 at 04:17:18PM +, Marc Zyngier wrote: > HCR_EL2.TID3 requires that AArch32 reads of MVFR[012] are trapped to > EL2, and that HCR_EL2.TID0 does the same for reads of FPSID. > In order to handle this, introduce a new TCG helper function that > checks for these control bits

Re: [PATCH v6] error: rename errp to errp_in where it is IN-argument

2019-11-29 Thread Vladimir Sementsov-Ogievskiy
28.11.2019 23:29, Markus Armbruster wrote: > Vladimir Sementsov-Ogievskiy writes: > >> 28.11.2019 17:23, Markus Armbruster wrote: >>> Vladimir Sementsov-Ogievskiy writes: >>> Error **errp is almost always OUT-argument: it's assumed to be NULL, or pointer to NULL-initialized pointer,

Re: [PATCH v2 2/2] travis.yml: Run tcg tests with tci

2019-11-29 Thread Thomas Huth
On 28/11/2019 22.06, Stefan Weil wrote: > Am 28.11.19 um 16:35 schrieb Thomas Huth: > >> So far we only have compile coverage for tci. But since commit >> 2f160e0f9797c7522bfd0d09218d0c9340a5137c ("tci: Add implementation >> for INDEX_op_ld16u_i64") has been included now, we can also run the >>

Re: [PATCH v1 1/1] pc-bios/s390-ccw: fix sclp_get_loadparm_ascii

2019-11-29 Thread Thomas Huth
On 29/11/2019 08.38, Christian Borntraeger wrote: > > > On 28.11.19 16:05, Peter Maydell wrote: >> On Thu, 28 Nov 2019 at 12:48, Christian Borntraeger >> wrote: >>> >>> >>> >>> On 28.11.19 13:45, Cornelia Huck wrote: On Thu, 28 Nov 2019 13:35:29 +0100 Christian Borntraeger wrote:

Re: [PATCH v4 6/6] s390x: kvm: Make kvm_sclp_service_call void

2019-11-29 Thread Cornelia Huck
On Fri, 29 Nov 2019 09:16:21 +0100 Janosch Frank wrote: > On 11/28/19 6:34 PM, Cornelia Huck wrote: > > On Wed, 27 Nov 2019 19:38:06 +0100 > > Janosch Frank wrote: > > > >> On 11/27/19 7:25 PM, Janosch Frank wrote: > >>> > >>> There's 0 (initiated), busy and operational and as far as I

Re: [PATCH v35 10/13] target/avr: Add limited support for USART and 16 bit timer peripherals

2019-11-29 Thread Sarah Harris
Hi Aleksandar, Yes, adding a note about the limitations of the USART emulation sounds like a good idea. Yes, I'm happy with switching to the (L)GPL license that's being used elsewhere. Kind regards, Sarah Harris On Thu, 28 Nov 2019 12:02:38 +0100 Aleksandar Markovic wrote: > On Thursday,

[PATCH v20 1/8] numa: Extend CLI to provide initiator information for numa nodes

2019-11-29 Thread Tao Xu
In ACPI 6.3 chapter 5.2.27 Heterogeneous Memory Attribute Table (HMAT), The initiator represents processor which access to memory. And in 5.2.27.3 Memory Proximity Domain Attributes Structure, the attached initiator is defined as where the memory controller responsible for a memory proximity

[PATCH v20 6/8] hmat acpi: Build Memory Side Cache Information Structure(s)

2019-11-29 Thread Tao Xu
From: Liu Jingqi This structure describes memory side cache information for memory proximity domains if the memory side cache is present and the physical device forms the memory side cache. The software could use this information to effectively place the data in memory to maximize the

Re: [PATCH v4 6/6] s390x: kvm: Make kvm_sclp_service_call void

2019-11-29 Thread Janosch Frank
On 11/28/19 6:34 PM, Cornelia Huck wrote: > On Wed, 27 Nov 2019 19:38:06 +0100 > Janosch Frank wrote: > >> On 11/27/19 7:25 PM, Janosch Frank wrote: >>> >>> There's 0 (initiated), busy and operational and as far as I know we >>> implement neither. >> >> That came out wrong... >>

Re: [PATCH v4 31/37] smbus-eeprom: remove PROP_PTR

2019-11-29 Thread Marc-André Lureau
Hi Corey On Fri, Nov 22, 2019 at 2:44 AM Corey Minyard wrote: > > On Wed, Nov 20, 2019 at 07:24:36PM +0400, Marc-André Lureau wrote: > > Instead, set the initial data field directly. > > > > (the initial data is an array of 256 bytes. As I don't know if it may > > change over time, I keep the

Re: [PATCH v5 0/8] Add dbus-vmstate

2019-11-29 Thread Marc-André Lureau
Hi On Fri, Oct 4, 2019 at 3:23 PM Marc-André Lureau wrote: > > Hi, > > With external processes or helpers participating to the VM support, it > becomes necessary to handle their migration. Various options exist to > transfer their state: > 1) as the VM memory, RAM or devices (we could say that's

Re: [PATCH v2] net/cadence_gem: Updating the GEM MAC IP to properly filter out multicast addresses.

2019-11-29 Thread Edgar E. Iglesias
On Fri, Nov 29, 2019 at 01:52:16PM +0500, bilalwasim...@gmail.com wrote: > From: bwasim > > The current code makes a bad assumption that the most-significant byte > of the MAC address is used to determine if the address is multicast or > unicast, but in reality only a single bit is used to

[PATCH v20 0/8] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-11-29 Thread Tao Xu
This series of patches will build Heterogeneous Memory Attribute Table (HMAT) according to the command line. The ACPI HMAT describes the memory attributes, such as memory side cache attributes and bandwidth and latency details, related to the Memory Proximity Domain. The software is expected to

[PATCH v20 5/8] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s)

2019-11-29 Thread Tao Xu
From: Liu Jingqi This structure describes the memory access latency and bandwidth information from various memory access initiator proximity domains. The latency and bandwidth numbers represented in this structure correspond to rated latency and bandwidth for the platform. The software could use

Re: [PATCH] monitor: Fix slow reading

2019-11-29 Thread Markus Armbruster
Yury Kotov writes: > The monitor_can_read (as a callback of qemu_chr_fe_set_handlers) > should return size of buffer which monitor_qmp_read or monitor_read > can process. > Currently, monitor_can_read returns 1 as a result of logical not. > Thus, for each QMP command, len(QMD) iterations of the

Re: [PATCH v2 2/4] ich9: fix getter type for sci_int property

2019-11-29 Thread Marc-André Lureau
On Thu, Nov 28, 2019 at 8:48 PM Felipe Franciosi wrote: > > When QOM APIs were added to ich9 in 6f1426ab, the getter for sci_int was > written using uint32_t. However, the object property is uint8_t. This > fixes the getter for correctness. > > Signed-off-by: Felipe Franciosi Reviewed-by:

Re: [PATCH v6] backends/cryptodev: drop local_err from cryptodev_backend_complete()

2019-11-29 Thread Vladimir Sementsov-Ogievskiy
29.11.2019 9:10, Markus Armbruster wrote: > Vladimir Sementsov-Ogievskiy writes: > >> No reason for local_err here, use errp directly instead. > > Related: "[PATCH v6] hw/vfio/ap: drop local_err from vfio_ap_realize". > I'm surprised it's just two. Did you search for the anti-pattern >

RE: [PATCH] Updating the GEM MAC IP to properly filter out the multicast addresses

2019-11-29 Thread Wasim, Bilal
git "send-email" doesn't really work well with my work account because the server considers it "less secure" and does NOT provide a way around it.. I've had to re-submit the patch from my secondary email... -Original Message- From: Qemu-arm

Re: [PATCH v37 00/17] QEMU AVR 8 bit cores

2019-11-29 Thread Sarah Harris
> Sarah, > do you mind if use the same license I use for my code? I'm happy to use the same license. Kind regards, Sarah Harris On Thu, 28 Nov 2019 14:28:19 +0200 Michael Rolnik wrote: > On Wed, Nov 27, 2019 at 11:06 PM Aleksandar Markovic < > aleksandar.m.m...@gmail.com> wrote: > > > On

[PATCH v5] s390x: kvm: Make kvm_sclp_service_call void

2019-11-29 Thread Janosch Frank
It defaults to returning 0 anyway and that return value is not necessary, as 0 is also the default rc that the caller would return. While doing that we can simplify the logic a bit and return early if we inject a PGM exception. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth ---

Re: [PATCH 2/2] Add -mem-shared option

2019-11-29 Thread Igor Mammedov
On Fri, 29 Nov 2019 11:11:09 +0100 Paolo Bonzini wrote: > On 29/11/19 11:07, Igor Mammedov wrote: > >>> So user who wants something non trivial could override default > >>> non-numa behavior with > >>> -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \ > >>> -machine

Re: [PATCH v6] backends/cryptodev: drop local_err from cryptodev_backend_complete()

2019-11-29 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 29.11.2019 9:10, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> No reason for local_err here, use errp directly instead. >> >> Related: "[PATCH v6] hw/vfio/ap: drop local_err from vfio_ap_realize". >> I'm surprised it's just two.

Re: [PATCH v2 01/13] s390x: protvirt: Add diag308 subcodes 8 - 10

2019-11-29 Thread Thomas Huth
On 29/11/2019 10.47, Janosch Frank wrote: [...] > Subcodes 8-10 are not valid in protected mode, we have to do a subcode > 3 and then the 8 and 10 combination for a protected reboot. So if 8-10 are not valid in protected mode... > @@ -59,6 +61,9 @@ int handle_diag_288(CPUS390XState *env,

Re: [PATCH for-5.0 v2 00/23] block: Fix check_to_replace_node()

2019-11-29 Thread Vladimir Sementsov-Ogievskiy
3 last iotests patches don't apply now.. Do you have a branch pushed somewhere? 11.11.2019 19:01, Max Reitz wrote: > Based-on: <20191108123455.39445-1-mre...@redhat.com> > (“iotests: Test failing mirror complete”) > > (Because both add cases to 041.) > > > Hi, > > For what this series does,

Re: qom device lifecycle interaction with hotplug/hotunplug ?

2019-11-29 Thread Peter Maydell
On Fri, 29 Nov 2019 at 12:26, Igor Mammedov wrote: > But from the my very limited understanding, on real hardware, > once device is uplugged it's gone (finalized) from machine > perspective, so it's unclear to my why someone would use > realize->unrealize->realize hotplug scenario. Well, on real

Re: [PATCH] virtfs-proxy-helper: switch from libcap to libcap-ng

2019-11-29 Thread Paolo Bonzini
On 29/11/19 13:32, Greg Kurz wrote: > Nice. :) > > Reviewed-by: Greg Kurz > > Paolo, > > I can take this through my 9p tree if you want. Otherwise, > > Acked-by: Greg Kurz Yes, please do it since it's self-contained. You'd probably also test it better than me. :) Paolo

Re: [PATCH-for-4.2? 0/1] roms/edk2: update submodule to edk2-stable201911, fixing low severity CVEs

2019-11-29 Thread Laszlo Ersek
Hi Phil, On 11/29/19 11:44, Philippe Mathieu-Daudé wrote: > I had this commit ready for when the next EDK2 release were go out, > which just happened: https://edk2.groups.io/g/devel/message/51502 > > Laszlo doesn't think it's worth the churn to rush to get this update > into into 4.2-rc4:

Re: [PATCH for-5.0 v2 00/23] block: Fix check_to_replace_node()

2019-11-29 Thread Max Reitz
On 29.11.19 13:24, Vladimir Sementsov-Ogievskiy wrote: > 3 last iotests patches don't apply now.. Do you have a branch pushed > somewhere? Hm, it’s based on “iotests: Test failing mirror complete”, maybe because of that. Does this work? https://git.xanclic.moe/XanClic/qemu.git

  1   2   3   >