Re: [PATCH v2 2/2] xen: fix stubdom PCI addr

2024-03-08 Thread Jason Andryuk
xs_node_scanf > - use %d instead of %u to read values written as %d > - add a comment from another iteration of this patch by Jason Andryuk > --- > hw/xen/xen-host-pci-device.c | 69 +++- > hw/xen/xen-host-pci-device.h | 6 > 2 files changed, 74

Re: [PATCH v2 1/2] hw/xen: detect when running inside stubdomain

2024-03-08 Thread Jason Andryuk
gt; differently. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk

Re: [PATCH 1/2] hw/xen: detect when running inside stubdomain

2024-02-25 Thread Jason Andryuk
On Tue, Feb 20, 2024 at 1:50 AM Philippe Mathieu-Daudé wrote: > > On 19/2/24 19:16, Marek Marczykowski-Górecki wrote: > > Introduce global xen_is_stubdomain variable when qemu is running inside > > a stubdomain instead of dom0. This will be relevant for subsequent > > patches, as few things like

Re: [PATCH 1/2] hw/xen: detect when running inside stubdomain

2024-02-25 Thread Jason Andryuk
gt; differently. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Thanks, Jason

Re: [PATCH 2/2] xen: fix stubdom PCI addr

2024-02-24 Thread Jason Andryuk
On Mon, Feb 19, 2024 at 1:49 PM Marek Marczykowski-Górecki wrote: > > From: Frédéric Pierret (fepitre) > > When running in a stubdomain, the config space access via sysfs needs to > use BDF as seen inside stubdomain (connected via xen-pcifront), which is > different from the real BDF. For other

Re: [PATCH] xen: Fix host pci for stubdom

2023-05-17 Thread Jason Andryuk
On Mon, May 15, 2023 at 11:04 AM Anthony PERARD wrote: > > On Sun, Mar 19, 2023 at 08:05:54PM -0400, Jason Andryuk wrote: > > diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c > > index 8c6e9a1716..51a72b432d 100644 > > --- a/hw/xen/xen-host-pci-d

Re: [PATCH] 9pfs/xen: Fix segfault on shutdown

2023-05-05 Thread Jason Andryuk
On Fri, May 5, 2023 at 6:05 AM Christian Schoenebeck wrote: > > Hi Jason, > > as this is a Xen specific change, I would like Stefano or another Xen > developer to take a look at it, just few things from my side ... > > On Tuesday, May 2, 2023 4:37:22 PM CEST Jason Andryuk wro

[PATCH] 9pfs/xen: Fix segfault on shutdown

2023-05-02 Thread Jason Andryuk
xen_9pfs_free can't use gnttabdev since it is already closed and NULL-ed out when free is called. Do the teardown in _disconnect(). This matches the setup done in _connect(). trace-events are also added for the XenDevOps functions. Signed-off-by: Jason Andryuk --- hw/9pfs/trace-events

Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-04-03 Thread Jason Andryuk
On Mon, Apr 3, 2023 at 5:33 AM Anthony PERARD wrote: > > On Sat, Apr 01, 2023 at 10:36:45PM +, Bernhard Beschow wrote: > > > > > > Am 30. März 2023 13:00:25 UTC schrieb Anthony PERARD > > : > > >On Sun, Mar 12, 2023 at 01:02:17PM +0100, Bernhard Beschow wrote: > > >> This is a preparational

Re: [PATCH] xen: Fix host pci for stubdom

2023-03-20 Thread Jason Andryuk
On Mon, Mar 20, 2023 at 2:41 PM Bernhard Beschow wrote: > > > > Am 20. März 2023 00:05:54 UTC schrieb Jason Andryuk : > >PCI passthrough for an HVM with a stubdom is PV PCI passthrough from > >dom0 to the stubdom, and then QEMU passthrough of the PCI device inside > >

[PATCH] xen: Fix host pci for stubdom

2023-03-19 Thread Jason Andryuk
dle either passthrough=0/1 case. Based on a stubdom-specific patch originally by Marek Marczykowski-Górecki , which is based on earlier work by HW42 Signed-off-by: Jason Andryuk --- hw/xen/xen-host-pci-device.c | 96 +++- hw/xen/xen-host-pci-device.h | 6 +++ 2 fil

Re: [PATCH] accel/xen: Fix DM state change notification in dm_restrict mode

2023-03-14 Thread Jason Andryuk
ate change handler to attempt to update the > XenStore node when we know it's destined to fail. > > Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to > internal emulation") > Reported-by: Jason Andryuk > Co-developed-by: Jason Andryuk >

