Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (8h)  netbsd-10 (6d)  netbsd-9 (6d)  netbsd-8 (11d) 

2024-05-23 01:50:29 UTC Now

2020-04-25 15:03:18 UTC bouyer-xenpvh commitmail json YAML

Merge GENERIC_XENHVM in GENERIC.
Remove XEN3_PVHVM/XEN3PAE_PVHVM files which have been obsolete for some time
on the branch

(bouyer)

2020-04-25 15:01:41 UTC bouyer-xenpvh commitmail json YAML

restore part accidentaly deleted

(bouyer)

2020-04-25 15:01:01 UTC bouyer-xenpvh commitmail json YAML

Include changes in sys/arch/xen/include/ between bouyer-xenpvh-base1 and
bouyer-xenpvh-base2.

(bouyer)

2020-04-25 13:16:48 UTC bouyer-xenpvh commitmail json YAML

2020-04-25 11:44:29 UTC bouyer-xenpvh commitmail json YAML

Add xen as include dir for x86

(bouyer)

2020-04-25 11:24:08 UTC bouyer-xenpvh commitmail json YAML

2020-04-25 11:02:23 UTC bouyer-xenpvh commitmail json YAML

2020-04-25 10:52:26 UTC bouyer-xenpvh commitmail json YAML

Include again xen/conf/files.compat for PV kernels, and make it build.
My build.sh -u used stale opt_*.h files ...

(bouyer)

2020-04-25 10:51:25 UTC bouyer-xenpvh commitmail json YAML

2020-04-22 20:49:08 UTC bouyer-xenpvh commitmail json YAML

Don't try to attach vcpu on !XENPV
remove debug printf and other misc cosmetic changes

(bouyer)

2020-04-22 16:51:56 UTC bouyer-xenpvh commitmail json YAML

Remove HZ=20, it was to testing only.

(bouyer)

2020-04-21 16:57:40 UTC bouyer-xenpvh commitmail json YAML

It is possible to use grant_v2 with HVM guest; but the status table has
to be mapped using XENMEM_add_to_physmap.

(bouyer)

2020-04-20 20:19:07 UTC bouyer-xenpvh commitmail json YAML

channel %d -> chan %d, for the benefit of 'systat vm'

(bouyer)

2020-04-20 19:46:44 UTC bouyer-xenpvh commitmail json YAML

2020-04-20 19:46:04 UTC bouyer-xenpvh commitmail json YAML

Thanks do jdolecek@, MAXPHYS is not restricted to 32k now.
Nothing prevents merging GENERIC_XENHVM in GENERIC now

(bouyer)

2020-04-20 19:43:33 UTC bouyer-xenpvh commitmail json YAML

2020-04-20 19:42:10 UTC bouyer-xenpvh commitmail json YAML

Bad news:
* grant table v2 is not supported for HVM guests on 4.11 at last.
* see xen/arch/x86/hvm/hypercall.c in Xen sources (missing
* GNTTABOP_get_status_frames)

So restore grant table v1 for !XENPV

(bouyer)

2020-04-20 19:40:51 UTC bouyer-xenpvh commitmail json YAML

2020-04-20 19:40:24 UTC bouyer-xenpvh commitmail json YAML

2020-04-20 19:38:54 UTC bouyer-xenpvh commitmail json YAML

2020-04-20 19:38:11 UTC bouyer-xenpvh commitmail json YAML

2020-04-20 18:50:46 UTC bouyer-xenpvh commitmail json YAML

Bring in 1.82 and 1.83 from HEAD

(bouyer)

2020-04-20 11:29:15 UTC bouyer-xenpvh commitmail json YAML

2020-04-19 20:29:30 UTC bouyer-xenpvh commitmail json YAML

2020-04-19 19:39:11 UTC bouyer-xenpvh commitmail json YAML

Add per-PIC callbacks for interrupt_get_devname(), interrupt_get_assigned()
and interrupt_get_count(). Implement Xen-specific callbacks for
PIC_XEN and use the x86 one for others.
In event_set_handler(), call intr_allocate_io_intrsource() so that
events appears in interrupt list (intrctl list).

(bouyer)

2020-04-19 11:40:31 UTC bouyer-xenpvh commitmail json YAML

