Re: TSC Frequency

2019-10-31 Thread michael . g . hinton
I guess I should clarify (for my future sake, at least) that the Jailhouse driver automatically passes this Linux-derived frequency into each cell's config, while I'm planning on measuring frequency information from the MSRs directly within an inmate. -- You received this message because you

TSC Frequency

2019-10-31 Thread michael . g . hinton
Hello, I notice that on my machine (Coffee Lake architecture, Intel 8th Generation), apparently Linux detects a TSC frequency of 3,696,003,000 Hz. However, the Intel SDM Vol. 4 Table 2-20, under bits 8-15 of the PLATFORM_INFO_MSR (0xCE), says that the invariant TSC runs at the Maximum

Re: GCC 8 + 9 not compiling cell configs correctly in Kubuntu 19.10

2019-10-28 Thread michael . g . hinton
Hey Jan, Here are the generated cells and their corresponding .o files for GCC 7, 8, and 9, as well as the original .c config file. Quick overview of the beginning of each .o file, with changes bolded: GCC 7: 7f45 4c46 0201 0100 0100 3e00 0100

Re: v0.9 vs v1.1 interrupt latency raise

2019-10-26 Thread michael . g . hinton
Hi all, I'm not sure if this is relevant in this case, but I have noticed that on Intel x86-64, if hardware p-states (HWP) are enabled in the CPU (which they are by default if the CPU supports it), this introduces frequency scaling coupling between cores, even when the cores are isolated in

GCC 8 + 9 not compiling cell configs correctly in Kubuntu 19.10

2019-10-26 Thread michael . g . hinton
Hello, After updating to Kubuntu 19.10 (kernel 5.3) from 19.04, I get the following error when trying to enable the root cell: JAILHOUSE_ENABLE: Invalid argument dmesg shows: [ 475.080776] jailhouse: Not a system configuration which comes from this code in

Re: Increase Inmate Memory to > 1 MB

2019-10-05 Thread michael . g . hinton
Thank you! That did the trick. -Michael On Saturday, October 5, 2019 at 1:41:02 AM UTC-6, Jan Kiszka wrote: > > On 05.10.19 02:08, michael...@gmail.com wrote: > > Hello, > > > > > > I want to increase how much memory my inmate can use to 10 MB. > > > > > > Here’s the relevant memory

Increase Inmate Memory to > 1 MB

2019-10-04 Thread michael . g . hinton
Hello, I want to increase how much memory my inmate can use to 10 MB. Here’s the relevant memory regions of the root config: /* MemRegion: 3a60-3f1f : JAILHOUSE Inmate Memory */ { .phys_start = 0x3a60, .virt_start = 0x3a60, // MGH: Leave a 1 MB region for IVSHMEM (4c ->

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-05-25 Thread michael . g . hinton
On Saturday, May 25, 2019 at 12:00:15 PM UTC-6, michael...@gmail.com wrote: > On Thursday, May 23, 2019 at 3:55:24 AM UTC-6, jeanne@gmail.com wrote: > > Le samedi 9 février 2019 06:26:29 UTC+1, michael...@gmail.com a écrit : > > > On Friday, February 8, 2019 at 8:40:18 AM UTC-7, Henning Schild

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-05-25 Thread michael . g . hinton
On Thursday, May 23, 2019 at 3:55:24 AM UTC-6, jeanne@gmail.com wrote: > Le samedi 9 février 2019 06:26:29 UTC+1, michael...@gmail.com a écrit : > > On Friday, February 8, 2019 at 8:40:18 AM UTC-7, Henning Schild wrote: > > > Am Thu, 7 Feb 2019 16:53:41 -0800 > > > schrieb : > > > > > > > On

Re: Understanding NMIs and Intel x86-64 VMX Preemption Timer

2019-05-22 Thread michael . g . hinton
Hi Jan, Thank you for your detailed response! That was a great explanation. After digesting that, things make a lot more sense. I’ll also try to implement your suggestions regarding the preemption timer. I do have a follow-up question: I understand now that the preemption timer is only needed

Understanding NMIs and Intel x86-64 VMX Preemption Timer

2019-05-18 Thread michael . g . hinton
Hello, As part of my research, I’ve been looking to modify Jailhouse slightly to take advantage of the preemption timer provided by VMX for Intel x86-64. I know Jailhouse already uses it, but I was hoping to also use it to have the root cell periodically “check up” on the inmate (the intended

Re: FATAL: Invalid PIO read, port: 934 size: 1

2019-03-27 Thread michael . g . hinton
Hey guys, Thanks so much for the help. 0xef didn't work, so I just did 0x00 instead: [ 0x3e0/8 ... 0x92f/8] = -1, [ 0x930/8 ... 0x937/8] = 0x00, /* PNP0C09:00 - EC cmd */ [ 0x938/8 ... 0xcff/8] = -1, and that solved the issue. I ran into another invalid PIO 1-byte access for 0xb2 (when I

FATAL: Invalid PIO read, port: 934 size: 1

2019-03-26 Thread michael . g . hinton
Hello, I used the root config generator to create a root config for my x86-64 Dell Inspiron running Kubuntu 18.04 (kernel 4.14). However, starting up the root cell usually causes the entire laptop to freeze soon after. I don’t have access to a serial console, but I am briefly able to see the

Re: [PATCH] hardware check: Catch errors opening /dev/mem during MMIO check

2019-03-22 Thread michael . g . hinton
On Friday, March 22, 2019 at 6:02:02 AM UTC-6, J. Kiszka wrote: > > +except OSError as e: > > +print(' ERROR: %s' % e) > > Now we have the same error reported twice: once here, and once for the access > that fails because we couldn't initialize self.mmap. I'll drop this one

Re: [PATCH] hardware check: Catch errors opening /dev/mem during MMIO check

2019-03-21 Thread michael . g . hinton
hardware check: Catch errors opening /dev/mem during MMIO check Catch error, print, and continue, instead of exiting test. Signed-off-by: Michael Hinton diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check index 51dea82d..517175c5 100755 ---

Re: [PATCH] hardware check: Catch errors opening /dev/mem during MMIO check

2019-03-19 Thread michael . g . hinton
Catch error, print, and continue, instead of exiting entire test. Kernel config CONFIG_STRICT_DEVMEM is enabled by default on newer kernels, causing these failures. Here is what it looks like before applying the patch on my Kubuntu 18.04 system: hintron@inspiron:~/code/jailhouse$ sudo

[PATCH] hardware check: Catch errors opening /dev/mem during MMIO check

2019-03-19 Thread michael . g . hinton
Catch error, print, and continue, instead of exiting test. Signed-off-by: Michael Hinton --- tools/jailhouse-hardware-check | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check index 51dea82d..1c73011b 100755

Re: Inmate not receiving interrupt from root cell

2019-03-05 Thread michael . g . hinton
On Monday, March 4, 2019 at 3:42:47 AM UTC-7, J. Kiszka wrote: > On 03.03.19 08:42, michael.g.hin...@gmail.com wrote: > > Thank you for the responses. I tried your suggestions, but I haven't got it > > working yet. > > > > The issue is that I'm still getting errors trying to mmap /dev/uio0 at >

Re: Inmate not receiving interrupt from root cell

2019-03-02 Thread michael . g . hinton
Thank you for the responses. I tried your suggestions, but I haven't got it working yet. The issue is that I'm still getting errors trying to mmap /dev/uio0 at offset 0. No matter what I do (change page size, etc.), I keep getting a "No such device" error. See

Inmate not receiving interrupt from root cell

2019-03-01 Thread michael . g . hinton
Hello, I've got most everything working with ivshmem: the inmate is modifying shared memory and sending interrupts to the root cell, the root cell is receiving the interrupts and seeing the shared memory and PCI config space, and the root is writing to shared memory, which the inmate sees.

Using Jailhouse to create lightweight "VM Containers"

2019-02-15 Thread michael . g . hinton
Hello, I have a few questions about the scope and future of Jailhouse: Could Jailhouse be used to create lightweight VM "containers" on the fly, a la Docker? Is this use case on the radar, and if so, what would need to be done to make it a reality? How does Jailhouse compare to a solution

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-02-08 Thread michael . g . hinton
On Friday, February 8, 2019 at 8:40:18 AM UTC-7, Henning Schild wrote: > Am Thu, 7 Feb 2019 16:53:41 -0800 > schrieb : > > > On Wednesday, February 6, 2019 at 5:59:09 AM UTC-7, Henning Schild > > wrote: > > > Am Tue, 5 Feb 2019 19:25:28 -0800 > > > schrieb : > > > > > > > On Friday, February

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-02-07 Thread michael . g . hinton
Hello, So I've been debugging uio_ivshmem.c with print statements, and I think have a theory for what's going wrong: I believe the ivshem-net driver is being attached to the root cell's ivshmem PCI device before the uio_ivshmem driver can, since I compiled the kernel with

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-02-07 Thread michael . g . hinton
On Wednesday, February 6, 2019 at 7:00:35 AM UTC-7, J. Kiszka wrote: > On 06.02.19 13:59, Henning Schild wrote: > > Am Tue, 5 Feb 2019 19:25:28 -0800 > > schrieb : > > > >> On Friday, February 1, 2019 at 12:32:40 AM UTC-7, J. Kiszka wrote: > >>> You likely want > >>>

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-02-05 Thread michael . g . hinton
On Friday, February 1, 2019 at 12:32:40 AM UTC-7, J. Kiszka wrote: > You likely want > https://github.com/siemens/linux/commits/jailhouse-enabling/4.14 > or the 4.19-variant that is jailhouse-prepared. That's what jailhouse-images > is > building for you. > If you just rebuild the kernel that

Re: How do I get ivshmem-demo working with Jailhouse Images?

2019-01-31 Thread michael . g . hinton
Jan, Thanks for the advice. I went and downloaded Linux 4.14.73 and recompiled with CONFIG_UIO=y and CONFIG_UIO_PCI_GENERIC=y (`make -j4`, `make modules_install`, and `make install`). I was then able to build uio_ivshmem.ko. However, now when I build Jailhouse, I hit the following errors:

Re: Jailhouse Images Demo No Longer Works After Image Resize

2019-01-24 Thread michael . g . hinton
On Tuesday, January 22, 2019 at 2:19:20 AM UTC-7, Henning Schild wrote: > Am Mon, 21 Jan 2019 15:46:25 -0800 > schrieb : > > > So here's what happened: I increased the memory from 1 GB to 4 GB in > > the QEMU command (from `-m 1G` to `-m 4G`). The Jailhouse-images's > > qemu-x86.cell root cell

Re: Jailhouse Images Demo No Longer Works After Image Resize

2019-01-21 Thread michael . g . hinton
So here's what happened: I increased the memory from 1 GB to 4 GB in the QEMU command (from `-m 1G` to `-m 4G`). The Jailhouse-images's qemu-x86.cell root cell didn't like that. So I guess if I want to increase the memory to 4 GB, I'll need to update configs/x86/qemu-x86.c accordingly. How

Re: Jailhouse Images Demo No Longer Works After Image Resize

2019-01-18 Thread michael . g . hinton
On Friday, January 18, 2019 at 5:26:50 AM UTC-7, Jan Kiszka wrote: > Looks like your virtual machine configuration (that of QEMU) somehow changed - > new QEMU version? Or did you touch the startup script? > > Jan I did play around with the start-up script. It's also possible I somehow changed

Re: Jailhouse Images Demo No Longer Works After Image Resize

2019-01-17 Thread michael . g . hinton
After waiting on a frozen QEMU, I did get this additional output: qemu: vtd_iova_to_slpte: detected slpte permission error (iova=0x178e36110, level=0x3, slpte=0x0, write=0) qemu: vtd_iommu_translate: detected translation failure (dev=00:02:00, iova=0x0) qemu: New fault is not recorded due to

Re: Jailhouse Images Demo No Longer Works After Image Resize

2019-01-16 Thread michael . g . hinton
On Wednesday, January 16, 2019 at 11:02:33 PM UTC-7, michael@gmail.com wrote: > I *did* recently manually resize the jailhouse QEMU image (see > https://groups.google.com/forum/#!topic/jailhouse-dev/3IMPKkNUguQ). So that > probably broke something. I'm pretty sure it was running before the

Jailhouse Images Demo No Longer Works After Image Resize

2019-01-16 Thread michael . g . hinton
Hello, I'm trying to run the jailhouse-images demo, I'm running into this error that freezes the system when I do `jailhouse enable /etc/jailhouse/qemu-x86.cell`: Initializing Jailhouse hypervisor v0.10 (0-gf596aa73) on CPU 0 Code location: 0xf050 Using x2APIC Page pool

Re: Resize Existing Jailhouse QEMU Image

2019-01-10 Thread michael . g . hinton
On Thursday, January 10, 2019 at 7:04:16 PM UTC-7, J. Kiszka wrote: > I suppose you are referring to a QEMU image created by jailhouse-images, > correct? Those images consist of a plain rootfs image, no partitioning > involved > there. So you can simply run "resizefs " after the "qemu-img >

Re: Setting up the Serial Port

2018-11-12 Thread michael . g . hinton
I'm pretty sure everything is AT/EVEREX header layout when I checked the first time. I'll double check, though. -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Setting up the Serial Port

2018-11-12 Thread michael . g . hinton
Hello, I'm struggling to figure out how to read out the serial port output of Jailhouse from my Kubuntu 18.04 Intel x86-64 box. Apparently, this is the only way to read out Jailhouse console logs in a cell in real hardware. Does anyone have any instructions for how to do this? Here is what I

Re: How to Build Inmates for Jailhouse

2018-09-27 Thread michael . g . hinton
On Wednesday, September 26, 2018 at 1:00:29 AM UTC-6, J. Kiszka wrote: > On 26.09.18 08:51, Jan Kiszka wrote: > > On 26.09.18 07:55, michael.g.hin...@gmail.com wrote: > >> I have two questions: > >> > >> 1) For Jailhouse images: is there any way I can rebuild Jailhouse one > >> inside > >> the

How to Build Inmates for Jailhouse

2018-09-25 Thread michael . g . hinton
I have two questions: 1) For Jailhouse images: is there any way I can rebuild Jailhouse one inside the x86 image? When I clone jailhouse inside the image and try to make it, the necessary linux-header stuff isn't there, and there doesn't seem to be a linux-header package for 4.14.50. 2) For

