RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 602590 - Disable pci_add, pci_del, drive_add
Summary: Disable pci_add, pci_del, drive_add
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-10 09:17 UTC by Markus Armbruster
Modified: 2010-11-11 19:30 UTC (History)
5 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.76.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 01:39:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Markus Armbruster 2010-06-10 09:17:17 UTC
Description of problem: pci_add, pci_del and drive_add are old ways to hot-plug and hot-unplug devices and drives.  They should be disabled.

pci_add is limited to PCI NICs, lsi53c895a, and virtio-blk-pci.  device_add is more general.

pci_del is limited to PCI devices.  device_del is more general.

drive_add is limited to SCSI drives and unconnected drives.  There is no way to delete a drive other than by deleting its controller with pci_del.  The forthcoming blockdev_add, blockdev_del will be more general.

Keeping the limited legacy interfaces confuses users.  Moreover, they use special legacy code paths instead of the common ones, and thus make us vulnerable to bugs hiding there.

Comment 2 RHEL Program Management 2010-06-10 09:33:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 juzhang 2010-06-29 09:02:44 UTC
Reproduced on qemu-kvm-0.12.1.2-2.53.el6    

Issue the following commands
(qemu) ? drive_add
drive_add [[<domain>:]<bus>:]<slot>
[file=file][,if=type][,bus=n]
[,unit=m][,media=d][index=i]
[,cyls=c,heads=h,secs=s[,trans=t]]
[snapshot=on|off][,cache=on|off] -- add drive to PCI storage controller
(qemu) ? pci_add 
pci_add auto|[[<domain>:]<bus>:]<slot> nic|storage|host [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]... [host=02:00.0[,name=string][,dma=none] -- hot-add PCI device
(qemu) ? pci_del
pci_del [[<domain>:]<bus>:]<slot> -- hot remove PCI device


Verified on qemu-kvm-0.12.1.2-2.82.el6  
1. boot vm
/usr/libexec/qemu-kvm -usbdevice tablet -rtc-td-hack -m 2G -smp 2 -drive file=/root/rhel6_2.33_641.qcow2,if=none,boot=on,cache=none,format=qcow2,werror=stop,rerror=stop,id=drive-virtio-disk0 -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:64:98 -uuid `uuidgen` -cpu qemu64,+sse2,+x2apic -device virtio-balloon-pci -boot c  -vnc :10 -qmp tcp:0:4444,server,server -monitor stdio

2. for text monitor
issue the following commands
(qemu) drive_add
unknown command: 'drive_add'
(qemu) pci_add
unknown command: 'pci_add'
(qemu) pci_del
unknown command: 'pci_del'

3. for qmp monitor
#{"execute":"query-commands"}
{"return": [{"name": "quit"}, {"name": "eject"}, {"name": "change"}, {"name": "stop"}, {"name": "cont"}, {"name": "system_reset"}, {"name": "system_powerdown"}, {"name": "device_add"}, {"name": "device_del"}, {"name": "cpu"}, {"name": "memsave"}, {"name": "pmemsave"}, {"name": "migrate"}, {"name": "migrate_cancel"}, {"name": "migrate_set_speed"}, {"name": "migrate_set_downtime"}, {"name": "netdev_add"}, {"name": "netdev_del"}, {"name": "balloon"}, {"name": "getfd"}, {"name": "closefd"}, {"name": "block_passwd"}, {"name": "qmp_capabilities"}, {"name": "__com.redhat_set_password"}, {"name": "__com.redhat_spice_migrate_info"}, {"name": "query-version"}, {"name": "query-commands"}, {"name": "query-chardev"}, {"name": "query-block"}, {"name": "query-blockstats"}, {"name": "query-cpus"}, {"name": "query-hpet"}, {"name": "query-kvm"}, {"name": "query-status"}, {"name": "query-mice"}, {"name": "query-vnc"}, {"name": "query-name"}, {"name": "query-uuid"}, {"name": "query-migrate"}, {"name": "query-balloon"}]}

drive_add,pci_add and pci_del is not included in the above commands.

Comment 8 juzhang 2010-07-02 01:39:05 UTC
according to comment6,close this issue.


Note You need to log in before you can comment on or make changes to this bug.