Page MenuHomeFreeBSD
Feed Advanced Search

Sep 13 2018

royger committed rS338624: msi: remove the check that interrupt sources have been added.
msi: remove the check that interrupt sources have been added
Sep 13 2018, 7:06 AM
royger closed D17001: msi: remove the check that interrupt sources have been added.
Sep 13 2018, 7:06 AM
royger committed rS338623: x86bios: use M_NOWAIT with mallocs.
x86bios: use M_NOWAIT with mallocs
Sep 13 2018, 7:04 AM
royger closed D17000: x86bios: use M_NOWAIT with mallocs.
Sep 13 2018, 7:04 AM

Sep 10 2018

royger committed rP479377: xen-tools411: re-add markdown.
xen-tools411: re-add markdown
Sep 10 2018, 9:10 AM

Sep 6 2018

royger updated the diff for D17013: xen: fix setting vcpu id for APs.
  • Bind PV IPI event channels once vcpu_id is set.
Sep 6 2018, 1:56 PM
royger committed rP479027: xen-tools411: remove markdown and pandoc DOCS dependency.
xen-tools411: remove markdown and pandoc DOCS dependency
Sep 6 2018, 12:30 PM
royger added inline comments to D17013: xen: fix setting vcpu id for APs.
Sep 6 2018, 12:25 PM
royger added a comment to D17013: xen: fix setting vcpu id for APs.

I wonder, can we make this work by changing the lines

PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ?
       regs[1] : PCPU_GET(acpi_id));

in xen_hvm_cpu_init to

PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ?
       regs[1] : -1);

and then resurrecting xen_set_vcpu_id but having it only set vcpu_id if it is currently set to -1?