Re: Error Creating Root Config

2018-09-10 Thread michael . g . hinton
Jan, I fixed the issue. It turns out that VT-d actually *was* disabled in the bios. Once I enabled it in the bios, /sys/firmware/acpi/tables/DMAR appeared and the config generation seemed to work! Thanks for the assistance! -Michael Details: My motherboard is a B360M Bazooka for an Intel

Re: Error Creating Root Config

2018-08-28 Thread michael . g . hinton
On Tuesday, August 28, 2018 at 12:31:59 AM UTC-6, J. Kiszka wrote: > On 2018-08-27 22:39, michael.g.hin...@gmail.com wrote: > > On Monday, August 20, 2018 at 11:36:47 PM UTC-6, J. Kiszka wrote: > >> On 2018-08-21 02:53, michael.g.hin...@gmail.com wrote: > >>> When I try to create a root config for

Re: Error Creating Root Config

2018-08-27 Thread michael . g . hinton
On Monday, August 20, 2018 at 11:36:47 PM UTC-6, J. Kiszka wrote: > On 2018-08-21 02:53, michael.g.hin...@gmail.com wrote: > > When I try to create a root config for my Ubuntu 18.04 Intel x86 machine, I > > get the following error: > > > > hintron@bazooka:~/code/jailhouse$ sudo jailhouse config

