Re: [libvirt] [PATCH] Add AHCI support to qemu driver
On Tue, Oct 18, 2011 at 07:49:11AM -0500, Adam Litke wrote: > On Mon, Oct 17, 2011 at 02:08:42PM -0600, Jim Fehlig wrote: > > Hi Adam, > > > > I've been traveling, sorry for the delay... > > > > > With the following config, I end up booting from the cdrom. If I take > > > away the > > > cdrom definition completely, I am unable to boot at all. > > > > > > > I can boot fine with your config, either from sda () or > > cdrom (). > > > > Have you verified your seabios supports booting from ahci as Bruce > > mentioned? > > No, I have not been able to verify it. Seabios refuses to build on my system > with the version of binutils I have installed. I am fairly certain that I am > using too old of a version of seabios (as you suggested). I am happy to > withdraw my problem report. And I just now was able to verify it. With an updated seabios, everything seems to be working fine for me. I can boot from the disks without problems. -- Adam Litke IBM Linux Technology Center -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
On Mon, Oct 17, 2011 at 02:08:42PM -0600, Jim Fehlig wrote: > Hi Adam, > > I've been traveling, sorry for the delay... > > > With the following config, I end up booting from the cdrom. If I take away > > the > > cdrom definition completely, I am unable to boot at all. > > > > I can boot fine with your config, either from sda () or > cdrom (). > > Have you verified your seabios supports booting from ahci as Bruce > mentioned? No, I have not been able to verify it. Seabios refuses to build on my system with the version of binutils I have installed. I am fairly certain that I am using too old of a version of seabios (as you suggested). I am happy to withdraw my problem report. -- Adam Litke IBM Linux Technology Center -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
Eric Blake wrote: > On 09/28/2011 04:43 PM, Jim Fehlig wrote: >> Tested with multiple AHCI controllers and multiple disks attached >> to a controller. E.g., >> >> +++ b/src/qemu/qemu_capabilities.c >> @@ -139,6 +139,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, >> "no-shutdown", >> >> "cache-unsafe", /* 75 */ >> + "ich9-ahci", > > You'll have to rebase here, but nothing too difficult. Yep, simple rebase > > ACK. and pushed. Thanks! Jim -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
On 09/28/2011 04:43 PM, Jim Fehlig wrote: Tested with multiple AHCI controllers and multiple disks attached to a controller. E.g., +++ b/src/qemu/qemu_capabilities.c @@ -139,6 +139,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, "no-shutdown", "cache-unsafe", /* 75 */ + "ich9-ahci", You'll have to rebase here, but nothing too difficult. ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
Adam Litke wrote: > On Mon, Oct 03, 2011 at 10:46:18PM -0600, Jim Fehlig wrote: > >> Adam Litke wrote: >> >>> Hi Jim. I was testing this and found that I could not boot from the sata >>> disks >>> I defined. When I switch them back to ide, they can be booted just fine. >>> Perhaps something is missing from the boot order logic? >>> >>> >> Hmm, I didn't notice this in my testing. sda in the below config >> contained /boot. Can you provide the domain config? >> > > Hi Adam, I've been traveling, sorry for the delay... > With the following config, I end up booting from the cdrom. If I take away > the > cdrom definition completely, I am unable to boot at all. > I can boot fine with your config, either from sda () or cdrom (). Have you verified your seabios supports booting from ahci as Bruce mentioned? Thanks, Jim > > blockPull-test > 262144 > 262144 > 1 > > hvm > > > > > > > > > destroy > restart > restart > > > /home/aglitke/src/qemu/x86_64-softmmu/qemu-system-x86_64 > > > > > > > > > > > > > > > > > > > > > > > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
Adam, Are you using a seabios which supports booting from ahci? It needs to be somewhat recent, not more than around 6 weeks old, as there have been bug fixes in that area. Bruce >>> Adam Litke 10/03/11 4:43 PM >>> Hi Jim. I was testing this and found that I could not boot from the sata disks I defined. When I switch them back to ide, they can be booted just fine. Perhaps something is missing from the boot order logic? On Wed, Sep 28, 2011 at 04:43:25PM -0600, Jim Fehlig wrote: > Tested with multiple AHCI controllers and multiple disks attached > to a controller. E.g., > > > > > > > > > > > > > > > > > > > > > > > > > > --- > docs/formatdomain.html.in |9 +++-- > docs/schemas/domaincommon.rng |1 + > src/conf/domain_conf.c | 14 + > src/qemu/qemu_capabilities.c |3 ++ > src/qemu/qemu_capabilities.h |1 + > src/qemu/qemu_command.c| 30 > > .../qemuxml2argv-disk-sata-device.args |6 > .../qemuxml2argv-disk-sata-device.xml | 25 > tests/qemuxml2argvtest.c |3 ++ > 9 files changed, 82 insertions(+), 10 deletions(-) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index 3087d01..b6a0c66 100644 > --- a/docs/formatdomain.html.in > +++ b/docs/formatdomain.html.in > @@ -972,11 +972,12 @@ > as a device ordering hint. The optional bus > attribute specifies the type of disk device to emulate; > possible values are driver specific, with typical values being > -"ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is > -inferred from the style of the device name. eg, a device named 'sda' > -will typically be exported using a SCSI bus. > +"ide", "scsi", "virtio", "xen", "usb" or "sata". If omitted, the bus > +type is inferred from the style of the device name. eg, a device > named > +'sda' will typically be exported using a SCSI bus. > Since 0.0.3; bus attribute since 0.4.3; > -"usb" attribute value since after 0.4.4 > +"usb" attribute value since after 0.4.4; "sata" attribute value since > +0.9.7 >driver > > The optional driver element allows specifying further details > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng > index be98be0..675d55d 100644 > --- a/docs/schemas/domaincommon.rng > +++ b/docs/schemas/domaincommon.rng > @@ -790,6 +790,7 @@ > xen > usb > uml > +sata > > > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index a918679..6a7f296 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -2157,6 +2157,15 @@ virDomainDiskDefAssignAddress(virCapsPtr caps, > virDomainDiskDefPtr def) > def->info.addr.drive.unit = (idx % 2); > break; > > +case VIR_DOMAIN_DISK_BUS_SATA: > +/* For SATA we define the default mapping to be 6 units > + * per bus, 1 bus per controller, many controllers */ > +def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE; > +def->info.addr.drive.controller = idx / 6; > +def->info.addr.drive.bus = 0; > +def->info.addr.drive.unit = idx % 6; > +break; > + > case VIR_DOMAIN_DISK_BUS_FDC: > /* For FDC we define the default mapping to be 2 units > * per bus, 1 bus per controller, many controllers */ > @@ -8675,6 +8684,11 @@ int virDomainDefAddImplicitControllers(virDomainDefPtr > def) >VIR_DOMAIN_DISK_BUS_IDE) < 0) > return -1; > > +if (virDomainDefAddDiskControllersForType(def, > + > VIR_DOMAIN_CONTROLLER_TYPE_SATA, > + VIR_DOMAIN_DISK_BUS_SATA) < 0) > +return -1; > + > if (virDomainDefMaybeAddVirtioSerialController(def) < 0) > return -1; > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > index 8e20e3f..7122756 100644 > --- a/src/qemu/qemu_capabilities.c > +++ b/src/qemu/qemu_capabilities.c > @@ -139,6 +139,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, >"no-shutdown", > >"cache-unsafe", /* 75 */ > + "ich9-ahci", > ); > > struct qemu_feature_flags { > @@ -1241,6 +1242,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr > flags) > qemuCapsSet(flags, QEMU_CAPS_USB_REDIR); > if (strstr(str, "name \"usb-hub\"")) > qemuCapsSet(flags, QEMU_CAPS_USB_HUB); > +if (strstr(str, "name \"
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
On Mon, Oct 03, 2011 at 10:46:18PM -0600, Jim Fehlig wrote: > Adam Litke wrote: > > Hi Jim. I was testing this and found that I could not boot from the sata > > disks > > I defined. When I switch them back to ide, they can be booted just fine. > > Perhaps something is missing from the boot order logic? > > > > Hmm, I didn't notice this in my testing. sda in the below config > contained /boot. Can you provide the domain config? With the following config, I end up booting from the cdrom. If I take away the cdrom definition completely, I am unable to boot at all. blockPull-test 262144 262144 1 hvm destroy restart restart /home/aglitke/src/qemu/x86_64-softmmu/qemu-system-x86_64 -- Adam Litke IBM Linux Technology Center -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
Adam Litke wrote: > Hi Jim. I was testing this and found that I could not boot from the sata > disks > I defined. When I switch them back to ide, they can be booted just fine. > Perhaps something is missing from the boot order logic? > Hmm, I didn't notice this in my testing. sda in the below config contained /boot. Can you provide the domain config? Thanks for taking a look! Jim > On Wed, Sep 28, 2011 at 04:43:25PM -0600, Jim Fehlig wrote: > >> Tested with multiple AHCI controllers and multiple disks attached >> to a controller. E.g., >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > function='0x0'/> >> >> >> > function='0x0'/> >> >> --- >> docs/formatdomain.html.in |9 +++-- >> docs/schemas/domaincommon.rng |1 + >> src/conf/domain_conf.c | 14 + >> src/qemu/qemu_capabilities.c |3 ++ >> src/qemu/qemu_capabilities.h |1 + >> src/qemu/qemu_command.c| 30 >> >> .../qemuxml2argv-disk-sata-device.args |6 >> .../qemuxml2argv-disk-sata-device.xml | 25 >> tests/qemuxml2argvtest.c |3 ++ >> 9 files changed, 82 insertions(+), 10 deletions(-) >> >> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in >> index 3087d01..b6a0c66 100644 >> --- a/docs/formatdomain.html.in >> +++ b/docs/formatdomain.html.in >> @@ -972,11 +972,12 @@ >> as a device ordering hint. The optional bus >> attribute specifies the type of disk device to emulate; >> possible values are driver specific, with typical values being >> -"ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is >> -inferred from the style of the device name. eg, a device named 'sda' >> -will typically be exported using a SCSI bus. >> +"ide", "scsi", "virtio", "xen", "usb" or "sata". If omitted, the bus >> +type is inferred from the style of the device name. eg, a device >> named >> +'sda' will typically be exported using a SCSI bus. >> Since 0.0.3; bus attribute since >> 0.4.3; >> -"usb" attribute value since after 0.4.4 >> +"usb" attribute value since after 0.4.4; "sata" attribute value >> since >> +0.9.7 >>driver >> >> The optional driver element allows specifying further details >> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng >> index be98be0..675d55d 100644 >> --- a/docs/schemas/domaincommon.rng >> +++ b/docs/schemas/domaincommon.rng >> @@ -790,6 +790,7 @@ >> xen >> usb >> uml >> +sata >> >> >> >> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c >> index a918679..6a7f296 100644 >> --- a/src/conf/domain_conf.c >> +++ b/src/conf/domain_conf.c >> @@ -2157,6 +2157,15 @@ virDomainDiskDefAssignAddress(virCapsPtr caps, >> virDomainDiskDefPtr def) >> def->info.addr.drive.unit = (idx % 2); >> break; >> >> +case VIR_DOMAIN_DISK_BUS_SATA: >> +/* For SATA we define the default mapping to be 6 units >> + * per bus, 1 bus per controller, many controllers */ >> +def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE; >> +def->info.addr.drive.controller = idx / 6; >> +def->info.addr.drive.bus = 0; >> +def->info.addr.drive.unit = idx % 6; >> +break; >> + >> case VIR_DOMAIN_DISK_BUS_FDC: >> /* For FDC we define the default mapping to be 2 units >> * per bus, 1 bus per controller, many controllers */ >> @@ -8675,6 +8684,11 @@ int >> virDomainDefAddImplicitControllers(virDomainDefPtr def) >>VIR_DOMAIN_DISK_BUS_IDE) < 0) >> return -1; >> >> +if (virDomainDefAddDiskControllersForType(def, >> + >> VIR_DOMAIN_CONTROLLER_TYPE_SATA, >> + VIR_DOMAIN_DISK_BUS_SATA) < 0) >> +return -1; >> + >> if (virDomainDefMaybeAddVirtioSerialController(def) < 0) >> return -1; >> >> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c >> index 8e20e3f..7122756 100644 >> --- a/src/qemu/qemu_capabilities.c >> +++ b/src/qemu/qemu_capabilities.c >> @@ -139,6 +139,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, >>"no-shutdown", >> >>"cache-unsafe", /* 75 */ >> + "ich9-ahci", >> ); >> >> struct qemu_feature_flags { >> @@ -1241,6 +1242,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr >> flags) >> qemuCapsSet(flags, QEMU_CAPS_USB_R
Re: [libvirt] [PATCH] Add AHCI support to qemu driver
Hi Jim. I was testing this and found that I could not boot from the sata disks I defined. When I switch them back to ide, they can be booted just fine. Perhaps something is missing from the boot order logic? On Wed, Sep 28, 2011 at 04:43:25PM -0600, Jim Fehlig wrote: > Tested with multiple AHCI controllers and multiple disks attached > to a controller. E.g., > > > > > > > > > > > > > > > > > > > > >function='0x0'/> > > >function='0x0'/> > > --- > docs/formatdomain.html.in |9 +++-- > docs/schemas/domaincommon.rng |1 + > src/conf/domain_conf.c | 14 + > src/qemu/qemu_capabilities.c |3 ++ > src/qemu/qemu_capabilities.h |1 + > src/qemu/qemu_command.c| 30 > > .../qemuxml2argv-disk-sata-device.args |6 > .../qemuxml2argv-disk-sata-device.xml | 25 > tests/qemuxml2argvtest.c |3 ++ > 9 files changed, 82 insertions(+), 10 deletions(-) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index 3087d01..b6a0c66 100644 > --- a/docs/formatdomain.html.in > +++ b/docs/formatdomain.html.in > @@ -972,11 +972,12 @@ > as a device ordering hint. The optional bus > attribute specifies the type of disk device to emulate; > possible values are driver specific, with typical values being > -"ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is > -inferred from the style of the device name. eg, a device named 'sda' > -will typically be exported using a SCSI bus. > +"ide", "scsi", "virtio", "xen", "usb" or "sata". If omitted, the bus > +type is inferred from the style of the device name. eg, a device > named > +'sda' will typically be exported using a SCSI bus. > Since 0.0.3; bus attribute since > 0.4.3; > -"usb" attribute value since after 0.4.4 > +"usb" attribute value since after 0.4.4; "sata" attribute value since > +0.9.7 >driver > > The optional driver element allows specifying further details > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng > index be98be0..675d55d 100644 > --- a/docs/schemas/domaincommon.rng > +++ b/docs/schemas/domaincommon.rng > @@ -790,6 +790,7 @@ > xen > usb > uml > +sata > > > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index a918679..6a7f296 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -2157,6 +2157,15 @@ virDomainDiskDefAssignAddress(virCapsPtr caps, > virDomainDiskDefPtr def) > def->info.addr.drive.unit = (idx % 2); > break; > > +case VIR_DOMAIN_DISK_BUS_SATA: > +/* For SATA we define the default mapping to be 6 units > + * per bus, 1 bus per controller, many controllers */ > +def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE; > +def->info.addr.drive.controller = idx / 6; > +def->info.addr.drive.bus = 0; > +def->info.addr.drive.unit = idx % 6; > +break; > + > case VIR_DOMAIN_DISK_BUS_FDC: > /* For FDC we define the default mapping to be 2 units > * per bus, 1 bus per controller, many controllers */ > @@ -8675,6 +8684,11 @@ int virDomainDefAddImplicitControllers(virDomainDefPtr > def) >VIR_DOMAIN_DISK_BUS_IDE) < 0) > return -1; > > +if (virDomainDefAddDiskControllersForType(def, > + > VIR_DOMAIN_CONTROLLER_TYPE_SATA, > + VIR_DOMAIN_DISK_BUS_SATA) < 0) > +return -1; > + > if (virDomainDefMaybeAddVirtioSerialController(def) < 0) > return -1; > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > index 8e20e3f..7122756 100644 > --- a/src/qemu/qemu_capabilities.c > +++ b/src/qemu/qemu_capabilities.c > @@ -139,6 +139,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, >"no-shutdown", > >"cache-unsafe", /* 75 */ > + "ich9-ahci", > ); > > struct qemu_feature_flags { > @@ -1241,6 +1242,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr > flags) > qemuCapsSet(flags, QEMU_CAPS_USB_REDIR); > if (strstr(str, "name \"usb-hub\"")) > qemuCapsSet(flags, QEMU_CAPS_USB_HUB); > +if (strstr(str, "name \"ich9-ahci\"")) > +qemuCapsSet(flags, QEMU_CAPS_ICH9_AHCI); > > /* Prefer -chardev spicevmc (detected earlier) over -device spicevmc */ > if (!qemuCapsGet(flags, QE