Comments (3)
Update (fixed): After some further experiments I'm pretty sure to have fixed the problem:
In the EFER-Control Register the bit EFER_LMA = (1U << 10) (=Long Mode Active, see https://en.wikipedia.org/wiki/Control_register#EFER) needs to be set.
Obviously the old KVM version did not check for "Long Mode Active" to be set and was satisfied with "Long Mode Enable".
So Adding the following line of code to kvm-hello-world.c:setup_long_mode() obviously fixes the problem:
sregs->efer |= (1U << 10);//EFER_LMA
Would be cool if you could patch the code so that it works on the latest Ubuntu version in case others run into the same problem :)
Anyway I don't understand why there's two different flags "enable" and "active" for long mode:
Why would it make sense to enable but not activate long mode or to activate long mode without it being enabled? I'm a bit confused why there's two different control bits here... Can you maybe tell me why there's two "different" flags for long mode?
Kind regards,
Andreas
from kvm-hello-world.
The 64 bit code crashed on Fedora 27 too. The patch from @AnonymousII helped. I took liberty to send pull request (but it has wrong signed off header).
from kvm-hello-world.
Thanks. Sorry it took a while for me to merge the fix - I needed to reinstall a machine at home to test.
from kvm-hello-world.
Related Issues (12)
- In fact, this is an issue, but a comment. HOT 2
- Question on KVM
- kvm-hello-world on AMD
- /usr/bin/ld: cannot use executable file 'payload.o' as input to a link HOT 3
- Question: where is string "Hello world!" data HOT 2
- Question about -Werror in makefile
- hlt instruction qemu-kvm HOT 1
- Undefined Reference to "_GLOBAL_OFFSET_TABLE_" when linking guest32.o HOT 2
- License file HOT 1
- How to run this proyect? HOT 2
- No real-mode output? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvm-hello-world.