Add a struct pic * member to struct intrhand.
This will be used for interrupt_get_count()
For Xen remplace pic_type with a pointer to the pic, and add a pointer
to intrhand, in struct pintrhand
Make event_set_handler return the pointer to struct intrhand.
Don't allocate a fake intrhand in xen_intr_establish_xname(), use the
one returned by event_set_handler().

(bouyer)

2020-04-18 20:36:31 UTC bouyer-xenpvh commitmail json YAML

If we get an event for another CPU just ignore it. The hypervisor will
callback on the other CPU anyway.

(bouyer)

2020-04-18 20:03:02 UTC bouyer-xenpvh commitmail json YAML

If possible, register a per-cpu callback via HVMOP_set_evtchn_upcall_vector.
From FreeBSD. This requires acking the interrupt in hypervisor_pvhvm_callback.

Don't try to use x86_cpu_idle_xen() for PVHVM, it cause the domU to hang.
FreeBSD doesn't seem to use it either.

(bouyer)

2020-04-18 15:06:18 UTC bouyer-xenpvh commitmail json YAML

Add PVHVM multiprocessor support:
We need the hypervisor to be set up before cpus attaches.
Move hypervisor setup to a new function xen_hvm_init(), called at the
beggining of mainbus_attach(). This function searches the cfdata[] array
to see if the hypervisor device is enabled (so you can disable PV
support with
disable hypervisor
from userconf).
For HVM, ci_cpuid doens't match the virtual CPU index needed by Xen.
Introduce ci_vcpuid to cpu_info. Introduce xen_hvm_init_cpu(), to be
called for each CPU in in its context, which initialize ci_vcpuid and
ci_vcpu, and setup the event callback.
Change Xen code to use ci_vcpuid.

Do not call lapic_calibrate_timer() for VM_GUEST_XENPVHVM, we will use
Xen timers.

Don't call lapic_initclocks() from cpu_hatch(); instead set
x86_cpu_initclock_func to lapic_initclocks() in lapic_calibrate_timer(),
and call *(x86_cpu_initclock_func)() from cpu_hatch().
Also call x86_cpu_initclock_func from cpu_attach() for the boot CPU.
As x86_cpu_initclock_func is called for all CPUs, x86_initclock_func can
be a NOP for lapic timer.

Reorganize Xen code for x86_initclock_func/x86_cpu_initclock_func.
Move x86_cpu_idle_xen() to hypervisor_machdep.c

(bouyer)

2020-04-18 14:49:57 UTC bouyer-xenpvh commitmail json YAML

Call stipending() only on XenPV. Fix spurious fpudna from kernel mode

(bouyer)

2020-04-18 14:47:56 UTC bouyer-xenpvh commitmail json YAML

Centralize initialisations of delay_func and initclock_func
in x86_machdep.c and export from <x86/machdep.h>
Introduce a x86_dummy_initclock() and a x86_cpu_initclock_func pointer,
to be used later for Xen HVM native clock support.
rename rtclock_tval to x86_rtclock_tval and export from <x86/machdep.h>,
for the benefit of lapic.c

(bouyer)

2020-04-16 20:21:45 UTC bouyer-xenpvh commitmail json YAML

MOve the #ifdef XENPV block to the end, so that XEN3_DOM0 builds again.

(bouyer)

2020-04-16 20:21:04 UTC bouyer-xenpvh commitmail json YAML

switch vm_guest to VM_GUEST_XENPVHVM only after all tests succeeded.

(bouyer)

2020-04-16 19:23:51 UTC bouyer-xenpvh commitmail json YAML

Rename xen/xen/clock.c to xen_clock.c, so that it can be compiled
with x86/isa/clock.c
call events_default_setup() from hypervisor_match to that event
arrays are properly initialised.
Use xen_delay() and xen's timecounter for PVHVM.

(bouyer)

2020-04-16 17:50:52 UTC bouyer-xenpvh commitmail json YAML

amd64: Xhypervisor_pvhvm_callback has to be in text.user for SVS.
Thanks to maxv@ for helping me with this.
Enable SVS again.
While there, increase ci_idepth before calling do_hypervisor_callback,
and don't touch ci_idepth while looping over pending events.

(bouyer)

2020-04-16 17:47:37 UTC bouyer-xenpvh commitmail json YAML

fail silently if hypervisor is not found.

(bouyer)

2020-04-16 17:46:44 UTC bouyer-xenpvh commitmail json YAML

