[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SEV guest debugging support for Qemu
From: |
Paolo Bonzini |
Subject: |
Re: SEV guest debugging support for Qemu |
Date: |
Fri, 25 Sep 2020 10:51:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 22/09/20 22:11, Ashish Kalra wrote:
> This internally invokes the address_space_rw() accessor functions
> which we had "fixed" internally (as part of the earlier patch) to
> invoke memory region specific debug ops. In our earlier approach we
> were adding debug ops/callbacks to memory regions and as per comments
> on our earlier patches, Paolo was not happy with this debug API for
> MemoryRegions and hence the SEV support for Qemu was merged without
> the debug support.
My complaint was only about hooking into address_space_read and
address_space_write; I think the hook should not touch general-purpose
(non-debug) code if possible, so something like this:
typedef struct MemoryDebugOps {
hwaddr (*translate)(CPUState *cpu, target_ulong addr,
MemTxAttrs *attrs);
MemTxResult (*read)(AddressSpace *as, hwaddr phys_addr,
MemTxAttrs attrs, void *buf,
hwaddr len);
MemTxResult (*write)(AddressSpace *as, hwaddr phys_addr,
MemTxAttrs attrs, const void *buf,
hwaddr len);
} MemoryDebugOps;
These ops would be used only by cpu_memory_rw_debug and would default to
static const MemoryDebugOps default_debug_ops = {
.translate = cpu_get_phys_page_attrs_debug,
.read = address_space_read,
.write = address_space_write_rom
};
static const MemoryDebugOps *debug_ops = &default_debug_ops;
Paolo
Re: SEV guest debugging support for Qemu,
Paolo Bonzini <=
- Re: SEV guest debugging support for Qemu, Ashish Kalra, 2020/09/25
- Re: SEV guest debugging support for Qemu, Paolo Bonzini, 2020/09/25
- Re: SEV guest debugging support for Qemu, Ashish Kalra, 2020/09/25
- Re: SEV guest debugging support for Qemu, Paolo Bonzini, 2020/09/25
- Re: SEV guest debugging support for Qemu, Ashish Kalra, 2020/09/28
- Re: SEV guest debugging support for Qemu, Paolo Bonzini, 2020/09/28