mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
ide: Adds wwn=hex qdev option
Allow the user to specify a disk's World Wide Name. Linux guests can address disks by their unique World Wide Name number (e.g. /dev/disk/by-id/wwn-0x5001517959123522). This patch adds support for assigning a World Wide Name number to a virtual IDE disk. Cc: kwolf@redhat.com Signed-off-by: Floris Bos <dev@noc-ps.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
aa2c91bdfe
commit
95ebda85e0
3 changed files with 29 additions and 8 deletions
|
@ -349,6 +349,7 @@ struct IDEState {
|
|||
int drive_serial;
|
||||
char drive_serial_str[21];
|
||||
char drive_model_str[41];
|
||||
uint64_t wwn;
|
||||
/* ide regs */
|
||||
uint8_t feature;
|
||||
uint8_t error;
|
||||
|
@ -470,6 +471,7 @@ struct IDEDevice {
|
|||
char *version;
|
||||
char *serial;
|
||||
char *model;
|
||||
uint64_t wwn;
|
||||
};
|
||||
|
||||
#define BM_STATUS_DMAING 0x01
|
||||
|
@ -536,7 +538,8 @@ void ide_data_writel(void *opaque, uint32_t addr, uint32_t val);
|
|||
uint32_t ide_data_readl(void *opaque, uint32_t addr);
|
||||
|
||||
int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind,
|
||||
const char *version, const char *serial, const char *model);
|
||||
const char *version, const char *serial, const char *model,
|
||||
uint64_t wwn);
|
||||
void ide_init2(IDEBus *bus, qemu_irq irq);
|
||||
void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,
|
||||
DriveInfo *hd1, qemu_irq irq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue