Re: Page Fault Handling in TCG mode

2021-11-09 Thread Peter Maydell
On Tue, 9 Nov 2021 at 15:00, Arnabjyoti Kalita wrote: > > Thank you very much, Peter. I have got the gist of the code flow. > Based on your explanation, I have a couple of questions to ask - > > - In cpu_restore_state(), can it happen that the host PC is incorrect > and thereby, the resultant gues

Re: Page Fault Handling in TCG mode

2021-11-09 Thread Arnabjyoti Kalita
Thank you very much, Peter. I have got the gist of the code flow. Based on your explanation, I have a couple of questions to ask - - In cpu_restore_state(), can it happen that the host PC is incorrect and thereby, the resultant guest PC becomes incorrect (the comments say that this happens during

Re: Page Fault Handling in TCG mode

2021-11-09 Thread Peter Maydell
On Tue, 9 Nov 2021 at 05:44, Arnabjyoti Kalita wrote: > I am trying to understand how page faults happen when a guest is > executing in TCG mode. Specifically, how does TCG determine at which > instruction pointer did page fault happen? Which functions in the TCG > code flow get called when it det

Page Fault Handling in TCG mode

2021-11-08 Thread Arnabjyoti Kalita
Hello all, I am trying to understand how page faults happen when a guest is executing in TCG mode. Specifically, how does TCG determine at which instruction pointer did page fault happen? Which functions in the TCG code flow get called when it detects that memory is not present in the page table?