Implementing an access log

2021-05-07 Thread Lorenzo Susini
Hi all, I'm a student and am working on a personal project, I would like to receive some feedback on implementing a memory access log in QEMU (or in KVM, since I'm always enabling it). In particular, I want to keep track of the guest physical pages which are accessed during a certain interval of t

Re: KVM_MEM_READONLY slot flag not working properly

2021-03-18 Thread Lorenzo Susini
Well I'm sorry but I didn't know IDT was marked as read only by Linux. If it is read only, how can you register any new interrupt handler? I guess it's a way of securing stuff against malicious attacks. I was taking for granted that the IDT was written when registering a new irq handler, given that

KVM_MEM_READONLY slot flag not working properly

2021-03-18 Thread Lorenzo Susini
Hello, Have some of you successfully used the KVM_MEM_READONLY slot flag? I'm working on a project and I'm trying to protect the guest's IDT by using KVM, modifying kvm-all.c. I'm able to correctly locate the IDT in the host by reading IDTR with KVM_GET_SREGS, translating it with KVM_TRANSLATE an

KVM guest physical address and its corresponding host virtual address

2021-03-13 Thread Lorenzo Susini
x27;m not sure. Do you think I can use this? I see it is also use to inject something (mce), so maybe it's good to use it. Could you also explain to me the meaning of the ram field of the KVMSlot struct? Best regards, Lorenzo Susini