[Xen-devel] [PATCH v6 3/6] libxl: don't try to manipulate json config for stubdomain

2019-09-14 Thread Marek Marczykowski-Górecki
Stubdomain do not have it's own config file - its configuration is derived from target domains. Do not try to manipulate it when attaching PCI device. This bug prevented starting HVM with stubdomain and PCI passthrough device attached. Signed-off-by: Marek Marczykowski-Górecki Acked-by: We

[Xen-devel] [PATCH v6 0/6] Fix PCI passthrough for HVM with stubdomain

2019-09-14 Thread Marek Marczykowski-Górecki
rge Dunlap Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Anthony PERARD Cc: "Roger Pau Monné" Cc: Suravee Suthikulpanit Cc: Brian Woods Cc: Kevin Tian Cc: Daniel De Graaf Marek Marczykowski-Górecki (6): libxl: do not attac

[Xen-devel] [PATCH v6 6/6] tools/libxc: add wrapper for PHYSDEVOP_interrupt_control

2019-09-14 Thread Marek Marczykowski-Górecki
Add libxc wrapper for PHYSDEVOP_interrupt_control introduced in previous commit. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - new patch Changes in v4: - adjust for updated previous patch Changes in v5: - rename to PHYSDEVOP_msi_control, adjust arguments Change in v6

[Xen-devel] [PATCH v6 5/6] xen/x86: add PHYSDEVOP_interrupt_control

2019-09-14 Thread Marek Marczykowski-Górecki
only for stubdomain controlling the domain which own the device. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - new patch Changes in v4: - adjust code style - s/msi_msix/msi/ - add msi_set_enable XSM hook - flatten struct physdev_msi_set_enable - add to include/xlat.lst Chang

[Xen-devel] [PATCH v6 1/6] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-09-14 Thread Marek Marczykowski-Górecki
it be stubdomain (the commit prevents attaching device to target HVM in this case); otherwise, attach it to the target domain. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- Changes in v2: - previously called "libxl: attach xen-pciback only to PV domains" - instead of exc

[Xen-devel] [PATCH v6 4/6] xen/x86: Allow stubdom access to irq created for msi.

2019-09-14 Thread Marek Marczykowski-Górecki
ff-by: Simon Gaiser Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - extend commit message Changes in v4: - add missing destroy_irq on error path Changes in v5: - move irq_{grant,revoke}_access() to {create,destroy}_irq(), which basically make it a different patch - add get_dm_d

[Xen-devel] [PATCH v6 2/6] libxl: attach PCI device to qemu only after setting pciback/pcifront

2019-09-14 Thread Marek Marczykowski-Górecki
When qemu is running in stubdomain, handling "pci-ins" command will fail if pcifront is not initialized already. Fix this by sending such command only after confirming that pciback/front is running. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- Changes in v2: -

Re: [Xen-devel] [PATCH v6 5/6] xen/x86: add PHYSDEVOP_interrupt_control

2019-09-20 Thread Marek Marczykowski-Górecki
On Fri, Sep 20, 2019 at 12:10:09PM +0200, Jan Beulich wrote: > On 14.09.2019 17:37, Marek Marczykowski-Górecki wrote: > > Allow device model running in stubdomain to enable/disable INTx/MSI(-X), > > bypassing pciback. While pciback is still used to access config space > > f

Re: [Xen-devel] [PATCH v6 5/6] xen/x86: add PHYSDEVOP_interrupt_control

2019-09-23 Thread Marek Marczykowski-Górecki
On Mon, Sep 23, 2019 at 09:58:27AM +0200, Jan Beulich wrote: > On 20.09.2019 18:02, Marek Marczykowski-Górecki wrote: > > On Fri, Sep 20, 2019 at 12:10:09PM +0200, Jan Beulich wrote: > >> On 14.09.2019 17:37, Marek Marczykowski-Górecki wrote: > >>> Allow device

Re: [Xen-devel] [PATCH v6 5/6] xen/x86: add PHYSDEVOP_interrupt_control

2019-09-23 Thread Marek Marczykowski-Górecki
On Mon, Sep 23, 2019 at 02:05:58PM +0200, Jan Beulich wrote: > On 23.09.2019 12:47, Marek Marczykowski-Górecki wrote: > > On Mon, Sep 23, 2019 at 09:58:27AM +0200, Jan Beulich wrote: > >> On 20.09.2019 18:02, Marek Marczykowski-Górecki wrote: > >>> Anyway, if you al

Re: [Xen-devel] [PATCH v6 5/6] xen/x86: add PHYSDEVOP_interrupt_control

2019-09-23 Thread Marek Marczykowski-Górecki
On Mon, Sep 23, 2019 at 03:02:49PM +0200, Jan Beulich wrote: > On 23.09.2019 14:25, Marek Marczykowski-Górecki wrote: > > What about this: HVM guest can already do all of this when qemu is > > running in dom0. So, allowing those actions when qemu is running in > > stubdomain

[Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain

2019-09-24 Thread Marek Marczykowski-Górecki
Cc: Tim Deegan Cc: Anthony PERARD Cc: "Roger Pau Monné" Cc: Suravee Suthikulpanit Cc: Brian Woods Cc: Kevin Tian Cc: Daniel De Graaf Marek Marczykowski-Górecki (4): libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use libxl: attach PCI device to qemu only af

[Xen-devel] [PATCH v7 3/4] libxl: don't try to manipulate json config for stubdomain

2019-09-24 Thread Marek Marczykowski-Górecki
Stubdomain do not have it's own config file - its configuration is derived from target domains. Do not try to manipulate it when attaching PCI device. This bug prevented starting HVM with stubdomain and PCI passthrough device attached. Signed-off-by: Marek Marczykowski-Górecki Acked-by: We

[Xen-devel] [PATCH v7 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-09-24 Thread Marek Marczykowski-Górecki
ff-by: Simon Gaiser Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - extend commit message Changes in v4: - add missing destroy_irq on error path Changes in v5: - move irq_{grant,revoke}_access() to {create,destroy}_irq(), which basically make it a different patch - add get_dm_d

[Xen-devel] [PATCH v7 1/4] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-09-24 Thread Marek Marczykowski-Górecki
it be stubdomain (the commit prevents attaching device to target HVM in this case); otherwise, attach it to the target domain. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- Changes in v2: - previously called "libxl: attach xen-pciback only to PV domains" - instead of exc

[Xen-devel] [PATCH v7 2/4] libxl: attach PCI device to qemu only after setting pciback/pcifront

2019-09-24 Thread Marek Marczykowski-Górecki
When qemu is running in stubdomain, handling "pci-ins" command will fail if pcifront is not initialized already. Fix this by sending such command only after confirming that pciback/front is running. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- Changes in v2: -

Re: [Xen-devel] [PATCH v7 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-09-25 Thread Marek Marczykowski-Górecki
that part, as discussed, doesn't need to be in Xen. For example the solution deployed in current Qubes stable version is based on pciback for this purpose. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is

[Xen-devel] [PATCH v7.1 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-09-25 Thread Marek Marczykowski-Górecki
stubdomain-msi-irq-access.patch by Eric Chanudet . Signed-off-by: Simon Gaiser Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Roger Pau Monné --- Changes in v3: - extend commit message Changes in v4: - add missing destroy_irq on error path Changes in v5: - move irq_{grant,revoke}_a

Re: [Xen-devel] [PATCH v7 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-09-25 Thread Marek Marczykowski-Górecki
On Wed, Sep 25, 2019 at 03:26:17PM +0200, Roger Pau Monné wrote: > On Wed, Sep 25, 2019 at 02:29:41PM +0200, Marek Marczykowski-Górecki wrote: > > On Wed, Sep 25, 2019 at 11:41:50AM +0200, Roger Pau Monné wrote: > > > It would still be nice to get the missing bits (interrupt e

[Xen-devel] VM_BUG_ON_PAGE(!PageOffline(page), page) in alloc_xenballooned_pages

2019-09-26 Thread Marek Marczykowski-Górecki
evtchn -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? signature.asc Description: PGP signature ___ Xen-devel maili

Re: [Xen-devel] VM_BUG_ON_PAGE(!PageOffline(page), page) in alloc_xenballooned_pages

2019-09-27 Thread Marek Marczykowski-Górecki
On Fri, Sep 27, 2019 at 09:44:35AM +0200, David Hildenbrand wrote: > On 26.09.19 23:34, Marek Marczykowski-Górecki wrote: > > Hi, > > > > I've hit VM_BUG_ON_PAGE(!PageOffline(page), page) in > > alloc_xenballooned_pages, when trying to use gnttab from userspace &g

Re: [Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain

2019-09-28 Thread Marek Marczykowski-Górecki
On Fri, Sep 27, 2019 at 03:36:08PM +0100, Wei Liu wrote: > On Fri, Sep 27, 2019 at 04:21:55PM +0200, Jan Beulich wrote: > > > > > > Marek Marczykowski-Górecki (4): > > > libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use > > > libx

[Xen-devel] [PATCH v8 4/4] libxl: don't try to manipulate json config for stubdomain

2019-09-28 Thread Marek Marczykowski-Górecki
Stubdomain do not have it's own config file - its configuration is derived from target domains. Do not try to manipulate it when attaching PCI device. This bug prevented starting HVM with stubdomain and PCI passthrough device attached. Signed-off-by: Marek Marczykowski-Górecki Acked-by: We

[Xen-devel] [PATCH v8 2/4] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-09-28 Thread Marek Marczykowski-Górecki
it be stubdomain (the commit prevents attaching device to target HVM in this case); otherwise, attach it to the target domain. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- Changes in v2: - previously called "libxl: attach xen-pciback only to PV domains" - instead of exc

[Xen-devel] [PATCH v8 3/4] libxl: attach PCI device to qemu only after setting pciback/pcifront

2019-09-28 Thread Marek Marczykowski-Górecki
When qemu is running in stubdomain, handling "pci-ins" command will fail if pcifront is not initialized already. Fix this by sending such command only after confirming that pciback/front is running. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - Fixed code style sinc

[Xen-devel] [PATCH v8 0/4] Fix PCI passthrough for HVM with stubdomain

2019-09-28 Thread Marek Marczykowski-Górecki
quot;Roger Pau Monné" Cc: Suravee Suthikulpanit Cc: Brian Woods Cc: Kevin Tian Cc: Daniel De Graaf Marek Marczykowski-Górecki (4): libxl: fix cold plugged PCI device with stubdomain libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use libxl: attach PCI device to

[Xen-devel] [PATCH v8 1/4] libxl: fix cold plugged PCI device with stubdomain

2019-09-28 Thread Marek Marczykowski-Górecki
and stubdomain. Fix this by resetting (local) 'starting' to false in pci_add_dm_done() (previously part of do_pci_add()) when handling stubdomain, regardless of pas->starting value. Fixes: 11db56f9a6 (libxl_pci: Use libxl__ao_device with libxl__device_pci_add) Signed-off-by: Marek Marcz

Re: [Xen-devel] [PATCH v7 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-09-28 Thread Marek Marczykowski-Górecki
On Thu, Sep 26, 2019 at 09:10:17AM +0200, Roger Pau Monné wrote: > On Thu, Sep 26, 2019 at 06:16:06AM +0200, Marek Marczykowski-Górecki wrote: > > On Wed, Sep 25, 2019 at 03:26:17PM +0200, Roger Pau Monné wrote: > > > On Wed, Sep 25, 2019 at 02:29:41PM +0200, Marek Ma

Re: [Xen-devel] [PATCH v7 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-09-29 Thread Marek Marczykowski-Górecki
On Sun, Sep 29, 2019 at 03:35:57AM +0200, Marek Marczykowski-Górecki wrote: > On Thu, Sep 26, 2019 at 09:10:17AM +0200, Roger Pau Monné wrote: > > On Thu, Sep 26, 2019 at 06:16:06AM +0200, Marek Marczykowski-Górecki wrote: > > > On Wed, Sep 25, 2019 at 03:26:17PM +0200, Rog

[Xen-devel] {xen, dom0}_vga_console_info.u.vesa_lfb.lfb_base field too small

2019-05-05 Thread Marek Marczykowski-Górecki
LFB64?). But I'm not sure how non-patched Linux (or other supported OSes) would respond to this. xen_init_vga() in Linux doesn't seem to bail on unknown video_type, so it may be fragile. Any better ideas? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it mess

[Xen-devel] [PATCH 2/5] drivers/video: drop unused limits

2019-05-06 Thread Marek Marczykowski-Górecki
MAX_BPP, MAX_FONT_W, MAX_FONT_H are not used in the code at all. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/video/lfb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/drivers/video/lfb.c b/xen/drivers/video/lfb.c index d0c8c49..0475a68 100644 --- a/xen/drivers/video

[Xen-devel] [PATCH 3/5] drivers/video: Drop framebuffer size constraints

2019-05-06 Thread Marek Marczykowski-Górecki
console on device with 3840x2160 native resolution. Signed-off-by: Marek Marczykowski-Górecki --- Cc: Olaf Hering --- xen/drivers/video/lfb.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/xen/drivers/video/lfb.c b/xen/drivers/video/lfb.c index 0475a68..5022195 100644 --- a/xen/dri

[Xen-devel] [PATCH 1/5] xen/bitmap: fix bitmap_fill with zero-sized bitmap

2019-05-06 Thread Marek Marczykowski-Górecki
When bitmap_fill(..., 0) is called, do not try to write anything. Before this patch, it tried to write almost LONG_MAX, surely overwriting something. Signed-off-by: Marek Marczykowski-Górecki --- Found while debugging framebuffer located above 4GB. In that case 32bit variable for it overflows

[Xen-devel] [PATCH 4/5] xen: fix handling framebuffer located above 4GB

2019-05-06 Thread Marek Marczykowski-Górecki
Marek Marczykowski-Górecki --- xen/arch/x86/efi/efi-boot.h | 1 + xen/drivers/video/vesa.c| 15 +++ xen/include/public/xen.h| 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 5789d2c..7a13a30 100644 ---

[Xen-devel] [PATCH 0/5] Fixes for large framebuffer, placed above 4GB

2019-05-06 Thread Marek Marczykowski-Górecki
cc: Olaf Hering Marek Marczykowski-Górecki (5): xen/bitmap: fix bitmap_fill with zero-sized bitmap drivers/video: drop unused limits drivers/video: Drop framebuffer size constraints xen: fix handling framebuffer located above 4GB drivers/video: use vlfb_info consistently xen/arch/x86

[Xen-devel] [PATCH 5/5] drivers/video: use vlfb_info consistently

2019-05-06 Thread Marek Marczykowski-Górecki
vlfb_info is an alias for vga_console_info.u.vesa_lfb, so this change is purely cosmetic. But using the same name helps reading the code. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/video/vesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/video

Re: [Xen-devel] [PATCH 4/5] xen: fix handling framebuffer located above 4GB

2019-05-06 Thread Marek Marczykowski-Górecki
On Mon, May 06, 2019 at 05:15:19PM +0200, Juergen Gross wrote: > On 06/05/2019 16:50, Marek Marczykowski-Górecki wrote: > > diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h > > index ccdffc0..b0f0f7e 100644 > > --- a/xen/include/public/xen.h > > +++

[Xen-devel] [PATCH v2 1/5] xen/bitmap: fix bitmap_fill with zero-sized bitmap

2019-05-09 Thread Marek Marczykowski-Górecki
When bitmap_fill(..., 0) is called, do not try to write anything. Before this patch, it tried to write almost LONG_MAX, surely overwriting something. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/include/xen/bitmap.h | 2 ++ 1 file

[Xen-devel] [PATCH v2 2/5] drivers/video: drop unused limits

2019-05-09 Thread Marek Marczykowski-Górecki
MAX_BPP, MAX_FONT_W, MAX_FONT_H are not used in the code at all. Signed-off-by: Marek Marczykowski-Górecki Suggested-by: Jan Beulich Acked-by: Andrew Cooper --- xen/drivers/video/lfb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/drivers/video/lfb.c b/xen/drivers/video/lfb.c

[Xen-devel] [PATCH v2 5/5] drivers/video: use vlfb_info consistently

2019-05-09 Thread Marek Marczykowski-Górecki
vlfb_info is an alias for vga_console_info.u.vesa_lfb, so this change is purely cosmetic. But using the same name helps reading the code. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Andrew Cooper --- xen/drivers/video/vesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Xen-devel] [PATCH v2 3/5] drivers/video: Drop framebuffer size constraints

2019-05-09 Thread Marek Marczykowski-Górecki
console on device with 3840x2160 native resolution. Signed-off-by: Marek Marczykowski-Górecki Suggested-by: Jan Beulich Acked-by: Andrew Cooper --- Cc: Olaf Hering --- xen/drivers/video/lfb.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/xen/drivers/video/lfb.c b/xen/drivers/v

[Xen-devel] [PATCH v2 0/5] Fixes for large framebuffer, placed above 4GB

2019-05-09 Thread Marek Marczykowski-Górecki
cc: Olaf Hering Marek Marczykowski-Górecki (5): xen/bitmap: fix bitmap_fill with zero-sized bitmap drivers/video: drop unused limits drivers/video: Drop framebuffer size constraints xen: fix handling framebuffer located above 4GB drivers/video: use vlfb_info consistently xen/arch/x86

[Xen-devel] [PATCH v2 4/5] xen: fix handling framebuffer located above 4GB

2019-05-09 Thread Marek Marczykowski-Górecki
Marek Marczykowski-Górecki --- Changes in v2: - guard ext_lfb_base with #if __XEN_INTERFACE_VERSION__, but always include whe building Xen itself - add a helper function for lfb_base --- xen/arch/x86/efi/efi-boot.h | 1 + xen/drivers/video/vesa.c| 13 + xen/include/public/xen.h

Re: [Xen-devel] Anyone using blktap2?

2019-05-13 Thread Marek Marczykowski-Górecki
On Mon, May 13, 2019 at 04:34:14PM +0100, Wei Liu wrote: > Hello > > Seeing that you were the last people who changed blktap2 in a meaningful > way: do you use it at all? > > I'm thinking about dropping it (again). Fine with me too. -- Best Regards, Marek Marczykowski-G

[Xen-devel] [PATCH v3 0/1] Fixes for large framebuffer, placed above 4GB

2019-05-16 Thread Marek Marczykowski-Górecki
an Jackson cc: Jan Beulich cc: Julien Grall cc: Konrad Rzeszutek Wilk cc: Stefano Stabellini cc: Tim Deegan cc: Wei Liu cc: Olaf Hering Marek Marczykowski-Górecki (1): xen: fix handling framebuffer located above 4GB xen/arch/x86/efi/efi-boot.h | 1 + xen/drivers/video/vesa.c

[Xen-devel] [PATCH v3 1/1] xen: fix handling framebuffer located above 4GB

2019-05-16 Thread Marek Marczykowski-Górecki
ublic interface and use __XEN_INTERFACE_VERSION__, bump __XEN_LATEST_INTERFACE_VERSION__. Note: if/when backporting this change to Xen <= 4.12, #if in xen.h needs to be extended with " || defined(__XEN__)". Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - guard ext

[Xen-devel] [PATCH v4] xen: fix handling framebuffer located above 4GB

2019-05-16 Thread Marek Marczykowski-Górecki
ublic interface and use __XEN_INTERFACE_VERSION__, bump __XEN_LATEST_INTERFACE_VERSION__. Note: if/when backporting this change to Xen <= 4.12, #if in xen.h needs to be extended with " || defined(__XEN__)". Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - guard ext

Re: [Xen-devel] [RFC PATCH v2 11/17] xenconsoled: add support for consoles using 'state' xenstore entry

2019-01-09 Thread Marek Marczykowski-Górecki
On Thu, Nov 01, 2018 at 05:21:39PM +, Ian Jackson wrote: > Marek Marczykowski-Górecki writes ("[RFC PATCH v2 11/17] xenconsoled: add > support for consoles using 'state' xenstore entry"): > > Add support for standard xenbus initialization protocol using '

[Xen-devel] [PATCH v2 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-01-15 Thread Marek Marczykowski-Górecki
-by: Marek Marczykowski-Górecki --- This is only one part of fixing MSI with QEMU in stubdomain. The other part is allowing stubdomain to actually enable MSI in PCI config space. QEMU does that through pcifront/back connected to the stubdomain (see hw/xen/xen_pt_msi.c:msi_msix_enable()), but pciback

[Xen-devel] [PATCH v2 3/4] libxl: don't try to manipulate json config for stubdomain

2019-01-15 Thread Marek Marczykowski-Górecki
Stubdomain do not have it's own config file - its configuration is derived from target domains. Do not try to manipulate it when attaching PCI device. This bug prevented starting HVM with stubdomain and PCI passthrough device attached. Signed-off-by: Marek Marczykowski-Górecki --- tools/

[Xen-devel] [PATCH v2 2/4] libxl: attach PCI device to qemu only after setting pciback/pcifront

2019-01-15 Thread Marek Marczykowski-Górecki
When qemu is running in stubdomain, handling "pci-ins" command will fail if pcifront is not initialized already. Fix this by sending such command only after confirming that pciback/front is running. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - Fixed code style sinc

[Xen-devel] [PATCH v2 1/4] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-01-15 Thread Marek Marczykowski-Górecki
to the stubdomain, effectively breaking PCI passthrough. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - previously called "libxl: attach xen-pciback only to PV domains" - instead of excluding all HVMs, change the condition to what actually matters here - check if stu

[Xen-devel] [PATCH v2 0/4] Fix PCI passthrough for HVM with stubdomain

2019-01-15 Thread Marek Marczykowski-Górecki
to irq created for msi" patch - applied review comments from v1 Marek Marczykowski-Górecki (3): libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use libxl: attach PCI device to qemu only after setting pciback/pcifront libxl: don't try to manipulate json config for

Re: [Xen-devel] [PATCH v2 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-01-16 Thread Marek Marczykowski-Górecki
On Wed, Jan 16, 2019 at 10:21:29AM +0100, Roger Pau Monné wrote: > On Tue, Jan 15, 2019 at 04:36:31PM +0100, Marek Marczykowski-Górecki wrote: > > From: Simon Gaiser > > > > Stubdomains need to be given sufficient privilege over the guest which it > > provides emu

Re: [Xen-devel] [PATCH v2 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-01-16 Thread Marek Marczykowski-Górecki
On Wed, Jan 16, 2019 at 01:20:04PM +0100, Roger Pau Monné wrote: > On Wed, Jan 16, 2019 at 11:52:18AM +0100, Marek Marczykowski-Górecki wrote: > > On Wed, Jan 16, 2019 at 10:21:29AM +0100, Roger Pau Monné wrote: > > > On Tue, Jan 15, 2019 at 04:36:31PM +0100, Marek Ma

Re: [Xen-devel] [PATCH v2 1/4] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-01-16 Thread Marek Marczykowski-Górecki
On Wed, Jan 16, 2019 at 05:47:19PM +0100, Roger Pau Monné wrote: > On Tue, Jan 15, 2019 at 04:36:28PM +0100, Marek Marczykowski-Górecki wrote: > > HVM domains use IOMMU and device model assistance for communicating with > > PCI devices, xen-pcifront/pciback is used only in PV do

Re: [Xen-devel] [PATCH v2 1/4] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-01-17 Thread Marek Marczykowski-Górecki
target domain. This also may be the reason why PCI devices are not included in stubdomain's config, but only do_pci_add() is called. It may be that in the past some more parts of the device setup was skipped this way. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because

Re: [Xen-devel] [PATCH v2 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-01-25 Thread Marek Marczykowski-Górecki
On Wed, Jan 16, 2019 at 11:52:21AM +0100, Marek Marczykowski-Górecki wrote: > On Wed, Jan 16, 2019 at 10:21:29AM +0100, Roger Pau Monné wrote: > > On Tue, Jan 15, 2019 at 04:36:31PM +0100, Marek Marczykowski-Górecki wrote: > > > From: Simon Gaiser > > > > &g

Re: [Xen-devel] [PATCH v2 4/4] xen/x86: Allow stubdom access to irq created for msi.

2019-01-25 Thread Marek Marczykowski-Górecki
On Fri, Jan 25, 2019 at 08:43:59PM +0100, Marek Marczykowski-Górecki wrote: > On Wed, Jan 16, 2019 at 11:52:21AM +0100, Marek Marczykowski-Górecki wrote: > > On Wed, Jan 16, 2019 at 10:21:29AM +0100, Roger Pau Monné wrote: > > > On Tue, Jan 15, 2019 at 04:36:31PM +0100, Marek Ma

Re: [Xen-devel] [PATCH v2 2/4] libxl: attach PCI device to qemu only after setting pciback/pcifront

2019-01-25 Thread Marek Marczykowski-Górecki
On Thu, Jan 17, 2019 at 11:29:59AM +0100, Roger Pau Monné wrote: > On Tue, Jan 15, 2019 at 04:36:29PM +0100, Marek Marczykowski-Górecki wrote: > > When qemu is running in stubdomain, handling "pci-ins" command will fail > > if pcifront is not initialized already. Fix thi

[Xen-devel] [PATCH v3 1/6] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use

2019-01-25 Thread Marek Marczykowski-Górecki
it be stubdomain (the commit prevents attaching device to target HVM in this case); otherwise, attach it to the target domain. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - previously called "libxl: attach xen-pciback only to PV domains" - instead of excluding all HVMs, chang

[Xen-devel] [PATCH v3 0/6] Fix PCI passthrough for HVM with stubdomain

2019-01-25 Thread Marek Marczykowski-Górecki
/18/msi-support/ Changes in v2: - new "xen/x86: Allow stubdom access to irq created for msi" patch - applied review comments from v1 Changes is v3: - apply suggestions by Roger - add PHYSDEVOP_msi_msix_set_enable Marek Marczykowski-Górecki (5): libxl: do not attach xen-pciback to

[Xen-devel] [PATCH v3 4/6] xen/x86: Allow stubdom access to irq created for msi.

2019-01-25 Thread Marek Marczykowski-Górecki
ed on https://github.com/OpenXT/xenclient-oe/blob/5e0e7304a5a3c75ef01240a1e3673665b2aaf05e/recipes-extended/xen/files/stubdomain-msi-irq-access.patch by Eric Chanudet . Signed-off-by: Simon Gaiser Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - extend commit message With this

[Xen-devel] [PATCH v3 5/6] xen/x86: add PHYSDEVOP_msi_msix_set_enable

2019-01-25 Thread Marek Marczykowski-Górecki
g the domain which own the device. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - new patch This is rather RFC. Any suggestions for shorter name? Also, I'm not sure if physdev_msi_msix_set_enable.flag is the best name/idea. Should it be plugged into XSM? Any suggestions h

[Xen-devel] [PATCH v3 3/6] libxl: don't try to manipulate json config for stubdomain

2019-01-25 Thread Marek Marczykowski-Górecki
Stubdomain do not have it's own config file - its configuration is derived from target domains. Do not try to manipulate it when attaching PCI device. This bug prevented starting HVM with stubdomain and PCI passthrough device attached. Signed-off-by: Marek Marczykowski-Górecki --- Changes

[Xen-devel] [PATCH v3 2/6] libxl: attach PCI device to qemu only after setting pciback/pcifront

2019-01-25 Thread Marek Marczykowski-Górecki
When qemu is running in stubdomain, handling "pci-ins" command will fail if pcifront is not initialized already. Fix this by sending such command only after confirming that pciback/front is running. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - Fixed code style sinc

[Xen-devel] [PATCH v3 6/6] tools/libxc: add wrapper for PHYSDEVOP_msi_msix_set_enable

2019-01-25 Thread Marek Marczykowski-Górecki
Add libxc wrapper for PHYSDEVOP_msi_msix_set_enable introduced in previous commit. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - new patch --- tools/libxc/include/xenctrl.h | 7 +++ tools/libxc/xc_physdev.c | 21 + 2 files changed, 28 insertions

Re: [Xen-devel] [PATCH v3 4/6] xen/x86: Allow stubdom access to irq created for msi.

2019-01-28 Thread Marek Marczykowski-Górecki
On Mon, Jan 28, 2019 at 02:50:00PM +, Wei Liu wrote: > On Sat, Jan 26, 2019 at 03:31:15AM +0100, Marek Marczykowski-Górecki wrote: > > From: Simon Gaiser > > > > Stubdomains need to be given sufficient privilege over the guest which it > > provides emulation for i

Re: [Xen-devel] [PATCH v3 3/6] libxl: don't try to manipulate json config for stubdomain

2019-01-28 Thread Marek Marczykowski-Górecki
On Mon, Jan 28, 2019 at 02:41:15PM +, Wei Liu wrote: > On Sat, Jan 26, 2019 at 03:31:14AM +0100, Marek Marczykowski-Górecki wrote: > > Stubdomain do not have it's own config file - its configuration is > > derived from target domains. Do not try to manipulate it when atta

[Xen-devel] [PATCH v3 13/17] libxl: use vchan for QMP access with Linux stubdomain, non-async version

2019-01-28 Thread Marek Marczykowski-Górecki
functions that are not async-compatible do need to call qmp commands (for example libxl_domain_unpause). Alternative to this patch, would be return error, breaking all such functions, and incrementally convert them to async API. Signed-off-by: Marek Marczykowski-Górecki --- Two TODOs here: - hand

[Xen-devel] [PATCH v3 05/17] libxl: Handle Linux stubdomain specific QEMU options.

2019-01-28 Thread Marek Marczykowski-Górecki
Shelton Simon: * fix disk path * fix cdrom path and "format" * pass downscript for network interfaces Signed-off-by: Simon Gaiser [drop Qubes-specific parts] Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - fix serial specified with serial=[ ... ] syntax - er

[Xen-devel] [PATCH v3 09/17] tools/libvchan: notify server when client is connected

2019-01-28 Thread Marek Marczykowski-Górecki
Marczykowski-Górecki --- I had this patch in Qubes for a long time and totally forgot it wasn't upstream thing... --- tools/libvchan/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c index 180833d..50a64c1 100644 --- a/tools/lib

[Xen-devel] [PATCH v3 08/17] xl: add stubdomain related options to xl config parser

2019-01-28 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk --- docs/man/xl.cfg.5.pod.in | 23 +++ tools/xl/xl_parse.c | 7 +++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index

[Xen-devel] [PATCH v3 11/17] libxl: move xswait declaration up in libxl_internal.h

2019-01-28 Thread Marek Marczykowski-Górecki
It will be needed for qmp_ev_* over vchan. No functional change. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - new patch --- tools/libxl/libxl_internal.h | 108 ++-- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/tools/libxl

[Xen-devel] [PATCH v3 15/17] tools: add missing libxenvchan cflags

2019-01-28 Thread Marek Marczykowski-Górecki
libxenvchan.h include xenevtchn.h and xengnttab.h, so applications built with it needs applicable -I in CFLAGS too. Signed-off-by: Marek Marczykowski-Górecki --- tools/Rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 12b3129

[Xen-devel] [PATCH v3 14/17] libxl: add save/restore support for qemu-xen in stubdomain

2019-01-28 Thread Marek Marczykowski-Górecki
Rely on a wrapper script in stubdomain to attach FD 3/4 of qemu to relevant consoles. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - adjust for qmp_ev* - assume specific fdset id in qemu set in stubdomain --- tools/libxl/libxl_dm.c | 23 +++ tools/libxl

[Xen-devel] [PATCH v3 03/17] libxl: fix qemu-trad cmdline for no sdl/vnc case

2019-01-28 Thread Marek Marczykowski-Górecki
-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Acked-by: Ian Jackson Acked-by: Wei Liu --- Changes in v2: - typo in qemu option Changes in v3: - add missing { } --- tools/libxl/libxl_dm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/libxl/libxl_dm

[Xen-devel] [PATCH v3 02/17] Document ioemu Linux stubdomain protocol

2019-01-28 Thread Marek Marczykowski-Górecki
Add documentation for upcoming Linux stubdomain for qemu-upstream. Signed-off-by: Marek Marczykowski-Górecki --- docs/misc/stubdom.txt | 50 - 1 file changed, 50 insertions(+) diff --git a/docs/misc/stubdom.txt b/docs/misc/stubdom.txt index 4c524f2

[Xen-devel] [PATCH v3 00/17] Add support for qemu-xen runnning in a Linux-based stubdomain.

2019-01-28 Thread Marek Marczykowski-Górecki
r changes, see individual patches for full changes list - split xenconsoled patches into separate series Cc: Simon Gaiser Cc: Eric Shelton Cc: Ian Jackson Cc: Wei Liu Eric Shelton (1): libxl: Handle Linux stubdomain specific QEMU options. Marek Marczykowski-Górecki (16): Document ioemu MiniO

[Xen-devel] [PATCH v3 07/17] libxl: create vkb device only for guests with graphics output

2019-01-28 Thread Marek Marczykowski-Górecki
e can still add vkb device manually if needed. This is continuation of b053f0c4c9e533f3d97837cf897eb920b8355ed3 "libxl: do not start dom0 qemu for stubdomain when not needed". Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk --- tools/libxl/libxl_create.c | 10

[Xen-devel] [PATCH v3 10/17] libxl: typo fix in comment

2019-01-28 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- tools/libxl/libxl_qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index 42c8ab8..a235095 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -1452,7 +1452,7

[Xen-devel] [PATCH v3 01/17] Document ioemu MiniOS stubdomain protocol

2019-01-28 Thread Marek Marczykowski-Górecki
Add documentation based on reverse-engineered toolstack-ioemu stubdomain protocol. Signed-off-by: Marek Marczykowski-Górecki --- docs/misc/stubdom.txt | 53 - 1 file changed, 53 insertions(+) diff --git a/docs/misc/stubdom.txt b/docs/misc/stubdom.txt

[Xen-devel] [PATCH v3 06/17] libxl: write qemu arguments into separate xenstore keys

2019-01-28 Thread Marek Marczykowski-Górecki
This allows using arguments with spaces, like -append, without nominating any special "separator" character. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - previous version of this patch "libxl: use \x1b to separate qemu arguments for linux stubdomain&quo

[Xen-devel] [PATCH v3 12/17] libxl: use vchan for QMP access with Linux stubdomain, libxl__ev_qmp_* version

2019-01-28 Thread Marek Marczykowski-Górecki
y result from either delayed libxl__ev_qmp_send() call, or internal state change To avoid the above problems, use pipe to self to schedule vchan data processing, even if vchan would not issue notification itself. Signed-off-by: Marek Marczykowski-Górecki --- TODO: - handle locking for vchan access

[Xen-devel] [PATCH v3 16/17] libxl: add locking for libvchan QMP connection

2019-01-28 Thread Marek Marczykowski-Górecki
andle only one client at a time anyway, so this does not introduce artificial limit here. Signed-off-by: Marek Marczykowski-Górecki --- tools/libxl/libxl_internal.h | 1 +- tools/libxl/libxl_qmp.c | 58 +++-- 2 files changed, 56 insertions(+), 3 deletions(-)

[Xen-devel] [PATCH v3 17/17] libxl: require qemu in dom0 even if stubdomain is in use

2019-01-28 Thread Marek Marczykowski-Górecki
startup timeout. This is a temporary patch until xenconsoled will be improved. Signed-off-by: Marek Marczykowski-Górecki --- tools/libxl/libxl_dm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index ce65321..0fdc2f8 100644

[Xen-devel] [PATCH v3 04/17] libxl: Allow running qemu-xen in stubdomain

2019-01-28 Thread Marek Marczykowski-Górecki
-xen-traditional. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v3: - new patch, instead of "libxl: Add "stubdomain_version" to domain_build_info" - helper functions as suggested by Ian Jackson --- tools/libxl/libxl_create.c | 9 - tools/libxl/l

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-28 Thread Marek Marczykowski-Górecki
vma, vma->vm_start + i*PAGE_SIZE, > - map->pages[i]); > - if (err) > - goto out_put_map; > - } > + err = vm_map_pages(vma, map->pages, map->count); > + if (err

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-29 Thread Marek Marczykowski-Górecki
On Mon, Jul 29, 2019 at 02:02:54PM +0530, Souptick Joarder wrote: > On Mon, Jul 29, 2019 at 1:35 PM Souptick Joarder wrote: > > > > On Sun, Jul 28, 2019 at 11:36 PM Marek Marczykowski-Górecki > > wrote: > > > > > > On Fri, Feb 15, 2019 at 08:18:31AM +0530,

Re: [Xen-devel] [PATCH] xen: Avoid calling device suspend/resume callbacks

2019-07-30 Thread Marek Marczykowski-Górecki
> > So how do "all other vendors" deal with device specific state? So > far I was under the impression that to deal with this is precisely > why we use the S3 logic in the kernel. FWIW in Qubes we specifically S3 domUs with PCI devices assigned just before host S3 - to let the drive

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-30 Thread Marek Marczykowski-Górecki
On Tue, Jul 30, 2019 at 10:05:42AM -0400, Boris Ostrovsky wrote: > On 7/30/19 2:03 AM, Souptick Joarder wrote: > > On Mon, Jul 29, 2019 at 7:06 PM Marek Marczykowski-Górecki > > wrote: > >> On Mon, Jul 29, 2019 at 02:02:54PM +0530, Souptick Joarder wrote: > >>

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-30 Thread Marek Marczykowski-Górecki
On Tue, Jul 30, 2019 at 08:22:02PM +0530, Souptick Joarder wrote: > On Tue, Jul 30, 2019 at 7:52 PM Marek Marczykowski-Górecki > wrote: > > > > On Tue, Jul 30, 2019 at 10:05:42AM -0400, Boris Ostrovsky wrote: > > > On 7/30/19 2:03 AM, Souptick Joarder wrote: > >

Re: [Xen-devel] [PATCH v5 5/6] xen/x86: add PHYSDEVOP_msi_control

2019-08-05 Thread Marek Marczykowski-Górecki
. I'm trying to get it working and it isn't clear to me what should I check for "INTx is also enabled". I assumed PCI_COMMAND_INTX_DISABLE bit, but it looks like guest has no control over this bit, even in permissive mode. This means enabling MSI(-X) always fails because guest

Re: [Xen-devel] preparations for 4.12.1

2019-08-05 Thread Marek Marczykowski-Górecki
a couple of other things that I say in git log that might > warrant a backport, and for which I'm hoping I get replies quickly. I'd like to propose "video: fix handling framebuffer located above 4GB" 9cf11fdcd91ff8e9cd038f8336cf21f0701e8b7b (see commit message about a little

Re: [Xen-devel] [PATCH v2] python: Adjust xc_physinfo wrapper for updated virt_caps bits

2019-08-05 Thread Marek Marczykowski-Górecki
On Mon, Aug 05, 2019 at 03:56:30PM +0100, Ian Jackson wrote: > Ian Jackson writes ("Re: [PATCH v2] python: Adjust xc_physinfo wrapper for > updated virt_caps bits"): > > Marek Marczykowski-Górecki writes ("[PATCH v2] python: Adjust xc_physinfo > > w

Re: [Xen-devel] [PATCH v5 5/6] xen/x86: add PHYSDEVOP_msi_control

2019-08-06 Thread Marek Marczykowski-Górecki
On Tue, Aug 06, 2019 at 07:56:39AM +, Jan Beulich wrote: > On 05.08.2019 15:44, Marek Marczykowski-Górecki wrote: > > On Fri, Jul 19, 2019 at 09:43:26AM +, Jan Beulich wrote: > >> On 19.07.2019 11:02, Roger Pau Monné wrote: > >>> On Fri, Jul 19, 2019 at

Re: [Xen-devel] [PATCH v5 5/6] xen/x86: add PHYSDEVOP_msi_control

2019-08-06 Thread Marek Marczykowski-Górecki
On Tue, Aug 06, 2019 at 12:33:39PM +0200, Jan Beulich wrote: > On 06.08.2019 11:46, Marek Marczykowski-Górecki wrote: > > On Tue, Aug 06, 2019 at 07:56:39AM +, Jan Beulich wrote: > > > On 05.08.2019 15:44, Marek Marczykowski-Górecki wrote: > > > > On Fri, Ju

Re: [Xen-devel] [PATCH v5 5/6] xen/x86: add PHYSDEVOP_msi_control

2019-08-06 Thread Marek Marczykowski-Górecki
On Tue, Aug 06, 2019 at 02:05:48PM +0200, Jan Beulich wrote: > On 06.08.2019 12:53, Marek Marczykowski-Górecki wrote: > > On Tue, Aug 06, 2019 at 12:33:39PM +0200, Jan Beulich wrote: > > > On 06.08.2019 11:46, Marek Marczykowski-Górecki wrote: > > > > On Tue, Au

Re: [Xen-devel] Xen 4.12 panic on Thinkpad W540 with UEFI mutiboot2, efi=no-rs workarounds it

2019-08-07 Thread Marek Marczykowski-Górecki
On Wed, Aug 07, 2019 at 05:33:05PM +0200, Jan Beulich wrote: > On 07.08.2019 17:17, Marek Marczykowski-Górecki wrote: > > On Wed, Aug 07, 2019 at 04:45:43PM +0200, Jan Beulich wrote: > > > On 07.08.2019 15:26, Marek Marczykowski-Górecki wrote: > > > > Hi, > >

Re: [Xen-devel] Xen 4.12 panic on Thinkpad W540 with UEFI mutiboot2, efi=no-rs workarounds it

2019-08-07 Thread Marek Marczykowski-Górecki
On Wed, Aug 07, 2019 at 05:58:59PM +0200, Jan Beulich wrote: > On 07.08.2019 17:51, Marek Marczykowski-Górecki wrote: > > On Wed, Aug 07, 2019 at 05:33:05PM +0200, Jan Beulich wrote: > > > On 07.08.2019 17:17, Marek Marczykowski-Górecki wrote: > > > > Actually,

  1   2   3   4   5   6   7   8   9   10   >