[PATCH 2/2] Improve legacy vbios handling

2020-04-27 Thread Grzegorz Uriasz
Signed-off-by: Grzegorz Uriasz --- hw/xen/xen_pt.c | 8 +-- hw/xen/xen_pt_graphics.c | 48 +--- hw/xen/xen_pt_load_rom.c | 2 +- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index b91082cb8b

[PATCH 1/2] Fix undefined behaviour

2020-04-27 Thread Grzegorz Uriasz
Signed-off-by: Grzegorz Uriasz --- hw/xen/xen_pt_load_rom.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/xen/xen_pt_load_rom.c b/hw/xen/xen_pt_load_rom.c index a50a80837e..9f100dc159 100644 --- a/hw/xen/xen_pt_load_rom.c +++ b/hw/xen/xen_pt_load_rom.c

[PATCH 0/2] Fix QEMU crashes when passing IGD to a guest VM under XEN

2020-04-27 Thread Grzegorz Uriasz
different laptops and it works fine and the guest VMS finally stopped complaining that the VBIOS tables are missing. Grzegorz Uriasz (2): Fix undefined behaviour Improve legacy vbios handling hw/xen/xen_pt.c | 8 +-- hw/xen/xen_pt_graphics.c | 48 ++

[PATCH v2 1/2] Fix undefined behaviour

2020-04-28 Thread Grzegorz Uriasz
xt patch in the series introduces a better method for getting the vbios so qemu does not exit when pci_assign_dev_load_option_rom fails - this is the reason I've changed error_report to warn_report as whether a failure in pci_assign_dev_load_option_rom is fatal depends on the caller. Sig

[PATCH v2 2/2] Improve legacy vbios handling

2020-04-28 Thread Grzegorz Uriasz
i config space in the guest looks fine. Signed-off-by: Grzegorz Uriasz --- hw/xen/xen_pt.c | 8 +-- hw/xen/xen_pt_graphics.c | 48 +--- hw/xen/xen_pt_load_rom.c | 2 +- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/hw/xen/xen_p

[PATCH v2 0/2] Fix QEMU crashes when passing IGD to a guest VM under XEN

2020-04-28 Thread Grzegorz Uriasz
this approach is already being used to handle MSI. I've tested the new code on few different laptops and it works fine and the guest VMS finally stopped complaining that the VBIOS tables are missing. Grzegorz Uriasz (2): Fix undefined behaviour Improve legacy vbios handling hw/xen/xen_

[PATCH 0/1] Fix broken suspend on some machines

2020-06-14 Thread Grzegorz Uriasz
luded patch fixes the suspend feature on ASUS FX504GM and hopefully other laptops - Probably next week I will test this patch on my friend's laptop where this issue also occurs(suspend is broken, trashed kernel time after resume). Grzegorz Uriasz (1): x86/acpi: Use FADT flags to determine

[PATCH 1/1] x86/acpi: Use FADT flags to determine the PMTMR width

2020-06-14 Thread Grzegorz Uriasz
. Without this patch suspend is broken on affected machines and even if a machine manages to resume correctly then the kernel time and xen timers are trashed. Signed-off-by: Grzegorz Uriasz Tested-by: Grzegorz Uriasz --- xen/arch/x86/acpi/boot.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH] libxl: tooling expects wrong errno

2020-06-14 Thread Grzegorz Uriasz
ci devices to domains without iommu. Signed-off-by: Grzegorz Uriasz Tested-by: Grzegorz Uriasz --- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 957ff5c8e9..bc5843b137 100644 --- a/tools/libxl/l

[PATCH 1/3] tools/libxl: Grant VGA IO port permission for stubdom/target domain

2020-06-14 Thread Grzegorz Uriasz
for the necessary vga io ports. Signed-off-by: Grzegorz Uriasz --- tools/libxl/libxl_pci.c | 99 ++--- 1 file changed, 73 insertions(+), 26 deletions(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 957ff5c8e9..436190f790 100644 --- a

[PATCH 0/3] IGD Passthrough fixes for linux based stubdomains

2020-06-14 Thread Grzegorz Uriasz
were tested on a few laptops(together with the linked qemu patchset) and they work fine. Grzegorz Uriasz (3): tools/libxl: Grant VGA IO port permission for stubdom/target domain tools/libxl: Grant permission for mapping opregions to the target domain tools/libxl: Directly map VBIOS to stubd

[PATCH 2/3] tools/libxl: Grant permission for mapping opregions to the target domain

2020-06-14 Thread Grzegorz Uriasz
opregions in libxl instead of qemu. Granting permissions in qemu may be removed when this patch get's merged - for now linux based stubdomains which use IGD's need to patch qemu and include this patch in xen for IGD passthrough to work. Signed-off-by: Grzegorz Uriasz --- tools/libxl/libxl_

[PATCH 3/3] tools/libxl: Directly map VBIOS to stubdomain

2020-06-14 Thread Grzegorz Uriasz
-by: Grzegorz Uriasz --- tools/libxl/libxl_pci.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 48b1d8073b..9b9564dd73 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -2445,6 +2445,8 @@ static int

[PATCH] hw/xen_pt: Don't grant opregion permissions

2020-06-14 Thread Grzegorz Uriasz
ns to the stubdomain running qemu. This patch removes granting opregion permissions in qemu - this should be fine as when qemu is running inside dom0 the memory mapping will be successfully created without first explicitly granting the permission. Signed-off-by: Grzegorz Uriasz --- h

Re: [PATCH 1/1] x86/acpi: Use FADT flags to determine the PMTMR width

2020-06-16 Thread Grzegorz Uriasz
I'm wondering why support for 32 bit acpi pm timers was introduced to xen. Linux doesn't bother and just crops it to 24 bits: https://github.com/torvalds/linux/blob/a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55/drivers/clocksource/acpi_pm.c#L37 Best regards, Grzegorz Uriasz On 16/06/2020 16

Re: [PATCH 1/1] x86/acpi: Use FADT flags to determine the PMTMR width

2020-06-16 Thread Grzegorz Uriasz
I will submit the v2 patch today. Best Regards, Grzegorz On 16/06/2020 17:25, Roger Pau Monné wrote: > On Tue, Jun 16, 2020 at 05:11:58PM +0200, Jan Beulich wrote: >> On 16.06.2020 16:59, Roger Pau Monné wrote: >>> On Tue, Jun 16, 2020 at 03:25:42PM +0200, Jan Beulich wrote: --- unstable.ori

[PATCH v2 1/1] x86/acpi: Use FADT flags to determine the PMTMR width

2020-06-18 Thread Grzegorz Uriasz
. Without this patch suspend is broken on affected machines and even if a machine manages to resume correctly then the kernel time and xen timers are trashed. Signed-off-by: Grzegorz Uriasz --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: "Roger Pau Monné" Cc: marma...@invisiblethings

[PATCH v2 0/1] Fix broken suspend on some machines

2020-06-18 Thread Grzegorz Uriasz
dth is set when xpm block is not present - Cleanup timer initialization Grzegorz Uriasz (1): x86/acpi: Use FADT flags to determine the PMTMR width xen/arch/x86/acpi/boot.c| 8 ++-- xen/arch/x86/time.c | 15 +++ xen/include/acpi/acmacros.h | 8 3 files c

Re: [PATCH v2 1/1] x86/acpi: Use FADT flags to determine the PMTMR width

2020-06-19 Thread Grzegorz Uriasz
On 19/06/2020 15:17, Jan Beulich wrote: > On 19.06.2020 06:28, Grzegorz Uriasz wrote: >> --- a/xen/arch/x86/acpi/boot.c >> +++ b/xen/arch/x86/acpi/boot.c >> @@ -478,7 +478,9 @@ static int __init acpi_parse_fadt(struct >> acpi_table_header *table) >&g

[PATCH v3 0/1] Fix broken suspend on some machines

2020-06-19 Thread Grzegorz Uriasz
dth is set when xpm block is not present - Cleanup timer initialization Changes in v3: - Check pm timer bit offset - Warn about acpi firmware bugs - Drop int cast in init_pmtimer - Merge if's in init_pmtimer Grzegorz Uriasz (1): x86/acpi: Use FADT flags to determine the PMTMR width xe

[PATCH v3 1/1] x86/acpi: Use FADT flags to determine the PMTMR width

2020-06-19 Thread Grzegorz Uriasz
. Without this patch suspend is broken on affected machines and even if a machine manages to resume correctly then the kernel time and xen timers are trashed. Signed-off-by: Grzegorz Uriasz --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: "Roger Pau Monné" Cc: marma...@invisiblethings