Don't try to attach hypervisor on non Xen; no more error messages about
hypervisor when booting on bare metal.

(bouyer)

2020-04-16 17:44:54 UTC bouyer-xenpvh commitmail json YAML

Avoid overflow of ci_ipi_events[] in the PVHVM case (it's size is
XEN_NIPIS but we use x86 IPIs): size XEN_NIPIS only for PV, and
CTASSERT that XEN_NIPIS <= X86_NIPI if we ever use Xen IPIs for
PVHVM.

(bouyer)

2020-04-16 10:42:26 UTC bouyer-xenpvh commitmail json YAML

Well, no, SVS does't quite work yet.

(bouyer)

2020-04-16 10:07:23 UTC bouyer-xenpvh commitmail json YAML

2020-04-16 09:45:57 UTC bouyer-xenpvh commitmail json YAML

2020-04-16 08:46:36 UTC bouyer-xenpvh commitmail json YAML

Reorganise sources to make it possible to include Xen PVHVM support in
native kernels. Among others:
- move xen/include/amd64/hypercall.h to amd64/include/xen and
  xen/include/i386/hypercall.h to i386/include/xen
- exclude some native files from the build for xenpv
- add xen to "machine" config statement for amd64 and i386
- split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers)
  and arch/xen/conf/files.xen.pv (for full pv support)
- add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV
  drivers.

(bouyer)

2020-04-15 16:04:07 UTC bouyer-xenpvh commitmail json YAML

On amd64, always use the cmpxchg8b version of spllower. All x86_64 host should
have it and we already rely on it in lock stubs.
On i386, always use i686_mutex_spin_exit and cx8_spllower for Xen;
Xen doesn't run on CPUs on CPUs lacking the required instructions anyway.
Skip x86_patch only for XENPV, and adjust for changes in assembly functions.
Tested on Xen PV and PVHVM, and on bare metal core i5.

(bouyer)

2020-04-14 16:53:57 UTC bouyer-xenpvh commitmail json YAML

Always patch spllower with cx8_spllower; it works fine for Xen now
Include x86/x86/patch.c is !xenpv
While there, defopt XENPV

(bouyer)

2020-04-14 16:52:36 UTC bouyer-xenpvh commitmail json YAML

Remove spllower alias, xen_spllower is gone

(bouyer)

2020-04-14 16:51:13 UTC bouyer-xenpvh commitmail json YAML

Force _atomic_cas_cx8 only for XENPV; x86_patch works fine for (PV)HVM

(bouyer)

2020-04-12 21:20:16 UTC bouyer-xenpvh commitmail json YAML

no MULTIPROCESSOR so NO_PREEMTION

(bouyer)

2020-04-12 21:19:49 UTC bouyer-xenpvh commitmail json YAML

2020-04-12 19:53:37 UTC bouyer-xenpvh commitmail json YAML

We need to call x86_init_preempt() for all CPUs now.

(bouyer)

2020-04-12 17:25:53 UTC bouyer-xenpvh commitmail json YAML

Get rid of xen-specific ci_x* interrupt handling:
- use the general SIR mechanism, reserving 3 more slots for IPL_VM, IPL_SCHED
  and IPL_HIGH
- remove specific handling from C sources, or change to ipending
- convert IPL number to SIR number in various places
- Remove XUNMASK/XPENDING in assembly or change to IUNMASK/IPENDING
- remove Xen-specific ci_xsources, ci_xmask, ci_xunmask, ci_xpending from
  struct cpu_info
- for now remove a KASSERT that there are no pending interrupts in
  idle_block(). We can get there with some software interrupts pending
  in autoconf XXX needs to be looked at.

(bouyer)

2020-04-12 17:17:38 UTC bouyer-xenpvh commitmail json YAML

Add XEN_IPI_KPREEMPT to list of valid IPIs

(bouyer)

2020-04-12 17:16:58 UTC bouyer-xenpvh commitmail json YAML

kpreempt_disable() only for x86_64 (which calls pmap_changeprot_local)).
On i386 curcpu() is not valid yet and we don't need preemption disabled.

(bouyer)

2020-04-12 16:35:49 UTC bouyer-xenpvh commitmail json YAML

The critical section handling is gone, remove comment about it

(bouyer)

2020-04-12 11:16:59 UTC bouyer-xenpvh commitmail json YAML

