avsm changed the topic of #mirage to: Good news everyone! Mirage 3.0 released!
brson has quit [Quit: leaving]
copy` has quit [Quit: Connection closed for inactivity]
ubeatlenine has quit [Ping timeout: 245 seconds]
yegods has quit [Remote host closed the connection]
yegods has joined #mirage
yegods has quit [Remote host closed the connection]
seliopou has quit [Ping timeout: 240 seconds]
seliopou has joined #mirage
yomimono has quit [Ping timeout: 240 seconds]
mort___ has joined #mirage
srenatus[m] has quit [Remote host closed the connection]
dudelson[m] has quit [Remote host closed the connection]
smondet[m] has quit [Remote host closed the connection]
smondet[m] has joined #mirage
srenatus[m] has joined #mirage
dudelson[m] has joined #mirage
mort___1 has joined #mirage
mort___ has quit [Ping timeout: 255 seconds]
mort___1 has quit [Quit: Leaving.]
srenatus[m] has quit [Remote host closed the connection]
smondet[m] has quit [Remote host closed the connection]
dudelson[m] has quit [Remote host closed the connection]
smondet[m] has joined #mirage
mort___ has joined #mirage
mort___1 has joined #mirage
mort___ has quit [Ping timeout: 240 seconds]
srenatus[m] has joined #mirage
dudelson[m] has joined #mirage
mort___1 has quit [Quit: Leaving.]
mort___ has joined #mirage
<kensan> mato: Hi, thanks for the review.
<kensan> mato: Regarding the issue of testing on Muen: what kind of setup do you have in mind? Do you have any (rough) ideas?
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
yegods has joined #mirage
copy` has joined #mirage
yomimono has joined #mirage
<mato> kensan: I'm not sure, I think it'd be nice to have some automated way of testing (even if just under Bochs) that things still run as well as just build.
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
<mato> kensan: However, I don't think we need to hold up the PR waiting for that to be implemented.
<mato> kensan: However, I am going to try and test it manually, just for my peace of mind that "things work" :-)
<kensan> mato: Cool, thanks!
<kensan> mato: Just poke me if you run into trouble.
<kensan> mato: Unfortunately the whole setup is a bit involved by the nature of Muen requiring Intel VT-x and a detailed hardware spec.
<kensan> mato: Ah btw, test_time also does not work in Bochs since time is not emulated faithfully.
<mato> kensan: I didn't realise Bochs emulated VT-x, some emulation is better than none. Will it eventually be possible to run under nested KVM? My understanding is recent kernels have improved in that regard.
<kensan> mato: Yes, Bochs has support for VT-x and it is quite good. Initially we found some small issues but they were fixed quite quickly. That is why the version must be recent enough so the fixes are included.
<kensan> mato: If nested virtualization is stable it should in general be possible to run under KVM.
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
<mato> kensan: supposedly Linux 4.10+ can now run stock Bhyve under nested KVM: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203994
<mato> kensan: And there are a bunch of KVM changes including nested virt in 4.11: http://lkml.iu.edu/hypermail/linux/kernel/1702.2/04145.html
<dstolfa> mato: FWIW, there's been some mumble to get some support for nested VT-x in bhyve too
<mato> Of course, I wonder how secure nested VT-x can be since the hypervisor has to do quite a lot more to support it.
<mato> However, for development/testing/CI it'll be awesome.
<dstolfa> mato: Well, depends on how you implement it of course
<dstolfa> It's largely used for development, yes
<dstolfa> Using nested VT-x in production is a little insane
<dstolfa> Considering you have no way of easily verifying it's correct, secure, and well, it performs like poop
<kensan> mato: Yeah, I would say complexity increase is by an order of magnitude
<dstolfa> kensan: In bhyve's case, maybe even more
<mato> Hmm. So you think we'll never see "production quality" nested VT-x?
<kensan> mato: even when using the hardware features.
<dstolfa> mato: I don't think that it's feasible to rely on it happening in the present, maybe sometime we will
<dstolfa> Depends on the CPU trends
<dstolfa> If we have to emulate everything in the hypervisor, I don't think it's feasible to run in a production environment at reasonable speed
<dstolfa> But if CPUs give some support for nested virtualization, I don't see why not
<kensan> mato: Well, I am not sure. People are happy with the current crop of hypervisors so throwing nested virtualization into the mix may not be such a big increase/issue...
<dstolfa> The problem isn't as much in merging N VMCS into one, but in emulating VMX
<dstolfa> kensan: Well, if speed isn't your primary concern, then you could run nested, yes
<dstolfa> But you'd have to expect failures in terms of hypervisor's emulation of VMX, which isn't that uncommon
<kensan> dstolfa: Yeah, that is what I meant with complexity increase: that will definitely bring some interesting bugs.
<kensan> Case in point: the recent nasty Xen bugs have been in emulation code...
<mato> Yeah, and my limited exposure to the actual hypervisor VMX code (and Intel manuals) certainly made my eyes glaze over in terms of the complexity involved.
<dstolfa> mato: kensan One thing that is more feasible to expect is running MirageOS inside containers. I think Joyent does something similar -- they spawn an illumos zone and spin up a VM inside that
<mato> Emulating all of it correctly and securely is a huge task.
<dstolfa> mato: The pseudocode of VMX is enormous
<dstolfa> Had lots of fun with that trying to figure things out :D
dograt has quit [Ping timeout: 258 seconds]
<kensan> dstolfa: Its funny that in some places the pseudo-code just turns into comments :) Almost like the Intel engineer writing the documentation was getting tired.
<dstolfa> kensan: Oh yeah, AMD's manual is like that too lol
<kensan> mato: Its the reason we use the bare minimum. Plus we restrict subjects/VMs to run on the same logical CPU all the time so no headaches regarding migration.
<dstolfa> I spent about 2 full days digging through Intel and AMD manuals trying to figure out how to disable VMCALL and VMMCALL, turns out Intel doesn't have a way for it lol
<kensan> dstolfa: Are you working on bhyve or why do you burden yourself with this? ;)
<dstolfa> kensan: Working on bhyve in the context of real time tracing of VMs
<dstolfa> Using bhyve as my reference hypervisor, and extending it along the way
<dstolfa> (But the idea is obviously to have it run seamlessly on any hypervisor or OS)
<kensan> dstolfa: cool.
<dstolfa> The context for my digging through manuals in terms of VMCALL/VMMCALL was when implementing a hypercall ABI for the fast trap mechanism from the guest kernel to the host kernel while tracing, but in doing so I also wanted to provide a way to do automated malware analysis in the future and went about making a framework around emulating other hypervisors in bhyve, which turned out to require a fair bit of
<dstolfa> digging
<dstolfa> Also I wanted to provide a way to enable or disable hypercalls
<kensan> dstolfa: Ah I see. imho you can always execute vmcall which traps, right?
<dstolfa> kensan: Yeah, you can't stop .byte 0x0f,0x01,0xc1 from going to VMX root mode, you can just stop it from doing anything meaningful and injecting an UD fault
<kensan> dstolfa: Yeah, but the hypervisor needs to always handle it... There's a bunch of instructions which trap unconditionally.
<dstolfa> kensan: Oh yeah, but AMD provides a way to disable access to VMMCALL on a VMCB level
<kensan> mato: Regarding the Signed-off-by: do you want me to add this to all commits?
<kensan> dstolfa: That's nice.
<mato> kensan: We don't currently have that as a policy for contributions, so no. I'll make a comment in the PR.
<kensan> mato: Ah ok. I updated the PR without making that change so I thought I'd ask.
ubeatlenine has joined #mirage
<mato> kensan: Did you add some commits to the Muen branch since I reviewed it? Moving the call to console_init()? I can't quite tell from the Github web UI.
brson has joined #mirage
<mato> Ah, it seems you rebased it with that change. Not obvious from Github :-/
<kensan> mato: Yeah, I fixed up the original commit.
<kensan> mato: instead of doing a commit on top.
<kensan> mato: Hm so github shows all commits as changed since the hashes are different from the commit I reworked :/
<mato> Yeah.
<mato> Anyway, it looks fine. I'll test it tomorrow and then hit the green button if it all works.
<mato> GTG. TTYL.
<kensan> mato: cool thanks!
yomimono has quit [Ping timeout: 240 seconds]
dograt has joined #mirage
mort___ has quit [Read error: Connection reset by peer]
mort___ has joined #mirage
mort___ has quit [Client Quit]
aggelos_ has quit [Ping timeout: 240 seconds]
aggelos_ has joined #mirage
mort___ has joined #mirage
mort___ has quit [Quit: Leaving.]
<hannes> yeah, nested virtualisation using software sounds a step backwards
<hannes> and I've some theory it is not needed.... in most cases (*working hard on some libvirt replacement to provision other peoples vms on my physical machine*)
mort___ has joined #mirage
sknebel has quit [Quit: sknebel]
sknebel has joined #mirage
yomimono has joined #mirage
mort___ has quit [Quit: Leaving.]
yegods has quit [Remote host closed the connection]
mort___ has joined #mirage
yomimono has quit [Quit: Ex-Chat]
mort___ has quit [Quit: Leaving.]
brson has quit [Ping timeout: 260 seconds]
brson has joined #mirage
dmj` has quit [Ping timeout: 240 seconds]
dmj` has joined #mirage
copy` has quit [Quit: Connection closed for inactivity]
gjaldon__ has quit [Ping timeout: 240 seconds]
gjaldon__ has joined #mirage