Assignment of interrupt numbers to Virtio devices in the guest

2023-01-05 Thread Arnabjyoti Kalita
interrupt number assigned to virtio devices. Additionally, are there other programmatic ways in QEMU for me to identify the interrupt numbers? Thanks, Arnabjyoti Kalita

QEMU-KVM Hardware Breakpoint Handling

2022-05-03 Thread Arnabjyoti Kalita
? Any pointers would be appreciated. Thank you very much for all your help. Best Regards, Arnabjyoti Kalita

Inter-processor interrupts in QEMU

2022-02-26 Thread Arnabjyoti Kalita
is raised? The guest and host architecture is both x86_64. My host runs Linux 5.8.0. Thank you very much for your reply. Best Regards, Arnabjyoti Kalita

Re: Modification to single Threaded Multi-Core emulation in TCG

2022-01-13 Thread Arnabjyoti Kalita
implementation going. Whenever the rdtsc instruction executes for a CPU, I read the next recorded TSC values for each CPU and make the next scheduling decision. I try to ensure that the TSC values are read in sequence. Best Regards, Arnabjyoti Kalita On Tue, Jan 11, 2022 at 11:03 PM Alex Bennée

Modification to single Threaded Multi-Core emulation in TCG

2021-12-22 Thread Arnabjyoti Kalita
to raise an interrupt at the end of the execution of every TB ? Where in code should I start making changes ? I do not want the functionality of the original TCG execution driver to change. Best Regards, Arnabjyoti Kalita

Re: Page Fault Handling in TCG mode

2021-11-09 Thread Arnabjyoti Kalita
TB instruction fetch)? How can this happen? Will guest execution fail if this happens? - Can it happen that a correct host PC map to an incorrect guest PC ? Best Regards, Arnabjyoti Kalita On Tue, Nov 9, 2021 at 4:42 PM Peter Maydell wrote: > > On Tue, 9 Nov 2021 at 05:44, Arnabjyoti

Page Fault Handling in TCG mode

2021-11-08 Thread Arnabjyoti Kalita
? For context, I am using QEMU version 5.0.1 and am looking for page fault handling mechanisms for the x86_64 architecture. Thank you very much. Best Regards, Arnabjyoti Kalita

Recording virtual memory addresses made by the Guest

2021-11-03 Thread Arnabjyoti Kalita
chitecture and is running Linux kernel 4.4.0. Thank you very much. Best Regards, Arnabjyoti Kalita

Logging program execution artifacts in TCG

2021-09-29 Thread Arnabjyoti Kalita
st Regards, Arnabjyoti Kalita

Re: Questions about virtio DMA operations

2021-09-01 Thread Arnabjyoti Kalita
Thank you Peter. This makes it very clear. Best Regards, Arnabjyoti Kalita On Tue, Aug 31, 2021 at 3:32 PM Peter Maydell wrote: > > On Tue, 31 Aug 2021 at 05:48, Arnabjyoti Kalita > wrote: > > > > Dear Peter, > > > > I had a few additional questions wit

Re: Questions about virtio DMA operations

2021-08-30 Thread Arnabjyoti Kalita
map() happens, the contents of the buffer that is pointed to by the host virtual address, will be finally written to the guest physical memory which is pointed to by "pa" in the code above? Best Regards, Arnabjyoti Kalita On Mon, Aug 30, 2021 at 3:16 PM Arnabjyoti Kalita wrote:

Re: Questions about virtio DMA operations

2021-08-30 Thread Arnabjyoti Kalita
And directly using the upstream record-and-replay feature is a slight impediment for me since I record in KVM mode and replay in TCG mode. But I get your point. I might try a more generic design once I have a working system. Best Regards, Arnabjyoti Kalita On Mon, Aug 30, 2021 at 2:39 PM P

Re: Questions about virtio DMA operations

2021-08-29 Thread Arnabjyoti Kalita
hem. During replay, all I would do is call virtqueue_push and pass in the members of the "VirtQueueElement" structure that I recorded. I hope this makes it clear. Thank you again for helping out, Peter. Best Regards, Arnabjyoti Kalita On Sun, Aug 29, 2021 at 5:49 PM Peter Maydell wrote: >

Re: Questions about virtio DMA operations

2021-08-28 Thread Arnabjyoti Kalita
virtqueue buffers be written to the guest memory, I can possibly just move forward without doing an unmap() in this case. Best Regards, Arnabjyoti Kalita

Questions about virtio DMA operations

2021-08-28 Thread Arnabjyoti Kalita
not happen? If there are good articles that describe this process of DMA address space mapping/unmapping, feel free to point me to them and I would love to read them too. Thank you very much. Best Regards, Arnabjyoti Kalita

