Ok updated the new changes.
On Mon, Oct 05, 2020 at 09:54:02PM +0200, Mark Kettenis wrote:
> > Date: Thu, 17 Sep 2020 20:54:51 -0500
> > From: Jordan Hargrave
> > Cc: ma...@peereboom.org, kette...@openbsd.org, tech@openbsd.org,
> > d...@openbsd.org, j...@open
Ping... still need more eyes on this
This is the IOMMU code for VT-d and AMD Vi implementation
It overrides the DMA Tag for each device and assigns it to a
protected domain
On Thu, Sep 17, 2020 at 08:54:51PM -0500, Jordan Hargrave wrote:
> Ok made more changes
>
> On Mon, Sep 14, 2
Ping. Can anyone review this?
From: Jordan Hargrave
Sent: Tuesday, September 15, 2020 12:54 PM
To: tech@openbsd.org ; jor...@openbsd.org
; kette...@openbsd.org
Subject: PATCH: Add vmmpci device for passthrough PCI
This adds a placeholder vmmpci device that
Ok made more changes
On Mon, Sep 14, 2020 at 08:19:18PM +0200, Mark Kettenis wrote:
> > Date: Tue, 8 Sep 2020 21:43:39 -0500
> > From: Jordan Hargrave
> >
> > Made changes for the iommu_readq -> iommu_read_8 and also now
> > dynamically allocate the hwdte f
Ping. Any replies or commeents on this?
On Tue, Sep 15, 2020 at 12:54:49PM -0500, Jordan Hargrave wrote:
> This adds a placeholder vmmpci device that will be used for VMD passthrough
> PCI.
>
> Normally the device will fail to attach unless the PCI domain:bus.dev.func has
> been
$ */
+/*
+ * Copyright (c) 2020 Jordan Hargrave
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "
This patch adds a couple of entries for AMD IOMMU structure definitions in ACPI
Index: acpireg.h
===
RCS file: /cvs/src/sys/dev/acpi/acpireg.h,v
retrieving revision 1.45
diff -u -p -r1.45 acpireg.h
--- acpireg.h 28 Aug 2019 22:39:09
This patch adds an extra size/cookie argument to pci_add_device and pci_add_bar.
Changes required for implementing passthrough PCI.
diff --git a/usr.sbin/vmd/pci.c b/usr.sbin/vmd/pci.c
index 954235eb6..47a133b9a 100644
--- a/usr.sbin/vmd/pci.c
+++ b/usr.sbin/vmd/pci.c
@@ -39,6 +39,26 @@ extern cha
Made changes for the iommu_readq -> iommu_read_8 and also now dynamically
allocate
the hwdte for AMD IOMMU.
On Fri, Sep 04, 2020 at 09:17:18PM +0200, Mark Kettenis wrote:
> > Date: Fri, 4 Sep 2020 00:50:44 -0500
> > From: Jordan Hargrave
>
> A few hints below...
>
&g
>From cba617464c71f4d4e4a34728f117ca92145f746f Mon Sep 17 00:00:00 2001
From: Jordan Hargrave
Date: Tue, 18 Aug 2020 15:46:36 -0500
Subject: [PATCH 1/4] Add helper vm_find_vcpu function for VMM
---
sys/arch/amd64/amd64/vmm.c | 63 --
1 file changed,
This code fixes the pci device union for accessing PCI config space >= 0x40
Running pcidump -xxx in a virtual machine would return garbage data due to
union overlap
On Mon, Sep 07, 2020 at 05:52:55PM -0500, Jordan Hargrave wrote:
> Index:
Index: pci.h
===
RCS file: /cvs/src/usr.sbin/vmd/pci.h,v
retrieving revision 1.7
diff -u -p -u -r1.7 pci.h
--- pci.h 17 Sep 2017 23:07:56 - 1.7
+++ pci.h 7 Sep 2020 22:48:09 -
@@ -32,43 +32,44 @@ typedef int (*
Attaching the full diff
On Mon, Sep 07, 2020 at 01:09:12PM -0500, Jordan Hargrave wrote:
> On Thu, Sep 03, 2020 at 08:37:56PM +0200, Mark Kettenis wrote:
> > > Date: Wed, 2 Sep 2020 15:19:55 +1000
> > > From: Jonathan Gray
> > >
> > > On Tue, Sep 01, 20
On Thu, Sep 03, 2020 at 08:37:56PM +0200, Mark Kettenis wrote:
> > Date: Wed, 2 Sep 2020 15:19:55 +1000
> > From: Jonathan Gray
> >
> > On Tue, Sep 01, 2020 at 11:44:03PM -0500, Jordan Hargrave wrote:
> > > This patch adds a common function for scanning PC
On Thu, Sep 03, 2020 at 09:06:59PM +0200, Mark Kettenis wrote:
> > Date: Tue, 1 Sep 2020 17:20:19 -0500
> > From: Jordan Hargrave
> >
> > [PATCH] Add IOMMU support for Intel VT-d and AMD Vi
> >
> > This hooks each pci device and overrides bus_dmamap_xxx t
On Wed, Sep 02, 2020 at 03:19:55PM +1000, Jonathan Gray wrote:
> On Tue, Sep 01, 2020 at 11:44:03PM -0500, Jordan Hargrave wrote:
> > This patch adds a common function for scanning PCIE Express Capability list
> > The PCIE Capability list starts at 0x100 in extended PCI configura
Oh good catch thanks. Weird, it does compile!
From: Daniel Dickman
Sent: Tuesday, September 1, 2020 11:23 PM
To: Jordan Hargrave
Cc: tech@openbsd.org
Subject: Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi
> [PATCH] Add IOMMU support for Intel V
This patch adds a common function for scanning PCIE Express Capability list
The PCIE Capability list starts at 0x100 in extended PCI configuration space.
---
sys/dev/pci/pci.c| 28
sys/dev/pci/pcivar.h | 2 ++
2 files changed, 30 insertions(+)
diff --git a/sys/d
ull
+++ b/sys/dev/acpi/acpidmar.c
@@ -0,0 +1,2988 @@
+/*
+ * Copyright (c) 2015 Jordan Hargrave
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
This patch is part of the PCI Passthrough VMM changes.
This adds support for registering 64-bit MMIO regions and properly handles
calculating BAR size for variable-lenth MMIO/IO regions.
Verification via pcidump -v
---
usr.sbin/vmd/pci.c | 69 +-
1 fi
---
sys/arch/amd64/amd64/vmm.c | 63 --
1 file changed, 33 insertions(+), 30 deletions(-)
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index 84fcb23a5..f6d51737e 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@
This is the first patch for adding PCI passthrough support to VMD.
I am splitting up the necessary changes into smaller patches.
This code fixes the pci device union for accessing PCI config space >= 0x40
pcidump -xxx would return garbage data due to union overlap
pci_add_bar now requires speci
This patch adds support to VMM to support passthrough PCI. I have tested
this on both Intel/AMD boxes, it requires the DMAR/IOMMU diff patch.
It has worked so far with re0 network devices and azalia sound but would
like more eyes and testing on this as well.
In order to build this you need to cop
a/sys/dev/acpi/acpidmar.c b/sys/dev/acpi/acpidmar.c
new file mode 100755
index 000..29baf46
--- /dev/null
+++ b/sys/dev/acpi/acpidmar.c
@@ -0,0 +1,1943 @@
+/*
+ * Copyright (c) 2015 Jordan Hargrave
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or w
acpidmar.c
diff -N dev/acpi/acpidmar.c
--- /dev/null 1 Jan 1970 00:00:00 -
+++ dev/acpi/acpidmar.c 22 Jul 2015 20:25:36 -
@@ -0,0 +1,1872 @@
+/*
+ * Copyright (c) 2015 Jordan Hargrave
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or withou
you will need to fix AMLOP_ONES as well. It does a (char)opcode typecast,
which would be 0xff not 0x... if using uint64.
amlop_match, amlop_wait, amlop_acquire, amlop_condref all will need to return
AML_ONES or AML_TRUE
> Date: Sun, 1 Apr 2012 10:45:55 +0300
> From: p...@irofti.net
> To: o...
Strings are always called with -1 (to pull the size-field from strlen itself)
for creation. So technically that could be any large constant as well.
> To: o...@drijf.net
> CC: tech@openbsd.org; kette...@openbsd.org; chas...@skynet.be;
jor...@openbsd.org
> Subject: Re: aml: Fix integer types to be
This patch fixes CondRef store to empty target seen on Dell E4310 and
some HP systems. Please test and send dmesg output.
Index: dsdt.c
===
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.185
diff -u -p -b -r1.185 dsdt
This diff creates a common aml_dereference function, please test on as many
systems as possible and send dmesg
Index: acpiprt.c
===
RCS file: /cvs/src/sys/dev/acpi/acpiprt.c,v
retrieving revision 1.43
diff -u -p -b -r1.43 acpiprt.c
-
This patch changes the values of boolean comparisons from 0:1 to 0:-1 (from
ACPI Spec) in order to fix an AML issue on some Asus machines.
Please test on other machines as well to verify that hardware sensors/acpi/boot
work properly.
Index: dsdt.c
It looks like there is a new L06 bios for the L401X, can you try this?
> Date: Wed, 22 Dec 2010 16:08:54 -0500
> From: kwesterb...@rogers.com
> To: tech@openbsd.org
> CC: jor...@openbsd.org; mlar...@openbsd.org; ma...@openbsd.org;
kette...@openbsd.org
> Subject: New acpi challenges! New Dell XPS b
Bad AML. Looks like it is trying to do an AML Load of a memory block, and that
is failing.
Usually that's because the checksum is incorrect. Look at dsdt.c:aml_load()
and put printf's at both goto fails', to see what is failing.
Not much I can do about it now as I am in Palau. :)
-jordan
> Date
Redux: this new version will apply with -current
This patch will allow acpiec to initialize earlier if a ECDT table is
found. This fixes a lockup if booting on some Thinkpads while docked.
You can tell if your system supports ECDT by scanning the ACPI tables
line in dmesg. There should be a li
This patch will allow acpiec to initialize earlier if a ECDT table is
found. This fixes a lockup if booting on some Thinkpads while docked.
You can tell if your system supports ECDT by scanning the ACPI tables
line in dmesg. There should be a line like this:
acpi0: tables DSDT FACP SSDT ECDT TCP
If there's no delta in dmesg, then it's good.
> Date: Thu, 22 Jul 2010 20:43:43 +0200
> From: dawed...@gmx.de
> To: jor...@openbsd.org
> Subject: Re: ACPI Name Search diff for Thinkpad, etc
>
> On Thu, 22 Jul 2010 11:10:27 -0600 (MDT)
> Jordan Hargrave wrote:
>
This patch is needed on some Thinkpads when searching 'short' name
paths (\_SB.PCI0. instead of \_SB_.PCI0.xxx)
Please test and report.
Index: dsdt.c
===
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.172
diff -u
This diff fixes a panic seen on Dell PEx9xx servers with the new ACPI PCI
mapping.
The _INI code was resetting the _ADR to 0x on some systems if the PCI
bus
does not exist. This caused the pci_make_tag to panic as dev/fn were 0x.
The second change is in acpiprt.. a panic was put in
.com
> To: jor...@cvs.openbsd.org
> CC: jhar...@gmail.com; tech@openbsd.org
>
> On Thu, Jul 1, 2010 at 2:53 PM, Jordan Hargrave wrote:
>> Index: dev/acpi/acpi.c
>> ===
>> RCS file: /cvs/src/sys/dev/acpi/a
penBSD: acpi.c,v 1.167 2010/07/01 01:39:39 jordan Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert
* Copyright (c) 2005 Jordan Hargrave
@@ -18,7 +18,6 @@
#include
#include
-#include
#include
#include
#include
@@ -42,6 +41,10 @@
#include
#include
+#include
+#include
+#i
.169 2010/07/01 16:23:46 thib Exp $ */
+/* $OpenBSD: acpi.c,v 1.167 2010/07/01 01:39:39 jordan Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert
* Copyright (c) 2005 Jordan Hargrave
@@ -18,7 +18,6 @@
#include
#include
-#include
#include
#include
#include
@@ -42,6 +41,10 @@
uart Henderson wrote:
> On 2010/07/01 03:37, Jordan Hargrave wrote:
>> So found the problem; on the R210 the AML code CHANGES the _HID for
>> the PCI Root Bus depending on the _OSI OS running.. UGH
>>
>> I'd had code in dsdt.c for ages that converted the _HID intege
/07/01 01:39:39 jordan Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert
* Copyright (c) 2005 Jordan Hargrave
@@ -18,6 +18,7 @@
#include
#include
+#include
#include
#include
#include
@@ -41,6 +42,10 @@
#include
#include
+#include
+#include
+#include
+
#include
#inc
06:56:15 -
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.168 2010/07/01 06:29:32 jordan Exp $ */
+/* $OpenBSD: acpi.c,v 1.167 2010/07/01 01:39:39 jordan Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert
* Copyright (c) 2005 Jordan Hargrave
@@ -18,6 +18,7 @@
#include
#include
+#include
43 matches
Mail list logo