Re: Single system binary & Dynamic machine model (KVM developers conference call 2022-12-13)

2022-12-13 Thread Felipe Franciosi
> On 13 Dec 2022, at 14:08, Philippe Mathieu-Daudé wrote: > > We moved the call here: > > https://teams.microsoft.com/_#/pre-join-calling/19:meeting_MjU2NDhkOGYtOGY5ZC00MzRjLWJjNjgtYWI2ODQxZGExMWNj@thread.v2 Just wondering: what's wrong with Google Hangout? If people want to try Zoom, I'd be

[PATCH v2] virtio: skip guest index check on device load

2020-10-28 Thread Felipe Franciosi
oken state (by the datapath handler) and must be reset. Signed-off-by: Felipe Franciosi --- v2: Keep the check around for logging. hw/virtio/virtio.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6f8f865aff..ceb58fda6c 10064

Re: [PATCH] virtio: skip guest index check on device load

2020-10-27 Thread Felipe Franciosi
> On Oct 27, 2020, at 12:25 PM, Michael S. Tsirkin wrote: > > On Tue, Oct 27, 2020 at 11:30:49AM +, Stefan Hajnoczi wrote: >> On Mon, Oct 26, 2020 at 03:13:32PM +, Felipe Franciosi wrote: >>> QEMU must be careful when loading device state off migratio

Re: [PATCH] virtio: skip guest index check on device load

2020-10-27 Thread Felipe Franciosi
> On Oct 27, 2020, at 12:56 PM, Michael S. Tsirkin wrote: > > On Tue, Oct 27, 2020 at 12:53:29PM +0000, Felipe Franciosi wrote: >> >> >>> On Oct 27, 2020, at 12:25 PM, Michael S. Tsirkin wrote: >>> >>> On Tue, Oct 27, 2020 at 11:30:49AM +

[PATCH] virtio: skip guest index check on device load

2020-10-26 Thread Felipe Franciosi
oken state (by the datapath handler) and must be reset. Signed-off-by: Felipe Franciosi --- hw/virtio/virtio.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6f8f865aff..0561bdb857 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -3136

Re: [PATCH v4] introduce vfio-user protocol specification

2020-10-15 Thread Felipe Franciosi
Hi, > On Oct 13, 2020, at 10:30 AM, Stefan Hajnoczi wrote: > > On Fri, Oct 02, 2020 at 10:14:23AM +0000, Felipe Franciosi wrote: >> >> >>> On Sep 30, 2020, at 3:24 PM, Stefan Hajnoczi wrote: >>> >>> On Tue, Sep 29, 2020 at 09:21:54AM -0700, J

Re: [PATCH v4] introduce vfio-user protocol specification

2020-10-02 Thread Felipe Franciosi
> On Sep 30, 2020, at 3:24 PM, Stefan Hajnoczi wrote: > > On Tue, Sep 29, 2020 at 09:21:54AM -0700, John G Johnson wrote: >>> On Sep 29, 2020, at 3:37 AM, Stefan Hajnoczi wrote: >>> >>> On Mon, Sep 28, 2020 at 09:58:37AM +, Thanos Makatos wrote: > It should be accompanied by a test

Re: DMA region abruptly removed from PCI device

2020-07-07 Thread Felipe Franciosi
> On Jul 6, 2020, at 3:20 PM, Alex Williamson > wrote: > > On Mon, 6 Jul 2020 10:55:00 + > Thanos Makatos wrote: > >> We have an issue when using the VFIO-over-socket libmuser PoC >> (https://www.mail-archive.com/qemu-devel@nongnu.org/msg692251.html) instead >> of >> the VFIO kernel

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-01 Thread Felipe Franciosi
Hi, > On Apr 30, 2020, at 4:20 PM, Thanos Makatos > wrote: > More importantly, considering: a) Marc-André's comments about data alignment etc., and b) the possibility to run the server on another guest or host, we won't be able to use native VFIO types. If we do want to

Re: [PATCH v6 0/4] Improve default object property_add uint helpers

2020-03-03 Thread Felipe Franciosi
> On Mar 3, 2020, at 8:25 AM, Paolo Bonzini wrote: > > On 03/03/20 09:05, Felipe Franciosi wrote: >>> >>> Paolo, would you queue it? >> Ping: did this get lost? > > Yes, I have queued it now and fixed the conflicts. > > Paolo > Thanks! Sorry for conflicts, I should have pinged sooner. F.

Re: [PATCH v6 0/4] Improve default object property_add uint helpers

2020-03-03 Thread Felipe Franciosi
Hi Marc/Paolo, > On Feb 4, 2020, at 1:41 PM, Marc-André Lureau > wrote: > > Hi > > On Tue, Feb 4, 2020 at 2:16 PM Felipe Franciosi wrote: >> >> This improves the family of object_property_add_uintXX_ptr helpers by >> enabling >> a default getter/s

Re: [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)

2020-02-05 Thread Felipe Franciosi
gt; A malicious guest in control of the iSCSI server could carefully program >>>> Qemu's heap (by selectively setting the bitmap) and then smash it. >>>> >>>> This limits the number of bits that iscsi_co_block_status() will try to >>>> update in the allocmap so

Re: [PATCH v2] fence: introduce a file-based self-fence mechanism

2020-02-05 Thread Felipe Franciosi
Heya, > On Feb 5, 2020, at 10:24 AM, Marc-André Lureau > wrote: > > Hi > > On Wed, Feb 5, 2020 at 10:57 AM Felipe Franciosi wrote: >> >> This introduces a self-fence mechanism to Qemu, causing it to die if a >> heartbeat condition is not me

[PATCH v2] fence: introduce a file-based self-fence mechanism

2020-02-05 Thread Felipe Franciosi
or in conjunction with this for additional protection. Signed-off-by: Felipe Franciosi --- backends/Makefile.objs | 2 + backends/file-fence.c | 374 + qemu-options.hx| 27 ++- 3 files changed, 402 insertions(+), 1 deletion(-) create mode 100644 backends

Re: [PATCH] fence: introduce a file-based self-fence mechanism

2020-02-05 Thread Felipe Franciosi
Hey, sorry for the delay on following up on this. I picked it up again. Hopefully we can finalise quickly. > On Dec 5, 2019, at 2:22 PM, Felipe Franciosi wrote: > > Heya, > >> On Nov 26, 2019, at 12:18 PM, Marc-André Lureau >> wrote: >> >> On Mon, Nov

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

2020-02-04 Thread Felipe Franciosi
. Some of these setters used to update the value even if the type visit failed (eg. because the value being set overflowed over the given type). The new setter introduces a check for these errors, not updating the value if an error occurred. The error is propagated. Signed-off-by: Felipe Franciosi

[PATCH v6 3/4] ich9: Simplify ich9_lpc_initfn

2020-02-04 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

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

2020-02-04 Thread Felipe Franciosi
will automatically install a setter). Other flags may be added later. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 7 +- hw/acpi/piix4.c | 12 +-- hw/isa/lpc_ich9.c| 4 +- hw/ppc/spapr_drc.c | 3 +- include/qom/object.h | 48

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

2020-02-04 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

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

2020-02-04 Thread Felipe Franciosi
in case of errors (and propagating them). If they did not provide an error pointer, then that behaviour was maintained. Felipe Franciosi (4): qom/object: enable setter for uint types ich9: fix getter type for sci_int property ich9: Simplify ich9_lpc_initfn qom/object: Use common get/set

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

2020-02-03 Thread Felipe Franciosi
> On Feb 3, 2020, at 4:10 PM, Marc-André Lureau > wrote: > > Hi > > On Mon, Feb 3, 2020 at 5:08 PM Felipe Franciosi wrote: >> >> Oops, I completely forgot to add a "v5" on the subject line. >> >> (The changelog is there.) >> >

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

2020-02-03 Thread Felipe Franciosi
Oops, I completely forgot to add a "v5" on the subject line. (The changelog is there.) Let me know if I should resend. F. > On Feb 3, 2020, at 3:54 PM, Felipe Franciosi wrote: > > This improves the family of object_property_add_uintXX_ptr helpers by enabling > a defa

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

2020-02-03 Thread Felipe Franciosi
. Some of these setters used to update the value even if the type visit failed (eg. because the value being set overflowed over the given type). The new setter introduces a check for these errors, not updating the value if an error occurred. The error is propagated. Signed-off-by: Felipe Franciosi

[PATCH 3/4] ich9: Simplify ich9_lpc_initfn

2020-02-03 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 v4 0/4] Improve default object property_add uint helpers

2020-02-03 Thread Felipe Franciosi
Heya, > On Jan 28, 2020, at 3:54 PM, Marc-André Lureau > wrote: > > Hi Felipe, > > On Fri, Jan 24, 2020 at 11:49 AM Felipe Franciosi wrote: >> >> Hi Marc-Andre and Paolo, >> >>> On Dec 20, 2019, at 3:15 PM, Marc-André Lureau >>> wro

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

2020-02-03 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

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

2020-02-03 Thread Felipe Franciosi
will automatically install a setter). Other flags may be added later. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 7 +- hw/acpi/piix4.c | 12 +-- hw/isa/lpc_ich9.c| 4 +- hw/ppc/spapr_drc.c | 3 +- include/qom/object.h | 48

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

2020-02-03 Thread Felipe Franciosi
in case of errors (and propagating them). If they did not provide an error pointer, then that behaviour was maintained. Felipe Franciosi (4): qom/object: enable setter for uint types ich9: fix getter type for sci_int property ich9: Simplify ich9_lpc_initfn qom/object: Use common get/set

Re: [PATCH v4 0/4] Improve default object property_add uint helpers

2020-01-24 Thread Felipe Franciosi
Hi Marc-Andre and Paolo, > On Dec 20, 2019, at 3:15 PM, Marc-André Lureau > wrote: > > Hi > > On Thu, Dec 19, 2019 at 10:02 PM Felipe Franciosi wrote: >> >> This improves the family of object_property_add_uintXX_ptr helpers by >> enabling >>

Re: [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)

2020-01-24 Thread Felipe Franciosi
> On Jan 24, 2020, at 10:04 AM, Philippe Mathieu-Daudé > wrote: > > On 1/23/20 11:58 PM, Peter Lieven wrote: >>> Am 23.01.2020 um 22:29 schrieb Felipe Franciosi : >>>> On Jan 23, 2020, at 5:46 PM, Philippe Mathieu-Daudé >>>> wrote: >

Re: [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)

2020-01-23 Thread Felipe Franciosi
Hi, > On Jan 23, 2020, at 5:46 PM, Philippe Mathieu-Daudé wrote: > > On 1/23/20 1:44 PM, Felipe Franciosi wrote: >> When querying an iSCSI server for the provisioning status of blocks (via >> GET LBA STATUS), Qemu only validates that the response descriptor zero's &

Re: [PATCH] iscsi: Don't access non-existent scsi_lba_status_descriptor

2020-01-23 Thread Felipe Franciosi
> On Jan 23, 2020, at 8:37 PM, John Snow wrote: > > > > On 1/23/20 12:05 PM, Kevin Wolf wrote: >> In iscsi_co_block_status(), we may have received num_descriptors == 0 >> from the iscsi server. Therefore, we can't unconditionally access >> lbas->descriptors[0]. Add the missing check. >> >>

Re: [PATCH] iscsi: Don't access non-existent scsi_lba_status_descriptor