Now that we return from hypervisor_callback via Xdoreti, no need to emulate it
in evtchn_do_event() any more.

(bouyer)

2020-04-11 21:21:49 UTC bouyer-xenpvh commitmail json YAML

Attach hypervisor earlier, so that ISA/PCI emulated device are disabled
before we probe them.

(bouyer)

2020-04-11 21:21:16 UTC bouyer-xenpvh commitmail json YAML

Use some PIO magic to disable qemu emulated disks and network device
when PVHVM is configured. From FreeBSD.

(bouyer)

2020-04-11 18:26:08 UTC bouyer-xenpvh commitmail json YAML

Move softint and preemtion-related functions out of x86/x86/intr.c to
  its own file, x86/x86/x86_softintr.c
Add x86/x86/x86_softintr.c for native and XenPV
Make sure XenPV also check ci_ioending, which is used for softints.
Switch XenPV to fast softints and allow kernel preemption.
kpreempt_disable() before calling pmap_changeprot_local()
run  xen_wallclock_time() and xen_global_systime_ns() at splshed() to
  avoid being interrupted.

XXX amd64 lock stubs are racy for XPENDING

(bouyer)

2020-04-11 12:01:42 UTC bouyer-xenpvh commitmail json YAML

calling stipending() is only needed in the PV case; in PVHVM
hypervisor_callback() will be called again as soon as we enable interrupts.

Use the PVHVM XENINTRSTUB for PV too; asjust Xdoreti as needed.
merge hypervisor_callback with hypervisor_pvhvm_callback. The reetrancy should
not be an issue, as we're already re-enabling events in
do_hupervisor_callback (that it, outside of the critical section).
We now can call Xdoreti in both cases.

(bouyer)

2020-04-11 11:56:51 UTC bouyer-xenpvh commitmail json YAML

Merge back hypervisor_callback and hypervisor_pvhvm_callback, there's no
issues calling Xdoreti in the PV case.

(bouyer)

2020-04-11 10:11:31 UTC bouyer-xenpvh commitmail json YAML

2020-04-11 08:06:16 UTC bouyer-xenpvh commitmail json YAML

Remove spaces in machdep.hypervisor, suggested by mlelstv@

(bouyer)

2020-04-10 14:42:00 UTC bouyer-xenpvh commitmail json YAML

spllower(): Also check Xen pending events
hypervisor_pvhvm_callback(): exit via Xdoreti, so that pending interrupts
are checked.
disable __HAVE_FAST_SOFTINTS only for XENPV, it now works for PVHVM.
We still have to disable PREEMPTION, until we support MULTIPROCESSOR

(bouyer)

2020-04-10 14:38:19 UTC bouyer-xenpvh commitmail json YAML

2020-04-10 14:37:54 UTC bouyer-xenpvh commitmail json YAML

Skip cx8_spllower patch if we're running on any form of Xen PV,
we can't handle PV interrupts with a single atomic op here.
Enable x86_patch() for Xen too.

(bouyer)

2020-04-09 21:01:33 UTC bouyer-xenpvh commitmail json YAML

Fix a second place where %eax is used with the wrong value.

(bouyer)

2020-04-09 16:51:00 UTC bouyer-xenpvh commitmail json YAML

restore %eax before using it. This bug caused event handlers to be called
spuriously at high spl or in a reentrant manner.
Now a amd64 PVHVM domU can checkout pkgsrc and build packages without panic.

(bouyer)

2020-04-09 16:12:50 UTC bouyer-xenpvh commitmail json YAML

For RB_POWERDONW, call HYPERVISOR_shutdown() in all cases where the
hypercall page is available. A PVHHVM domU now properly exits on
halt -p

(bouyer)

2020-04-08 17:59:17 UTC bouyer-xenpvh commitmail json YAML

Remove VM_GUEST_XEN and define only Xen subtypes:
VM_GUEST_XENPV
VM_GUEST_XENPVH
VM_GUEST_XENHVM
VM_GUEST_XENPVHVM

Set vm_guest in the start routine, if it is hypervisor-specific (e.g Xen PV).
If vm_guest was not set early and we detect Xen in identify_hypervisor(),
assume it is VM_GUEST_XENHVM. Refine to VM_GUEST_PVXENHVM in
hypervisor_match().

(bouyer)

2020-04-08 17:56:08 UTC bouyer-xenpvh commitmail json YAML