Allow updating those two adjacent 32bit fields with one 64bit write.
This fixes qemu crash when booting Xen inside.
See discussion on Xen side of the thing here:
http://xen.markmail.org/message/6mrmemrnmhxvaxba
Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com>
-
On Wed, Jan 24, 2018 at 03:18:48PM +0100, Marek Marczykowski-Górecki wrote:
> Allow updating those two adjacent 32bit fields with one 64bit write.
> This fixes qemu crash when booting Xen inside.
>
> See discussion on Xen side of the thing here:
> http://xen.markmail.org/message/6
due to certain circumstances (i.e. on resume
> now)
> */
> vaddr_base = mmap(vaddr, size, PROT_READ | PROT_WRITE,
> - MAP_ANON | MAP_SHARED, -1, 0);
> + MAP_ANON | MAP_SHARED | (vaddr ? MAP_FIXED : 0),
> + -1, 0);
t can be worked around by enabling permissive mode. Jason, did
you had a chance to test it with any MSI-X device?
I'm not aware of anything thing particular that breaks MSI-X but not
MSI. Besides much less devices lying around to test MSI-X...
--
Best Regards,
Marek Marczykowski-Górecki
Invisible
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 Monné wrote:
> > > On Mon, Mar 11, 2019 at 02:02:15PM -0400, Jason A
the addr
argument is only a hint.
--
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
are needed at all.
Signed-off-by: Marek Marczykowski-Górecki
---
configure| 11 +++
crypto/Makefile.objs | 3 ++-
crypto/random-none.c | 38 ++
3 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 crypto/random-none.c
diff
a linux stubdomain?
> Can we truncate the "save file" which seems to be stubdomain's console 1?
No, truncate won't work on the stubdomain's console. I mean, the
operation won't fail, but the actual file connected to the console on
the other end won't get truncated. But I think in case o
nested_state->format needs to ne set appropriately for VMX/SVM,
otherwise KVM_SET_NESTED_STATE ioctl will fail.
Signed-off-by: Marek Marczykowski-Górecki
---
target/i386/kvm.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/target/i386/kvm.c b/target/i
initially here:
https://lore.kernel.org/xen-devel/20180216204031.5...@gmail.com/
Apparently this alone is already enough to get massive speedup.
Signed-off-by: Marek Marczykowski-Górecki
---
hw/i386/pc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386
On Tue, Nov 22, 2022 at 05:12:59PM +, Anthony PERARD wrote:
> On Mon, Nov 14, 2022 at 08:20:10PM +0100, Marek Marczykowski-Górecki wrote:
> > diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
> > index 0ec7e52183..269bd26109 100644
> > --- a/hw/xen/xen_pt.c
> > +++ b/hw
On Wed, Nov 16, 2022 at 02:15:22PM -0500, Jason Andryuk wrote:
> 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 Arr
On Thu, Nov 17, 2022 at 09:04:40AM +0100, Jan Beulich wrote:
> On 17.11.2022 04:34, Marek Marczykowski-Górecki wrote:
> > Ok, I found what is wrong. Enabling MSI-X is refused, because INTx isn't
> > disabled at this point yet. And apparently I was testing this with
&
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-Górecki
> > wrote:
> > >
> > > The /dev/mem is used f
fails if any of those
higher bits are set.
Fix this by initializing 'val' with zero.
Signed-off-by: Marek Marczykowski-Górecki
---
hw/xen/xen_pt_config_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index
xen_pt_*_reg_write()).
2. Not setting value early allows the hooks to see the old value too.
If it would be only about the first point, setting PCIDevice.wmask would
probably be sufficient, but given the second point, restructure those
writes.
Signed-off-by: Marek Marczykowski-Górecki
---
hw
is not necessary anymore.
Removing /dev/mem access is useful to work within stubdomain, and
necessary when dom0 kernel runs in lockdown mode.
Signed-off-by: Marek Marczykowski-Górecki
---
hw/xen/xen_pt.h | 1 -
hw/xen/xen_pt_msi.c | 51 -
2 files
On Mon, Nov 14, 2022 at 07:39:48PM +, Andrew Cooper wrote:
> On 14/11/2022 19:20, 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 firs
On Tue, Nov 15, 2022 at 09:14:07AM +0100, Jan Beulich wrote:
> On 14.11.2022 20:20, 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
, but its gcc is
otherwise perfectly capable of building firmwares in pc-bios/optionrom
dir. Make configure recognize this situation.
Keep requiring functional -lgcc in other places.
Signed-off-by: Marek Marczykowski-Górecki
---
configure | 10 +++---
1 file changed, 7 insertions(+), 3 deletions
, but its gcc is
otherwise perfectly capable of building firmwares in pc-bios/optionrom
dir. Make configure recognize this situation.
Keep requiring functional -lgcc in other places. Few more may not need
it, but I don't have an easy way to test.
Signed-off-by: Marek Marczykowski-Górecki
---
Changes
On Mon, Feb 19, 2024 at 07:16:06PM +0100, Marek Marczykowski-Górecki wrote:
> From: Frédéric Pierret (fepitre)
This shouldn't be here, it's my patch.
> When running in a stubdomain, the config space access via sysfs needs to
> use BDF as seen inside stubdomain (connected via xen
On Fri, Jun 18, 2021 at 09:54:14AM +0100, Alex Bennée wrote:
>
> Marek Marczykowski-Górecki writes:
>
> > Kernel on Xen is loaded via fw_cfg. Previously it used non-DMA version,
> > which loaded the kernel (and initramfs) byte by byte. Change this
> > to DM
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 accessing PCI config space need to be done
differently.
Signed-off-by: Marek Marczykowski-Górecki
---
hw/xen/xen-legacy
the in-stubdomain BDF by looking up relevant PV PCI xenstore
entries.
Signed-off-by: Marek Marczykowski-Górecki
---
hw/xen/xen-host-pci-device.c | 77 +++-
hw/xen/xen-host-pci-device.h | 6 +++
2 files changed, 82 insertions(+), 1 deletion(-)
diff --git a/hw/xen/xen
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 accessing PCI config space need to be done
differently.
Signed-off-by: Marek Marczykowski-Górecki
---
Changes in v2:
- use sigend
the in-stubdomain BDF by looking up relevant PV PCI xenstore
entries.
Signed-off-by: Marek Marczykowski-Górecki
---
Changes in v2:
- use 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
On Tue, Mar 26, 2024 at 05:06:50PM +, Anthony PERARD wrote:
> On Tue, Mar 05, 2024 at 08:12:29PM +0100, Marek Marczykowski-Górecki wrote:
> > diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
> > index 124dd5f3d6..6bd4e6eb2f 100644
> > --- a/hw/xen
This is minimal set of changes necessary to run Xen device model inside a
stubdomain and still support PCI passthrough.
Marek Marczykowski-Górecki (2):
hw/xen: detect when running inside stubdomain
xen: fix stubdom PCI addr
hw/i386/xen/xen-hvm.c| 22 +++-
hw/xen/xen-host-pci
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 accessing PCI config space need to be done
differently.
Signed-off-by: Marek Marczykowski-Górecki
---
Changes in v3:
- move
relevant PV PCI xenstore
entries.
Signed-off-by: Marek Marczykowski-Górecki
---
Changes in v3:
- reduce 'path' size
- add two missing error_setg() calls
- coding style
Changes in v2:
- use xs_node_scanf
- use %d instead of %u to read values written as %d
- add a comment from another iteration
another
register there). It should be no-op, but due to a bug in xen_pt code,
it broke MSI-X detection.
All those patches have been shipped in Qubes OS 4.2 already, and prove to fix
the issue.
See individual commit messages for details.
Marek Marczykowski-Górecki (3):
hw/xen/xen_pt: Save back
conditions. Removing /dev/mem access is useful to work within
stubdomain (avoids emulated reads and potential races), and necessary
when dom0 kernel runs in lockdown mode (where /dev/mem is unavailable at
all).
Signed-off-by: Marek Marczykowski-Górecki
---
Changes in v2:
- Make change conditional on new X
Marczykowski-Górecki
---
v2:
- rewrite commit message, previous one was very misleading
- fix loop saving register values
- fix int overflow when calculating write mask
---
hw/xen/xen_pt.c | 24 +++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/hw/xen/xen_pt.c b/hw/xen
Update it to get XENFEAT_dm_msix_all_writes for the next patch.
Signed-off-by: Marek Marczykowski-Górecki
---
include/hw/xen/interface/features.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/include/hw/xen/interface/features.h
b/include/hw/xen/interface/features.h
space, call the pci_default_write_config() only for its side effects.
Signed-off-by: Marek Marczykowski-Górecki
---
v3:
- use emulated register value for pci_default_write_config() call, not
the one for writting back to the hardware
- greatly simplify the patch by calling
another
register there). It should be no-op, but due to a bug in xen_pt code,
it broke MSI-X detection.
All those patches have been shipped in Qubes OS 4.2 already, and prove to fix
the issue.
See individual commit messages for details.
Marek Marczykowski-Górecki (3):
hw/xen/xen_pt: Save back
conditions. Removing /dev/mem access is useful to work within
stubdomain (avoids emulated reads and potential races), and necessary
when dom0 kernel runs in lockdown mode (where /dev/mem is unavailable at
all).
Signed-off-by: Marek Marczykowski-Górecki
---
Changes in v2:
- Make change conditional on new X
Update it to get XENFEAT_dm_msix_all_writes for the next patch.
Signed-off-by: Marek Marczykowski-Górecki
---
include/hw/xen/interface/features.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/include/hw/xen/interface/features.h
b/include/hw/xen/interface/features.h
On Mon, May 06, 2024 at 02:33:19AM +0200, Marek Marczykowski-Górecki wrote:
> This series fixes handling MSI-X when device model is running in a stubdomain.
> The main part is to avoid accessing /dev/mem, which also fixes running dom0
> with lockdown enabled.
>
> It depends on a
40 matches
Mail list logo