2020-01-23 Thread Felipe Franciosi
scsi_datain_unmarshall(iTask.task); > -if (lbas == NULL) { > +if (lbas == NULL || lbas->num_descriptors == 0) { > ret = -EIO; > goto out_unlock; > } > -- > 2.20.1 > Reviewed-by: Felipe Franciosi

[PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)

2020-01-23 Thread Felipe Franciosi
to update in the allocmap so it can't overflow the bitmap. Signed-off-by: Felipe Franciosi Signed-off-by: Peter Turschmid Signed-off-by: Raphael Norwitz --- block/iscsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 2aea7e3f13

Re: Feedback on multi-process QEMU muser prototype

2020-01-15 Thread Felipe Franciosi
Hi, > On Jan 14, 2020, at 3:22 PM, Stefan Hajnoczi wrote: > > I haven't seen the link to the muser prototype shared on the list yet, > so I'm taking the liberty of posting it for discussion: > https://github.com/oracle/qemu/tree/multi-process-qemu-v0.4.1-muser > > Great that a lot of the

Re: How to impove downtime of Live-Migration caused bdrv_drain_all()

2020-01-02 Thread Felipe Franciosi
> On Jan 2, 2020, at 3:07 PM, Stefan Hajnoczi wrote: > > On Thu, Dec 26, 2019 at 05:40:22PM +0800, 张海斌 wrote: >> Stefan Hajnoczi 于2019年3月29日周五 上午1:08写道: >>> >>> On Thu, Mar 28, 2019 at 05:53:34PM +0800, 张海斌 wrote: hi, stefan I have faced the same problem you wrote in

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2020-01-02 Thread Felipe Franciosi
gt;>>> On Thu, Dec 19, 2019 at 12:33:15PM +, Felipe Franciosi wrote: >>>>>> On Dec 19, 2019, at 11:55 AM, Stefan Hajnoczi wrote: >>>>>> On Tue, Dec 17, 2019 at 10:57:17PM +, Felipe Franciosi wrote: >>>>>>>> On Dec 17, 2019,

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-20 Thread Felipe Franciosi
Heya, > On Dec 20, 2019, at 3:25 PM, Alex Williamson > wrote: > > On Fri, 20 Dec 2019 14:14:33 +0000 > Felipe Franciosi wrote: > >>> On Dec 20, 2019, at 9:50 AM, Paolo Bonzini wrote: >>> >>> On 20/12/19 10:47, Stefan Hajnoczi wrote: >

Re: [PATCH v4 0/4] Improve default object property_add uint helpers

2019-12-20 Thread Felipe Franciosi
> On Dec 20, 2019, at 3:15 PM, Marc-André Lureau > wrote: > > Hi > > On Thu, Dec 19, 2019 at 10:02 PM Felipe Franciosi wrote: >> >> This improves the family of object_property_add_uintXX_ptr helpers by >> enabling >> a default getter/setter only w

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-20 Thread Felipe Franciosi
> On Dec 20, 2019, at 9:50 AM, Paolo Bonzini wrote: > > On 20/12/19 10:47, Stefan Hajnoczi wrote: >>> If it doesn't create too large of a burden to support both, then I think >>> it is very desirable. IIUC, this is saying a kernel based solution as the >>> optimized/optimal solution, and

Re: [PATCH v4 0/4] Improve default object property_add uint helpers

2019-12-20 Thread Felipe Franciosi
Hi, > On Dec 19, 2019, at 11:56 PM, Alexey Kardashevskiy wrote: > > > > On 20/12/2019 05:02, Felipe Franciosi wrote: >> This improves the family of object_property_add_uintXX_ptr helpers by >> enabling >> a default getter/setter only when desired. To prev

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

2019-12-19 Thread Felipe Franciosi
. Some of these setters used to update the value even if the type visit failed (eg. because the value being set overflowed over the given type). The new setter introduces a check for these errors, not updating the value if an error occurred. The error is propagated. Signed-off-by: Felipe Franciosi

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

2019-12-19 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

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

2019-12-19 Thread Felipe Franciosi
in case of errors (and propagating them). If they did not provide an error pointer, then that behaviour was maintained. Felipe Franciosi (4): qom/object: enable setter for uint types ich9: fix getter type for sci_int property ich9: Simplify ich9_lpc_initfn qom/object: Use common get/set

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

2019-12-19 Thread Felipe Franciosi
will automatically install a setter). Other flags may be added later. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 7 +- hw/acpi/piix4.c | 12 +-- hw/isa/lpc_ich9.c| 4 +- hw/ppc/spapr_drc.c | 3 +- include/qom/object.h | 44

[PATCH v4 3/4] ich9: Simplify ich9_lpc_initfn