Re: Questions about Disk I/O Record and Replay

2021-08-14 Thread Arnabjyoti Kalita
Dear Pavel, Thank you again for the answers. I had another question - How is it possible to just use the request id while recording and use it during replay? Don't we have to record other parameters of the disk I/O request (like offset, bytes, iov buffer etc.) ? Best Regards, Arnabjyoti Kalita

Questions about Disk I/O Record and Replay

2021-08-12 Thread Arnabjyoti Kalita
far. Best Regards, Arnabjyoti Kalita

Re: Block I/O record and replay questions

2021-08-05 Thread Arnabjyoti Kalita
Dear Pavel, Thank you very much for your answers. So if I understand correctly, the blkreplay layer would only record disk events generated by the virtual device, so this solves the problem of recording only the relevant disk events that change the guest state. Best Regards, Arnabjyoti Kalita

Block I/O record and replay questions

2021-08-05 Thread Arnabjyoti Kalita
eterministic event, like say, a disk interrupt? 3) How do we separate disk requests that are actually generated by the guest from the ones generated by QEMU (for eg. with operations like loadvm/savevm)? Thank you very much. Best Regards, Arnabjyoti Kalita

Re: Disable scsi disk requests in QEMU when using virtio-blk device

2021-07-19 Thread Arnabjyoti Kalita
by the guest as well. Are these interrupts independent or related? Best Regards, Arnab On Mon, Jul 19, 2021 at 11:55 AM Thomas Huth wrote: > > On 18/07/2021 15.37, Arnabjyoti Kalita wrote: > > Hello all, > > > > Is it possible to disable scsi disk requests being generated by the > &g

Disable scsi disk requests in QEMU when using virtio-blk device

2021-07-18 Thread Arnabjyoti Kalita
Hello all, Is it possible to disable scsi disk requests being generated by the guest when using a virtio-blk device? I am starting the guest in KVM mode using the below command line- sudo ./qemu-system-x86_64 -m 1024 --machine pc-i440fx-2.5 -cpu qemu64,-kvmclock,-kvm_pv_eoi -enable-kvm -netdev

Calling disk I/O functions in qemu main loop

2021-07-10 Thread Arnabjyoti Kalita
is x86-64. Thank you very much for all your help so far. Best regards, Arnabjyoti Kalita

How does virtio-net tx and rx work in TCG?

2021-06-13 Thread Arnabjyoti Kalita
ve to make to ensure synchronous processing of network packets happens in TCG? Thanks for all your help so far. Best regards, Arnabjyoti Kalita

Replaying block I/O events

2021-06-06 Thread Arnabjyoti Kalita
h the same disk state? Can I get rid of the extra snapshot that is created here? Thank you very much for all your help so far. Best Regards, Arnabjyoti Kalita

Re: Recording and replaying HPET timer values

2021-05-20 Thread Arnabjyoti Kalita
see any other potential causes of concern? Best Regards, Arnabjyoti Kalita On Mon, May 17, 2021 at 1:05 PM Pavel Dovgalyuk wrote: > > On 14.05.2021 06:30, Arnabjyoti Kalita wrote: > > Hello all, > > > > I am recording and replaying HPET timer values for my guest. > >

Recording and replaying HPET timer values

2021-05-13 Thread Arnabjyoti Kalita
values are being replayed correctly. Best Regards, Arnabjyoti Kalita

Understanding VMEXITS caused by the rdtsc instruction

2021-04-24 Thread Arnabjyoti Kalita
rdtsc. This requires me to know which functions get called when the rdtsc emulation happens within QEMU. How do I go about determining whether a VMEXIT happened because of the rdtsc instruction? Which function does QEMU execute to emulate rdtsc? Thank you very much. Best Regards, Arnabjyoti Kalita

Questions about timer interrupt handling in QEMU

2021-03-14 Thread Arnabjyoti Kalita
Hello all, This is a continuation of some of the questions I had about the clock record-replay handling process in QEMU. My previous post is here - https://www.mail-archive.com/qemu-discuss@nongnu.org/msg06231.html My experiment involves two steps. In the first step, I start QEMU in KVM mode,

Re: Some more questions with regards to QEMU clock record and replay

2021-03-03 Thread Arnabjyoti Kalita
Thank you Pavel. Your answers make the clock record-replay process much clearer to me now. Best Regards, Arnab On Tue, Mar 2, 2021 at 12:49 PM Pavel Dovgalyuk wrote: > On 01.03.2021 20:16, Arnabjyoti Kalita wrote: > > Hello all, > > > > I am really thankful for the wo

