mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
SCSI changes that enable sending vendor-specific commands via virtio-scsi.
Memory changes for QOMification and automatic tracking of MR lifetime. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJT8et9AAoJEBvWZb6bTYbyIJAQAI3AlLSe27xWoUGfQUgWH30z Rt/pShHz3BJMfQpD79JfTH8u6uBpkQmKtflerNT7FhXN9ULDzNq+b/jRtke8nkuy ctCt05FhhK00rfWpUoRue4XiCuvbizBU7MK0DI3yCyNdXQyYnFvgnvsJtlqox8Zh J5HZcBJEmdCiWBxq7UPk0qBitp4PqNoy7jlD/Ex3m7fJN5WK2cyspQIT9zmhehVn B8Nwp+RitDDbXbwm0r18col5rFr/6Nj6+dW1gr+7sVJDLNsmJEqC2l3Kgk0wbPkG Uqwbih29me9PC9/L1VLGHY0ApKDQ8JGE0GrYgEg162hbhoxEHkjjoHMhDUfV6Pj8 NkqcjjWl11UUhgkNqrGafayXbBVnOiEglxy8uXCeq14y9Xd/gjK9Fz6MQvRSOjms PFmaKknhdmpxh0DuZmTix7WBmKim8zOiCE0/vrAPvwx5L+d1bn5xh6yQvtVjBMpU Sru3Mhdm9bL9dUDBgOM/G6WCxSTVLBlExOblcYkQh03MfabD7bfplcrKYPXt5ull Y8YLjqkoIfoy5t0ErvtlpdBJjeEz99JXU+wLQ6NYHnzwzTV+oUtSaEph14mAFOcY XkFKdoPDI9PnyEfvy4193du8z/dSbhu7sWgHWbTCQyrcaNnSaVhlH43NUC+p23YN 8vfEsVLd1X7MFkDBUmWp =M+/m -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging SCSI changes that enable sending vendor-specific commands via virtio-scsi. Memory changes for QOMification and automatic tracking of MR lifetime. # gpg: Signature made Mon 18 Aug 2014 13:03:09 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: mtree: remove write-only field memory: Use canonical path component as the name memory: Use memory_region_name for name access memory: constify memory_region_name exec: Abstract away ref to memory region names loader: Abstract away ref to memory region names tpm_tis: remove instance_finalize callback memory: remove memory_region_destroy memory: convert memory_region_destroy to object_unparent ioport: split deletion and destruction nic: do not destroy memory regions in cleanup functions vga: do not dynamically allocate chain4_alias sysbus: remove unused function sysbus_del_io qom: object: move unparenting to the child property's release callback qom: object: delete properties before calling instance_finalize virtio-scsi: implement parse_cdb scsi-block, scsi-generic: implement parse_cdb scsi-block: extract scsi_block_is_passthrough scsi-bus: introduce parse_cdb in SCSIDeviceClass and SCSIBusInfo scsi-bus: prepare scsi_req_new for introduction of parse_cdb Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
0e4a773705
62 changed files with 183 additions and 308 deletions
28
memory.c
28
memory.c
|
@ -914,7 +914,6 @@ void memory_region_init(MemoryRegion *mr,
|
|||
if (size == UINT64_MAX) {
|
||||
mr->size = int128_2_64();
|
||||
}
|
||||
mr->name = g_strdup(name);
|
||||
|
||||
if (name) {
|
||||
object_property_add_child_array(owner, name, OBJECT(mr));
|
||||
|
@ -1259,16 +1258,9 @@ static void memory_region_finalize(Object *obj)
|
|||
assert(memory_region_transaction_depth == 0);
|
||||
mr->destructor(mr);
|
||||
memory_region_clear_coalescing(mr);
|
||||
g_free((char *)mr->name);
|
||||
g_free(mr->ioeventfds);
|
||||
}
|
||||
|
||||
void memory_region_destroy(MemoryRegion *mr)
|
||||
{
|
||||
object_unparent(OBJECT(mr));
|
||||
}
|
||||
|
||||
|
||||
Object *memory_region_owner(MemoryRegion *mr)
|
||||
{
|
||||
Object *obj = OBJECT(mr);
|
||||
|
@ -1313,9 +1305,9 @@ uint64_t memory_region_size(MemoryRegion *mr)
|
|||
return int128_get64(mr->size);
|
||||
}
|
||||
|
||||
const char *memory_region_name(MemoryRegion *mr)
|
||||
const char *memory_region_name(const MemoryRegion *mr)
|
||||
{
|
||||
return mr->name;
|
||||
return object_get_canonical_path_component(OBJECT(mr));
|
||||
}
|
||||
|
||||
bool memory_region_is_ram(MemoryRegion *mr)
|
||||
|
@ -1979,7 +1971,6 @@ typedef struct MemoryRegionList MemoryRegionList;
|
|||
|
||||
struct MemoryRegionList {
|
||||
const MemoryRegion *mr;
|
||||
bool printed;
|
||||
QTAILQ_ENTRY(MemoryRegionList) queue;
|
||||
};
|
||||
|
||||
|
@ -2009,7 +2000,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
|
|||
|
||||
/* check if the alias is already in the queue */
|
||||
QTAILQ_FOREACH(ml, alias_print_queue, queue) {
|
||||
if (ml->mr == mr->alias && !ml->printed) {
|
||||
if (ml->mr == mr->alias) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
@ -2017,7 +2008,6 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
|
|||
if (!found) {
|
||||
ml = g_new(MemoryRegionList, 1);
|
||||
ml->mr = mr->alias;
|
||||
ml->printed = false;
|
||||
QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue);
|
||||
}
|
||||
mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx
|
||||
|
@ -2032,8 +2022,8 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
|
|||
mr->romd_mode ? 'R' : '-',
|
||||
!mr->readonly && !(mr->rom_device && mr->romd_mode) ? 'W'
|
||||
: '-',
|
||||
mr->name,
|
||||
mr->alias->name,
|
||||
memory_region_name(mr),
|
||||
memory_region_name(mr->alias),
|
||||
mr->alias_offset,
|
||||
mr->alias_offset
|
||||
+ (int128_nz(mr->size) ?
|
||||
|
@ -2051,7 +2041,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
|
|||
mr->romd_mode ? 'R' : '-',
|
||||
!mr->readonly && !(mr->rom_device && mr->romd_mode) ? 'W'
|
||||
: '-',
|
||||
mr->name);
|
||||
memory_region_name(mr));
|
||||
}
|
||||
|
||||
QTAILQ_INIT(&submr_print_queue);
|
||||
|
@ -2099,10 +2089,8 @@ void mtree_info(fprintf_function mon_printf, void *f)
|
|||
mon_printf(f, "aliases\n");
|
||||
/* print aliased regions */
|
||||
QTAILQ_FOREACH(ml, &ml_head, queue) {
|
||||
if (!ml->printed) {
|
||||
mon_printf(f, "%s\n", ml->mr->name);
|
||||
mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head);
|
||||
}
|
||||
mon_printf(f, "%s\n", memory_region_name(ml->mr));
|
||||
mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head);
|
||||
}
|
||||
|
||||
QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue