[RFC PATCH 01/12] drivers/char: Add support for Xue USB3 debugger

2022-06-05 Thread Marek Marczykowski-Górecki
From: Connor Davis Xue is a cross-platform USB 3 debugger that drives the Debug Capability (DbC) of xHCI-compliant host controllers. This patch implements the operations needed for xue to initialize the host controller's DbC and communicate with it. It also implements a struct uart_driver that

[RFC PATCH 10/12] xue: mark DMA buffers as reserved for the device

2022-06-05 Thread Marek Marczykowski-Górecki
, prevent anything else being placed on those pages by adding artificial padding. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/char/xue.c | 46 --- xen/drivers/passthrough/vtd/dmar.c | 2 +- 2 files changed, 32 insertions(+), 16 deletions(-) diff

[RFC PATCH 09/12] IOMMU/AMD: wire common device reserved memory API

2022-06-05 Thread Marek Marczykowski-Górecki
Register common device reserved memory similar to how ivmd= parameter is handled. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/passthrough/amd/iommu_acpi.c | 16 1 file changed, 16 insertions(+) diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers

[RFC PATCH 08/12] IOMMU/VT-d: wire common device reserved memory API

2022-06-05 Thread Marek Marczykowski-Górecki
Re-use rmrr= parameter handling code to handle common device reserved memory. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/passthrough/vtd/dmar.c | 201 +- 1 file changed, 119 insertions(+), 82 deletions(-) diff --git a/xen/drivers/passthrough/vtd

[RFC PATCH 00/12] Add Xue - console over USB 3 Debug Capability

2022-06-05 Thread Marek Marczykowski-Górecki
/char: Add support for Xue USB3 debugger Marek Marczykowski-Górecki (11): xue: annotate functions with cf_check xue: reset XHCI ports when initializing dbc xue: add support for selecting specific xhci ehci-dbgp: fix selecting n-th ehci controller console: support multiple serial consol

[RFC PATCH 06/12] console: support multiple serial console simultaneously

2022-06-05 Thread Marek Marczykowski-Górecki
of MAX_SERCONS (4) is arbitrary, inspired by the number of SERHND_IDX values. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/char/console.c | 58 ++- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/xen/drivers/char/console.c b/xen

[RFC PATCH 05/12] ehci-dbgp: fix selecting n-th ehci controller

2022-06-05 Thread Marek Marczykowski-Górecki
The ehci number was parsed but ignored. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/char/ehci-dbgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index 16c8ff394d5c..92c588ec0aa3 100644 --- a/xen

[RFC PATCH 03/12] xue: reset XHCI ports when initializing dbc

2022-06-05 Thread Marek Marczykowski-Górecki
Reset ports, to force host system to re-enumerate devices. Otheriwse it will require the cable to be re-plugged, or will wait in the "configuring" state indefinitely. Trick and code copied from Linux: drivers/usb/early/xhci-dbc.c:xdbc_start()->xdbc_reset_debug_port() Signed-

[RFC PATCH 04/12] xue: add support for selecting specific xhci

2022-06-05 Thread Marek Marczykowski-Górecki
Handle parameters similar to dbgp=ehci. Implement this by not resettting xhc_cf8 again in xue_init_xhc(), but using a value found there if non-zero. Additionally, add xue->xhc_num to select n-th controller. Signed-off-by: Marek Marczykowski-Górecki --- docs/misc/xen-command-line.pandoc |

[RFC PATCH 02/12] xue: annotate functions with cf_check

2022-06-05 Thread Marek Marczykowski-Górecki
Annotate indirectly called functions for IBT. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/char/xue.c | 12 ++-- xen/include/xue.h | 24 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xen/drivers/char/xue.c b/xen/drivers/char

Re: [PATCH v6 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-20 Thread Marek Marczykowski-Górecki
On Fri, May 20, 2022 at 11:47:02AM +0200, Jan Beulich wrote: > On 20.05.2022 10:53, Marek Marczykowski-Górecki wrote: > > Intel LPSS has INTERRUPT_LINE set to 0xff by default, that is declared > > by the PCI Local Bus Specification Revision 3.0 (from 2004) as > > &qu

Re: [PATCH v6 2/2] ns16550: Add more device IDs for Intel LPSS UART

2022-05-20 Thread Marek Marczykowski-Górecki
On Fri, May 20, 2022 at 11:42:37AM +0200, Jan Beulich wrote: > On 20.05.2022 10:53, Marek Marczykowski-Górecki wrote: > > This is purely based on the spec: > > - Intel 500 Series PCH: 635218-006 > > - Intel 600 Series PCH: 691222-001, 648364-003 > > > > Th

[PATCH v6 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-20 Thread Marek Marczykowski-Górecki
_X86 anyway. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Roger Pau Monné --- Changes in v6: - wrap the check in additional CONFIG_X86, with appropriate comment Changes in v5: - drop IRQ 0 from the log message Changes in v4: - adjust log message, change it from WARNING to INFO -

[PATCH v6 2/2] ns16550: Add more device IDs for Intel LPSS UART

2022-05-20 Thread Marek Marczykowski-Górecki
This is purely based on the spec: - Intel 500 Series PCH: 635218-006 - Intel 600 Series PCH: 691222-001, 648364-003 This is tested only on TGL-LP added initially, but according to the spec, they should behave the same. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Andrew Cooper

Showcase of openQA for testing on physical hardware

2022-05-19 Thread Marek Marczykowski-Górecki
ABIs force rebuilds of several parts in that case. But I guess testing just Xen with its native toolstack won't have this problem (and you build all of it in gitlab already). I'm open for any questions about this setup :) -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab sig

Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-18 Thread Marek Marczykowski-Górecki
:31PM +0200, Jan Beulich wrote: > >>>> On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote: > >>>>> --- a/xen/drivers/char/ns16550.c > >>>>> +++ b/xen/drivers/char/ns16550.c > >>>>> @@ -1238,6 +1238,13 @@ pci_uart_config(struct ns16550 *ua

xen-blkfront crash on xl block-detach of not fully attached device

2022-05-11 Thread Marek Marczykowski-Górecki
ES: CR0: 80050033 CR2: 0050 CR3: e932e002 CR4: 003706e0 Kernel panic - not syncing: Fatal exception Kernel Offset: disabled -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

[PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-11 Thread Marek Marczykowski-Górecki
_X86 anyway. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Roger Pau Monné --- Changes in v5: - drop IRQ 0 from the log message Changes in v4: - adjust log message, change it from WARNING to INFO - re-add x86 reference in the commit message Changes in v3: - change back to checking 0xff

[PATCH v5 2/2] ns16550: Add more device IDs for Intel LPSS UART

2022-05-11 Thread Marek Marczykowski-Górecki
This is purely based on the spec: - Intel 500 Series PCH: 635218-006 - Intel 600 Series PCH: 691222-001, 648364-003 This is tested only on TGL-LP added initially, but according to the spec, they should behave the same. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Andrew Cooper

[PATCH v4 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-11 Thread Marek Marczykowski-Górecki
_X86 anyway. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v4: - adjust log message, change it from WARNING to INFO - re-add x86 reference in the commit message Changes in v3: - change back to checking 0xff explicitly - adjust commit message, include spec reference - change warnin

[PATCH v4 2/2] ns16550: Add more device IDs for Intel LPSS UART

2022-05-11 Thread Marek Marczykowski-Górecki
This is purely based on the spec: - Intel 500 Series PCH: 635218-006 - Intel 600 Series PCH: 691222-001, 648364-003 This is tested only on TGL-LP added initially, but according to the spec, they should behave the same. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Andrew Cooper

[PATCH v3 1/2] ns16550: reject IRQ above nr_irqs_gsi

2022-05-10 Thread Marek Marczykowski-Górecki
Intel LPSS has INTERRUPT_LINE set to 0xff by default, that is declared by the PCI Local Bus Specification Revision 3.0 (from 2004) as "unknown"/"no connection". Fallback to poll mode in this case. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - change b

[PATCH v3 2/2] ns16550: Add more device IDs for Intel LPSS UART

2022-05-10 Thread Marek Marczykowski-Górecki
This is purely based on the spec: - Intel 500 Series PCH: 635218-006 - Intel 600 Series PCH: 691222-001, 648364-003 This is tested only on TGL-LP added initially, but according to the spec, they should behave the same. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Andrew Cooper

Re: [PATCH v2 1/2] ns16550: reject IRQ above nr_irqs_gsi

2022-05-10 Thread Marek Marczykowski-Górecki
On Tue, May 10, 2022 at 05:46:12PM +0200, Roger Pau Monné wrote: > On Tue, May 10, 2022 at 02:30:41PM +, Andrew Cooper wrote: > > On 10/05/2022 12:55, Marek Marczykowski-Górecki wrote: > > > Intel LPSS has INTERRUPT_LINE set to 0xff by default, that can't > > > po

[PATCH v2 2/2] ns16550: Add more device IDs for Intel LPSS UART

2022-05-10 Thread Marek Marczykowski-Górecki
This is purely based on the spec: - Intel 500 Series PCH: 635218-006 - Intel 600 Series PCH: 691222-001, 648364-003 This is tested only on TGL-LP added initially, but according to the spec, they should behave the same. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - new patch

[PATCH v2 1/2] ns16550: reject IRQ above nr_irqs_gsi

2022-05-10 Thread Marek Marczykowski-Górecki
()). Currently it's x86-specific, as the surrounding code is guarded with CONFIG_X86 anyway. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - add log message - extend commit message - code style fix --- xen/drivers/char/ns16550.c | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [PATCH 0/1] Adjust odd Python bindings

2022-04-21 Thread Marek Marczykowski-Górecki
at the same time, but TBH I'm not sure how to do that with C extension. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: Increasing domain memory beyond initial maxmem

2022-04-06 Thread Marek Marczykowski-Górecki
On Wed, Apr 06, 2022 at 07:13:18AM +0200, Juergen Gross wrote: > On 05.04.22 18:24, Marek Marczykowski-Górecki wrote: > > On Tue, Apr 05, 2022 at 01:03:57PM +0200, Juergen Gross wrote: > > > Hi Marek, > > > > > > On 31.03.22 14:36, Marek Marczykowski-Górecki

Re: Increasing domain memory beyond initial maxmem

2022-04-05 Thread Marek Marczykowski-Górecki
On Tue, Apr 05, 2022 at 01:03:57PM +0200, Juergen Gross wrote: > Hi Marek, > > On 31.03.22 14:36, Marek Marczykowski-Górecki wrote: > > On Thu, Mar 31, 2022 at 02:22:03PM +0200, Juergen Gross wrote: > > > Maybe some kernel config differences, or other udev rules (memory on

Re: preparations for 4.14.5 ?

2022-04-04 Thread Marek Marczykowski-Górecki
On Mon, Apr 04, 2022 at 03:42:09PM +0200, Jan Beulich wrote: > On 01.04.2022 15:46, Marek Marczykowski-Górecki wrote: > > On Wed, Mar 30, 2022 at 12:16:00PM +0200, Jan Beulich wrote: > >> All, > >> > >> while 4.14's general support period ended in January,

Re: preparations for 4.14.5 ?

2022-04-01 Thread Marek Marczykowski-Górecki
ranch and the list above, but which you consider relevant. I'm not sure if "just" bugfix qualify for 4.14 at this point, but if so, I'd propose: 0a20a53df158 tools/libs/light: set video_mem for PVH guests In any case, the above should be backported to 4.15 and 4.16. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: Increasing domain memory beyond initial maxmem

2022-03-31 Thread Marek Marczykowski-Górecki
tate}="online" But I don't think they are conflicting. > What type of guest are you using? Mine was a PVH guest. PVH here too. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: Increasing domain memory beyond initial maxmem

2022-03-31 Thread Marek Marczykowski-Górecki
On Thu, Mar 31, 2022 at 08:41:19AM +0200, Juergen Gross wrote: > On 31.03.22 05:51, Marek Marczykowski-Górecki wrote: > > Hi, > > > > I'm trying to make use of CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y to increase > > domain memory beyond initial maxmem, but I hit few issues

Increasing domain memory beyond initial maxmem

2022-03-30 Thread Marek Marczykowski-Górecki
to be used. Any ideas? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: Security support status of xnf(4) and xbf(4)

2022-03-27 Thread Marek Marczykowski-Górecki
On Mon, Mar 28, 2022 at 04:12:29AM +0200, Marek Marczykowski-Górecki wrote: > On Mon, Mar 28, 2022 at 12:45:24PM +1100, Damien Miller wrote: > > On Fri, 25 Mar 2022, Demi Marie Obenour wrote: > > > > > Linux’s netfront and blkfront drivers recently had a security >

Re: Security support status of xnf(4) and xbf(4)

2022-03-27 Thread Marek Marczykowski-Górecki
(which has no network interfaces at all!). You can read more about it at the link below (especially look for the diagram at the end, if you want just a quick look): https://www.qubes-os.org/doc/architecture/ -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: Support status of OpenBSD frontend drivers

2022-03-24 Thread Marek Marczykowski-Górecki
firewall or sys-whonix qubes. I'm with Roger on this - when security support is external, such information in xen.git could easily become stale. If anything, there could be a link to OpenBSD security status info, maintained by whoever such support provides. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: "BUG: using smp_processor_id() in preemptible" on resume from S3

2022-03-22 Thread Marek Marczykowski-Górecki
On Tue, Mar 22, 2022 at 08:12:53AM +0100, Juergen Gross wrote: > Hi Marek, > > On 21.03.22 23:26, Marek Marczykowski-Górecki wrote: > > Hi, > > > > After updating from 5.14.15 dom0 kernel to 5.16.13 I started getting > > this on resume from S3: > > > &

"BUG: using smp_processor_id() in preemptible" on resume from S3

2022-03-21 Thread Marek Marczykowski-Górecki
nges I see e25a8d959992 "x86/Xen: streamline (and fix) PV CPU enumeration", which was backported to 5.16.11, although that's just a hunch. Any ideas? If necessary, I can run bisect to find specific commit, but I hope the above message gives enough hints. -- Best Regards, Marek Marc

System hangs shortly after S3 resume, if suspended for a longer time

2022-03-14 Thread Marek Marczykowski-Górecki
ough, 1min is not. Another user reported similar issue here: https://github.com/QubesOS/qubes-issues/issues/7340 That system uses totally different firmware (Lenovo vs Coreboot + EDK2). While it doesn't completely rule out firmware issue, I'd say it's unlikely in this case. -- Best Rega

Re: [PATCH 1/2] ns16550: reject IRQ above nr_irqs

2022-03-11 Thread Marek Marczykowski-Górecki
ill need to figure how to > handle that specific Line value. I haven't looked at the docs, will do > on Monday hopefully. ... having fallback to a poll mode is still better than crashing the hypervisor or not using such console at all. -- Best Regards, Marek Marczykowski-Góre

Re: [PATCH 1/2] ns16550: reject IRQ above nr_irqs

2022-03-11 Thread Marek Marczykowski-Górecki
On Fri, Mar 11, 2022 at 10:23:03AM +, Julien Grall wrote: > Hi Marek, > > On 10/03/2022 16:37, Marek Marczykowski-Górecki wrote: > > On Thu, Mar 10, 2022 at 04:21:50PM +, Julien Grall wrote: > > > Hi, > > > > > > On 10/03/2022 16:12, Roger Pau

Re: [PATCH 1/2] ns16550: reject IRQ above nr_irqs

2022-03-10 Thread Marek Marczykowski-Górecki
022 at 04:23:00PM +0100, Jan Beulich wrote: > > > > > On 10.03.2022 15:34, Marek Marczykowski-Górecki wrote: > > > > > > --- a/xen/drivers/char/ns16550.c > > > > > > +++ b/xen/drivers/char/ns16550.c > > > > > > @

[PATCH 2/2] ns16550: Add support for Intel LPSS UART

2022-03-10 Thread Marek Marczykowski-Górecki
This adds support for serial console as found in a laptop with TGL-LP (StarBook MkV). Since the device is on the bus 0, it needs to be enabled via "com1=...,amt", not just "...,pci". Device specification is in Intel docs 631119-007 and 631120-001. Signed-off-by: Marek

[PATCH 1/2] ns16550: reject IRQ above nr_irqs

2022-03-10 Thread Marek Marczykowski-Górecki
Intel LPSS has INTERRUPT_LINE set to 0xff by default, that can't possibly work. While a proper IRQ configuration may be useful, validating value retrieved from the hardware is still necessary. If it fails, use the device in poll mode. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers

Re: x86/vmx: Don't spuriously crash the domain when INIT is received

2022-02-25 Thread Marek Marczykowski-Górecki
icture here yet, unless your > mentioning of TXT was actually implying that TXT was active at the > point of the crash (which I don't think was said anywhere). No, TXT wasn't (intentionally) active. I think Andrew mentioned it as explanation why VMX behaves this way: to let the OS do something _if_ TXT is active (the check for TXT is the OS responsibility here). But that's my guess only... -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

[PATCH v2] xen/netfront: destroy queues before real_num_tx_queues is zeroed

2022-02-23 Thread Marek Marczykowski-Górecki
ta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - use xennet_uninit, as suggested by Jakub Kicinski --- drivers/net/xen-netfront.c | 39 ++ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/net/xen-netfron

Re: [PATCH] xen/netfront: destroy queues before real_num_tx_queues is zeroed

2022-02-23 Thread Marek Marczykowski-Górecki
On Tue, Feb 22, 2022 at 12:03:01PM -0800, Jakub Kicinski wrote: > On Mon, 21 Feb 2022 07:27:32 +0100 Juergen Gross wrote: > > On 20.02.22 14:42, Marek Marczykowski-Górecki wrote: > > > xennet_destroy_queues() relies on info->netdev->real_num_tx_queues to &g

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread Marek Marczykowski-Górecki
y will need to do this. If it's not done right away, someone > (else) will hit a build issue on a perhaps just slightly older platform. That's why declare what version _should_ work (and test that via CI), instead of trying to find what is the minimum version that is actually required. This

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread Marek Marczykowski-Górecki
; By "find the actual minimum version", do you mean to get to know the version > number, or install that version on developer's machine? I think it's something else (closer to the second one): finding what version is required for features actually used in the code. -- Best R

Re: [PATCH v2 2/2] Revert "xen-netback: Check for hotplug-status existence before watching"

2022-02-22 Thread Marek Marczykowski-Górecki
On Tue, Feb 22, 2022 at 09:31:31AM +0100, Roger Pau Monné wrote: > On Tue, Feb 22, 2022 at 01:18:17AM +0100, Marek Marczykowski-Górecki wrote: > > This reverts commit 2afeec08ab5c86ae21952151f726bfe184f6b23d. > > > > The reasoning in the commit was wrong - the code expected t

[PATCH v2 1/2] Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"

2022-02-21 Thread Marek Marczykowski-Górecki
is wrong and leads to not configured interface. More discussion at https://lore.kernel.org/xen-devel/afedd7cb-a291-e773-8b0d-4db9b291f...@ipxe.org/T/#u Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- Cc: Michael Brown Changes in v2: - build fix, reported by kernel test

[PATCH v2 2/2] Revert "xen-netback: Check for hotplug-status existence before watching"

2022-02-21 Thread Marek Marczykowski-Górecki
Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- I believe this is the same issue as discussed at https://lore.kernel.org/xen-devel/20220113111946.ga4133...@dingwall.me.uk/ Cc: James Dingwall --- drivers/net/xen-netback/xenbus.c | 12 1 file changed, 4

Re: [PATCH] xen/netfront: destroy queues before real_num_tx_queues is zeroed

2022-02-21 Thread Marek Marczykowski-Górecki
stroy_queues()? Tried that and no issues spotted. > In case your test with the added ASSERT_RTNL() doesn't show any > problem you can add my: > > Reviewed-by: Juergen Gross Thanks. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

[PATCH 2/2] Revert "xen-netback: Check for hotplug-status existence before watching"

2022-02-20 Thread Marek Marczykowski-Górecki
Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- I believe this is the same issue as discussed at https://lore.kernel.org/xen-devel/20220113111946.ga4133...@dingwall.me.uk/ Cc: James Dingwall --- drivers/net/xen-netback/xenbus.c | 12 1 file changed, 4

[PATCH 1/2] Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"

2022-02-20 Thread Marek Marczykowski-Górecki
is wrong and leads to not configured interface. More discussion at https://lore.kernel.org/xen-devel/afedd7cb-a291-e773-8b0d-4db9b291f...@ipxe.org/T/#u Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- Cc: Michael Brown --- drivers/net/xen-netback/xenbus.c | 2 +- 1 file

[PATCH] xen/netfront: destroy queues before real_num_tx_queues is zeroed

2022-02-20 Thread Marek Marczykowski-Górecki
c: sta...@vger.kernel.org # 5.16+ Signed-off-by: Marek Marczykowski-Górecki --- While this fixes the issue, I'm not sure if that is the correct thing to do. xennet_remove() calls xennet_destroy_queues() under rtnl_lock, which may be important here? Just moving xennet_destroy_queues() before unregister

Re: [XEN PATCH 6/7] xenstored: do_introduce: handle the late_init case

2022-01-07 Thread Marek Marczykowski-Górecki
t; CC: w...@xen.org > CC: Anthony PERARD > CC: Juergen Gross > CC: jul...@xen.org > --- > tools/xenstore/xenstored_domain.c | 15 ++- Isn't the same necessary in oxenstored too? Otherwise, I think it needs some explicit documentation, that late PV with dom0less requir

Re: [XEN PATCH 3/7] tools: add a late_init argument to xs_introduce_domain

2022-01-07 Thread Marek Marczykowski-Górecki
it doesn't change > behaviors. > > Signed-off-by: Luca Miccio > Signed-off-by: Stefano Stabellini I realize there is not much sense in making the parameter usable in the Python API, since it's only useful for xenstored. So, for the Python part: Acked-by: Marek Marczykowski-Gór

Re: Live update of Xenstore-stubdom

2022-01-06 Thread Marek Marczykowski-Górecki
r should I go with a > file based approach (and if yes, 9pfs or pvcalls based)? Personally, I'd go with memory, as IMHO it the cleanest design from disaggregation point of view (what was in stubomain, remains in stubdomain, no extra external interface necessary). -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: [PATCH 59.5/65] x86: Introduce helpers/checks for endbr64 instructions

2021-11-26 Thread Marek Marczykowski-Górecki
ll-addrs join -v 2 <(sort valid-addrs) <(sort all-addrs) | awk '{ printf "%x\n", 0x'$offset' + strtonum("0x" $1)}' | addr2line -e xen-syms Currently it finds just one match: xen/arch/x86/alternative.c:145 -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: [PATCH for-4.16 4/4] tools/python: fix python libxc bindings to pass a max grant version

2021-11-17 Thread Marek Marczykowski-Górecki
('gnttab: allow setting max version per-domain') > Signed-off-by: Roger Pau Monné Acked-by: Marek Marczykowski-Górecki > --- > Cc: Ian Jackson > > Without this fix the python bindings won't be usable, as they will > attempt to pass a max version of 0 which will be refused by the

Re: [PATCH v4] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-11-04 Thread Marek Marczykowski-Górecki
still wonder why it wasn't an issue before, although it could just be a race that was less likely to loose before. You can find some analysis of mine here: https://lore.kernel.org/xen-devel/YXFxKC4shCATB913@mail-itl/ -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature

[PATCH-4.16 v2] x86/xstate: reset cached register values on resume

2021-11-03 Thread Marek Marczykowski-Górecki
the cache with appropriate value - get_msr_xss() is not used anywhere - and thus not before any set_msr_xss() that will fill the cache Fixes: aca2a985a55a "xen: don't free percpu areas during suspend" Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jan Beulich --- Changes in v2: -

Re: Ping: [PATCH] x86/xstate: reset cached register values on resume

2021-11-01 Thread Marek Marczykowski-Górecki
On Thu, Oct 21, 2021 at 03:44:27PM +0200, Roger Pau Monné wrote: > On Mon, Oct 18, 2021 at 10:21:28AM +0200, Jan Beulich wrote: > > On 24.08.2021 23:11, Andrew Cooper wrote: > > > On 18/08/2021 13:44, Andrew Cooper wrote: > > >> On 18/08/2021 12:30, Ma

Re: [PATCH v3] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-29 Thread Marek Marczykowski-Górecki
if (balloon_state == BP_DONE && n_pages != -credit && n_pages < totalreserve_pages) balloon_state = BP_EAGAIN; It would be bad to finish waiting in this case. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: [PATCH] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-29 Thread Marek Marczykowski-Górecki
On Fri, Oct 29, 2021 at 12:22:18PM +0200, Juergen Gross wrote: > On 29.10.21 11:57, Marek Marczykowski-Górecki wrote: > > On Fri, Oct 29, 2021 at 06:48:44AM +0200, Juergen Gross wrote: > > > On 28.10.21 22:16, Marek Marczykowski-Górecki wrote: > > > > On Thu, Oc

Re: [PATCH] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-29 Thread Marek Marczykowski-Górecki
On Fri, Oct 29, 2021 at 06:48:44AM +0200, Juergen Gross wrote: > On 28.10.21 22:16, Marek Marczykowski-Górecki wrote: > > On Thu, Oct 28, 2021 at 12:59:52PM +0200, Juergen Gross wrote: > > > When running as PVH or HVM guest with actual memory < max memory the > > >

Re: [PATCH] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-28 Thread Marek Marczykowski-Górecki
tarted, which can consume lots of memory. > > In order to avoid random boot crashes in such cases, add a late init > call to wait for ballooning down having finished for PVH/HVM guests. > > Cc: > Reported-by: Marek Marczykowski-Górecki > Signed-off-by: Juergen Gross It may happen that i

Re: Tentative fix for "out of PoD memory" issue

2021-10-21 Thread Marek Marczykowski-Górecki
wait for initial balloon down before starting userspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Organization: Invisible Things Lab Cc: Marek Marczykowski-Górecki When HVM/PVH guest with maxmem > memory, a populate on demand feature is used. Thi

Re: [Xen-devel] Xen crash after S3 suspend - Xen 4.13 and newer

2021-10-09 Thread Marek Marczykowski-Górecki
On Sun, Jan 31, 2021 at 03:15:30AM +0100, Marek Marczykowski-Górecki wrote: > On Tue, Sep 29, 2020 at 05:27:48PM +0200, Jürgen Groß wrote: > > On 29.09.20 17:16, Marek Marczykowski-Górecki wrote: > > > On Tue, Sep 29, 2020 at 05:07:11PM +0200, Jürgen Groß wrote: > > >

Re: xen-balloon thread using 100% of CPU, regression in 5.4.150

2021-10-05 Thread Marek Marczykowski-Górecki
On Tue, Oct 05, 2021 at 10:05:39AM +0200, Juergen Gross wrote: > On 04.10.21 11:14, Marek Marczykowski-Górecki wrote: > > On Mon, Oct 04, 2021 at 07:31:40AM +0200, Juergen Gross wrote: > > > On 03.10.21 06:47, Marek Marczykowski-Górecki wrote: > > > > Hi, > > &g

Re: xen-balloon thread using 100% of CPU, regression in 5.4.150

2021-10-04 Thread Marek Marczykowski-Górecki
On Mon, Oct 04, 2021 at 07:31:40AM +0200, Juergen Gross wrote: > On 03.10.21 06:47, Marek Marczykowski-Górecki wrote: > > Hi, > > > > After updating a PVH domU to 5.4.150, I see xen-balloon thread using > > 100% CPU (one thread). > > This is a domain started

xen-balloon thread using 100% of CPU, regression in 5.4.150

2021-10-02 Thread Marek Marczykowski-Górecki
ink Xen version matters here much. I have _not_ managed to reproduce the issue on 5.10.70, nor 5.14.9. In both cases, just after starting the domain, I see current_kb=target_kb=716412. And writing 716924 to target_kb manually does not cause xen-balloon thread to spin. -- Best Regards, Mar

Re: Xen Rust VirtIO demos work breakdown for Project Stratos

2021-09-24 Thread Marek Marczykowski-Górecki
on various VirtIO on Xen approaches (since there is more than one) in a single place, including: - key characteristics, differences - who is involved - status - links to relevant threads, maybe I'd propose to revive https://wiki.xenproject.org/wiki/Virtio_On_Xen -- Best Regards, Marek Marczykowski-Gó

Re: [PATCH v2] x86/setup: call early_reserve_memory() earlier

2021-09-20 Thread Marek Marczykowski-Górecki
to avoid such problems. > > Cc: sta...@vger.kernel.org > Fixes: a799c2bd29d19c565 ("x86/setup: Consolidate early memory reservations") > Reported-by: Marek Marczykowski-Górecki > Signed-off-by: Juergen Gross I confirm this fixes my boot issue too. Tested-by: Marek Marczykowsk

Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-14 Thread Marek Marczykowski-Górecki
On Tue, Sep 14, 2021 at 10:39:10AM +0200, Jan Beulich wrote: > On 14.09.2021 09:14, Juergen Gross wrote: > > On 13.09.21 14:50, Marek Marczykowski-Górecki wrote: > >> Hi, > >> > >> Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the > &

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-14 Thread Marek Marczykowski-Górecki
to avoid such problems. > > Cc: sta...@vger.kernel.org > Fixes: a799c2bd29d19c565 ("x86/setup: Consolidate early memory reservations") > Reported-by: Marek Marczykowski-Górecki > Signed-off-by: Juergen Gross Thanks, it works! Tested-by: Marek Marczykowski-Górecki > --- > arc

Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-13 Thread Marek Marczykowski-Górecki
Link: [1] https://lore.kernel.org/lkml/20201217201214.3414100-2-g...@fb.com Link: https://lkml.kernel.org/r/20210302100406.22059-2-r...@kernel.org Since this seems to affect Xen boot only, I'm copying xen-devel too. Any ideas? -- Best Regards, Marek Marczykowski-Górecki Invisible Thin

Re: [PATCH v2 0/4] xen: harden netfront against malicious backends

2021-09-10 Thread Marek Marczykowski-Górecki
On Tue, Aug 24, 2021 at 05:33:10PM +0200, Jan Beulich wrote: > On 24.08.2021 12:28, Juergen Gross wrote: > > It should be mentioned that a similar series has been posted some years > > ago by Marek Marczykowski-Górecki, but this series has not been applied > > due to a Xen h

Re: [PATCH v3 2/3] xen/blkfront: don't take local copy of a request from the ring page

2021-09-10 Thread Marek Marczykowski-Górecki
req; > + *final_extra_ring_req = *extra_ring_req; > > if (new_persistent_gnts) > gnttab_free_grant_references(setup.gref_head); > -- > 2.26.2 > > -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: HVM guest only bring up a single vCPU

2021-08-26 Thread Marek Marczykowski-Górecki
result will skip all the CPUs. The value is retrieve from a CPUID > leaf. So it sounds like we don't set the leaft correctly. > > FWIW, I have also tried on Xen 4.11 and could spot the same issue. Does this > ring any bell to you? Is it maybe this: https://lore.kernel.org/xen-devel/20201106003529.391649-1-bmas...@redhat.com/T/#u ? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

[PATCH v2] PCI/MSI: Skip masking MSI-X on Xen PV

2021-08-26 Thread Marek Marczykowski-Górecki
I/MSI: Mask all unused MSI-X entries") Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- Cc: xen-devel@lists.xenproject.org Changes in v2: - update commit message (MSI -> MSI-X) --- drivers/pci/msi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/

Re: [PATCH] PCI/MSI: skip masking MSI on Xen PV

2021-08-26 Thread Marek Marczykowski-Górecki
t MSI, so > please update the subject line and the "masking MSI" below to reflect > that. Sure, thanks for pointing this out. Is the patch otherwise ok? Should I post v2 with just updated commit message? > On Thu, Aug 26, 2021 at 03:43:37PM +0200, Marek Marczykowski-Górecki wrote: &

[PATCH] PCI/MSI: skip masking MSI on Xen PV

2021-08-26 Thread Marek Marczykowski-Górecki
I: Mask all unused MSI-X entries") Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- Cc: xen-devel@lists.xenproject.org --- drivers/pci/msi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e5e75331b415..3a9f4f8ad8f9 1006

Re: Kernel panic in __pci_enable_msix_range on Xen PV with PCI passthrough

2021-08-25 Thread Marek Marczykowski-Górecki
On Wed, Aug 25, 2021 at 05:55:09PM +0200, Jan Beulich wrote: > On 25.08.2021 17:47, Marek Marczykowski-Górecki wrote: > > If so, I guess the issue is the kernel trying to write directly, instead > > of via some hypercall, right? > > Indeed. Or to be precise - the

Re: Kernel panic in __pci_enable_msix_range on Xen PV with PCI passthrough

2021-08-25 Thread Marek Marczykowski-Górecki
On Wed, Aug 25, 2021 at 05:33:54PM +0200, Jan Beulich wrote: > On 25.08.2021 17:24, Marek Marczykowski-Górecki wrote: > > On recent kernel I get kernel panic when starting a Xen PV domain with > > PCI devices assigned. This happens on 5.10.60 (worked on .54) and > > 5.

Kernel panic in __pci_enable_msix_range on Xen PV with PCI passthrough

2021-08-25 Thread Marek Marczykowski-Górecki
ab9fc06f399f Author: Thomas Gleixner Date: Thu Jul 29 23:51:41 2021 +0200 PCI/MSI: Mask all unused MSI-X entries I can reliably reproduce it on Xen 4.14 and Xen 4.8, so I don't think Xen version matters here. Any idea how to fix it? -- Best Regards, Marek Marczykowski-Górecki Invisibl

[PATCH v3 2/2] ns16550: add Exar PCIe UART cards support

2021-08-19 Thread Marek Marczykowski-Górecki
or working 115200bps at the very least. The specification for the 2-port card is available at: https://www.maxlinear.com/product/interface/uarts/pcie-uarts/xr17v352 Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - use read-modify-write for enabling ECB - handle also 4- and 8-p

[PATCH v3 1/2] ns16550: specify uart param for ns_{read,write}_reg as const

2021-08-19 Thread Marek Marczykowski-Górecki
They don't modify it, after all. Signed-off-by: Marek Marczykowski-Górecki --- New in v3. There was "ns16550: do not override fifo size if explicitly set" here before, but it's already committed. --- xen/drivers/char/ns16550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [PATCH v2 2/2] ns16550: add Exar PCIe UART cards support

2021-08-19 Thread Marek Marczykowski-Górecki
On Thu, Aug 19, 2021 at 06:01:31PM +0200, Marek Marczykowski-Górecki wrote: > On Thu, Aug 19, 2021 at 05:57:21PM +0200, Jan Beulich wrote: > > On 18.08.2021 14:16, Marek Marczykowski-Górecki wrote: > > > @@ -169,6 +172,29 @@ static void handle_dw_usr_busy_quirk(struct ns

Re: [PATCH v2 2/2] ns16550: add Exar PCIe UART cards support

2021-08-19 Thread Marek Marczykowski-Górecki
On Thu, Aug 19, 2021 at 05:57:21PM +0200, Jan Beulich wrote: > On 18.08.2021 14:16, Marek Marczykowski-Górecki wrote: > > @@ -169,6 +172,29 @@ static void handle_dw_usr_busy_quirk(struct ns16550 > > *uart) > > } > > } > > > > +static void enable_

Re: [PATCH] x86/xstate: reset cached register values on resume

2021-08-19 Thread Marek Marczykowski-Górecki
On Wed, Aug 18, 2021 at 01:44:31PM +0100, Andrew Cooper wrote: > On 18/08/2021 12:30, Marek Marczykowski-Górecki wrote: > > set_xcr0() and set_msr_xss() use cached value to avoid setting the > > register to the same value over and over. But suspend/resume implicitly > >

[PATCH v2 2/2] ns16550: add Exar PCIe UART cards support

2021-08-18 Thread Marek Marczykowski-Górecki
or working 115200bps at the very least. The specification for the 2-port card is available at: https://www.maxlinear.com/product/interface/uarts/pcie-uarts/xr17v352 Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - use read-modify-write for enabling ECB - handle also 4- and 8-p

[PATCH v2 1/2] ns16550: do not override fifo size if explicitly set

2021-08-18 Thread Marek Marczykowski-Górecki
If fifo size is already set via uart_params, do not force it to 16 - which may not match the actual hardware. Specifically Exar cards have fifo of 256 bytes. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jan Beulich --- xen/drivers/char/ns16550.c | 3 ++- 1 file changed, 2 insertions

Re: [PATCH] x86/xstate: reset cached register values on resume

2021-08-18 Thread Marek Marczykowski-Górecki
On Wed, Aug 18, 2021 at 02:05:05PM +0200, Jan Beulich wrote: > On 18.08.2021 13:30, Marek Marczykowski-Górecki wrote: > > --- a/xen/arch/x86/xstate.c > > +++ b/xen/arch/x86/xstate.c > > @@ -642,6 +642,13 @@ void xstate_init(struct cpuinfo_x86 *c

[PATCH] x86/xstate: reset cached register values on resume

2021-08-18 Thread Marek Marczykowski-Górecki
the cache with appropriate value - get_msr_xss() is not used anywhere - and thus not before any set_msr_xss() that will fill the cache Fixes: aca2a985a55a "xen: don't free percpu areas during suspend" Signed-off-by: Marek Marczykowski-Górecki --- xen/arch/x86/xstate.c | 7 +++ 1 file

Re: [PATCH] RFC: Version support policy

2021-08-18 Thread Marek Marczykowski-Górecki
than my > suggested 6 year cutoff, so if this patch is applied to staging and > not applied retrospectively, they could be removed. > > I'm not sure if this policy should be here in README (where the > version support was until now) or in SUPPORT.md. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: S3 resume issue in cpufreq -> get_cpu_idle_time->vcpu_runstate_get

2021-08-18 Thread Marek Marczykowski-Górecki
On Wed, Aug 18, 2021 at 08:24:39AM +0200, Juergen Gross wrote: > Marek, > > On 17.08.21 17:15, Juergen Gross wrote: > > On 17.08.21 16:50, Marek Marczykowski-Górecki wrote: > > I'll be looking into that. > > Could you please try the attached patch? It works, thanks!

S3 resume issue in cpufreq -> get_cpu_idle_time->vcpu_runstate_get

2021-08-17 Thread Marek Marczykowski-Górecki
On Tue, Aug 17, 2021 at 04:04:24PM +0200, Jan Beulich wrote: > On 17.08.2021 15:48, Marek Marczykowski-Górecki wrote: > > On Tue, Aug 17, 2021 at 02:29:20PM +0100, Andrew Cooper wrote: > >> On 17/08/2021 14:21, Jan Beulich wrote: > >>> On 17.08.2021 15:06, Andrew C

<    1   2   3   4   5   6   7   8   9   10   >