Some more questions with regards to QEMU clock record and replay

2021-03-01 Thread Arnabjyoti Kalita
Hello all, I am really thankful for the wonderful answers in my last post linked below- https://lists.nongnu.org/archive/html/qemu-discuss/2021-02/msg00131.html In continuation with the last post, I have a few more questions to ask - My experiment is still, mostly the same. I record clock

Re: QEMU Clock record and replay

2021-02-27 Thread Arnabjyoti Kalita
the host may * undergo (e.g. due to NTP). ``` Thanks. Best Regards, Arnab On Fri, Feb 26, 2021 at 3:25 PM Alex Bennée wrote: > > Pavel Dovgalyuk writes: > > > On 25.02.2021 18:43, Philippe Mathieu-Daudé wrote: > >> Cc'ing Pavel/Alex. > >> > >> O

Re: QEMU Clock record and replay

2021-02-27 Thread Arnabjyoti Kalita
t; On 2/25/21 4:09 PM, Arnabjyoti Kalita wrote: > >> Hello all, > >> > >> I am trying to understand how the clock values are recorded and replayed > >> in QEMU (when it runs in TCG mode). I have been specifically following > >> the document that has been

Re: QEMU Clock record and replay

2021-02-25 Thread Arnabjyoti Kalita
that the timer activity is synchronized with the KVM mode, when I load the guest in TCG mode. Will this be possible to achieve ? Thank you very much again. Best Regards, Arnab On Thu, Feb 25, 2021 at 10:30 PM Alex Bennée wrote: > > Arnabjyoti Kalita writes: > > > Hello all, >

Re: QEMU Clock record and replay

2021-02-25 Thread Arnabjyoti Kalita
Thank you Lukas for your answer. I was only looking to record and replay host clock values (not any other events), i.e. record in KVM mode and replay in TCG mode. Best Regards, Arnab On Thu, Feb 25, 2021 at 10:00 PM Lukas Straub wrote: > On Thu, 25 Feb 2021 20:39:20 +0530 > Arnabjyoti

QEMU Clock record and replay

2021-02-25 Thread Arnabjyoti Kalita
Hello all, I am trying to understand how the clock values are recorded and replayed in QEMU (when it runs in TCG mode). I have been specifically following the document that has been provided here - https://github.com/qemu/qemu/blob/master/docs/replay.txt I have the following 4 questions to ask-

Re: Question for debugging option

2021-01-17 Thread Arnabjyoti Kalita
No, it won't work with KVM. Thanks, Arnab On Mon, Jan 18, 2021 at 7:03 AM Duo Zhang wrote: > Hi developers, > > I am trying to capture input instructions through QEMU, I see on the > manual: "-d in_asm" shows input assembly code for each compiled TB. Does > the option still work when enabling

Identical CPU models for TCG and KVM

2020-11-01 Thread Arnabjyoti Kalita
Hello all, I am trying to mimic the CPU configuration that QEMU starts up with in both TCG and KVM modes. I do not see a mechanism to change the CPU model in TCG, while there is a way in KVM with the help of the -cpu flag. As a starting point, I used the *qemu64 *CPU when I start QEMU with KVM

Timer migration from KVM to TCG

2020-10-15 Thread Arnabjyoti Kalita
Hello all, I am doing a KVM-TCG migration of VMState as follows. I start the QEMU process in KVM mode using the below command line - *sudo ./qemu-system-x86_64 -m 1024 --machine pc-i440fx-2.5 -netdev tap,id=tap1,ifname=tap0,script=no,downscript=no --accel kvm -device

Re: Masking all interrupts in TCG mode

2020-10-04 Thread Arnabjyoti Kalita
Fri, Oct 2, 2020 at 11:39 PM Peter Maydell wrote: > On Fri, 2 Oct 2020 at 17:50, Arnabjyoti Kalita > wrote: > > What I can understand is that when we restore the VM State, the same > interrupt state will be restored which was before we did a savevm. And then > these interr

Re: Masking all interrupts in TCG mode

2020-10-02 Thread Arnabjyoti Kalita
different numbers in the KVM mode and in TCG mode? Like say, an interrupt is 0x15 in KVM, but is 0x75 in TCG. Best Regards, Arnab On Fri, Oct 2, 2020 at 4:05 PM Peter Maydell wrote: > On Fri, 2 Oct 2020 at 04:17, Arnabjyoti Kalita > wrote: > > Is there a way to mask all interrupts in

Masking all interrupts in TCG mode

2020-10-01 Thread Arnabjyoti Kalita
Hello all, Is there a way to mask *all* interrupts in the TCG mode of QEMU execution? How should I go about doing that in code? Scenario: I start the QEMU process in KVM mode and then do a savevm. I load the saved QEMU state in TCG mode. I'd like all the interrupts to be disabled/masked when I

Source of Device Interrupts in QEMU

2020-09-28 Thread Arnabjyoti Kalita
I am running an experiment with QEMU as follows - 1. Start the QEMU process with "accel=kvm" using the default qemu64 CPU, the command line I use is - *sudo ./qemu-system-x86_64 -m 1024 -machine pc-i440fx-2.5 -cpu qemu64,-kvmclock -accel kvm -netdev

Which clocksource does KVM-QEMU use ?

2020-09-24 Thread Arnabjyoti Kalita
Hello all, I am running QEMU with KVM using the below command line - *sudo ./qemu-system-x86_64 -m 1024 -machine pc-i440fx-3.0 * *-cpu qemu64,-kvmclock -accel kvm -netdev tap,id=tap1,ifname=tap0,script=no,downscript=no * *-device virtio-net-pci,netdev=tap1,mac=00:00:00:00:00:00 * *-drive

Virtqueue Kick functions in QEMU

2020-09-12 Thread Arnabjyoti Kalita
Hello all, I am running the QEMU stable version of 3.0 in KVM mode with the host as well as target architecture being x86_64. I am using a virtio-net device using the command line - -device virtio-net-pci,netdev=tap1,mac=00:00:00:00:00:00 I have been trying to record all the virtqueue kicks

Re: How does QEMU in TCG mode handle interrupts ?

2020-09-12 Thread Arnabjyoti Kalita
Thank you for the detailed explanation, Peter. It makes a lot of things clear. Arnab On Tue, Aug 25, 2020 at 4:00 PM Peter Maydell wrote: > On Tue, 25 Aug 2020 at 06:53, Arnabjyoti Kalita > wrote: > > This makes sense. In this scenario, when QEMU takes an interrupt at the >

Re: How does QEMU in TCG mode handle interrupts ?

2020-08-24 Thread Arnabjyoti Kalita
for all kinds of interrupts, hardware/software/faults/traps/vmexits etc. ? Best Regards, Arnab On Sat, Aug 22, 2020 at 7:01 PM Peter Maydell wrote: > On Sat, 22 Aug 2020 at 09:42, Arnabjyoti Kalita > wrote: > > I am running QEMU-3.0.0 in TCG mode, and my QEMU as well as TCG target

How does QEMU in TCG mode handle interrupts ?

2020-08-22 Thread Arnabjyoti Kalita
Hello all, I am running QEMU-3.0.0 in TCG mode, and my QEMU as well as TCG target is x86_64 architecture. What I am trying to do is inject an I/O interrupt in the middle of a translation block. I have started TCG mode using the following debug flags *-d in_asm,cpu,exec,nochain* Let's say, I

QEMU savevm and loadvm doubts

2020-07-08 Thread Arnabjyoti Kalita
size);* given this scenario, when we do *savevm* and then a *loadvm*, will the memory addresses like *nc*, *buf* in the function above still retain correct values, or will they be garbage? Thank you for answering. Best Regards, Arnabjyoti Kalita

Recording network traffic coming through virtio-net

2020-07-08 Thread Arnabjyoti Kalita
packets without fail. Regards, Arnabjyoti Kalita

[Qemu-discuss] Recording I/O activity after KVM does a VMEXIT

2018-05-30 Thread Arnabjyoti Kalita
Hello all, I am trying to implement a 'minimal' record-replay mechanism for KVM, which is similar to the one existing for TCG via -icount. I am trying to record I/O events only (specifically disk and network events) when KVM does a VMEXIT. This has led me to the function kvm_cpu_exec where I can

Re: [Qemu-discuss] Understanding the return value of the function tcg_qemu_tb_exec()

2018-05-16 Thread Arnabjyoti Kalita
Hi Peter, Thanks for highlighting this. Regards, Arnabjyoti Kalita On Wed, May 16, 2018 at 9:14 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 15 May 2018 at 22:09, Arnabjyoti Kalita <akal...@cs.stonybrook.edu> > wrote: > > I was trying to unde

[Qemu-discuss] Understanding the return value of the function tcg_qemu_tb_exec()

2018-05-15 Thread Arnabjyoti Kalita
it hard to understand what it returns from the source code. Basically, I am finding it hard to determine if this function returns the current TB that was executed or that it returns the next TB that is to be executed. Thanks and Regards, Arnabjyoti Kalita

[Qemu-discuss] Forcefully causing Interrupts in QEMU-TCG

2018-04-02 Thread Arnabjyoti Kalita
Hi all, I have been trying to simulate the occurrence of an interrupt during the execution of an application in TCG mode. Specifically the interrupt number is 239 (local apic timer interrupt). Briefly, I am using the -loadvm command to load a previously saved state of QEMU. When I load the saved

[Qemu-discuss] Disable Page Faults in QEMU

2018-03-26 Thread Arnabjyoti Kalita
Hi all, I have been trying to modify the execution flow in QEMU. Briefly, at certain points in my program, I have tried to reverse the direction of the branch i.e. if the branch was taken, I have forced the branch to not be taken or if the branch was not-taken, I have forced the branch to be

Re: [Qemu-discuss] How do -icount flags work in QEMU TCG

2018-03-24 Thread Arnabjyoti Kalita
at 12:27 PM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 23 March 2018 at 19:47, Arnabjyoti Kalita <akal...@cs.stonybrook.edu> > wrote: > > Hi Peter, > > > > Yes only I could see that. Sorry for dumping out incomplete logs :) > >

Re: [Qemu-discuss] How do -icount flags work in QEMU TCG

2018-03-23 Thread Arnabjyoti Kalita
. That helped me to atleast narrow down the sources of this cause. Best Regards, Arnab On Fri, Mar 23, 2018 at 6:03 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 22 March 2018 at 22:34, Arnabjyoti Kalita <akal...@cs.stonybrook.edu> > wrote: > > From what

Re: [Qemu-discuss] How do -icount flags work in QEMU TCG

2018-03-22 Thread Arnabjyoti Kalita
r.mayd...@linaro.org> wrote: > On 21 March 2018 at 20:22, Arnabjyoti Kalita <akal...@cs.stonybrook.edu> > wrote: > > I see that in the trace file, some of the TCG blocks seem to be > translated > > more than once - > > > > ( NOTE: I am not using the T

[Qemu-discuss] How do -icount flags work in QEMU TCG

2018-03-21 Thread Arnabjyoti Kalita
Hi all, I have been trying to understand how the -icount shift=N | auto flags work in QEMU. There are small descriptions as to how it works already, but I just wanted a clearer perspective. I obtained a trace of the target instructions using "-d in_asm" switch while having the icount flags in

Re: [Qemu-discuss] TCG execution in QEMU is stuck

2018-03-21 Thread Arnabjyoti Kalita
Thanks Peter for guiding me through this information. I was able to find out the source of this problem when I added the -nochain feature to the QEMU command line. On Thu, Mar 15, 2018 at 6:06 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 15 March 2018 at 00:51, Arnabjyo

[Qemu-discuss] TCG execution in QEMU is stuck

2018-03-14 Thread Arnabjyoti Kalita
Hi all, I have been trying to modify the execution flow in QEMU. Briefly, at certain points in my program, I have tried to reverse the direction of the branch i.e. if the branch was taken, I have forced the branch to not be taken or if the branch was not-taken, I have forced the branch to be

Re: [Qemu-discuss] QEMU is looping when I load a VM snapshot

2017-09-04 Thread Arnabjyoti Kalita
QEMU version 2.10 as well. I will be grateful if you can provide me with some more details on the root cause of this issue. Best Regards, Arnab On Mon, Sep 4, 2017 at 4:58 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 1 September 2017 at 18:33, Arnabjyoti Kalit

[Qemu-discuss] Understanding the contents of virsh-dump --memory-only for a QEMU machine

2017-08-02 Thread Arnabjyoti Kalita
Hello, I was trying to understand the ELF file generated by the virsh dump (--memory-only) command. I have successfully generated a dump of the QEMU VM memory using this command. I specifically am trying to understand the loadable segments of this ELF file. I ran readelf -a to get the

[Qemu-discuss] (no subject)

2017-08-02 Thread Arnabjyoti Kalita
Hello, I was trying to understand the ELF file generated by the virsh dump (--memory-only) command. I have successfully generated a dump of the QEMU VM memory using this command. I specifically am trying to understand the loadable segments of this ELF file. I ran readelf -a to get the

[Qemu-discuss] Reading QEMU VM dump/save files and QEMU memory snapshots

2017-07-26 Thread Arnabjyoti Kalita
Hello, I was looking for ways to read in QEMU memory dump files/ QEMU snapshot files. I currently have two files with me - one of them is a snapshot of the memory which I created using the command (virsh snapshot-create-as --memspec ... ) and the other is a dump of the QEMU guest memory,