Alex Bennée писал 2017-09-19 17:25:
Aleksandr Bezzubikov writes:
2017-09-19 12:30 GMT+03:00 Alex Bennée :
Pavel Dovgalyuk writes:
From: Aleksandr Bezzubikov [mailto:zuban...@gmail.com]
2017-09-18 15:02 GMT+03:00 Aleksandr Bezzubikov
:
> 2017-05-02 15:42 GMT+03:00 Igor R :
>> I'm try
2017-08-07 19:39 GMT+03:00 Marcel Apfelbaum :
> On 05/08/2017 23:27, Aleksandr Bezzubikov wrote:
>>
>> Introduce a new PCIExpress-to-PCI Bridge device,
>> which is a hot-pluggable PCI Express device and
>> supports devices hot-plug with SHPC.
>>
>
>
> Hi Aleksandr,
>
>> This device is intended to r
2017-08-07 18:52 GMT+03:00 Marcel Apfelbaum :
> On 05/08/2017 23:29, Aleksandr Bezzubikov wrote:
>>
>> On PCI init PCI bridge devices may need some
>> extra info about bus number to reserve, IO, memory and
>> prefetchable memory limits. QEMU can provide this
>> with special vendor-specific PCI capa
2017-08-04 23:28 GMT+03:00 Laszlo Ersek :
> On 08/04/17 20:59, Alexander Bezzubikov wrote:
>> 2017-08-01 20:28 GMT+03:00 Alexander Bezzubikov :
>>> 2017-08-01 16:38 GMT+03:00 Marcel Apfelbaum :
>>>> On 31/07/2017 22:01, Alexander Bezzubikov wrote:
>>>>&g
2017-08-01 20:28 GMT+03:00 Alexander Bezzubikov :
> 2017-08-01 16:38 GMT+03:00 Marcel Apfelbaum :
>> On 31/07/2017 22:01, Alexander Bezzubikov wrote:
>>>
>>> 2017-07-31 21:57 GMT+03:00 Michael S. Tsirkin :
>>>>
>>>> On Mon, Jul 31, 2
чт, 3 авг. 2017 г. в 15:52, Michael S. Tsirkin :
> On Sat, Jul 29, 2017 at 02:37:49AM +0300, Aleksandr Bezzubikov wrote:
> > Unmask previously masked SHPC feature in _OSC method.
> >
> > Signed-off-by: Aleksandr Bezzubikov
>
> This does not do what the subject says - it enables
> SHPC uncondition
2017-08-01 23:31 GMT+03:00 Laszlo Ersek :
> (Whenever my comments conflict with Michael's or Marcel's, I defer to them.)
>
> On 07/29/17 01:37, Aleksandr Bezzubikov wrote:
>> Signed-off-by: Aleksandr Bezzubikov
>> ---
>> docs/pcie.txt| 46 ++
>> docs/pcie_pci_bridge.t
2017-08-01 16:38 GMT+03:00 Marcel Apfelbaum :
> On 31/07/2017 22:01, Alexander Bezzubikov wrote:
>>
>> 2017-07-31 21:57 GMT+03:00 Michael S. Tsirkin :
>>>
>>> On Mon, Jul 31, 2017 at 09:54:55PM +0300, Alexander Bezzubikov wrote:
>>>>
>
2017-07-31 21:57 GMT+03:00 Michael S. Tsirkin :
> On Mon, Jul 31, 2017 at 09:54:55PM +0300, Alexander Bezzubikov wrote:
>> 2017-07-31 17:09 GMT+03:00 Marcel Apfelbaum :
>> > On 31/07/2017 17:00, Michael S. Tsirkin wrote:
>> >>
>> >> On Sat, Jul 29, 2017
> I personally like the simplicity of vendor cap per io/mem/bus,
> even if it is on the expense of the limited PCI Config space.
>
Personally I agree with Marcel since all this fields express
reservations of some objects.
> We need a consensus here :)
>
Absolutely :)
> Thanks,
> Marcel
>
>
>>
>>> +
>>> +*/
>>> +
>>> +/* Offset of vendor-specific capability type field */
>>> +#define PCI_CAP_VNDR_SPEC_TYPE 3
>>
>>
>> This is a QEMU specific thing. Please name it as such.
>>
>>> +
>>> +/* List of valid Red Hat vendor-specific capability types */
>>> +#define REDHAT_CAP_TYPE_QEMU1
>>> +
>>> +
>>> +/* Offsets of QEMU capability fields */
>>> +#define QEMU_PCI_CAP_NON_PREF 4
>>> +#define QEMU_PCI_CAP_BUS_RES6
>>> +#define QEMU_PCI_CAP_IO_8 7
>>> +#define QEMU_PCI_CAP_IO_32 8
>>> +#define QEMU_PCI_CAP_PREF_3212
>>> +#define QEMU_PCI_CAP_PREF_6416
>>> +#define QEMU_PCI_CAP_SIZE 24
>>> +
>>> +#endif /* _PCI_CAP_H */
>>> --
>>> 2.7.4
>
>
--
Alexander Bezzubikov
>OBJECT_GET_CLASS(PCIERootPortClass, (obj), TYPE_PCIE_ROOT_PORT)
>> +void rp_realize(PCIDevice *d, Error **errp);
>
>
> This is not how QEMU re-uses parent's realize function.
> You can grep for "parent_realize" in the project, it
> goes something like this:
> 1. You add "DeviceRealize parent_realize" to GenPCIERootPort class.
> 2. In class_init you save parent's realize and replace it with
> your own:
> grpc->parent_realize = dc->realize;
> dc->realize = gen_rp_realize;
> 3. In gen_rp_realize call first parent_realize:
> rpc->parent_realize(dev, errp);
> - your code here -
> if (err)
> rpc-> exit()
>
OK, this is really much more pretty.
> Thanks,
> Marcel
>
>
>> +
>> typedef struct PCIERootPortClass {
>> PCIDeviceClass parent_class;
>>
>
>
--
Alexander Bezzubikov
s
>uint32_t io_res
>uint32_t mem_res
>uint32_t pref_32_res
>uint64_t pref_64_res
>
In this version I've designed it just as Laszlo suggested -
whenever we have variable-size fields - like IO and prefetchable -
we use mutually exclusive fields.
I think now we should choose one common format and fix it for the future,
otherwise every next version it will cause new questions.
> It is possible I missed some arguments, I'll have another look
> on the thread.
>
> Thanks,
> Marcel
>
>
>
>> +} PCIBridgeQemuCap;
>> +
>> +#define REDHAT_PCI_CAP_QEMU 1
>> +
>> +int pci_bridge_qemu_cap_init(PCIDevice *dev, int cap_offset,
>> + uint8_t bus_reserve, uint32_t io_reserve,
>> + uint16_t mem_reserve, uint64_t
>> pref_reserve,
>> + Error **errp);
>> +
>> #endif /* QEMU_PCI_BRIDGE_H */
>>
>
--
Alexander Bezzubikov
lugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
>> +
>> +k->is_express = 1;
>> +k->is_bridge = 1;
>> +k->vendor_id = PCI_VENDOR_ID_REDHAT;
>> +k->device_id = PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE;
>> +k->realize = pciepci_bridge_realize;
>> +k->exit = pciepci_bridge_exit;
>> +k->config_write = pcie_pci_bridge_write_config;
>> +dc->vmsd = &pciepci_bridge_dev_vmstate;
>> +dc->props = pcie_pci_bridge_dev_properties;
>> +dc->vmsd = &pciepci_bridge_dev_vmstate;
>> +dc->reset = &pciepci_bridge_reset;
>> +set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
>> +hc->plug = pcie_pci_bridge_hotplug_cb;
>> +hc->unplug_request = pcie_pci_bridge_hot_unplug_request_cb;
>> +}
>> +
>> +static const TypeInfo pciepci_bridge_info = {
>> +.name = TYPE_PCIE_PCI_BRIDGE_DEV,
>> +.parent = TYPE_PCI_BRIDGE,
>> +.instance_size = sizeof(PCIEPCIBridge),
>> +.class_init = pciepci_bridge_class_init,
>> +.interfaces = (InterfaceInfo[]) {
>> +{ TYPE_HOTPLUG_HANDLER },
>> +{ },
>> +}
>> +};
>> +
>> +static void pciepci_register(void)
>> +{
>> +type_register_static(&pciepci_bridge_info);
>> +}
>> +
>> +type_init(pciepci_register);
>> diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
>> index e598b09..b33a34f 100644
>> --- a/include/hw/pci/pci.h
>> +++ b/include/hw/pci/pci.h
>> @@ -98,6 +98,7 @@
>> #define PCI_DEVICE_ID_REDHAT_PXB_PCIE0x000b
>> #define PCI_DEVICE_ID_REDHAT_PCIE_RP 0x000c
>> #define PCI_DEVICE_ID_REDHAT_XHCI0x000d
>> +#define PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE 0x000e
>> #define PCI_DEVICE_ID_REDHAT_QXL 0x0100
>> #define FMT_PCIBUS PRIx64
>>
>
> Other than the comments above the implementation
> looks good to me.
>
> Thanks,
> Marcel
>
--
Alexander Bezzubikov
gister is 16 bits long.
>> +uint16_t io_lim_upper;
>> + uint8_t io_lim;
>> +uint8_t padding;
>
> IMHO each type should have a special "don't care" flag
> that would mean "I don't know".
>
>
Don't know what? Now 0 is an indicator to do nothing with this field.
>> +} PCIBridgeQemuCap;
>
> You don't really need this struct in the header. And pls document all fields.
>
>> +
>> +int pci_bridge_help_cap_init(PCIDevice *dev, int cap_offset,
>> + uint8_t bus_reserve, uint32_t io_limit,
>> + uint16_t mem_limit, uint64_t pref_limit,
>> + Error **errp);
>> +
>> #endif /* QEMU_PCI_BRIDGE_H */
>> --
>> 2.7.4
--
Alexander Bezzubikov
вт, 25 июля 2017 г. в 19:10, Marcel Apfelbaum :
> On 25/07/2017 17:09, Alexander Bezzubikov wrote:
> > 2017-07-25 16:53 GMT+03:00 Michael S. Tsirkin :
> >> On Tue, Jul 25, 2017 at 04:50:49PM +0300, Alexander Bezzubikov wrote:
> >>> 2017-07-25 16:43 GMT+03:00 Mich
2017-07-25 16:53 GMT+03:00 Michael S. Tsirkin :
> On Tue, Jul 25, 2017 at 04:50:49PM +0300, Alexander Bezzubikov wrote:
>> 2017-07-25 16:43 GMT+03:00 Michael S. Tsirkin :
>> > On Sun, Jul 23, 2017 at 05:13:11PM +0300, Marcel Apfelbaum wrote:
>> >> On 23/07/2017 1
lude/hw/pci/pcie_port.h
>> > > @@ -34,6 +34,9 @@ struct PCIEPort {
>> > > /* pci express switch port */
>> > > uint8_t port;
>> > > +
>> > > +/* additional buses to reserve on firmware init */
>> > > +uint8_t bus_reserve;
>> > > };
>> > > void pcie_port_init_reg(PCIDevice *d);
>> >
>> > So here is a property and it does not do anything.
>> > It makes it easier to work on series maybe, but review
>> > is harder since we do not see what it does at all.
>> > Please do not split up patches like this - you can maintain
>> > it split up in your branch if you like and merge before sending.
>> >
>>
>> Agreed, Alexandr please merge patches 4-5-6 for your next submission.
>>
>> Thanks,
>> Marcel
>>
>>
>> > > --
>> > > 2.7.4
--
Alexander Bezzubikov
e types,
>need to disable for these
>
Actually the original idea was to add it for pcie-root-port excusively
(for now at least), looks like I've confused a little with files naming.
Will add it for v3.
>> --
>> 2.7.4
--
Alexander Bezzubikov
cie_port.h
>> > > +++ b/include/hw/pci/pcie_port.h
>> > > @@ -34,6 +34,9 @@ struct PCIEPort {
>> > > /* pci express switch port */
>> > > uint8_t port;
>> > > +
>> > > +/* additional buses to reserve on firmware init */
>> > > +uint8_t bus_reserve;
>> > > };
>> > > void pcie_port_init_reg(PCIDevice *d);
>> >
>> > So here is a property and it does not do anything.
>> > It makes it easier to work on series maybe, but review
>> > is harder since we do not see what it does at all.
>> > Please do not split up patches like this - you can maintain
>> > it split up in your branch if you like and merge before sending.
>> >
>>
>> Agreed, Alexandr please merge patches 4-5-6 for your next submission.
>>
>> Thanks,
>> Marcel
>>
>>
>> > > --
>> > > 2.7.4
--
Alexander Bezzubikov
2017-07-24 12:42 GMT+03:00 Gerd Hoffmann :
> On Sun, 2017-07-23 at 22:44 +0300, Alexander Bezzubikov wrote:
> > By the way, any ideas on how to avoid 'bus overstealing' would
> > be greatly appreciated.
> > Static BIOS variable isn't applicable since its
By the way, any ideas on how to avoid 'bus overstealing' would
be greatly appreciated.
Static BIOS variable isn't applicable since its value isn't saved across
reboots.
2017-07-23 19:43 GMT+03:00 Alexander Bezzubikov :
> 2017-07-23 5:49 GMT+03:00 Michael S. Tsirkin :
>
-aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl));
>> +aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1F), a_ctrl));
>> if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1;
>> /* Unknown revision */
>>
>>
>
--
Alexander Bezzubikov
src/fw/ directory instead of src/hw/. Also, I'd prefer to avoid a
> "pci_" prefix on the header as it makes it seem similar to the
> existing pci_regs.h and pci_ids.h headers which are a bit different -
> how about src/fw/dev-pci.h instead?
>
> -Kevin
>
No objections, Will do that in v3.
Except 'pci_' prefix - it's still a PCI capability, isn't it?
--
Alexander Bezzubikov
-subbus = *pci_bus;
> > +subbus, *pci_bus + res_bus);
> > +subbus = *pci_bus + res_bus;
>
> So you take all present devices and add reserved ones - is that it?
> If so it looks like this will steal extra buses each time you
> add a child bus and reboot.
>
You're right, such problem persists. Will think on what can be done here.
>
>
> > } else {
> > dprintf(1, "PCI: subordinate bus = 0x%x\n", subbus);
> > }
> > --
> > 2.7.4
>
--
Alexander Bezzubikov
e need io_lim and io_lim_upper?
>
The idea was to be able to directly move the capability fields values
to the registers when actually using it (in firmware) code.
Secondly, it saves a little space by avoding usage 32-bit types
when 24-bit ones are desired. And the same thing with prefetchable (48->64).
But if it's more convenient no to split this value, I can do that.
>
> Thanks,
> Marcel
>
>
> +uint8_t padding;
>> +} PCIBridgeQemuCap;
>> +
>> +int pci_bridge_help_cap_init(PCIDevice *dev, int cap_offset,
>> + uint8_t bus_reserve, uint32_t io_limit,
>> + uint16_t mem_limit, uint64_t pref_limit,
>> + Error **errp);
>> +
>> #endif /* QEMU_PCI_BRIDGE_H */
>>
>>
>
--
Alexander Bezzubikov
in the next version.
>
> > +u8 bus_res;
> > +u32 pref_lim_upper;
> > +u16 pref_lim;
> > +u16 mem_lim;
> > +u16 io_lim_upper;
> > +u8 io_lim;
> > +u8 padd;
>
> Please add documentation.
>
>
> > +};
> > +
> > +#endif /* _PCI_CAP_H */
> > --
> > 2.7.4
>
--
Alexander Bezzubikov
2017-07-19 21:18 GMT+03:00 Konrad Rzeszutek Wilk :
> On Wed, Jul 19, 2017 at 05:14:41PM +0000, Alexander Bezzubikov wrote:
> > ср, 19 июля 2017 г. в 16:57, Konrad Rzeszutek Wilk <
> konrad.w...@oracle.com>:
> >
> > > On Wed, Jul 19, 2017 at 04:20:12PM
> > pci: add support for direct usage of bdf for capability lookup
> > pci: enable RedHat pci bridges to reserve more buses
> >
> > src/fw/pciinit.c | 12 ++--
> > src/hw/pcidevice.c | 24 ++++
> > src/hw/pcidevice.h | 1 +
> > 3 files changed, 35 insertions(+), 2 deletions(-)
> >
> > --
> > 2.7.4
> >
> >
>
--
Alexander Bezzubikov
2017 г. в 1:06, Alexander Bezzubikov :
> Tried it on Win7 Enterprise SP1 - SHPC works well, _OSC patches aren't
> necessary (since pci-bridge has its own controller, I suppose).
> On Linux guests it works when adding device from CLI with -device, but OS
> seems to fail detecti
tandard Hot-Plug Controller
> > > (SHPC) hot plug. If the OS successfully receives control of this
> feature, it must track and
> > > update the status of hot plug slots and handle hot plug events as
> described in the SHPC
> > > Specification.
> > > I was under impression they only set bit 0.
> > >
> >
> > Alexandr, if modern Windows OSes do support shpc, it makes our
> > job easier, can you please try to enable shpc hotplug?
> >
> > Thanks,
> > Marcel
>
> No need to enable or even have a bridge for that at all -
> set the bit in _OSC, see what does guest enable.
>
--
Alexander Bezzubikov
o keep acpi tables for bridges).
>>
>> So I'm in favor of Michael's suggestion to leave ACPI PCI
>> only in PC machine for old WinXP guests and to keep Q35
>> clean, where linux or newer Windows guests could just
>> use standard SHPC.
>>
>> [...]
>>
>
>
>
> --
> Alexander Bezzubikov
>
--
Alexander Bezzubikov
t; only in PC machine for old WinXP guests and to keep Q35
> clean, where linux or newer Windows guests could just
> use standard SHPC.
>
> [...]
>
--
Alexander Bezzubikov
tains nothing about
this insertion.
Thanks
--
Alexander Bezzubikov
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.h | 9 +
hw/ide/internal.h | 4 +++-
hw/ide/qdev.c | 41 +
3 files changed, 53 insertions(+), 1 deletion(-)
create mode 100644 hw/ide/bridge.h
diff --git a/hw/ide/bridge.h b/hw/ide
hw/ide/qdev.c: corrected to treat bridge as CDROM
hw/ide/core.c: same corrections as in qdev.c
hw/ide/ahci.c: same corrections as in qdev.c
hw/ide/atapi.c: skip some CDROM checks because bridge has only fake drive
Signed-off-by: Alexander Bezzubikov
---
hw/ide/ahci.c | 6 --
hw/ide
Signed-off-by: Alexander Bezzubikov
---
hw/scsi/scsi-disk.c| 12
include/hw/scsi/scsi.h | 13 +
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index bada9a7..68ff09a 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw
This patch is necessary because ATAPI-SCSI bridge transfer uses
ide_transfer_start/stop and ide_data_read function check if
PIO transfer is running, so bridge function should be added
to this check
Signed-off-by: Alexander Bezzubikov
---
hw/ide/core.c | 4 +++-
1 file changed, 3 insertions
ide: bridge functions created
ide: Makefile corrected due to bridge creation
scsi: added function to enable bridge send SCSI requests
ide: bridge can now forward requests to SCSI
ide: bridge functions assigned to SCSIBusInfo
Signed-off-by: Alexander Bezzubikov
---
hw/ide/Makefile.objs | 2
necke
Changelog:
v2: reduced amount of patches, some patches merged with each other
v3: order of patches changes for successful compilation after every patch
v4: SCSIRequest * in IDEState renamed to scsi_req
v5: checks for treating bridge as CDROM added to ACHI code
Alexander Bezzubikov (5):
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.h | 9 +
hw/ide/internal.h | 4 +++-
hw/ide/qdev.c | 41 +
3 files changed, 53 insertions(+), 1 deletion(-)
create mode 100644 hw/ide/bridge.h
diff --git a/hw/ide/bridge.h b/hw/ide
hw/ide/qdev.c: corrected to treat bridge as CDROM
hw/ide/core.c: same corrections as in qdev.c
hw/ide/atapi.c: skip some CDROM checks because bridge has only fake drive
Signed-off-by: Alexander Bezzubikov
---
hw/ide/atapi.c | 4 +++-
hw/ide/core.c | 24 ++--
hw/ide
e for parsing and execution.
Example of using:
qemu-system-x86_64 \
-drive if=none,file=,id=cdrom \
-drive if=none,id=fake \
-device ide-bridge,id=bridge,drive=fake \
-device scsi-cd,drive=cdrom,bus=bridge.0 \
-hda diskimage \
-m 1024
Alexander Bezzubik
Signed-off-by: Alexander Bezzubikov
---
hw/scsi/scsi-disk.c| 12
include/hw/scsi/scsi.h | 13 +
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 64f0694..8626eba 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw
This patch is necessary because ATAPI-SCSI bridge transfer uses
ide_transfer_start/stop and ide_data_read function check if
PIO transfer is running, so bridge function should be added
to this check
Signed-off-by: Alexander Bezzubikov
---
hw/ide/core.c | 4 +++-
1 file changed, 3 insertions
ide: bridge functions created
ide: Makefile corrected due to bridge creation
scsi: added function to enable bridge send SCSI requests
ide: bridge can now forward requests to SCSI
ide: bridge functions assigned to SCSIBusInfo
Signed-off-by: Alexander Bezzubikov
---
hw/ide/Makefile.objs | 2
ide: bridge functions created
ide: Makefile corrected due to bridge creation
scsi: added function to enable bridge send SCSI requests
ide: bridge can now forward requests to SCSI
ide: bridge functions assigned to SCSIBusInfo
Signed-off-by: Alexander Bezzubikov
---
hw/ide/Makefile.objs | 2
hw/ide/qdev.c: corrected to treat bridge as CDROM
hw/ide/core.c: same corrections as in qdev.c
hw/ide/atapi.c: skip some CDROM checks because bridge has only fake drive
Signed-off-by: Alexander Bezzubikov
---
hw/ide/atapi.c | 4 +++-
hw/ide/core.c | 24 ++--
hw/ide
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.h | 9 +
hw/ide/internal.h | 4 +++-
hw/ide/qdev.c | 41 +
3 files changed, 53 insertions(+), 1 deletion(-)
create mode 100644 hw/ide/bridge.h
diff --git a/hw/ide/bridge.h b/hw/ide
Signed-off-by: Alexander Bezzubikov
---
hw/scsi/scsi-disk.c| 12
include/hw/scsi/scsi.h | 13 +
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 64f0694..8626eba 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw
e for parsing and execution.
Example of using:
qemu-system-x86_64 \
-drive if=none,file=,id=cdrom \
-drive if=none,id=fake \
-device ide-bridge,id=bridge,drive=fake \
-device scsi-cd,drive=cdrom,bus=bridge.0 \
-hda diskimage \
-m 1024
Alexander Bezzubik
This patch is necessary because ATAPI-SCSI bridge transfer uses
ide_transfer_start/stop and ide_data_read function check if
PIO transfer is running, so bridge function should be added
to this check
Signed-off-by: Alexander Bezzubikov
---
hw/ide/core.c | 4 +++-
1 file changed, 3 insertions
This patch is necessary because ATAPI-SCSI bridge transfer uses
ide_transfer_start/stop and ide_data_read function check if
PIO transfer is running, so bridge function should be added
to this check
Signed-off-by: Alexander Bezzubikov
---
hw/ide/core.c | 4 +++-
1 file changed, 3 insertions
hw/ide/qdev.c: corrected to treat bridge as CDROM
hw/ide/core.c: same corrections as in qdev.c
hw/ide/atapi.c: skip some CDROM checks because bridge has only fake drive
Signed-off-by: Alexander Bezzubikov
---
hw/ide/atapi.c | 4 +++-
hw/ide/core.c | 24 ++--
hw/ide
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.h | 9 +
hw/ide/internal.h | 4 +++-
hw/ide/qdev.c | 41 +
3 files changed, 53 insertions(+), 1 deletion(-)
create mode 100644 hw/ide/bridge.h
diff --git a/hw/ide/bridge.h b/hw/ide
ide: bridge functions created
ide: Makefile corrected due to bridge creation
scsi: added function to enable bridge send SCSI requests
ide: bridge can now forward requests to SCSI
ide: bridge functions assigned to SCSIBusInfo
Signed-off-by: Alexander Bezzubikov
---
hw/ide/Makefile.objs | 2
Signed-off-by: Alexander Bezzubikov
---
hw/scsi/scsi-disk.c| 12
include/hw/scsi/scsi.h | 13 +
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index f67d816..9d5f0a4 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw
e for parsing and execution.
Example of using:
qemu-system-x86_64 \
-drive if=none,file=,id=cdrom \
-drive if=none,id=fake \
-device ide-bridge,id=bridge,drive=fake \
-device scsi-cd,drive=cdrom,bus=bridge.0 \
-hda diskimage \
-m 1024
Alexander Bezzubik
Signed-off-by: Alexander Bezzubikov
---
hw/ide/qdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 63090cc..773a587 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -150,8 +150,8 @@ static const struct SCSIBusInfo atapi_scsi_info
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.c | 2 +-
hw/ide/bridge.h | 1 +
hw/ide/core.c | 4 +++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/ide/bridge.c b/hw/ide/bridge.c
index 3a534de..4a5251b 100644
--- a/hw/ide/bridge.c
+++ b/hw/ide/bridge.c
@@ -1,6 +1,6
Signed-off-by: Alexander Bezzubikov
---
hw/ide/core.c | 24 ++--
hw/ide/qdev.c | 2 +-
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 50449ca..d017d4e 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -348,7 +348,7
Signed-off-by: Alexander Bezzubikov
---
hw/ide/atapi.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 6e73910..896f595 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -1230,7 +1230,8 @@ void ide_atapi_cmd(IDEState
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.c | 114
1 file changed, 114 insertions(+)
create mode 100644 hw/ide/bridge.c
diff --git a/hw/ide/bridge.c b/hw/ide/bridge.c
new file mode 100644
index 000..3a534de
--- /dev/null
Signed-off-by: Alexander Bezzubikov
---
hw/ide/Makefile.objs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
index 729e9bd..f54f275 100644
--- a/hw/ide/Makefile.objs
+++ b/hw/ide/Makefile.objs
@@ -1,4 +1,4 @@
-common-obj
e for parsing and execution.
Example of using:
qemu-system-x86_64 \
-drive if=none,file=,id=cdrom \
-drive if=none,id=fake \
-device ide-bridge,id=bridge,drive=fake \
-device scsi-cd,drive=cdrom,bus=bridge.0 \
-hda diskimage \
-m 1024
Alexander Bezzubiko
Signed-off-by: Alexander Bezzubikov
---
hw/ide/internal.h | 2 +-
hw/scsi/scsi-disk.c| 43 +++
include/hw/scsi/scsi.h | 3 +++
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 3ebc63c
Signed-off-by: Alexander Bezzubikov
---
hw/ide/internal.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index f2999ce..3ebc63c 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -429,6 +429,8 @@ struct IDEState {
uint8_t
Signed-off-by: Alexander Bezzubikov
---
hw/ide/atapi.c | 16
1 file changed, 16 insertions(+)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 79dd167..6e73910 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -1257,5 +1257,21 @@ void ide_atapi_cmd(IDEState *s
Signed-off-by: Alexander Bezzubikov
---
hw/ide/bridge.h | 9 +
hw/ide/internal.h | 3 ++-
hw/ide/qdev.c | 40
3 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 hw/ide/bridge.h
diff --git a/hw/ide/bridge.h b/hw/ide
Signed-off-by: Alexander Bezzubikov
---
hw/scsi/scsi-disk.c| 12
include/hw/scsi/scsi.h | 13 +
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index f67d816..9d5f0a4 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw
atapi: ATAPI-SCSI bridge device created
private SCSI bus added to bridge
ATAPI inquiry command can use a bridge
---
hw/ide/atapi.c | 36 +--
hw/ide/core.c | 207 +++
hw/ide/internal.h | 257 +--
70 matches
Mail list logo