Re: [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-03-13 Thread Jason Andryuk
Hi, David, On Mon, Mar 13, 2023 at 4:45 AM David Woodhouse wrote: > > On Sun, 2023-03-12 at 15:19 -0400, Jason Andryuk wrote: > > > > This breaks dm_restrict=1 since the xs_open is not allowed by the > > time > > this is called. There are other evtchn errors befor

[PATCH] xen: fix dm_restrict startup

2023-03-12 Thread Jason Andryuk
the call back use it and the close it. Use the completed boolean to only allow it to be called once. This lets the xenstore connection be closed after the startup indication. Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to internal emulation") Signed-off-by: Jas

Re: [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-03-12 Thread Jason Andryuk
On Tue, Mar 7, 2023 at 1:29 PM David Woodhouse wrote: > > From: Paul Durrant > > Signed-off-by: Paul Durrant > Signed-off-by: David Woodhouse > Reviewed-by: Paul Durrant > --- > accel/xen/xen-all.c | 11 +- > hw/char/xen_console.c | 2 +- >

Re: [PATCH 2/2] Do not access /dev/mem in MSI-X PCI passthrough on Xen

2022-11-17 Thread Jason Andryuk
On Wed, Nov 16, 2022 at 10:34 PM Marek Marczykowski-Górecki wrote: > > On Wed, Nov 16, 2022 at 10:40:02PM +0100, Marek Marczykowski-Górecki wrote: > > On Wed, Nov 16, 2022 at 02:15:22PM -0500, Jason Andryuk wrote: > > > On Mon, Nov 14, 2022 at 2:21 PM Marek Marczykowski

Re: [PATCH 2/2] Do not access /dev/mem in MSI-X PCI passthrough on Xen

2022-11-16 Thread Jason Andryuk
On Mon, Nov 14, 2022 at 2:21 PM Marek Marczykowski-Górecki wrote: > > The /dev/mem is used for two purposes: > - reading PCI_MSIX_ENTRY_CTRL_MASKBIT > - reading Pending Bit Array (PBA) > > The first one was originally done because when Xen did not send all > vector ctrl writes to the device

Re: [PATCH] xen-hvm: Allow disabling buffer_io_timer

2022-01-26 Thread Jason Andryuk
On Tue, Dec 14, 2021 at 8:40 AM Durrant, Paul wrote: > > On 10/12/2021 11:34, Jason Andryuk wrote: > > commit f37f29d31488 "xen: slightly simplify bufioreq handling" hard > > coded setting req.count = 1 during initial field setup before the main > > loop. Th

[PATCH] xen-hvm: Allow disabling buffer_io_timer

2021-12-10 Thread Jason Andryuk
e. The named variable will more clearly show the intent of the code. Signed-off-by: Jason Andryuk --- hw/i386/xen/xen-hvm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 482be95415..cf8e500514 100644 --- a/hw/i386/xen/xe

Re: [PATCH v2] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-27 Thread Jason Andryuk
; for (i = 0; i < ARRAY_SIZE(targets); i++) { > > due to empty 'targets' array. > Fix it by making sure that CONFIG_KVM_TARGETS isn't empty. > > Fixes: e741aff0f43343 ("tests: qtest: add qtest_has_accel() to check if > tested binary supports accelerator") &

Re: [PATCH] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-27 Thread Jason Andryuk
s set. > > > > Fixes: e741aff0f43343 ("tests: qtest: add qtest_has_accel() to check if > > tested binary supports accelerator") > > Reported-by: Jason Andryuk > > Signed-off-by: Igor Mammedov > > > > --- > > tests/qtest/libqtest.c | 4 +

Re: [PULL v2 02/44] tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator

2021-10-22 Thread Jason Andryuk
On Wed, Oct 20, 2021 at 6:23 AM Michael S. Tsirkin wrote: > > From: Igor Mammedov > > Currently it is not possible to create tests that have KVM as a hard > requirement on a host that doesn't support KVM for tested target > binary (modulo going through the trouble of compiling out > the

[PATCH] vl: Parse legacy default_machine_opts

2021-07-12 Thread Jason Andryuk
ore dumped) The default_machine_opts handling doesn't process the legacy machine options like "accel". Call qemu_apply_legacy_machine_options to provide the legacy handling. Signed-off-by: Jason Andryuk --- softmmu/vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/vl.c b/softmmu/v

Re: [PULL 36/40] vl: switch -M parsing to keyval

2021-07-08 Thread Jason Andryuk
On Tue, Jul 6, 2021 at 6:43 AM Paolo Bonzini wrote: > > Switch from QemuOpts to keyval. This enables the introduction > of non-scalar machine properties, and JSON syntax in the future. > > For JSON syntax to be supported right now, we would have to > consider what would happen if string-based

Re: [PATCH] meson.build: fix building of Xen support for aarch64

2020-10-29 Thread Jason Andryuk
On Thu, Oct 29, 2020 at 6:01 AM Alex Bennée wrote: > > > Stefano Stabellini writes: > > > On Wed, 28 Oct 2020, Alex Bennée wrote: > >> Xen is supported on aarch64 although weirdly using the i386-softmmu > >> model. Checking based on the host CPU meant we never enabled Xen > >> support. It would

Re: [PATCH 8/9] dev-serial: fix FTDI_GET_MDM_ST response

2020-10-27 Thread Jason Andryuk
On Tue, Oct 27, 2020 at 9:18 AM Mark Cave-Ayland wrote: > > I spent a bit of time this morning doing some further tests on Linux using 2 > machines > and a test program to check CTS and usbmon: > > usbmon when adapter unplugged: > 95a4bf2dd300 2366831506 S Ci:4:004:0 s c0 05 0002 2

Re: [PATCH 8/9] dev-serial: fix FTDI_GET_MDM_ST response

2020-10-26 Thread Jason Andryuk
On Mon, Oct 26, 2020 at 9:40 AM Mark Cave-Ayland wrote: > > On 26/10/2020 13:00, Jason Andryuk wrote: > > > On Mon, Oct 26, 2020 at 7:21 AM Samuel Thibault > > wrote: > >> > >> Mark Cave-Ayland, le lun. 26 oct. 2020 10:58:43 +, a ecrit: > >

Re: [PATCH 8/9] dev-serial: fix FTDI_GET_MDM_ST response

2020-10-26 Thread Jason Andryuk
On Mon, Oct 26, 2020 at 7:21 AM Samuel Thibault wrote: > > Mark Cave-Ayland, le lun. 26 oct. 2020 10:58:43 +, a ecrit: > > On 26/10/2020 09:54, Samuel Thibault wrote: > > > Mark Cave-Ayland, le lun. 26 oct. 2020 08:34:00 +, a ecrit: > > > > The FTDI_GET_MDM_ST response should only return

Re: [PATCH v2 0/3] Add Xen CpusAccel

2020-10-22 Thread Jason Andryuk
On Tue, Oct 13, 2020 at 1:16 PM Paolo Bonzini wrote: > > On 13/10/20 16:05, Jason Andryuk wrote: > > Xen was left behind when CpusAccel became mandatory and fails the assert > > in qemu_init_vcpu(). It relied on the same dummy cpu threads as qtest. > > Move the qtest c

Re: [PATCH] hw/xen: Set suppress-vmdesc for Xen machines

2020-10-16 Thread Jason Andryuk
On Fri, Oct 16, 2020 at 12:44 PM Anthony PERARD wrote: > > On Fri, Oct 16, 2020 at 12:01:47PM -0400, Jason Andryuk wrote: > > On Fri, Oct 16, 2020 at 11:38 AM Anthony PERARD > > wrote: > > > > > > On Tue, Oct 13, 2020 at 03:05:06PM -0400, Jason Andryuk w

Re: [PATCH] hw/xen: Set suppress-vmdesc for Xen machines

2020-10-16 Thread Jason Andryuk
On Fri, Oct 16, 2020 at 11:38 AM Anthony PERARD wrote: > > On Tue, Oct 13, 2020 at 03:05:06PM -0400, Jason Andryuk wrote: > > xen-save-devices-state doesn't currently generate a vmdesc, so restore > > always triggers "Expected vmdescription section, but got 0". Th

[PATCH] hw/xen: Set suppress-vmdesc for Xen machines

2020-10-13 Thread Jason Andryuk
se to skip it. Reported-by: Marek Marczykowski-Górecki Signed-off-by: Jason Andryuk --- hw/i386/pc_piix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3c2ae0612b..0cf22a57ad 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c

[PATCH v2 3/3] accel: Add xen CpusAccel using dummy-cpus

2020-10-13 Thread Jason Andryuk
using the dummy-cpus implementation used by qtest. Signed-off-by: Jason Andryuk --- accel/meson.build | 1 + accel/xen/xen-all.c | 8 2 files changed, 9 insertions(+) diff --git a/accel/meson.build b/accel/meson.build index 9a417396bd..b26cca227a 100644 --- a/accel/meson.build +++ b/accel/meson.

[PATCH v2 2/3] accel: move qtest CpusAccel functions to a common location

2020-10-13 Thread Jason Andryuk
Move and rename accel/qtest/qtest-cpus.c files to accel/dummy-cpus.c so it can be re-used by Xen. Signed-off-by: Jason Andryuk --- v2: - Use accel/dummy-cpus.c - Put prototype in include/sysemu/cpus.h --- accel/{qtest/qtest-cpus.c => dummy-cpus.c} | 22 -- ac

[PATCH v2 1/3] accel: Remove _WIN32 ifdef from qtest-cpus.c

2020-10-13 Thread Jason Andryuk
dummy-cpus.c is only compiled with CONFIG_POSIX, so the _WIN32 condition will never evaluate true. Remove it. Signed-off-by: Jason Andryuk --- v2: New in v2 --- accel/qtest/qtest-cpus.c | 5 - 1 file changed, 5 deletions(-) diff --git a/accel/qtest/qtest-cpus.c b/accel/qtest/qtest-cpus.c

[PATCH v2 0/3] Add Xen CpusAccel

2020-10-13 Thread Jason Andryuk
Use accel/dummy-cpus.c for filename Put prototype in include/sysemu/cpus.h Jason Andryuk (3): accel: Remove _WIN32 ifdef from qtest-cpus.c accel: move qtest CpusAccel functions to a common location accel: Add xen CpusAccel using dummy-cpus accel/{qtest/qtest-cpus.c => dummy

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Jason Andryuk
On Mon, Oct 12, 2020 at 4:23 PM Claudio Fontana wrote: > > On 10/12/20 10:07 PM, Jason Andryuk wrote: > > Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they > > can be re-used by Xen. > > > > Signed-off-by: Jason Andryuk > > --- > &g

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Jason Andryuk
On Mon, Oct 12, 2020 at 4:30 PM Paolo Bonzini wrote: > > On 12/10/20 22:23, Claudio Fontana wrote: > > On 10/12/20 10:07 PM, Jason Andryuk wrote: > >> Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they > >> can be re-used by Xen. > >

[PATCH 2/2] accel: Add xen CpusAccel using dummy-cpu

2020-10-12 Thread Jason Andryuk
using the dummy-cpu implementation used by qtest. Signed-off-by: Jason Andryuk --- accel/dummy/meson.build | 1 + accel/xen/xen-all.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/accel/dummy/meson.build b/accel/dummy/meson.build index 5fbe27de90..cdff0ba746 100644 --- a/accel/dum

[PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Jason Andryuk
Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they can be re-used by Xen. Signed-off-by: Jason Andryuk --- .../qtest-cpus.c => dummy/dummy-cpus.c} | 22 +-- .../qtest-cpus.h => dummy/dummy-cpus.h} | 10 - accel/dummy/meson

[PATCH 0/2] Add Xen CpusAccel

2020-10-12 Thread Jason Andryuk
Xen was left behind when CpusAccel became mandatory and fails the assert in qemu_init_vcpu(). It relied on the same dummy cpu threads as qtest. Move the qtest cpu functions to a common location and reuse them for Xen. Jason Andryuk (2): accel: move qtest CpusAccel functions to a common

[PATCH] vnc-stubs: Allow -vnc none

2020-10-08 Thread Jason Andryuk
Currently `-vnc none` is fatal when built with `--disable-vnc`. Make vnc_parse accept "none", so QEMU still run without using vnc. Signed-off-by: Jason Andryuk --- ui/vnc-stubs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/vnc-stubs.c b/ui/vnc-stubs.c index 06c4ac6296..

Re: [PATCH 2/2] xen: cleanup unrealized flash devices

2020-07-01 Thread Jason Andryuk
On Wed, Jul 1, 2020 at 8:55 AM Philippe Mathieu-Daudé wrote: > > On 7/1/20 2:40 PM, Philippe Mathieu-Daudé wrote: > > On 7/1/20 2:25 PM, Jason Andryuk wrote: > >> On Wed, Jul 1, 2020 at 3:03 AM Paul Durrant wrote: > >>> > >>>> -Original

Re: [PATCH 2/2] xen: cleanup unrealized flash devices

2020-07-01 Thread Jason Andryuk
S. Tsirkin' > > ; 'Paul Durrant' > > ; 'Jason Andryuk' ; 'Paolo > > Bonzini' ; > > 'Richard Henderson' > > Subject: Re: [PATCH 2/2] xen: cleanup unrealized flash devices > > > > On 6/30/20 5:44 PM, Paul Durrant wrote: > > >> -Ori

Re: Migration vmdesc and xen-save-devices-state

2020-06-24 Thread Jason Andryuk
On Wed, Jun 24, 2020 at 1:57 PM Dr. David Alan Gilbert wrote: > > * Jason Andryuk (jandr...@gmail.com) wrote: > > Hi, > > > > At some point, QEMU changed to add a json VM description (vmdesc) > > after the migration data. The vmdesc is not needed to

Migration vmdesc and xen-save-devices-state

2020-06-24 Thread Jason Andryuk
Hi, At some point, QEMU changed to add a json VM description (vmdesc) after the migration data. The vmdesc is not needed to restore the migration data, but qemu_loadvm_state() will read and discard the vmdesc to clear the stream when should_send_vmdesc() is true. xen-save-devices-state

Re: [PATCH] xen: Fix xen-legacy-backend qdev types

2020-06-24 Thread Jason Andryuk
On Wed, Jun 24, 2020 at 8:30 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk > > Sent: 24 June 2020 13:20 > > To: Stefano Stabellini ; Anthony Perard > > ; Paul > > Durrant ; xen-de...@lists.xenproject.org > > Cc: Jaso

[PATCH] xen: Fix xen-legacy-backend qdev types

2020-06-24 Thread Jason Andryuk
e)' failed. TYPE_XENBACKEND is not a subclass of XEN_XENSYSDEV, so it's parent is just TYPE_DEVICE. Change that. Signed-off-by: Jason Andryuk --- hw/xen/xen-legacy-backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legac

Re: sysbus failed assert for xen_sysdev

2020-06-24 Thread Jason Andryuk
On Wed, Jun 24, 2020 at 6:29 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk > > Sent: 24 June 2020 04:24 > > To: Paul Durrant > > Cc: Markus Armbruster ; Mark Cave-Ayland > > ; Anthony > > PERARD ; xen-devel &g

Re: sysbus failed assert for xen_sysdev

2020-06-23 Thread Jason Andryuk
On Tue, Jun 23, 2020 at 9:22 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk > > Sent: 23 June 2020 13:57 > > To: Markus Armbruster > > Cc: Mark Cave-Ayland ; Anthony PERARD > > ; xen- > > devel ; Paul Durrant ; QEM

Re: sysbus failed assert for xen_sysdev

2020-06-23 Thread Jason Andryuk
On Tue, Jun 23, 2020 at 7:46 AM Paul Durrant wrote: > > > -Original Message- > > From: Markus Armbruster > > Sent: 23 June 2020 09:41 > > To: Jason Andryuk > > Cc: Mark Cave-Ayland ; Anthony PERARD > > ; xen- > > devel ; Paul Durrant ; QEM

Re: sysbus failed assert for xen_sysdev

2020-06-23 Thread Jason Andryuk
On Tue, Jun 23, 2020 at 4:41 AM Markus Armbruster wrote: > > Jason Andryuk writes: > > > On Mon, Jun 22, 2020 at 5:17 PM Mark Cave-Ayland > > wrote: > >> > >> On 22/06/2020 21:33, Jason Andryuk wrote: > >> > >> > Hi, > >>

Re: sysbus failed assert for xen_sysdev

2020-06-22 Thread Jason Andryuk
On Mon, Jun 22, 2020 at 5:17 PM Mark Cave-Ayland wrote: > > On 22/06/2020 21:33, Jason Andryuk wrote: > > > Hi, > > > > Running qemu devel for a Xen VM is failing an assert after the recent > > "qdev: Rework how we plug into the parent bus" sysbus change

sysbus failed assert for xen_sysdev

2020-06-22 Thread Jason Andryuk
Hi, Running qemu devel for a Xen VM is failing an assert after the recent "qdev: Rework how we plug into the parent bus" sysbus changes. qemu-system-i386: hw/core/qdev.c:102: qdev_set_parent_bus: Assertion `dc->bus_type && object_dynamic_cast(OBJECT(bus), dc->bus_type)' failed. dc->bus_type is

[PATCH v2 4/4] usb-serial: Fix timeout closing the device

2020-03-16 Thread Jason Andryuk
clear, and it seems Linux is waiting for FTDI_TEMT to be set to indicate the tx queue is empty before closing. Set the bits when responding to a GetModemStat query and avoid the shutdown delay. Signed-off-by: Jason Andryuk Reviewed-by: Samuel Thibault --- Looking at a USB dump for a real FTDI

[PATCH v2 2/4] usb-serial: chunk data to wMaxPacketSize

2020-03-16 Thread Jason Andryuk
for 462 bytes max. Signed-off-by: Jason Andryuk --- hw/usb/dev-serial.c | 47 - 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index d807ce5771..ec091b6a36 100644 --- a/hw/usb/dev-serial.c

[PATCH v2 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-16 Thread Jason Andryuk
We'll be adding a loop, so move the code into a helper function. breaks are replaced with returns. While making this change, add braces to single line if statements to comply with coding style and keep checkpatch happy. Signed-off-by: Jason Andryuk --- v2: Add braces to single line

[PATCH v2 3/4] usb-serial: Increase receive buffer to 496

2020-03-16 Thread Jason Andryuk
A FTDI USB adapter on an xHCI controller can send 512 byte USB packets. These are 8 * ( 2 bytes header + 62 bytes data). A 384 byte receive buffer is insufficient to fill a 512 byte packet, so bump the receive size to 496 ( 512 - 2 * 8 ). Signed-off-by: Jason Andryuk Reviewed-by: Samuel

[PATCH v2 0/4] usb-serial: xHCI and timeout fixes

2020-03-16 Thread Jason Andryuk
if statements to comply with coding style. Added Samuel's R-b to 3 & 4. 1 & 2 only changed by the addition of braces, but I don't know the protocol for this situation. Jason Andryuk (4): usb-serial: Move USB_TOKEN_IN into a helper function usb-serial: chunk data to wMaxPacketSize us

Re: [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-16 Thread Jason Andryuk
On Mon, Mar 16, 2020 at 7:40 AM Gerd Hoffmann wrote: > > Hi, > > > +if (len > s->recv_used) > > +len = s->recv_used; > > scripts/checkpatch.pl flags a codestyle error here. > > > -if (len > s->recv_used) > > -len = s->recv_used; > > Which is strictly speaking not

[PATCH 4/4] usb-serial: Fix timeout closing the device

2020-03-12 Thread Jason Andryuk
clear, and it seems Linux is waiting for FTDI_TEMT to be set to indicate the tx queue is empty before closing. Set the bits when responding to a GetModemStat query and avoid the shutdown delay. Signed-off-by: Jason Andryuk --- Looking at a USB dump for a real FTDI USB adapter, I see these bits

[PATCH 0/4] usb-serial: xHCI and timeout fixes

2020-03-12 Thread Jason Andryuk
to 512 - 2 * 8 = 496 bytes. A second fix is to set the FTDI_THRE (Transmitter Holding Register) and FTDI_TEMT (Transmitter Empty) status bits in a GetModemStat response. This makes the linux driver happy when closing the device and avoids a 30 second timeout. Jason Andryuk (4): usb-serial: Move

[PATCH 3/4] usb-serial: Increase receive buffer to 496

2020-03-12 Thread Jason Andryuk
A FTDI USB adapter on an xHCI controller can send 512 byte USB packets. These are 8 * ( 2 bytes header + 62 bytes data). A 384 byte receive buffer is insufficient to fill a 512 byte packet, so bump the receive size to 496 ( 512 - 2 * 8 ). Signed-off-by: Jason Andryuk --- hw/usb/dev-serial.c

[PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-12 Thread Jason Andryuk
We'll be adding a loop, so move the code into a helper function. breaks are replaced with returns. Signed-off-by: Jason Andryuk --- hw/usb/dev-serial.c | 77 + 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw

[PATCH 2/4] usb-serial: chunk data to wMaxPacketSize

2020-03-12 Thread Jason Andryuk
for 462 bytes max. Signed-off-by: Jason Andryuk --- hw/usb/dev-serial.c | 43 +++ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 71fa786bd8..96b6c34202 100644 --- a/hw/usb/dev-serial.c +++ b

Re: [PATCH] usb-serial: wakeup device on input

2020-03-09 Thread Jason Andryuk
On Mon, Mar 9, 2020 at 6:08 AM Gerd Hoffmann wrote: > > On Fri, Mar 06, 2020 at 09:09:17AM -0500, Jason Andryuk wrote: > > Currently usb-serial devices are unable to send data into guests with > > the xhci controller. Data is copied into the usb-serial's buffer, but

Re: [PATCH] usb-serial: wakeup device on input

2020-03-06 Thread Jason Andryuk
On Fri, Mar 6, 2020 at 11:13 AM wrote: > > Patchew URL: > https://patchew.org/QEMU/20200306140917.26726-1-jandr...@gmail.com/ > > > > Hi, > > This series failed the docker-clang@ubuntu build test. Please find the > testing commands and > their output below. If you have Docker installed, you can

[PATCH] usb-serial: wakeup device on input

2020-03-06 Thread Jason Andryuk
() when receiving data from the chardev. This seems to notify the xhci controller and fix inbound data flow. Also add USB_CFG_ATT_WAKEUP to the device's bmAttributes. This matches a real FTDI serial adapter's bmAttributes. Signed-off-by: Jason Andryuk --- Other devices added USB_CFG_ATT_WAKEUP

Re: [Xen-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2020-01-14 Thread Jason Andryuk
On Tue, Jan 14, 2020 at 5:04 AM Roger Pau Monné wrote: > > On Mon, Jan 13, 2020 at 02:01:47PM -0500, Jason Andryuk wrote: > > On Fri, Mar 22, 2019 at 3:43 PM Jason Andryuk wrote: > > > > > > On Thu, Mar 21, 2019 at 11:09 PM Roger Pau Monné > > > wrot

Re: [Xen-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2020-01-13 Thread Jason Andryuk
On Fri, Mar 22, 2019 at 3:43 PM Jason Andryuk wrote: > > On Thu, Mar 21, 2019 at 11:09 PM Roger Pau Monné wrote: > > > > On Wed, Mar 20, 2019 at 01:28:47PM -0400, Jason Andryuk wrote: > > > On Fri, Mar 15, 2019 at 12:28 PM Andrew Cooper > > > wrote: >

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-13 Thread Jason Andryuk
On Wed, Nov 13, 2019 at 8:18 AM Marc-André Lureau wrote: > > Hi > > On Wed, Nov 13, 2019 at 4:41 PM Markus Armbruster wrote: > > > > Jason Andryuk writes: > > > > > Currently, mon->commands is uninitialized until CHR_EVENT_OPENED where > >

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-07 Thread Jason Andryuk
On Wed, Nov 6, 2019 at 8:08 PM wrote: > > Patchew URL: > https://patchew.org/QEMU/20191106130309.6737-1-jandr...@gmail.com/ > > > > Hi, > > This series failed the docker-quick@centos7 build test. Please find the > testing commands and > their output below. If you have Docker installed, you can

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-06 Thread Jason Andryuk
On Wed, Nov 6, 2019 at 9:53 AM Marc-André Lureau wrote: > > Hi > > On Wed, Nov 6, 2019 at 5:04 PM Jason Andryuk wrote: > > > > Currently, mon->commands is uninitialized until CHR_EVENT_OPENED where > > it is set to _cap_negotiation_commands. After capa

[PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-06 Thread Jason Andryuk
Set mon->commands to _cap_negotiation_commands for CHR_EVENT_CLOSED to stop sending events. Setting for the CHR_EVENT_OPENED case remains since that is how mon->commands is set for a newly opened connections. Signed-off-by: Jason Andryuk --- monitor/qmp.c | 1 + 1 file changed, 1 insertion

Re: [Qemu-devel] [Xen-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2019-03-22 Thread Jason Andryuk
On Thu, Mar 21, 2019 at 11:09 PM Roger Pau Monné wrote: > > On Wed, Mar 20, 2019 at 01:28:47PM -0400, Jason Andryuk wrote: > > On Fri, Mar 15, 2019 at 12:28 PM Andrew Cooper > > wrote: > > > > > > On 15/03/2019 09:17, Paul Durrant wrote: > > > >&

Re: [Qemu-devel] [Xen-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2019-03-20 Thread Jason Andryuk
On Fri, Mar 15, 2019 at 12:28 PM Andrew Cooper wrote: > > On 15/03/2019 09:17, Paul Durrant wrote: > >> -Original Message----- > >> From: Jason Andryuk [mailto:jandr...@gmail.com] > >> Sent: 14 March 2019 18:16 > >> To: Paul Durra

Re: [Qemu-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2019-03-14 Thread Jason Andryuk
On Wed, Mar 13, 2019 at 11:09 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk [mailto:jandr...@gmail.com] > > Sent: 11 March 2019 18:02 > > To: qemu-devel@nongnu.org > > Cc: xen-de...@lists.xenproject.org; marma...@invisibl

Re: [Qemu-devel] [PATCH 2/6] xen: Move xenstore initialization to common location

2019-03-13 Thread Jason Andryuk
On Wed, Mar 13, 2019 at 11:01 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk [mailto:jandr...@gmail.com] > > Sent: 11 March 2019 18:02 > > To: qemu-devel@nongnu.org > > Cc: xen-de...@lists.xenproject.org; marma...@invisible

Re: [Qemu-devel] [Xen-devel] [PATCH 5/6] xen-pt: Hide MSI-X from xen stubdoms

2019-03-12 Thread Jason Andryuk
On Tue, Mar 12, 2019 at 11:15 AM Jason Andryuk wrote: > I'll test to verify whether MSI-X works with > permissive mode. Dropping this patch and enabling permissive mode allowed MSI-X to work. {"execute": "device_add", "arguments": {"driver": &q

Re: [Qemu-devel] [Xen-devel] [PATCH 5/6] xen-pt: Hide MSI-X from xen stubdoms

2019-03-12 Thread Jason Andryuk
On Tue, Mar 12, 2019 at 10:13 AM Roger Pau Monné wrote: > > On Tue, Mar 12, 2019 at 09:58:56AM -0400, Jason Andryuk wrote: > > On Tue, Mar 12, 2019 at 8:38 AM Marek Marczykowski-Górecki > > wrote: > > > > > > On Tue, Mar 12, 2019 at 01:04:19PM +0100, Roger Pau

Re: [Qemu-devel] [Xen-devel] [PATCH 5/6] xen-pt: Hide MSI-X from xen stubdoms

2019-03-12 Thread Jason Andryuk
On Tue, Mar 12, 2019 at 8:38 AM Marek Marczykowski-Górecki wrote: > > On Tue, Mar 12, 2019 at 01:04:19PM +0100, Roger Pau Monné wrote: > > On Mon, Mar 11, 2019 at 02:02:15PM -0400, Jason Andryuk wrote: > > > MSI-X is not supported in Xen stubdoms, so it must be disabled. U

Re: [Qemu-devel] [PATCH 1/6] xen: Introduce -xen-stubdom option

2019-03-11 Thread Jason Andryuk
On Mon, Mar 11, 2019 at 2:06 PM Paolo Bonzini wrote: > > On 11/03/19 19:02, Jason Andryuk wrote: > > With Xen, QEMU can run isolated in a dedicated service VM - a stubdom. > > There are a few differences when running in a stubdom compared to dom0. > > Add the -xen-

[Qemu-devel] [PATCH 4/6] xen: Set HVM_PARAM_DM_DOMAIN for stubdom on older Xen

2019-03-11 Thread Jason Andryuk
started returning an error when setting HVM_PARAM_DM_DOMAIN. Put the HVM_PARAM_DM_DOMAIN call in the version compatibility header. When we fallback to the default ioreq server, issue the call and don't bother to check the return value. Original patch by Anthony PERARD Signed-off-by: Jason

[Qemu-devel] [PATCH 2/6] xen: Move xenstore initialization to common location

2019-03-11 Thread Jason Andryuk
For the xen stubdom case, we'll want xenstore initialized, but we'll want to skip the rest of xen_be_init. Move the initialization to xen_hvm_init so we can conditionalize calling xen_be_init. xs_domain_open() is deprecated for xs_open(0), so make the replacement as well. Signed-off-by: Jason

[Qemu-devel] [PATCH 5/6] xen-pt: Hide MSI-X from xen stubdoms

2019-03-11 Thread Jason Andryuk
MSI-X is not supported in Xen stubdoms, so it must be disabled. Use the existing xen_pt_hide_dev_cap to hide when running under -xen-stubdom. A compile-time patch was originally written by James McKenzie Signed-off-by: Jason Andryuk --- hw/xen/xen_pt_config_init.c | 3 +++ 1 file changed, 3

[Qemu-devel] [PATCH 1/6] xen: Introduce -xen-stubdom option

2019-03-11 Thread Jason Andryuk
With Xen, QEMU can run isolated in a dedicated service VM - a stubdom. There are a few differences when running in a stubdom compared to dom0. Add the -xen-stubdom option to select this mode at runtime. The default is off. Signed-off-by: Jason Andryuk --- include/hw/xen/xen.h | 6 ++ qemu

[Qemu-devel] [PATCH 3/6] xen: Skip backend initialization for stubdom

2019-03-11 Thread Jason Andryuk
When QEMU is running in a stubdom, it does not provide any Paravirtualized backends. Those still run in dom0 or another driver domain. Therefore we skip backend initialization (xen_bus_init and xen_be_init) for the stubdom case. Original patch by Anthony PERARD Signed-off-by: Jason Andryuk

[Qemu-devel] [PATCH 0/6] Xen stubdom support

2019-03-11 Thread Jason Andryuk
specified. The stubdom doesn't run PV backends, so that initialization code can be skipped. Stubdom's don't support MSI-X, so that PCI capability must be hidden from passed through devices. Stubdom mode is enabled by the new -xen-stubdom flag. Jason Andryuk (5): xen: Introduce -xen-stubdom option

[Qemu-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2019-03-11 Thread Jason Andryuk
you will see error like this in the stubdom log: [00:05.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0004 QubesOS/qubes-issues#2849 Signed-off-by: Simon Gaiser Signed-off-by: Jason Andryuk --- hw/xen/xen_pt.c | 10 +++--- 1 file changed, 7 insertions(+)

[Qemu-devel] Stable 2.12.1 Request: "ccid-card-passthru: fix regression in realize()"

2018-07-24 Thread Jason Andryuk
I'd like to request this commit for QEMU 2.12.1 stable backport: commit e58d64a16abc "ccid-card-passthru: fix regression in realize()" The patch fixes a VM start failure which I experience on 2.12.0. Patch inlined below Thanks, Jason >From e58d64a16abc2304c4dcb644411eb9580bf63b1e Mon Sep 17

[Qemu-devel] [PATCH] ccid: Fix dwProtocols advertisement of T=0

2018-04-20 Thread Jason Andryuk
this error persists, your smart card or reader may not be functioning correctly Command Header: 03 00 00 00 Setting to 0x0001 fixes the Windows issue. Signed-off-by: Jason Andryuk <jandr...@gmail.com> Cc: qemu-sta...@nongnu.org --- hw/usb/dev-smartcard-reader.c | 4 ++-- 1 file chang