2019-12-19 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: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-19 Thread Felipe Franciosi
Hello, (I've added Jim and Ben from the SPDK team to the thread.) > On Dec 19, 2019, at 11:55 AM, Stefan Hajnoczi wrote: > > On Tue, Dec 17, 2019 at 10:57:17PM +0000, Felipe Franciosi wrote: >>> On Dec 17, 2019, at 5:33 PM, Stefan Hajnoczi wrote: >>> On Mon, Dec 1

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-17 Thread Felipe Franciosi
> On Dec 17, 2019, at 5:33 PM, Stefan Hajnoczi wrote: > > On Mon, Dec 16, 2019 at 07:57:32PM +0000, Felipe Franciosi wrote: >>> On 16 Dec 2019, at 20:47, Elena Ufimtseva >>> wrote: >>> On Fri, Dec 13, 2019 at 10:41:16AM +, Stefan Hajnoczi wrote: &g

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

2019-12-17 Thread Felipe Franciosi
my commit and then makes the change Marc-Andre recommended (by dropping the (void *) cast). Is it ok for me to just drop that part of my patch and send the v4? You can follow-up on the cast change afterwards. Thanks, F. > On Dec 10, 2019, at 1:04 PM, Felipe Franciosi wrote: > > Hi &g

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-16 Thread Felipe Franciosi
Heya, > On 16 Dec 2019, at 20:47, Elena Ufimtseva wrote: > > On Fri, Dec 13, 2019 at 10:41:16AM +, Stefan Hajnoczi wrote: >>> On Mon, Dec 09, 2019 at 10:47:17PM -0800, Elena Ufimtseva wrote: >>> At this moment we are working on the first stage of the project with help of >>> the Nutanix

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

2019-12-10 Thread Felipe Franciosi
Hi > On Dec 2, 2019, at 6:31 AM, Alexey Kardashevskiy wrote: > > > > On 30/11/2019 04:46, Felipe Franciosi wrote: >> Several objects implemented their own uint property getters and setters, >> despite them being straightforward (without any checks/validations

Re: [PATCH] fence: introduce a file-based self-fence mechanism

2019-12-05 Thread Felipe Franciosi
Heya, > On Nov 26, 2019, at 12:18 PM, Marc-André Lureau > wrote: > > On Mon, Nov 25, 2019 at 8:14 PM Felipe Franciosi wrote: >> >> This introduces a self-fence mechanism to Qemu, causing it to die if a >> heartbeat condition is not met. Currently, a file-b

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

2019-12-02 Thread Felipe Franciosi
Heya > On Nov 30, 2019, at 7:50 AM, Marc-André Lureau > wrote: > > 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, o

[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

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

2019-11-29 Thread Felipe Franciosi
will automatically install a setter). Other flags may be added later. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 7 +- hw/acpi/piix4.c | 12 +-- hw/isa/lpc_ich9.c| 4 +- hw/ppc/spapr_drc.c | 3 +- include/qom/object.h | 44

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

2019-11-29 Thread Felipe Franciosi
in case of errors (and propagating them). If they did not provide an error pointer, then that behaviour was maintained. Felipe Franciosi (4): qom/object: enable setter for uint types ich9: fix getter type for sci_int property ich9: Simplify ich9_lpc_initfn qom/object: Use common get/set

[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

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

2019-11-29 Thread Felipe Franciosi
. Some of these setters used to update the value even if the type visit failed (eg. because the value being set overflowed over the given type). The new setter introduces a check for these errors, not updating the value if an error occurred. The error is propagated. Signed-off-by: Felipe Franciosi

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

2019-11-29 Thread Felipe Franciosi
> On Nov 29, 2019, at 3:35 PM, Marc-André Lureau > wrote: > > Hi > > On Fri, Nov 29, 2019 at 7:14 PM Felipe Franciosi wrote: >> >> Heya, >> >>> On Nov 28, 2019, at 8:35 PM, Marc-André Lureau >>> wrote: >>> >>

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

2019-11-29 Thread Felipe Franciosi
Heya, > On Nov 28, 2019, at 8:35 PM, Marc-André Lureau > wrote: > > Hi > > On Thu, Nov 28, 2019 at 8:48 PM Felipe Franciosi wrote: >> >> Traditionally, the uint-specific property helpers only offer getters. >> When adding object (or class) uint types, o

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

2019-11-28 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

[PATCH v2 3/4] ich9: Simplify ich9_lpc_initfn

2019-11-28 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

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

2019-11-28 Thread Felipe Franciosi
in case of errors (and propagating them). If they did not provide an error pointer, then that behaviour was maintained. Felipe Franciosi (4): qom/object: enable setter for uint types ich9: fix getter type for sci_int property ich9: Simplify ich9_lpc_initfn qom/object: Use common get/set uint

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

2019-11-28 Thread Felipe Franciosi
be added later. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 7 +- hw/acpi/piix4.c | 12 +-- hw/isa/lpc_ich9.c| 4 +- hw/ppc/spapr_drc.c | 2 +- include/qom/object.h | 42 +++-- qom/object.c | 216

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

2019-11-28 Thread Felipe Franciosi
. Some of these setters used to update the value even if the type visit failed (eg. because the value being set overflowed over the given type). The new setter introduces a check for these errors, not updating the value if an error occurred. The error is propagated. Signed-off-by: Felipe Franciosi

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

2019-11-28 Thread Felipe Franciosi
> On Nov 27, 2019, at 11:58 PM, Alexey Kardashevskiy wrote: > > > > On 26/11/2019 20:39, Felipe Franciosi wrote: >> >> >>> On Nov 26, 2019, at 8:39 AM, Marc-André Lureau >>> wrote: >>> >>> Hi >> >> Heya,

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

2019-11-26 Thread Felipe Franciosi
> On Nov 26, 2019, at 12:18 PM, Marc-André Lureau > wrote: > > Hi > > On Tue, Nov 26, 2019 at 4:03 PM Felipe Franciosi wrote: >> >> Heya >> >>> On Nov 26, 2019, at 8:40 AM, Marc-André Lureau >>> wrote: >>> >>

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

2019-11-26 Thread Felipe Franciosi
Heya > On Nov 26, 2019, at 8:40 AM, Marc-André Lureau > wrote: > > Hi > > On Mon, Nov 25, 2019 at 7:40 PM Felipe Franciosi wrote: >> >> Traditionally, the uint-specific property helpers only offer getters. >> When adding object (or class) uint types, o

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

2019-11-26 Thread Felipe Franciosi
Hi > On Nov 25, 2019, at 4:43 PM, Philippe Mathieu-Daudé wrote: > > On 11/25/19 4:36 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. Thi

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

2019-11-26 Thread Felipe Franciosi
> On Nov 26, 2019, at 8:39 AM, Marc-André Lureau > wrote: > > Hi Heya, thanks for the review. > > On Mon, Nov 25, 2019 at 7:37 PM Felipe Franciosi wrote: >> >> Several objects implemented their own uint property getters and setters, >> despite the

[PATCH] fence: introduce a file-based self-fence mechanism

2019-11-25 Thread Felipe Franciosi
or block commands may be pending in the kernel. If that is a concern, systems should consider using further fencing mechanisms like hardware watchdogs either in addition or in conjunction with this for additional protection. Signed-off-by: Felipe Franciosi --- Based-on: <20191125153619.39893-2-

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

2019-11-25 Thread Felipe Franciosi
> On Nov 19, 2019, at 10:06 AM, Stefan Hajnoczi wrote: > > On Sun, Nov 17, 2019 at 03:50:32PM +0000, Felipe Franciosi wrote: >> Traditionally, the uint-specific property helpers only offer getters. >> When adding object (or class) uint types, one must therefore use th

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

2019-11-25 Thread Felipe Franciosi
of that API to set this parameter to true. If 'readonly' is false, though, the helper will add an automatic setter for the value. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 6 +- hw/acpi/piix4.c | 12 ++-- hw/isa/lpc_ich9.c| 4 +- hw/ppc

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

2019-11-25 Thread Felipe Franciosi
. Some of these setters used to update the value even if the type visit failed (eg. because the value being set overflowed over the given type). The new setter introduces a check for these errors, not updating the value if an error occurred. The error is propagated. Signed-off-by: Felipe Franciosi

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

2019-11-25 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, 3 insertions(+), 3 deletions

[PATCH 3/4] ich9: Simplify ich9_lpc_initfn

2019-11-25 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 | 19

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

2019-11-25 Thread Felipe Franciosi
es in case of errors (and propagating them). Felipe Franciosi (4): qom/object: enable setter for uint types ich9: fix getter type for sci_int property ich9: Simplify ich9_lpc_initfn qom/object: Use common get/set uint helpers hw/acpi/ich9.c | 97 +++ hw/ac

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

2019-11-17 Thread Felipe Franciosi
of that API to set this parameter to true. If 'readonly' is false, though, the helper will add an automatic setter for the value. Signed-off-by: Felipe Franciosi --- hw/acpi/ich9.c | 4 +- hw/acpi/pcihp.c | 6 +-- hw/acpi/piix4.c | 12 +++--- hw/isa/lpc_ich9.c| 4 +- hw/ppc

Re: [PATCH v2] virtio: notify virtqueue via host notifier when available

2019-11-07 Thread Felipe Franciosi
; eventfd for the traditional ioeventfd case. I don't think it's worth >> adding a fast path for the traditional ioeventfd case because calling >> virtio_queue_notify() is rare when ioeventfd is enabled. >> >> Reported-by: Felipe Franciosi >> Signed-off-by: Stefan Hajnoczi &

Re: [PATCH] vhost-user-scsi: implement handle_output

2019-10-21 Thread Felipe Franciosi
> On Oct 21, 2019, at 5:01 AM, Yongji Xie wrote: > > On Fri, 18 Oct 2019 at 19:14, Felipe Franciosi wrote: >> >> >> >>> On Oct 18, 2019, at 3:59 AM, Yongji Xie wrote: >>> >>> On Fri, 18 Oct 2019 at 01:17, Felipe Franciosi wrote: &g

Re: [PATCH] vhost-user-scsi: implement handle_output

2019-10-18 Thread Felipe Franciosi
> On Oct 18, 2019, at 3:59 AM, Yongji Xie wrote: > > On Fri, 18 Oct 2019 at 01:17, Felipe Franciosi wrote: >> >> Originally, vhost-user-scsi did not implement a handle_output callback >> as that didn't seem necessary. Turns out it is. >> >> Dependi

[PATCH] vhost-user-scsi: implement handle_output

2019-10-17 Thread Felipe Franciosi
VQs via the config space. Those land on Qemu (not the vhost backend) and are missed, causing the VM not to boot. This fixes the issue by getting Qemu to post the notification. Signed-off-by: Felipe Franciosi --- hw/scsi/vhost-user-scsi.c | 9 + 1 file changed, 5 insertions(+), 4

Re: Thoughts on VM fence infrastructure

2019-10-01 Thread Felipe Franciosi
> On Oct 1, 2019, at 12:10 PM, Daniel P. Berrangé wrote: > > On Tue, Oct 01, 2019 at 10:46:24AM +0000, Felipe Franciosi wrote: >> Hi Daniel! >> >> >>> On Oct 1, 2019, at 11:31 AM, Daniel P. Berrangé wrote: >>> >>> On Tue, Oc

Re: Thoughts on VM fence infrastructure

2019-10-01 Thread Felipe Franciosi
Hi Daniel! > On Oct 1, 2019, at 11:31 AM, Daniel P. Berrangé wrote: > > On Tue, Oct 01, 2019 at 09:56:17AM +0000, Felipe Franciosi wrote: >> >> >>> On Oct 1, 2019, at 9:23 AM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franc

Re: Thoughts on VM fence infrastructure

2019-10-01 Thread Felipe Franciosi
> On Oct 1, 2019, at 9:23 AM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> >> >>> On Sep 30, 2019, at 6:59 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi (fel...@nutan

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 8:45 PM, Rafael David Tinoco > wrote: > > There are times when the main loop can get blocked even though the CPU threads can be running and can in some configurations perform IO even without the main loop (I think!). >>> Ah, that's a very good point.

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 6:59 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> >> >>> On Sep 30, 2019, at 6:11 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi (fel...@nutan

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 6:11 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> >> >>> On Sep 30, 2019, at 5:03 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi (fel...@nu

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 5:03 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> Hi David, >> >>> On Sep 30, 2019, at 3:29 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
Hi David, > On Sep 30, 2019, at 3:29 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> Heyall, >> >> We have a use case where a host should self-fence (and all VMs should >> die) if it doesn't hear back from a heart

Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
Heyall, We have a use case where a host should self-fence (and all VMs should die) if it doesn't hear back from a heartbeat within a certain time period. Lots of ideas were floated around where libvirt could take care of killing VMs or a separate service could do it. The concern with those is

[Qemu-devel] [Bug 1838390] Re: vmx_write_mem: mmu_gva_to_gpa failed when using hvf

2019-09-04 Thread Felipe Franciosi
Also happens to me on a freshly built Qemu master (tip 23919ddfd561). MBP15,2 OSX 10.14.6 Qemu command line: qemu/x86_64-softmmu/qemu-system-x86_64 -cpu host -accel hvf -m 4G -smp 8 -vga std -nographic -vnc :1 -netdev user,id=net0 -device e1000e,netdev=net0 buster.qcow Guest works fine until I

Re: [Qemu-devel] [PATCH v3 08/16] virtio: split vhost user scsi bits from virtio-pci

2018-12-14 Thread Felipe Franciosi
bj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o >> diff --git a/hw/virtio/vhost-user-scsi-pci.c >> b/hw/virtio/vhost-user-scsi-pci.c >> new file mode 100644 >> index 00..5baec9c356 >> --- /dev/null >> +++ b/hw/virtio/vhost-user-scsi-pci.c

Re: [Qemu-devel] KVM Forum VFIO BoF summary

2018-11-23 Thread Felipe Franciosi
Hi Alex, I'm also terribly sorry for the delay in responding to this. I'm only now having the time resources to come back to this topic and figure out a way forward with my proposal. Please see my notes below (quoting only the relevant sections). > On Nov 6, 2018, at 9:32 PM, Alex Williamson

Re: [Qemu-devel] [PATCH 3/3] vhost-scsi: expose 't10_pi' property for VIRTIO_SCSI_F_T10_PI

2018-08-09 Thread Felipe Franciosi
3 +++ > 2 files changed, 6 insertions(+) Reviewed-by: Felipe Franciosi

Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: unify vhost-scsi get_features implementations

2018-08-09 Thread Felipe Franciosi
> --- > hw/scsi/vhost-scsi-common.c | 3 +++ > hw/scsi/vhost-user-scsi.c | 14 +- > 2 files changed, 4 insertions(+), 13 deletions(-) Reviewed-by: Felipe Franciosi

Re: [Qemu-devel] [PATCH 1/3] vhost-user-scsi: move host_features into VHostSCSICommon

2018-08-09 Thread Felipe Franciosi
-scsi.c | 15 --- > include/hw/virtio/vhost-scsi-common.h | 1 + > include/hw/virtio/vhost-user-scsi.h | 1 - > 3 files changed, 9 insertions(+), 8 deletions(-) > Reviewed-by: Felipe Franciosi

Re: [Qemu-devel] libiscsi task cancellation

2018-02-14 Thread Felipe Franciosi
0,12 @@ iscsi_abort_task_cb(struct iscsi_context *iscsi, > int status, void *command_data, > { > IscsiAIOCB *acb = private_data; > > -acb->status = -ECANCELED; > -iscsi_schedule_bh(acb); > +/* If the command callback hasn't been called yet, drop the task */ >

Re: [Qemu-devel] [PATCH v2 3/3] block/iscsi: fix ioctl cancel use-after-free

2018-02-14 Thread Felipe Franciosi
are some additional issues with iscsi_aio_cancel(): > 1. Several ABORT TASKs may be sent for the same task if > iscsi_aio_cancel() is invoked multiple times. It's better to avoid > this just in case the command identifier is reused. > 2. The iscsilun->mutex protection is missing in iscsi_aio_ca

Re: [Qemu-devel] libiscsi task cancellation

2018-02-08 Thread Felipe Franciosi
> On 8 Feb 2018, at 14:58, Hannes Reinecke wrote: > > On 02/08/2018 03:14 PM, Paolo Bonzini wrote: >> On 08/02/2018 15:08, Stefan Hajnoczi wrote: >>> Now on to libiscsi: >>> >>> The iscsi_task_mgmt_async() API documentation says: >>> >>> * abort_task will also cancel the scsi

  1   2   3   >