Question: why no VMEXIT occur when I read/write emulated pci devices's bar by mmap inside guest userspace?

2023-03-27 Thread Wu Zongyong
Hi, I create a VM with a virtual pci device "-net nic,model=e1000", and I attemped to read/write the bar0 of the virtual nic inside the guest userspace by mmap the "/sys/bus/pci/devices/:xx:xx.x/resource0" to the userspace. What I expected is a VMEXIT should occur when I read/write the bar bu

SEV: why cbitpos is needed instead of just get it by cpuid?

2023-02-28 Thread Wu Zongyong
Hi, The @option{cbitpos} is defined with sev-guest object in qemu. And I'm wondering why this option is needed since we can get the C-bit position by cpuid. Besides, the only usecase I found in source code is to check if the value provided by user is consistent with the return value of cpuid in fu