Error Creating Root Config

2018-08-20 Thread michael . g . hinton
When I try to create a root config for my Ubuntu 18.04 Intel x86 machine, I get the following error: hintron@bazooka:~/code/jailhouse$ sudo jailhouse config create bazooka.c Traceback (most recent call last): File "/usr/local/sbin/jailhouse-config-create", line 1185, in dmar_regions)

Re: Jailhouse Images Issues

2018-05-23 Thread michael . g . hinton
On Tuesday, May 15, 2018 at 3:53:14 PM UTC-6, Jan Kiszka wrote: > On 2018-05-11 16:52, michael.g.hin...@gmail.com wrote: > >> Could you check in the guest Linux if the clocksources is tsc? > >> cat /sys/devices/system/clocksource/clocksource0/current_clocksource > > > > It says hpet.

Re: Jailhouse Images Issues

2018-05-15 Thread michael . g . hinton
> Could you check in the guest Linux if the clocksources is tsc? > cat /sys/devices/system/clocksource/clocksource0/current_clocksource It says hpet. avaliable_clocksource shows hpet and acpi_pm. > If not, please provide dmesg from inside the guest. I've attached a screenshot of the dmesg

Re: Jailhouse Images Issues

2018-05-15 Thread michael . g . hinton
Is there a reason why my original response was deleted? I'm confused. -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscr...@googlegroups.com.

Jailhouse Images Issues

2018-05-10 Thread michael . g . hinton
Hello, I'm struggling to get a Jailhouse demo up and running in QEMU using jailhouse-images. In jailhouse-images/, I was able to build the QEMU images via the `build-images.sh` script on an Ubuntu 17 machine, and I was able to start my custom-built QEMU 2.11 by setting the path of the