That way if we have XEN_HVM_CPUID_VCPU_ID_PRESENT we'll get vcpu_id from there (and it doesn't matter if that runs before acpi_id is set) and if we don't then we'll fill in the right value slightly later (after acpi_id is set, but we don't need to be running on the AP in question at that point).

Sep 6 2018, 12:25 PM

Sep 5 2018

royger added inline comments to D17015: lapic: skip setting intrcnt if lapic is not present.
Sep 5 2018, 9:04 AM
royger added a comment to D17001: msi: remove the check that interrupt sources have been added.
In D17001#362843, @jhb wrote:
In D17001#362583, @kib wrote:

Would be useful to assert that there is no IO APICs or AT PICs configured when num_io_irqs == 0, but I am not sure that this is straightforward.

I thought about this too, but I didn't find any straightforward way to check whether there are any PICs in the system. I will wait for John in case he has a suggestion.

There isn't a good way to assert that. The ATPIC code always assumes it can use the first 16 IRQs if 'device atpic' is enabled in the kernel which is a bit of a landmine. 'device atpic' isn't in GENERIC, but it might be nice to force it to be disabled for this particular Xen case? Or is there an emulated ATPIC with no useful interrupts? (In a kernel without 'device atpic' we use unconditional logic to init the 8259A's into a silent state.) If Xen is still providing a dummy set of 8259A's, then I think what I'd actually prefer is to patch the SYSINIT in local_apic.c that does 'apic_setup_io' to bump num_io_irqs up to 16 if it is still zero to avoid any possible conflicts with IRQs 0 - 15. Note that one idea I'm considering is removing MINIMUM_MSI_INT post-branch so that MSI IRQs would start at the end of the PIC range rather than at 256 in which case explicitly reserving 0-15 would still matter.

Sep 5 2018, 8:58 AM
royger updated the diff for D17013: xen: fix setting vcpu id for APs.
  • Remove xenpv_set_ids.
  • Make sure acpi_id is set when starting APs.
Sep 5 2018, 7:26 AM

Sep 4 2018

royger created D17015: lapic: skip setting intrcnt if lapic is not present.
Sep 4 2018, 3:13 PM
royger created D17013: xen: fix setting vcpu id for APs.
Sep 4 2018, 2:55 PM

Sep 3 2018

royger added a comment to D17001: msi: remove the check that interrupt sources have been added.
In D17001#362583, @kib wrote:

Would be useful to assert that there is no IO APICs or AT PICs configured when num_io_irqs == 0, but I am not sure that this is straightforward.

Sep 3 2018, 10:39 AM
royger added a comment to D17000: x86bios: use M_NOWAIT with mallocs.
In D17000#362586, @kib wrote:

They are not too large, what I see is: "contigmalloc - size: 0x1000 low: 0x1000 high: 0xa0000", which should be fulfillable. I guess there's something else that allocates this memory, but I have no idea of what yet. This is probably a glitch of running as a PVH guest, which has no BIOS and no reserved regions < 1MB.

Ah so it is low memory. Does it make sense to init bios at all, on such machine ?

Sep 3 2018, 10:26 AM
royger updated the diff for D17000: x86bios: use M_NOWAIT with mallocs.
  • Add newline at the start of x86bios_unmap_mem.
  • Use consistent order for the flags.
Sep 3 2018, 10:20 AM
royger added a comment to D17000: x86bios: use M_NOWAIT with mallocs.
In D17000#362579, @kib wrote:

This is in fact worrying. How large are these requests ? If they cannot be satisfied at the early boot stage, then they cannot be at all, I think.

Sep 3 2018, 10:15 AM
royger created D17001: msi: remove the check that interrupt sources have been added.
Sep 3 2018, 9:25 AM
royger created D17000: x86bios: use M_NOWAIT with mallocs.
Sep 3 2018, 9:13 AM

Aug 24 2018

royger updated the test plan for D16881: Remove {max/min}_offset, use vm_map_{max/min}..
Aug 24 2018, 4:17 PM
royger added a comment to D16881: Remove {max/min}_offset, use vm_map_{max/min}..

I'm going on vacations for the whole next week and I'm not taking any computer, so I won't be able to commit this. If someone feels like picking this up in the meantime that's great, if not I will pick it up in two weeks.

Aug 24 2018, 4:16 PM
royger updated the diff for D16881: Remove {max/min}_offset, use vm_map_{max/min}..

Remove unrelated netfront change.

Aug 24 2018, 3:34 PM
royger created D16881: Remove {max/min}_offset, use vm_map_{max/min}..
Aug 24 2018, 3:32 PM
royger accepted D16861: Dynamically allocate IRQ ranges on x86..

Tested with Xen on amd64, no issues. Thanks.

Aug 24 2018, 11:22 AM
royger committed rP477953: xen-tools411: build a working hvmloader.
xen-tools411: build a working hvmloader
Aug 24 2018, 10:10 AM

Aug 23 2018

royger added a comment to D16861: Dynamically allocate IRQ ranges on x86..

The following diff on top of your patch seem to fix the issue:

diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c
index 4b64ac36b774..c7328ad71e27 100644
--- a/sys/x86/xen/xen_intr.c
+++ b/sys/x86/xen/xen_intr.c
@@ -634,17 +634,13 @@ xen_intr_init(void *dummy __unused)
 	mtx_init(&xen_intr_isrc_lock, "xen-irq-lock", NULL, MTX_DEF);
Aug 23 2018, 2:29 PM
royger added a comment to D16861: Dynamically allocate IRQ ranges on x86..

This panics quite early with the following trace:

/boot/kernel/kernel text=0x167caa8 data=0x1cdac8+0x79c1f0 syms=[0x8+0x1803c0+0x8+0x19cd3e]
/boot/entropy size=0x1000
Booting...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
---<<BOOT>>---
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-ALPHA2 #0 d016733ea(master)-dirty: Thu Aug 23 13:55:07 UTC 2018
    root@freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
WARNING: WITNESS option enabled, expect reduced performance.
VT(vga): text 80x25
XEN: Hypervisor version 4.12 detected.
CPU: Intel(R) Xeon(R) CPU E3-1230 v6 @ 3.50GHz (3504.12-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x906e9  Family=0x6  Model=0x9e  Stepping=9
  Features=0x1fc3fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT>
  Features2=0xfffa3203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended Features=0x1c6fbb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,NFPUSG,MPX,RDSEED,ADX,SMAP>
  Structured Extended Features3=0xc000000<IBPB,STIBP>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID EBX=0x1000
Hypervisor: Origin = "XenVMMXenVMM"
real memory  = 16768827392 (15992 MB)
avail memory = 16202080256 (15451 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <Xen HVM>
WARNING: L1 data cache covers fewer APIC IDs than a core (0 < 1)
WARNING: L2 data cache covers fewer APIC IDs than a core (0 < 1)
WARNING: L3 data cache covers fewer APIC IDs than a core (0 < 1)
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 cache groups x 1 core(s)
random: unblocking device.
panic: Assertion intrcnt_index < nintrcnt failed at /usr/src/sys/x86/x86/intr_machdep.c:468
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff82696900
vpanic() at vpanic+0x1a3/frame 0xffffffff82696960
panic() at panic+0x43/frame 0xffffffff826969c0
intrcnt_add() at intrcnt_add+0xc1/frame 0xffffffff826969e0
xen_intr_init() at xen_intr_init+0xd0/frame 0xffffffff82696a50
mi_startup() at mi_startup+0x118/frame 0xffffffff82696a70
btext() at btext+0x2c
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x3b: movq    $0,kdb_why
db>
Aug 23 2018, 1:58 PM

Aug 17 2018

royger committed rP477433: xen-tools411: fix pkg-plist.
xen-tools411: fix pkg-plist
Aug 17 2018, 3:03 PM
royger committed rS337960: build: skip the database check when generating install media.
build: skip the database check when generating install media
Aug 17 2018, 7:27 AM
royger closed D16638: build: skip the database check when generating install media.
Aug 17 2018, 7:27 AM

Aug 16 2018

royger committed rP477316: xen411: apply fixes for XSA-269, XSA-272 and XSA-273.
xen411: apply fixes for XSA-269, XSA-272 and XSA-273
Aug 16 2018, 9:02 AM
royger added a comment to D16638: build: skip the database check when generating install media.

Ping?

Aug 16 2018, 7:24 AM

Aug 14 2018

royger committed rP477143: xen-tools411: bump port version after r477080..
xen-tools411: bump port version after r477080.
Aug 14 2018, 9:03 AM

Aug 13 2018

royger committed rP477080: xen-tools411: use HAS_CONFIGURE instead of GNU_CONFIGURE.
xen-tools411: use HAS_CONFIGURE instead of GNU_CONFIGURE
Aug 13 2018, 5:16 PM

Aug 9 2018

royger added a reviewer for D16638: build: skip the database check when generating install media: emaste.
Aug 9 2018, 9:42 AM
royger created D16638: build: skip the database check when generating install media.
Aug 9 2018, 8:40 AM

Aug 8 2018

royger added a comment to D16507: build: skip the database check for the distributeworld target.

So it seems there are still issues even after this fix, now I'm seeing:

Aug 8 2018, 2:15 PM
royger closed D16507: build: skip the database check for the distributeworld target.
Aug 8 2018, 7:58 AM
royger committed rS337452: build: skip the database check for the distributeworld target.
build: skip the database check for the distributeworld target
Aug 8 2018, 7:58 AM

Aug 6 2018

royger accepted D16590: Chase removal of emulators/xen package in the handbook.

Thanks, that look great!

Aug 6 2018, 3:23 PM
royger added a comment to D16507: build: skip the database check for the distributeworld target.

I plan to commit this tomorrow unless there are any objections.

Aug 6 2018, 11:36 AM
royger added a comment to D16590: Chase removal of emulators/xen package in the handbook.

Thanks! LGTM, just one minor issue with the command line because we need to use dom0pvh=1 when using the xen47 packages and dom0=pvh when using the xen411 packages.

Aug 6 2018, 8:33 AM

Aug 1 2018

royger added a reviewer for D16507: build: skip the database check for the distributeworld target: gjb.
Aug 1 2018, 7:27 AM

Jul 31 2018

royger committed rP475254: xen: rename to xen47.
xen: rename to xen47
Jul 31 2018, 6:05 AM
royger closed D16416: xen: rename to xen477.
Jul 31 2018, 6:05 AM

Jul 30 2018

royger updated the diff for D16507: build: skip the database check for the distributeworld target.

Change the wording of the comment and put it just before the first
usage of DB_FROM_SRC.

Jul 30 2018, 3:10 PM
royger created D16507: build: skip the database check for the distributeworld target.
Jul 30 2018, 2:07 PM
royger committed rS336897: xen/grants: fix deadlocks in the free callbacks.
xen/grants: fix deadlocks in the free callbacks
Jul 30 2018, 11:42 AM
royger closed D16505: Xen: Make gnttab_list_lock a recursive lock.
Jul 30 2018, 11:42 AM
royger accepted D16505: Xen: Make gnttab_list_lock a recursive lock.
Jul 30 2018, 11:36 AM
royger added a comment to D16136: Xen blkfront: Fixed memory leak in xbd_connect().

Probably a difference in the tab width. I don't get why there is indentation with both tabs and spaces in a single line. The entire blkfront code is like that. Some places its all tabs, some places it is a mix of tabs and spaces for indentation. Its weird and confusing.

Jul 30 2018, 11:34 AM
royger added inline comments to D16446: Xen: Fix potential page faults in the grant_table.c.
Jul 30 2018, 11:30 AM
royger committed rS336896: xen-blkfront: fix memory leak in xbd_connect error path.
xen-blkfront: fix memory leak in xbd_connect error path
Jul 30 2018, 11:28 AM
royger accepted D16136: Xen blkfront: Fixed memory leak in xbd_connect().

The code is OK, but the coding style is not. I had to fix the lines to be < 80 cols and adjust the indentation.

Jul 30 2018, 11:25 AM
royger committed rS336895: xen-blkfront: fix length check.
xen-blkfront: fix length check
Jul 30 2018, 11:15 AM
royger accepted D16045: Xen blkfront: Fixed wrong error code return in xbd_dump().
Jul 30 2018, 10:48 AM

Jul 26 2018

royger committed rP475356: xen-tools411: remove oxenstored related files from plist.
xen-tools411: remove oxenstored related files from plist
Jul 26 2018, 9:31 AM

Jul 24 2018

royger committed rP475255: xen: import version 4.11.
xen: import version 4.11
Jul 24 2018, 1:58 PM
royger closed D16418: xen: import version 4.11.
Jul 24 2018, 1:58 PM
royger committed rP475252: xen: fix charset of patch file.
xen: fix charset of patch file
Jul 24 2018, 1:36 PM
royger closed D16415: xen: fix charset of patch file.
Jul 24 2018, 1:36 PM
royger created D16418: xen: import version 4.11.
Jul 24 2018, 8:55 AM
royger created D16416: xen: rename to xen477.
Jul 24 2018, 7:37 AM
royger created D16415: xen: fix charset of patch file.
Jul 24 2018, 7:36 AM

Jul 19 2018

royger accepted D16330: Add support for freeing preloaded data..

LGTM.

Jul 19 2018, 2:59 PM
royger committed rS336475: xen: add missing file from r336474.
xen: add missing file from r336474
Jul 19 2018, 10:15 AM
royger committed rS336474: xen: implement early init helper for PVHv2.
xen: implement early init helper for PVHv2
Jul 19 2018, 8:45 AM
royger committed rS336473: xen: allow very early initialization of the hypercall page.
xen: allow very early initialization of the hypercall page
Jul 19 2018, 8:14 AM
royger committed rS336472: xen: attach the PV CPU if no CPU device is present.
xen: attach the PV CPU if no CPU device is present
Jul 19 2018, 8:01 AM
royger committed rS336471: xen: do not limit PV console usage to PV guests.
xen: do not limit PV console usage to PV guests
Jul 19 2018, 7:58 AM
royger committed rS336470: xen: remove direct usage of HYPERVISOR_start_info.
xen: remove direct usage of HYPERVISOR_start_info
Jul 19 2018, 7:54 AM
royger committed rS336469: xen: add PVHv2 entry point.
xen: add PVHv2 entry point
Jul 19 2018, 7:39 AM

Jul 11 2018

royger requested changes to D16205: Create three helper functions for parsing boot args..

LGTM, I think with a small change to boot_parse_cmdline we could remove xen_pv_set_env.

Jul 11 2018, 8:54 AM

Jul 9 2018

royger added a comment to D16136: Xen blkfront: Fixed memory leak in xbd_connect().

Also, I have no idea why my diffs can't be expanded. I simply run git diff and then upload it here. Should I do something differently?

Jul 9 2018, 10:07 AM
royger added a comment to D16136: Xen blkfront: Fixed memory leak in xbd_connect().

I asked on freebsd-hackers@ mailing list, and Conrad Meyer says that contigmalloc() can fail even when M_NOWAIT is not specified. Link to the email.

So there should be a NULL check after contigmalloc() above. Should I add that change in this same revision or create a different one?

Jul 9 2018, 8:50 AM

Jul 5 2018

royger added inline comments to D16136: Xen blkfront: Fixed memory leak in xbd_connect().
Jul 5 2018, 9:09 AM
royger added a comment to D16136: Xen blkfront: Fixed memory leak in xbd_connect().

Do you also need to free cm_sg_refs and destroy the dmamap in case of failure?

Jul 5 2018, 9:01 AM

Jul 2 2018

royger added inline comments to D16045: Xen blkfront: Fixed wrong error code return in xbd_dump().
Jul 2 2018, 2:29 PM

Jun 26 2018

royger committed rS335668: xen: obtain vCPU ID from CPUID.
xen: obtain vCPU ID from CPUID
Jun 26 2018, 3:01 PM
royger committed rS335666: xen: limit the number of hypercall pages to 1.
xen: limit the number of hypercall pages to 1
Jun 26 2018, 2:39 PM
royger committed rS335664: xen-netback: fix LOR.
xen-netback: fix LOR
Jun 26 2018, 2:07 PM

Jun 25 2018

royger accepted D16004: Do not access ISA timer if BIOS reports that there is no legacy devices present..

LGTM thanks.

Jun 25 2018, 10:24 AM
royger committed rS335629: vt: add option to ignore NO_VGA flag in ACPI.
vt: add option to ignore NO_VGA flag in ACPI
Jun 25 2018, 9:39 AM
royger closed D16003: vt: add option to ignore NO_VGA flag in ACPI.
Jun 25 2018, 9:39 AM
royger added a comment to D16004: Do not access ISA timer if BIOS reports that there is no legacy devices present..

I would like to use acpi_get_fadt_bootflags for vt also, but then it needs to live in some generic ACPI file, or else I would have to provide dummy implementations for !x86 arches.

Jun 25 2018, 9:35 AM
royger created D16003: vt: add option to ignore NO_VGA flag in ACPI.
Jun 25 2018, 8:39 AM

Jun 21 2018

royger closed D15899: Xen: Added missing check for free callbacks in gnttab_end_foreign_access_references().

Committed as r335490.

Jun 21 2018, 3:48 PM
royger committed rS335490: xen: check if there are clients waiting in gnttab_end_foreign_access_references.
xen: check if there are clients waiting in gnttab_end_foreign_access_references
Jun 21 2018, 3:47 PM

Jun 19 2018

royger accepted D15899: Xen: Added missing check for free callbacks in gnttab_end_foreign_access_references().

LGTM. Will commit it tomorrow unless there are objections.

Jun 19 2018, 9:26 AM

Jun 11 2018

royger added a comment to D15733: Fix build of bxe with base gcc on i386.

64bit BARs can have addresses and lengths bigger than 32bits, so I would rather cast to uint64_t and use PRIx64 in order to print them. Or cast to uintmax_t and print with PRIxMAX.

Jun 11 2018, 7:38 AM

Jun 6 2018

royger accepted D15675: Account for dmap limit when selecting the pages for the bootstrap pagetables..
Jun 6 2018, 3:50 PM
royger accepted D15675: Account for dmap limit when selecting the pages for the bootstrap pagetables..

LGTM, just one nit.

Jun 6 2018, 3:31 PM

May 29 2018

royger committed rS334315: MFC r334027: xen-blkback: do not use state 3.
MFC r334027: xen-blkback: do not use state 3
May 29 2018, 7:51 AM

May 25 2018

royger committed rS334205: xen: remove dead code from gnttab.h.
xen: remove dead code from gnttab.h
May 25 2018, 8:44 AM
royger accepted D15553: Xen: Removed some leftover code from gnttab.h.
May 25 2018, 8:40 AM

May 24 2018

royger committed rS334147: xen/pvh: allocate dbg_stack.
xen/pvh: allocate dbg_stack
May 24 2018, 10:23 AM
royger committed rS334146: xen/evtchn: fix LOR in evtchn device.
xen/evtchn: fix LOR in evtchn device
May 24 2018, 10:21 AM
royger committed rS334145: xen-blkback: don't unbind the interrupt while holding the lock.
xen-blkback: don't unbind the interrupt while holding the lock
May 24 2018, 10:20 AM
royger committed rS334144: dev/xenstore: prevent transaction hijacking.
dev/xenstore: prevent transaction hijacking
May 24 2018, 10:18 AM